mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 11:28:18 +00:00
Renamed components so they don't all have the annoying discourse- prefix
This commit is contained in:
parent
3a8bc60bf2
commit
20e4a2ef80
@ -1,12 +1,12 @@
|
||||
/**
|
||||
This view is used for rendering a basic list of topics.
|
||||
|
||||
@class BasicTopicListView
|
||||
@class BasicTopicListComponent
|
||||
@extends Discourse.View
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DiscourseBasicTopicListComponent = Ember.Component.extend({
|
||||
Discourse.BasicTopicListComponent = Ember.Component.extend({
|
||||
|
||||
loaded: function() {
|
||||
var topicList = this.get('topicList');
|
||||
|
@ -1,12 +1,12 @@
|
||||
/**
|
||||
A breadcrumb including category drop downs
|
||||
|
||||
@class DiscourseBreadcrumbsComponent
|
||||
@class BreadCrumbsComponent
|
||||
@extends Ember.Component
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DiscourseBreadcrumbsComponent = Ember.Component.extend({
|
||||
Discourse.BreadCrumbsComponent = Ember.Component.extend({
|
||||
classNames: ['category-breadcrumb'],
|
||||
tagName: 'ol',
|
||||
parentCategory: Em.computed.alias('category.parentCategory'),
|
@ -1,12 +1,12 @@
|
||||
/**
|
||||
Renders a drop down for selecting a category
|
||||
|
||||
@class DiscourseCategorydropComponent
|
||||
@class CategoryDropComponent
|
||||
@extends Ember.Component
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DiscourseCategorydropComponent = Ember.Component.extend({
|
||||
Discourse.CategoryDropComponent = Ember.Component.extend({
|
||||
classNameBindings: ['category::no-category', 'categories:has-drop'],
|
||||
tagName: 'li',
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Discourse.DiscourseLogoComponent = Ember.Component.extend({
|
||||
Discourse.HomeLogoComponent = Ember.Component.extend({
|
||||
|
||||
linkUrl: function() {
|
||||
return Discourse.getURL("/");
|
@ -1,13 +1,13 @@
|
||||
/**
|
||||
The controls at the top of a private message in the map area.
|
||||
|
||||
@class DiscoursePrivateMessageMapComponent
|
||||
@class PrivateMessageMapComponent
|
||||
@extends Ember.Component
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DiscoursePrivateMessageMapComponent = Ember.Component.extend({
|
||||
templateName: 'components/discourse-private-message-map',
|
||||
Discourse.PrivateMessageMapComponent = Ember.Component.extend({
|
||||
templateName: 'components/private-message-map',
|
||||
tagName: 'section',
|
||||
classNames: ['information'],
|
||||
postStream: Em.computed.alias('topic.postStream'),
|
||||
|
@ -1,12 +1,12 @@
|
||||
/**
|
||||
Renders a heading for a table with optional sorting controls.
|
||||
|
||||
@class DiscourseHeadingComponent
|
||||
@class SortableHeadingComponent
|
||||
@extends Ember.Component
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DiscourseHeadingComponent = Ember.Component.extend({
|
||||
Discourse.SortableHeadingComponent = Ember.Component.extend({
|
||||
tagName: 'th',
|
||||
classNameBindings: ['number:num', 'sortBy', 'iconSortClass:sorting', 'sortable:sortable'],
|
||||
attributeBindings: ['colspan'],
|
@ -1,13 +1,13 @@
|
||||
/**
|
||||
The controls for toggling the summarized view on/off
|
||||
|
||||
@class DiscourseToggleSummaryComponent
|
||||
@class ToggleSummaryComponent
|
||||
@extends Ember.Component
|
||||
@namespace Discourse
|
||||
@module Discourse
|
||||
**/
|
||||
Discourse.DiscourseToggleSummaryComponent = Ember.Component.extend({
|
||||
templateName: 'components/discourse-toggle-summary',
|
||||
Discourse.ToggleSummaryComponent = Ember.Component.extend({
|
||||
templateName: 'components/toggle-summary',
|
||||
tagName: 'section',
|
||||
classNames: ['information'],
|
||||
postStream: Em.computed.alias('topic.postStream'),
|
||||
|
@ -11,7 +11,7 @@ var LINKS_SHOWN = 5;
|
||||
|
||||
Discourse.DiscourseTopicMapComponent = Ember.Component.extend({
|
||||
mapCollapsed: true,
|
||||
templateName: 'components/discourse-topic-map',
|
||||
templateName: 'components/topic-map',
|
||||
details: Em.computed.alias('topic.details'),
|
||||
allLinksShown: false,
|
||||
|
||||
|
@ -2,24 +2,24 @@
|
||||
{{#if topics}}
|
||||
<table id="topic-list">
|
||||
<tr>
|
||||
{{#discourse-heading sortBy="default" sortOrder=sortOrder}}
|
||||
{{#sortable-heading sortBy="default" sortOrder=sortOrder}}
|
||||
{{i18n topic.title}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="category" sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="category" sortOrder=sortOrder}}
|
||||
{{i18n category_title}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="posts" number=true sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="posts" number=true sortOrder=sortOrder}}
|
||||
{{i18n posts}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="likes" number=true sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="likes" number=true sortOrder=sortOrder}}
|
||||
{{i18n likes}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="views" number=true sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="views" number=true sortOrder=sortOrder}}
|
||||
{{i18n views}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="activity" number=true colspan="2" sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="activity" number=true colspan="2" sortOrder=sortOrder}}
|
||||
{{i18n activity}}
|
||||
{{/discourse-heading}}
|
||||
{{/sortable-heading}}
|
||||
</tr>
|
||||
|
||||
{{#groupedEach topic in topics}}
|
@ -0,0 +1,11 @@
|
||||
<li>
|
||||
{{category-drop category=firstCategory categories=parentCategories}}
|
||||
</li>
|
||||
|
||||
{{#if childCategories}}
|
||||
<li>
|
||||
{{category-drop category=secondCategory parentCategory=firstCategory categories=childCategories subCategory="true"}}
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
<div class='clear'></div>
|
@ -1,11 +0,0 @@
|
||||
<li>
|
||||
{{discourse-categorydrop category=firstCategory categories=parentCategories}}
|
||||
</li>
|
||||
|
||||
{{#if childCategories}}
|
||||
<li>
|
||||
{{discourse-categorydrop category=secondCategory parentCategory=firstCategory categories=childCategories subCategory="true"}}
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
<div class='clear'></div>
|
@ -41,14 +41,14 @@
|
||||
{{number details.links.length}}
|
||||
</li>
|
||||
<li {{bindAttr class=":avatars mapCollapsed::hidden"}}>
|
||||
{{#groupedEach participant in details.fewParticipants}}{{discourse-topic-participant participant=participant}}{{/groupedEach}}
|
||||
{{#groupedEach participant in details.fewParticipants}}{{topic-participant participant=participant}}{{/groupedEach}}
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{{#unless mapCollapsed}}
|
||||
<section class='avatars clearfix'>
|
||||
{{#groupedEach participant in details.participants}}{{discourse-topic-participant participant=participant}}{{/groupedEach}}
|
||||
{{#groupedEach participant in details.participants}}{{topic-participant participant=participant}}{{/groupedEach}}
|
||||
</section>
|
||||
|
||||
{{#if infoLinks}}
|
@ -1,7 +1,7 @@
|
||||
<div class='container'>
|
||||
<div class='contents clearfix'>
|
||||
|
||||
{{discourse-logo minimized=showExtraInfo}}
|
||||
{{home-logo minimized=showExtraInfo}}
|
||||
|
||||
{{#if showExtraInfo}}
|
||||
<div class="extra-info-wrapper">
|
||||
@ -133,7 +133,7 @@
|
||||
|
||||
{{#each categories}}
|
||||
<li class='category'>
|
||||
{{discourse-header-category-info category=this currentUser=controller.currentUser}}
|
||||
{{header-category-info category=this currentUser=controller.currentUser}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class='list-controls'>
|
||||
<div class="container">
|
||||
|
||||
{{discourse-breadcrumbs category=category categories=categories}}
|
||||
{{bread-crumbs category=category categories=categories}}
|
||||
|
||||
<ul class="nav nav-pills" id='category-filter'>
|
||||
{{each availableNavItems itemViewClass="Discourse.NavItemView"}}
|
||||
@ -28,7 +28,7 @@
|
||||
<div class="row">
|
||||
<div class="full-width">
|
||||
<div id='list-area'>
|
||||
{{discourse-topic-list-loading loading=loading}}
|
||||
{{topic-list-loading loading=loading}}
|
||||
{{outlet listView}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{discourse-topic-list-loading loading=topicListReloading}}
|
||||
{{topic-list-loading loading=topicListReloading}}
|
||||
|
||||
{{#unless loading}}
|
||||
{{#if loaded}}
|
||||
@ -18,29 +18,29 @@
|
||||
{{#if currentUser}}
|
||||
<th> </th>
|
||||
{{/if}}
|
||||
{{#discourse-heading sortBy="default" sortOrder=sortOrder}}
|
||||
{{#sortable-heading sortBy="default" sortOrder=sortOrder}}
|
||||
{{i18n topic.title}}
|
||||
{{/discourse-heading}}
|
||||
{{/sortable-heading}}
|
||||
{{#unless category}}
|
||||
{{#discourse-heading sortBy="category" sortOrder=sortOrder}}
|
||||
{{#sortable-heading sortBy="category" sortOrder=sortOrder}}
|
||||
{{i18n category_title}}
|
||||
{{/discourse-heading}}
|
||||
{{/sortable-heading}}
|
||||
{{/unless}}
|
||||
{{#discourse-heading sortBy="posters" sortOrder=sortOrder}}
|
||||
{{#sortable-heading sortBy="posters" sortOrder=sortOrder}}
|
||||
{{i18n participants}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="posts" number=true sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="posts" number=true sortOrder=sortOrder}}
|
||||
{{i18n posts}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="likes" number=true sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="likes" number=true sortOrder=sortOrder}}
|
||||
{{i18n likes}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="views" number=true sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="views" number=true sortOrder=sortOrder}}
|
||||
{{i18n views}}
|
||||
{{/discourse-heading}}
|
||||
{{#discourse-heading sortBy="activity" number=true colspan="2" sortOrder=sortOrder}}
|
||||
{{/sortable-heading}}
|
||||
{{#sortable-heading sortBy="activity" number=true colspan="2" sortOrder=sortOrder}}
|
||||
{{i18n activity}}
|
||||
{{/discourse-heading}}
|
||||
{{/sortable-heading}}
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
@ -1 +1 @@
|
||||
{{discourse-basic-topic-list topicList=model}}
|
||||
{{basic-topic-list topicList=model}}
|
||||
|
@ -85,7 +85,7 @@
|
||||
<div id='suggested-topics'>
|
||||
<h3>{{i18n suggested_topics.title}}</h3>
|
||||
<div class='topics'>
|
||||
{{discourse-basic-topic-list topics=details.suggested_topics}}
|
||||
{{basic-topic-list topics=details.suggested_topics}}
|
||||
</div>
|
||||
<br/>
|
||||
<h3>{{{view.browseMoreMessage}}}</h3>
|
||||
|
@ -1,7 +1,7 @@
|
||||
var view, oldMobileView;
|
||||
|
||||
var View = Ember.View.extend({
|
||||
template: Ember.Handlebars.compile("{{discourse-logo minimized=view.minimized}}")
|
||||
template: Ember.Handlebars.compile("{{home-logo minimized=view.minimized}}")
|
||||
});
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ var appendView = function() {
|
||||
};
|
||||
|
||||
|
||||
module("Discourse.DiscourseLogoComponent", {
|
||||
module("Discourse.HomeLogoComponent", {
|
||||
setup: function() {
|
||||
oldMobileView = Discourse.Mobile.mobileView;
|
||||
view = View.create();
|
||||
|
Loading…
x
Reference in New Issue
Block a user