discourse/app/assets/javascripts/admin/addon/templates/plugins-index.hbs
Martin Brennan a879bcdc35
DEV: Introduce <DPageHeader /> and <DPageSubheader /> components (#30146)
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
2024-12-18 08:13:39 +10:00

58 lines
1.7 KiB
Handlebars

<div class="admin-plugins-list-container">
<DPageHeader
@titleLabel={{i18n "admin.plugins.installed"}}
@descriptionLabel={{i18n "admin.plugins.description"}}
@learnMoreUrl="https://www.discourse.org/plugins"
>
<:breadcrumbs>
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
<DBreadcrumbsItem
@path="/admin/plugins"
@label={{i18n "admin.plugins.title"}}
/>
</:breadcrumbs>
<:tabs>
<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}}
</:tabs>
</DPageHeader>
<div class="alert alert-info -top-margin admin-plugins-howto">
{{dIcon "circle-info"}}
<a href="https://meta.discourse.org/t/install-a-plugin/19157">
{{i18n "admin.plugins.howto"}}
</a>
</div>
{{#if this.model.length}}
<AdminPluginsList @plugins={{this.model}} />
{{else}}
<p>{{i18n "admin.plugins.none_installed"}}</p>
{{/if}}
<span>
<PluginOutlet
@name="admin-below-plugins-index"
@connectorTagName="div"
@outletArgs={{hash model=this.model}}
/>
</span>
</div>