discourse/app/assets/javascripts/admin/addon/templates/plugins.hbs
Martin Brennan 361e954c55
UX: Change admin plugins list to follow UI guidelines (#28478)
This commit introduces a little bit of duplication
since the old plugin UIs not using the new plugin show
page look different from ones like AI and Gamification
which have been converted. We can use the new admin
header component on the plugins list, but for the other
pages we are manually rendering a breadcrumb trail and
the list of plugin tabs.

Over time as we convert more plugins to use the new UI
guidelines and show page we can get rid of this duplication.
2024-08-30 14:53:36 +10:00

43 lines
1.3 KiB
Handlebars

{{#if this.showTopNav}}
<div class="admin-page-header">
<DBreadcrumbsContainer />
<DBreadcrumbsItem @path="/admin" @label={{i18n "admin_title"}} />
<DBreadcrumbsItem
@path="/admin/plugins"
@label={{i18n "admin.plugins.title"}}
/>
<div class="admin-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>