FIX: display old category style on mobile
This commit is contained in:
parent
c9422462be
commit
1d7df97c30
|
@ -13,7 +13,7 @@ CategoryList.reopenClass({
|
|||
const categories = CategoryList.create();
|
||||
const list = Discourse.Category.list();
|
||||
|
||||
let statPeriod;
|
||||
let statPeriod = "all";
|
||||
const minCategories = result.category_list.categories.length * 0.66;
|
||||
|
||||
["week", "month"].some(period => {
|
||||
|
@ -37,6 +37,8 @@ CategoryList.reopenClass({
|
|||
c.topics = c.topics.map(t => Discourse.Topic.create(t));
|
||||
}
|
||||
|
||||
c["pick" + statPeriod[0].toUpperCase() + statPeriod.slice(1)] = true;
|
||||
|
||||
switch(statPeriod) {
|
||||
case "week":
|
||||
case "month":
|
||||
|
|
|
@ -17,7 +17,7 @@ const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, {
|
|||
},
|
||||
|
||||
model() {
|
||||
const style = this.siteSettings.desktop_category_page_style;
|
||||
const style = !this.site.mobileView && this.siteSettings.desktop_category_page_style;
|
||||
const parentCategory = this.get("model.parentCategory");
|
||||
|
||||
let promise;
|
||||
|
|
|
@ -33,9 +33,17 @@
|
|||
|
||||
</table>
|
||||
<footer class="clearfix">
|
||||
<figure title="{{i18n 'year_desc'}}">{{number c.topics_year}} <figcaption>{{i18n 'category.this_year'}}</figcaption></figure>
|
||||
{{#if c.pickAll}}
|
||||
<figure title="{{i18n 'all_time_desc'}}">{{number c.topics_all_time}} <figcaption>{{i18n 'all_time'}}</figcaption></figure>
|
||||
{{/if}}
|
||||
|
||||
{{#if c.pickMonth}}
|
||||
<figure title="{{i18n 'month_desc'}}">{{number c.topics_month}} <figcaption>{{i18n 'month'}}</figcaption></figure>
|
||||
<figure title="{{i18n 'week_desc'}}">{{number c.topics_week}} <figcaption>{{i18n 'week'}}</figcaption></figure>
|
||||
{{/if}}
|
||||
|
||||
{{#if c.pickWeek}}
|
||||
<figure title="{{i18n 'week_desc'}}">{{number c.topics_week}} <figcaption>{{i18n 'week'}}</figcaption></figure>
|
||||
{{/if}}
|
||||
|
||||
{{#if c.can_edit}}
|
||||
<a href {{action "editCategory" c}} class='btn btn-small'>{{i18n 'category.edit'}}</a>
|
||||
|
|
|
@ -887,6 +887,8 @@ en:
|
|||
|
||||
learn_more: "learn more..."
|
||||
|
||||
all_time: 'total'
|
||||
all_time_desc: 'total topics created'
|
||||
year: 'year'
|
||||
year_desc: 'topics created in the last 365 days'
|
||||
month: 'month'
|
||||
|
|
Loading…
Reference in New Issue