mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Show active categories in form templates customize table (#20498)
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<tr class="admin-list-item">
|
||||
<td class="col first">{{@template.name}}</td>
|
||||
<td class="col categories">
|
||||
{{#each this.activeCategories as |category|}}
|
||||
{{category-link category}}
|
||||
{{/each}}
|
||||
</td>
|
||||
<td class="col action">
|
||||
<DButton
|
||||
@title="admin.form_templates.list_table.actions.view"
|
||||
|
||||
@@ -9,6 +9,13 @@ import I18n from "I18n";
|
||||
export default class FormTemplateRowItem extends Component {
|
||||
@service router;
|
||||
@service dialog;
|
||||
@service site;
|
||||
|
||||
get activeCategories() {
|
||||
return this.site?.categories?.filter((c) =>
|
||||
c["form_template_ids"].includes(this.args.template.id)
|
||||
);
|
||||
}
|
||||
|
||||
@action
|
||||
viewTemplate() {
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
<th class="col heading">
|
||||
{{i18n "admin.form_templates.list_table.headings.name"}}
|
||||
</th>
|
||||
<th class="col heading">
|
||||
{{i18n "admin.form_templates.list_table.headings.active_categories"}}
|
||||
</th>
|
||||
<th class="col heading sr-only">
|
||||
{{i18n "admin.form_templates.list_table.headings.actions"}}
|
||||
</th>
|
||||
|
||||
Reference in New Issue
Block a user