mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 15:29:19 +03:00
Static page and feature options in new PSM
closes #4109 - Add featured option - Move static page/featured to other place - Change wording on static page
This commit is contained in:
parent
d87980b80a
commit
5f5993819a
@ -559,22 +559,6 @@ body.zen {
|
||||
|
||||
}
|
||||
|
||||
#entry-controls {
|
||||
&.unsaved {
|
||||
.post-settings-menu {
|
||||
padding-bottom: 0;
|
||||
|
||||
.post-setting:nth-child(3) td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.delete {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#entry-actions {
|
||||
margin-right: 6px;
|
||||
position: relative;
|
||||
@ -589,6 +573,14 @@ body.zen {
|
||||
bottom: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&.unsaved {
|
||||
padding-bottom: 0;
|
||||
|
||||
.delete {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#entry-actions-menu {
|
||||
@ -750,4 +742,4 @@ body.zen {
|
||||
th {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -197,6 +197,22 @@ var PostSettingsMenuController = Ember.ObjectController.extend({
|
||||
self.get('model').rollback();
|
||||
});
|
||||
},
|
||||
|
||||
toggleFeatured: function () {
|
||||
var self = this;
|
||||
|
||||
this.toggleProperty('featured');
|
||||
// If this is a new post. Don't save the model. Defer the save
|
||||
// to the user pressing the save button
|
||||
if (this.get('isNew')) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.get('model').save(this.get('saveOptions')).catch(function (errors) {
|
||||
self.showErrors(errors);
|
||||
self.get('model').rollback();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* triggered by user manually changing slug
|
||||
*/
|
||||
|
@ -1,13 +1,10 @@
|
||||
<footer id="publish-bar">
|
||||
|
||||
<div class="publish-bar-inner">
|
||||
|
||||
{{render 'post-tags-input'}}
|
||||
|
||||
<div class="publish-bar-actions">
|
||||
<button type="button" class='post-settings' {{action "toggleRightOutlet"}}></button>
|
||||
{{view "editor-save-button" id="entry-actions"}}
|
||||
{{view "editor-save-button" id="entry-actions" classNameBindings="isNew:unsaved"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</footer>
|
||||
|
@ -11,5 +11,9 @@
|
||||
<li class="post-save-draft" {{bind-attr class="willPublish::active"}}>
|
||||
<a {{action "setSaveType" "draft"}} href="#">{{view.draftText}}</a>
|
||||
</li>
|
||||
<li class="divider delete"></li>
|
||||
<li class="delete">
|
||||
<a {{action "openModal" "delete-post" this}} href="#">Delete Post</a>
|
||||
</li>
|
||||
</ul>
|
||||
{{/gh-popover}}
|
@ -1,6 +1,6 @@
|
||||
<div class="editor-cover" {{action "closeRightOutlet"}}></div>
|
||||
{{#gh-tabs-manager selected="showSubview" id="entry-controls" classNameBindings="isNew:unsaved :right-outlet"}}
|
||||
<div id="entry-controls" {{bind-attr class="isNew:unsaved :right-outlet"}}>
|
||||
{{#gh-tabs-manager selected="showSubview" id="entry-controls" class="right-outlet"}}
|
||||
<div id="entry-controls" class="right-outlet">
|
||||
<div {{bind-attr class="isViewingSubview:outlet-pane-out-left:outlet-pane-in :post-settings-menu :outlet-pane"}}>
|
||||
<div class="post-settings-header">
|
||||
<h4>Post Settings</h4>
|
||||
@ -37,13 +37,6 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group for-checkbox">
|
||||
<label class="checkbox" for="static-page" {{action "togglePage" bubbles="false"}}>
|
||||
{{input type="checkbox" name="static-page" id="static-page" class="post-setting-static-page" checked=page}}
|
||||
<span class="input-toggle-component"></span>
|
||||
<p>Static Page</p>
|
||||
</label>
|
||||
</div>
|
||||
<ul class="nav-list nav-list-block">
|
||||
{{#gh-tab tagName="li" classNames="nav-list-item"}}
|
||||
<a href="#">
|
||||
@ -51,28 +44,22 @@
|
||||
<span>Extra content for SEO and social media.</span>
|
||||
</a>
|
||||
{{/gh-tab}}
|
||||
{{!--
|
||||
{{#gh-tab tagName="li" classNames="nav-list-item"}}
|
||||
<a href="#">
|
||||
<b>Advanced Settings</b>
|
||||
<span>Convert to a page, mark as featured.</span>
|
||||
</a>
|
||||
{{/gh-tab}}
|
||||
{{#gh-tab tagName="li" classNames="nav-list-item"}}
|
||||
<a href="#">
|
||||
<b>Revision History</b>
|
||||
<span>12 versions of this post by 3 people.</span>
|
||||
</a>
|
||||
{{/gh-tab}}
|
||||
{{#gh-tab tagName="li" classNames="nav-list-item"}}
|
||||
<a href="#">
|
||||
<b>Custom App</b>
|
||||
<span>Registered an advanced setting panel.</span>
|
||||
</a>
|
||||
{{/gh-tab}}
|
||||
--}}
|
||||
</ul>
|
||||
<button type="button" class="btn btn-red icon-trash delete" {{action "openModal" "delete-post" this}}>Delete This Post</button>
|
||||
|
||||
<div class="form-group for-checkbox">
|
||||
<label class="checkbox" for="static-page" {{action "togglePage" bubbles="false"}}>
|
||||
{{input type="checkbox" name="static-page" id="static-page" class="post-setting-static-page" checked=page}}
|
||||
<span class="input-toggle-component"></span>
|
||||
<p>Turn this post into a static page</p>
|
||||
</label>
|
||||
|
||||
<label class="checkbox" for="static-page" {{action "toggleFeatured" bubbles="false"}}>
|
||||
{{input type="checkbox" name="featured" id="featured" class="post-setting-featured" checked=featured}}
|
||||
<span class="input-toggle-component"></span>
|
||||
<p>Feature this post</p>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!-- .post-settings-content -->
|
||||
</div><!-- .post-settings-menu -->
|
||||
|
Loading…
Reference in New Issue
Block a user