-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove remaining code for two-column categories page
- Loading branch information
Showing
16 changed files
with
122 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 111 additions & 8 deletions
119
app/assets/javascripts/discourse/templates/list/categories.js.handlebars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,111 @@ | ||
<section class="category-column first"> | ||
{{each categoriesEven itemViewClass="Discourse.FeaturedTopicsView"}} | ||
</section> | ||
<section class="category-column"> | ||
{{each categoriesOdd itemViewClass="Discourse.FeaturedTopicsView"}} | ||
</section> | ||
|
||
<div class='clearfix'></div> | ||
<div class='contents'> | ||
|
||
<table id='topic-list' class='categories'> | ||
<thead> | ||
<tr> | ||
<th class='category'>{{i18n categories.category}}</th> | ||
<th class='latest'>{{i18n categories.latest}}</th> | ||
<th class='stats topics'>{{i18n categories.topics}}</th> | ||
<th class='stats posts'>{{i18n categories.posts}} | ||
{{#if canEdit}} | ||
<button title='{{i18n categories.toggle_ordering}}' class='btn toggle-admin no-text' {{action toggleOrdering}}><i class='fa fa-wrench'></i></button> | ||
{{/if}} | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{#each model.categories}} | ||
<tr data-category_id='{{unbound id}}' {{bindAttr class="description_excerpt:has-description:no-description"}}> | ||
<td class='category'> | ||
<div> | ||
<div class="pull-left"> | ||
{{#if controller.ordering}} | ||
<i class="fa fa-bars"></i> | ||
{{/if}} | ||
{{categoryLink this allowUncategorized=true}} | ||
{{#if unreadTopics}} | ||
<a href={{unbound unreadUrl}} class='badge new-posts badge-notification' title='{{i18n topic.unread_topics count="unreadTopics"}}'>{{unbound unreadTopics}}</a> | ||
{{/if}} | ||
{{#if newTopics}} | ||
<a href={{unbound newUrl}} class='badge new-posts badge-notification' title='{{i18n topic.new_topics count="newTopics"}}'>{{unbound newTopics}} <i class='fa fa-asterisk'></i></a> | ||
{{/if}} | ||
</div> | ||
<div class='featured-users'> | ||
{{#each featured_users}} | ||
<a href="/users/{{unbound username_lower}}">{{avatar this imageSize="small"}}</a> | ||
{{/each}} | ||
</div> | ||
<div class="clearfix"></div> | ||
</div> | ||
{{#if description_excerpt}} | ||
<div class="category-description"> | ||
{{{description_excerpt}}} | ||
</div> | ||
{{/if}} | ||
|
||
{{#if subcategories}} | ||
<div class='subcategories'> | ||
{{i18n categories.subcategories}} | ||
{{#each subcategory in subcategories}} | ||
{{categoryLink subcategory}} | ||
{{/each}} | ||
</div> | ||
{{/if}} | ||
</td> | ||
<td {{bindAttr class="archived :latest"}}> | ||
{{#each featuredTopics}} | ||
<div class="featured-topic"> | ||
{{topicStatus topic=this}} | ||
<a class='title' href="{{unbound lastUnreadUrl}}">{{{unbound fancy_title}}}</a> | ||
{{#if unread}} | ||
<a href="{{unbound lastUnreadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts count="unread"}}'>{{unread}}</a> | ||
{{/if}} | ||
{{#if new_posts}} | ||
<a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts count="new_posts"}}'>{{new_posts}}</a> | ||
{{/if}} | ||
{{#if unseen}} | ||
<a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new}}'><i class='fa fa-asterisk'></i></a> | ||
{{/if}} | ||
|
||
{{#if controller.latestTopicOnly}} | ||
<div class='last-user-info'> | ||
{{i18n categories.latest_by}} <a href="{{{unbound lastPosterUrl}}}">{{unbound last_poster.username}}</a> | ||
<a href="{{unbound lastPostUrl}}">{{unboundAge last_posted_at}}</a> | ||
</div> | ||
{{else}} | ||
| ||
<a href="{{unbound lastPostUrl}}" class="last-posted-at">{{unboundAge last_posted_at}}</a> | ||
{{/if}} | ||
</div> | ||
{{/each}} | ||
</td> | ||
<td class='stats' {{bindAttr title="topicStatsTitle"}}> | ||
<table class="categoryStats"> | ||
{{#each topicCountStats}} | ||
<tr> | ||
<td class="value">{{value}}</td> | ||
<td class="unit">{{unit}}</td> | ||
</tr> | ||
{{/each}} | ||
</table> | ||
</td> | ||
<td class='stats' {{bindAttr title="postStatsTitle"}}> | ||
<table class="categoryStats"> | ||
{{#each postCountStats}} | ||
<tr> | ||
<td class="value">{{value}}</td> | ||
<td class="unit">{{unit}}</td> | ||
</tr> | ||
{{/each}} | ||
</table> | ||
</td> | ||
</tr> | ||
{{/each}} | ||
</tbody> | ||
|
||
</table> | ||
</div> | ||
|
||
<footer id='topic-list-bottom'> | ||
</footer> | ||
|
111 changes: 0 additions & 111 deletions
111
app/assets/javascripts/discourse/templates/list/wide_categories.js.handlebars
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...e/views/list/list_wide_categories_view.js → ...course/views/list/list_categories_view.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
db/migrate/20140107220141_remove_enable_wide_category_list.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class RemoveEnableWideCategoryList < ActiveRecord::Migration | ||
def up | ||
execute "DELETE FROM site_settings WHERE name = 'enable_wide_category_list'" | ||
end | ||
|
||
def down | ||
# Nothing. Default site setting value will be used. | ||
end | ||
end |