discourse/app/assets/javascripts/admin/addon/templates/admin-badges.hbs
Martin Brennan 894f146b3a
DEV: Add component tests for admin page header components (#28837)
These components will be used in many places and are quite
independent, adding component tests is sensible.
2024-09-11 13:27:58 +10:00

59 lines
1.6 KiB
Handlebars

<div class="badges">
<AdminPageHeader
@titleLabel="admin.badges.title"
@descriptionLabel="admin.badges.description"
@learnMoreUrl="https://meta.discourse.org/t/understanding-and-using-badges/32540"
>
<:breadcrumbs>
<DBreadcrumbsItem
@path="/admin/badges"
@label={{i18n "admin.badges.title"}}
/>
</:breadcrumbs>
<:actions as |actions|>
<actions.Primary
@route="adminBadges.show"
@routeModels="new"
@icon="plus"
@label="admin.badges.new"
class="new-badge"
/>
<actions.Default
@route="adminBadges.award"
@routeModels="new"
@icon="upload"
@label="admin.badges.mass_award.title"
class="award-badge"
/>
<actions.Default
@action={{routeAction "editGroupings"}}
@title="admin.badges.group_settings"
@label="admin.badges.group_settings"
@icon="cog"
class="edit-groupings-btn"
/>
</:actions>
</AdminPageHeader>
<div class="admin-container">
<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>
</div>