mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
UX: Indent category badges to indicate sub-categories.
This commit is contained in:
parent
b8bd031648
commit
ce75e30bf5
@ -2,16 +2,19 @@
|
|||||||
<div id="rc-scroll-anchor"></div>
|
<div id="rc-scroll-anchor"></div>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<th class="th-pos">{{i18n "categories.reorder.position"}}</th>
|
|
||||||
<th class="th-cat">{{i18n "categories.category"}}</th>
|
<th class="th-cat">{{i18n "categories.category"}}</th>
|
||||||
|
<th class="th-pos">{{i18n "categories.reorder.position"}}</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#each categoriesOrdered as |cat|}}
|
{{#each categoriesOrdered as |cat|}}
|
||||||
<tr data-category-id="{{cat.id}}">
|
<tr data-category-id="{{cat.id}}">
|
||||||
<td>
|
<td>
|
||||||
{{#if cat.parent_category_id}}
|
<div class={{if cat.parent_category_id 'reorder-categories-sub-cat' ''}}>
|
||||||
|
{{category-badge cat allowUncategorized="true"}}
|
||||||
{{/if}}
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
{{number-field number=(readonly cat.position) change=(action 'change' cat)}}
|
{{number-field number=(readonly cat.position) change=(action 'change' cat)}}
|
||||||
{{d-button class="btn-default no-text" action=(action "moveUp") actionParam=cat icon="arrow-up"}}
|
{{d-button class="btn-default no-text" action=(action "moveUp") actionParam=cat icon="arrow-up"}}
|
||||||
{{d-button class="btn-default no-text" action=(action "moveDown") actionParam=cat icon="arrow-down"}}
|
{{d-button class="btn-default no-text" action=(action "moveDown") actionParam=cat icon="arrow-down"}}
|
||||||
@ -19,7 +22,6 @@
|
|||||||
{{d-button class="no-text ok" action=(action "commit") icon="check"}}
|
{{d-button class="no-text ok" action=(action "commit") icon="check"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{category-badge cat allowUncategorized="true"}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -27,3 +27,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reorder-categories-sub-cat {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user