2024-08-20 07:59:43 +08:00
|
|
|
import { hash } from "@ember/helper";
|
2024-08-21 08:42:00 +08:00
|
|
|
import { htmlSafe } from "@ember/template";
|
2024-08-20 07:59:43 +08:00
|
|
|
import i18n from "discourse-common/helpers/i18n";
|
|
|
|
import {
|
|
|
|
DangerButton,
|
|
|
|
DefaultButton,
|
|
|
|
PrimaryButton,
|
|
|
|
} from "admin/components/admin-page-action-button";
|
|
|
|
|
|
|
|
const AdminPageSubheader = <template>
|
|
|
|
<div class="admin-page-subheader">
|
|
|
|
<div class="admin-page-subheader__title-row">
|
|
|
|
<h3 class="admin-page-subheader__title">{{i18n @titleLabel}}</h3>
|
|
|
|
<div class="admin-page-subheader__actions">
|
|
|
|
{{yield
|
|
|
|
(hash Primary=PrimaryButton Default=DefaultButton Danger=DangerButton)
|
|
|
|
to="actions"
|
|
|
|
}}
|
|
|
|
</div>
|
2024-08-21 08:42:00 +08:00
|
|
|
|
|
|
|
{{#if @descriptionLabel}}
|
|
|
|
<p class="admin-page-header__description">
|
|
|
|
{{i18n @descriptionLabel}}
|
|
|
|
{{#if @learnMoreUrl}}
|
|
|
|
{{htmlSafe (i18n "learn_more_with_link" url=@learnMoreUrl)}}
|
|
|
|
{{/if}}
|
|
|
|
</p>
|
|
|
|
{{/if}}
|
2024-08-20 07:59:43 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>;
|
|
|
|
|
|
|
|
export default AdminPageSubheader;
|