Added base files for Offers structure

- Moving Offers outside settings to main menu
- Moving Integrations and Staff to settings
This commit is contained in:
Peter Zimon 2021-10-04 13:01:12 +02:00
parent 2eb0e465c2
commit 390b2b136f
10 changed files with 82 additions and 4 deletions

View File

@ -86,11 +86,20 @@
</LinkTo>
{{/if}}
</li>
{{#if (feature "offers")}}
<li>
<LinkTo @route="offers" @alt="Offers" @title="Offers">{{svg-jar "percentage"}}Offers</LinkTo>
</li>
{{else}}
<li>
<LinkTo @route="integrations" @alt="Integrations" @title="Integrations" data-test-nav="dashboard">{{svg-jar "module"}}Integrations</LinkTo>
</li>
{{/if}}
{{/if}}
{{#unless (feature "offers")}}
<li><LinkTo @route="staff" data-test-nav="staff">{{svg-jar "staff"}}Staff</LinkTo></li>
{{/unless}}
</ul>
{{#if this.session.user.isOwnerOnly}}

View File

@ -0,0 +1,7 @@
import Controller from '@ember/controller';
import {action} from '@ember/object';
export default class MembersController extends Controller {
@action
save() {}
}

View File

@ -0,0 +1,3 @@
import Controller from '@ember/controller';
export default class MembersController extends Controller {}

View File

@ -38,10 +38,6 @@ Router.map(function () {
this.route('edit', {path: ':type/:post_id'});
});
this.route('staff', function () {
this.route('user', {path: ':user_slug'});
});
this.route('tags');
this.route('tag.new', {path: '/tags/new'});
this.route('tag', {path: '/tags/:tag_slug'});
@ -84,12 +80,19 @@ Router.map(function () {
this.route('integrations.unsplash', {path: '/integrations/unsplash'});
this.route('integrations.zapier', {path: '/integrations/zapier'});
this.route('staff', function () {
this.route('user', {path: ':user_slug'});
});
this.route('members', function () {
this.route('import');
});
this.route('member.new', {path: '/members/new'});
this.route('member', {path: '/members/:member_id'});
this.route('offers');
this.route('offer');
this.route('error404', {path: '/*path'});
this.route('designsandbox');

View File

@ -0,0 +1,3 @@
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
export default class MembersRoute extends AuthenticatedRoute {}

View File

@ -0,0 +1,3 @@
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
export default class MembersRoute extends AuthenticatedRoute {}

View File

@ -0,0 +1,16 @@
<section class="gh-canvas">
<GhCanvasHeader class="gh-canvas-header break tablet members-header">
<h2 class="gh-canvas-title" data-test-screen-title>
<LinkTo @route="offers" data-test-link="offers-back">Offers</LinkTo>
<span>{{svg-jar "arrow-right"}}</span>
New offer
</h2>
<section class="view-actions">
<GhTaskButton @class="gh-btn gh-btn-primary gh-btn-icon" @type="button" @task={{this.saveTask}} @data-test-button="save" />
</section>
</GhCanvasHeader>
<section class="view-container">
Offer...
</section>
</section>

View File

@ -0,0 +1,12 @@
<section class="gh-canvas">
<GhCanvasHeader class="gh-canvas-header break tablet members-header">
<h2 class="gh-canvas-title" data-test-screen-title>Offers</h2>
<section class="view-actions">
<LinkTo @route="offer" class="gh-btn gh-btn-primary"><span>New offer</span></LinkTo>
</section>
</GhCanvasHeader>
<section class="view-container">
Offers...
</section>
</section>

View File

@ -46,6 +46,16 @@
<p>Set up primary and secondary menus</p>
</div>
</LinkTo>
{{#if (feature "offers")}}
<LinkTo class="gh-setting-group" @route="staff" data-test-nav="navigation">
<span class="green">{{svg-jar "staff"}}</span>
<div>
<h4>Staff</h4>
<p>Manage authors, editor and collaborators</p>
</div>
</LinkTo>
{{/if}}
</div>
<div class="gh-setting-header">Members</div>
@ -75,6 +85,17 @@
<p>Add code to your publication</p>
</div>
</LinkTo>
{{#if (feature "offers")}}
<LinkTo class="gh-setting-group" @route="integrations" data-test-nav="navigation">
<span class="blue">{{svg-jar "module"}}</span>
<div>
<h4>Integrations</h4>
<p>Make Ghost work with apps and tools</p>
</div>
</LinkTo>
{{/if}}
<LinkTo class="gh-setting-group" @route="settings.labs" data-test-nav="labs">
<span class="pink">{{svg-jar "labs"}}</span>
<div>

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.a{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}</style></defs><path class="a" d="M2.25,21.75l19.5-19.5Z"/><circle class="a" cx="18.75" cy="18.75" r="3"/><circle class="a" cx="5.25" cy="5.25" r="3"/></svg>

After

Width:  |  Height:  |  Size: 326 B