mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 11:23:43 +08:00
c197daa04c
This commit adds two new getters to the category model: - `displayName` - `descriptionText` These getters are used instead of `name` and `description_text` where appropriate. On top of this two transformers have been added to allow plugins to alter these getters: ```javascript api.registerValueTransformer( "category-display-name", ({ value, context }) => value + "-" + context.category.id + "-transformed" ); ``` ```javascript api.registerValueTransformer( "category-description-text", ({ value, context }) => value + "-" + context.category.id + "-transformed" ); ```
37 lines
948 B
Handlebars
37 lines
948 B
Handlebars
<AdminSiteSettingsFilterControls
|
|
@initialFilter={{this.filter}}
|
|
@onChangeFilter={{this.filterChanged}}
|
|
@showMenu={{true}}
|
|
@onToggleMenu={{this.toggleMenu}}
|
|
/>
|
|
|
|
<div class="admin-nav admin-site-settings-category-nav pull-left">
|
|
<ul class="nav nav-stacked">
|
|
{{#each this.visibleSiteSettings as |category|}}
|
|
<li
|
|
class={{concat-class
|
|
"admin-site-settings-category-nav__item"
|
|
category.nameKey
|
|
}}
|
|
>
|
|
<LinkTo
|
|
@route="adminSiteSettingsCategory"
|
|
@model={{category.nameKey}}
|
|
class={{category.nameKey}}
|
|
title={{category.displayName}}
|
|
>
|
|
{{category.displayName}}
|
|
{{#if category.count}}
|
|
<span class="count">({{category.count}})</span>
|
|
{{/if}}
|
|
</LinkTo>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="admin-detail pull-left mobile-closed">
|
|
{{outlet}}
|
|
</div>
|
|
|
|
<div class="clearfix"></div> |