mirror of
https://github.com/discourse/discourse.git
synced 2025-01-10 02:14:09 +08:00
a879bcdc35
This converts the `<AdminPageHeader />` component and the `<AdminPageSubheader />` components into new components that can be used outside of admin, and updates the CSS classes. Also introduces a `<DPageActionButton />` component and child components for the header action buttons. I have to keep the old admin-only components around for now until plugins are updated, then we can remove it, and remove the re-exports that are done within admin-page-action-button.gjs
60 lines
1.7 KiB
Handlebars
60 lines
1.7 KiB
Handlebars
<div class="badges">
|
|
<DPageHeader
|
|
@titleLabel={{i18n "admin.badges.title"}}
|
|
@descriptionLabel={{i18n "admin.badges.page_description"}}
|
|
@learnMoreUrl="https://meta.discourse.org/t/understanding-and-using-badges/32540"
|
|
>
|
|
<:breadcrumbs>
|
|
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
|
<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="gear"
|
|
class="edit-groupings-btn"
|
|
/>
|
|
</:actions>
|
|
</DPageHeader>
|
|
|
|
<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> |