mirror of
https://github.com/discourse/discourse.git
synced 2024-12-13 15:13:56 +08:00
b4f8ea6ade
A previous refactor has moved this function in the controller instead of the route making it inaccessible to the modal. This commit is fixing this and also adding a spec.
41 lines
1.2 KiB
Handlebars
41 lines
1.2 KiB
Handlebars
<div class="badges">
|
|
<div class="badges-header">
|
|
<h3 class="badges-heading">{{i18n "admin.badges.title"}}</h3>
|
|
<div class="create-new-badge">
|
|
|
|
<LinkTo @route="adminBadges.award" @model="new" class="btn btn-default">
|
|
{{d-icon "upload"}}
|
|
<span class="d-button-label">{{i18n
|
|
"admin.badges.mass_award.title"
|
|
}}</span>
|
|
</LinkTo>
|
|
|
|
<DButton
|
|
@action={{route-action "editGroupings"}}
|
|
@translatedLabel="Group settings"
|
|
@icon="cog"
|
|
@class="btn-default edit-groupings-btn"
|
|
/>
|
|
|
|
<LinkTo @route="adminBadges.show" @model="new" class="btn btn-primary">
|
|
{{d-icon "plus"}}
|
|
<span>{{i18n "admin.badges.new"}}</span>
|
|
</LinkTo>
|
|
</div>
|
|
</div>
|
|
<div class="content-list">
|
|
<ul class="admin-badge-list">
|
|
{{#each this.model as |badge|}}
|
|
<li class="admin-badge-list-item">
|
|
<LinkTo @route={{this.selectedRoute}} @model={{badge.id}}>
|
|
<BadgeButton @badge={{badge}} />
|
|
{{#if badge.newBadge}}
|
|
<span class="list-badge">{{i18n "filters.new.lower_title"}}</span>
|
|
{{/if}}
|
|
</LinkTo>
|
|
</li>
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
{{outlet}}
|
|
</div> |