Revert "Updated profile page for Authors & Contributors"

This reverts commit c5940ab57b.
This commit is contained in:
Sanne de Vries 2022-01-21 12:46:27 +00:00
parent c5940ab57b
commit 0ddca821d6
3 changed files with 7 additions and 32 deletions

View File

@ -1,10 +0,0 @@
import Controller from '@ember/controller';
import {alias} from '@ember/object/computed';
import {inject as service} from '@ember/service';
export default Controller.extend({
session: service(),
user: alias('model'),
currentUser: alias('session.user')
});

View File

@ -6,16 +6,6 @@ export default class IndexRoute extends AuthenticatedRoute {
@service infinity; @service infinity;
@service session; @service session;
beforeModel() {
super.beforeModel(...arguments);
const user = this.session.user;
if (!user.isAdmin) {
return this.transitionTo('settings.staff.user', user);
}
}
model() { model() {
return this.session.user; return this.session.user;
} }

View File

@ -1,17 +1,12 @@
<section class="gh-canvas"> <section class="gh-canvas">
<GhCanvasHeader class="gh-canvas-header"> <GhCanvasHeader class="gh-canvas-header">
{{!-- Remove breadcrumbs for Authors and Contributors --}} <h2 class="gh-canvas-title" data-test-screen-title>
{{#if this.currentUser.isAuthorOrContributor}} <LinkTo @route="settings">Settings</LinkTo>
<h2 class="gh-canvas-title" data-test-screen-title>Your profile</h2> <span>{{svg-jar "arrow-right"}}</span>
{{else}} <LinkTo @route="settings.staff" data-test-staff-link={{true}}>Staff</LinkTo>
<h2 class="gh-canvas-title" data-test-screen-title> <span>{{svg-jar "arrow-right"}}</span>
<LinkTo @route="settings">Settings</LinkTo> {{this.user.name}}
<span>{{svg-jar "arrow-right"}}</span> </h2>
<LinkTo @route="settings.staff" data-test-staff-link={{true}}>Staff</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
{{this.user.name}}
</h2>
{{/if}}
<section class="view-actions"> <section class="view-actions">
<div class="gh-btn gh-btn-primary"><span>Save</span></div> <div class="gh-btn gh-btn-primary"><span>Save</span></div>