mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Added base files for Offers structure
- Moving Offers outside settings to main menu - Moving Integrations and Staff to settings
This commit is contained in:
parent
2eb0e465c2
commit
390b2b136f
@ -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}}
|
||||
|
7
ghost/admin/app/controllers/offer.js
Normal file
7
ghost/admin/app/controllers/offer.js
Normal file
@ -0,0 +1,7 @@
|
||||
import Controller from '@ember/controller';
|
||||
import {action} from '@ember/object';
|
||||
|
||||
export default class MembersController extends Controller {
|
||||
@action
|
||||
save() {}
|
||||
}
|
3
ghost/admin/app/controllers/offers.js
Normal file
3
ghost/admin/app/controllers/offers.js
Normal file
@ -0,0 +1,3 @@
|
||||
import Controller from '@ember/controller';
|
||||
|
||||
export default class MembersController extends Controller {}
|
@ -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');
|
||||
|
3
ghost/admin/app/routes/offer.js
Normal file
3
ghost/admin/app/routes/offer.js
Normal file
@ -0,0 +1,3 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
|
||||
export default class MembersRoute extends AuthenticatedRoute {}
|
3
ghost/admin/app/routes/offers.js
Normal file
3
ghost/admin/app/routes/offers.js
Normal file
@ -0,0 +1,3 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
|
||||
export default class MembersRoute extends AuthenticatedRoute {}
|
16
ghost/admin/app/templates/offer.hbs
Normal file
16
ghost/admin/app/templates/offer.hbs
Normal 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>
|
12
ghost/admin/app/templates/offers.hbs
Normal file
12
ghost/admin/app/templates/offers.hbs
Normal 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>
|
@ -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>
|
||||
|
1
ghost/admin/public/assets/icons/percentage.svg
Normal file
1
ghost/admin/public/assets/icons/percentage.svg
Normal 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 |
Loading…
Reference in New Issue
Block a user