Added link on UI for Editors to staff page

refs. https://github.com/TryGhost/Team/issues/1839

- there was no way for an Editor through the Admin UI to be able to invite staff users
This commit is contained in:
Peter Zimon 2022-08-24 14:22:45 +02:00
parent 046fd2bd82
commit 3231863dc2
4 changed files with 15 additions and 6 deletions

View File

@ -93,6 +93,9 @@
{{#if (gh-user-can-admin this.session.user)}}
<LinkTo class="gh-nav-bottom-tabicon" @route="settings" @current-when={{this.isSettingsRoute}} data-test-nav="settings">{{svg-jar "settings"}}</LinkTo>
{{/if}}
{{#if this.session.user.isEditor}}
<LinkTo class="gh-nav-bottom-tabicon" @route="settings.staff" @current-when={{this.isSettingsRoute}} data-test-nav="settings">{{svg-jar "settings"}}</LinkTo>
{{/if}}
<div class="nightshift-toggle-container">
<div class="nightshift-toggle {{if this.feature.nightShift "on"}}" {{action (toggle "nightShift" this.feature)}}>
<div class="sun">{{svg-jar "sun"}}</div>

View File

@ -1,8 +1,10 @@
<section class="gh-canvas">
<GhCanvasHeader class="gh-canvas-header">
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{#unless this.session.user.isEditor}}
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{/unless}}
Staff
</h2>
{{!-- Do not show Invite user button to authors --}}

View File

@ -5,8 +5,10 @@
<h2 class="gh-canvas-title" data-test-screen-title>Your profile</h2>
{{else}}
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{#unless this.session.user.isEditor}}
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{/unless}}
<LinkTo @route="settings.staff" data-test-staff-link={{true}}>Staff</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{this.user.name}}

View File

@ -5,8 +5,10 @@
<h2 class="gh-canvas-title" data-test-screen-title>Your profile</h2>
{{else}}
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{#unless this.session.user.isEditor}}
<LinkTo @route="settings">Settings</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{/unless}}
<LinkTo @route="settings.staff" data-test-staff-link={{true}}>Staff</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{this.user.name}}