discourse/app/assets/javascripts/admin/addon/templates/admin-badges.hbs
Joffrey JAFFEUX b4f8ea6ade
FIX: correctly pass updateGroupings to the modal (#28683)
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.
2024-09-02 17:32:18 +02:00

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>