discourse/app/assets/javascripts/admin/addon/templates/admin-badges.hbs
Peter Wagenet 40cb46631f
DEV: Update /admin/badges to modern Ember patterns (#17672)
* Nest admin badges controller and route files

* Use standard file names for admin-badges

* Update resolver to allow standardized file structure for admin

* Add adminBadges.index controller for property tracking

* Modernize admin badges controller

* Modernize admin-badges route

* Add admin-badges index route

* Modernize admin-badges.show controller and route

* Modernize admin-badges.award controller and route

* Convert BadgeButton to a Glimmer component
2022-08-03 10:12:17 +01:00

32 lines
1010 B
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.show" @model="new" class="btn btn-primary">
{{d-icon "plus"}}
<span>{{i18n "admin.badges.new"}}</span>
</LinkTo>
<LinkTo @route="adminBadges.award" @model="new" class="btn btn-default">
{{d-icon "upload"}}
<span>{{i18n "admin.badges.mass_award.title"}}</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>