mirror of
https://github.com/discourse/discourse.git
synced 2025-01-10 02:05:48 +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
43 lines
1.3 KiB
Handlebars
43 lines
1.3 KiB
Handlebars
{{#if this.showTopNav}}
|
|
<div class="d-page-header">
|
|
<DBreadcrumbsContainer />
|
|
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
|
|
<DBreadcrumbsItem
|
|
@path="/admin/plugins"
|
|
@label={{i18n "admin.plugins.title"}}
|
|
/>
|
|
<div class="d-nav-submenu">
|
|
<HorizontalOverflowNav class="main-nav nav plugin-nav">
|
|
<NavItem @route="adminPlugins.index" @label="admin.plugins.title" />
|
|
{{#each this.adminRoutes as |route|}}
|
|
{{#if route.use_new_show_route}}
|
|
<NavItem
|
|
@route={{route.full_location}}
|
|
@label={{route.label}}
|
|
@routeParam={{route.location}}
|
|
@class="admin-plugin-tab-nav-item"
|
|
data-plugin-nav-tab-id={{route.plugin_id}}
|
|
/>
|
|
{{else}}
|
|
<NavItem
|
|
@route={{route.full_location}}
|
|
@label={{route.label}}
|
|
@class="admin-plugin-tab-nav-item"
|
|
data-plugin-nav-tab-id={{route.plugin_id}}
|
|
/>
|
|
{{/if}}
|
|
{{/each}}
|
|
</HorizontalOverflowNav>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="admin-container -no-header">
|
|
{{#each this.brokenAdminRoutes as |route|}}
|
|
<div class="alert alert-error">
|
|
{{i18n "admin.plugins.broken_route" name=(i18n route.label)}}
|
|
</div>
|
|
{{/each}}
|
|
|
|
{{outlet}}
|
|
</div> |