mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Fifth of the header restructure, and the answer to the question I had left open: the panel's tabs are navigation BETWEEN its four pages rather than controls of one, so they do not belong in a right sidebar with a page's controls. They belong where you can always see which of the four you are on - the first header bar, immediately left of the notification bell. Icon only, each named by a translated tooltip, because that bar is a single row shared with the logo, the starred boards, the notification bell and the user menu; four labelled buttons would not fit beside them. They link by route NAME, as they did. The tab bar goes with them, and its four route references. "Admin Panel" is already what the first bar says on all four routes - models/lib/pageTitles.js has mapped them since the first step - so the panel is named once, there, rather than by an h1 of its own. Which routes ARE the Admin Panel is read from the one place that already lists them, adminUrls.js, rather than spelled out again in the header. Three guards followed. The same mistake as last time was caught by the same guard: settingHeader.js still registered onCreated, onDestroyed and helpers on a template that no longer existed, which throws at module load and aborts every module after it - they are on adminPanelTabs now. The security-log guard checked for a `.setting-header-btn.problems`, and the multitenancy guard checked that Settings and Problems sit behind the site-admin check; both properties are unchanged and both now read the markup where it is. Remaining: the board's own second header bar, which is the last one with controls in it. Thanks to xet7 !
18 lines
1.0 KiB
Plaintext
18 lines
1.0 KiB
Plaintext
template(name="adminPanelTabs")
|
|
if currentUser
|
|
.board-header-btns.admin-panel-tabs
|
|
//- Multitenancy option D (docs/Design/Multitenancy/Multitenancy.md, D.7):
|
|
Settings and Problems are about the INSTANCE, so a per-tenant Global
|
|
Admin does not get those tabs - they get People (their own Organizations
|
|
and their members) and Attachments (Backup, scoped to their tenant).
|
|
if currentUser.isAdmin
|
|
a.board-header-btn.settings(class=isSettingsActive href="{{pathFor 'setting'}}" title="{{_ 'settings'}}")
|
|
i.fa.fa-cog
|
|
a.board-header-btn.people(class=isPeopleActive href="{{pathFor 'people'}}" title="{{_ 'people'}}")
|
|
i.fa.fa-users
|
|
a.board-header-btn.informations(class=isAttachmentsActive href="{{pathFor 'attachments'}}" title="{{_ 'attachments'}}")
|
|
i.fa.fa-paperclip
|
|
if currentUser.isAdmin
|
|
a.board-header-btn.problems(class="{{isProblemsActive}} {{problemsClass}}" href="{{pathFor 'admin-reports'}}" title="{{_ 'problems'}}")
|
|
i.fa.fa-exclamation-triangle
|