1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/templates/post-settings-menu.hbs
Kevin Ansfield 3afc43e2d2 replace gh-select-native with one-way-select (#286)
no issue
- removes `gh-select-native` component as ember-one-way-control's `one-way-select` component offers the same one-way-binding but also allows element attributes to be set
2016-09-26 11:39:43 -05:00

152 lines
7.5 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{#gh-tabs-manager selected="showSubview" id="entry-controls" class="settings-menu-container"}}
<div id="entry-controls">
<div class="{{if isViewingSubview 'settings-menu-pane-out-left' 'settings-menu-pane-in'}} settings-menu settings-menu-pane">
<div class="settings-menu-header">
<h4>Post Settings</h4>
<button class="close icon-x settings-menu-header-action" {{action "closeMenus"}}><span class="hidden">Close</span></button>
</div>
<div class="settings-menu-content">
{{gh-image-uploader-with-preview
image=model.image
text="Add post image"
update=(action "setCoverImage")
remove=(action "clearCoverImage")
}}
<form>
<div class="form-group">
<label for="url">Post URL</label>
{{#if model.isPublished}}
<a class="post-view-link" target="_blank" href="{{model.absoluteUrl}}">
View post <i class="icon-external"></i>
</a>
{{else}}
<a class="post-view-link" target="_blank" href="{{model.previewUrl}}">
Preview <i class="icon-external"></i>
</a>
{{/if}}
<span class="input-icon icon-link">
{{gh-input slugValue class="post-setting-slug" id="url" name="post-setting-slug" focusOut=(action "updateSlug" slugValue) stopEnterKeyDownPropagation="true" update=(action (mut slugValue))}}
</span>
{{gh-url-preview slug=slugValue tagName="p" classNames="description"}}
</div>
{{#gh-form-group errors=model.errors property="post-setting-date"}}
{{#if model.timeScheduled}}
<label for="post-setting-date">Scheduled Date</label>
{{else}}
<label for="post-setting-date">Publish Date</label>
{{/if}}
{{gh-datetime-input
value=model.publishedAtUTC
update=(action "setPublishedAtUTC")
inputClass="post-setting-date"
inputId="post-setting-date"
inputName="post-setting-date"
}}
{{gh-error-message errors=model.errors property="post-setting-date"}}
{{/gh-form-group}}
<div class="form-group">
<label for="tag-input">Tags</label>
{{gh-selectize
id="tag-input"
multiple=true
selection=model.tags
content=availableTags
optionValuePath="content.uuid"
optionLabelPath="content.name"
openOnFocus=false
create-item="addTag"
remove-item="removeTag"
plugins="remove_button, drag_drop"}}
</div>
{{#unless session.user.isAuthor}}
<div class="form-group for-select">
<label for="author-list">Author</label>
<span class="input-icon icon-user">
<span class="gh-select" tabindex="0">
{{one-way-select
id="author-list"
name="post-setting-author"
options=authors
optionValuePath="id"
optionLabelPath="name"
value=selectedAuthor
update=(action "changeAuthor")
}}
</span>
</span>
</div>
{{/unless}}
<ul class="nav-list nav-list-block">
{{#gh-tab tagName="li" classNames="nav-list-item"}}
<button type="button">
<b>Meta Data</b>
<span>Extra content for SEO and social media.</span>
</button>
<i class="icon-arrow-right"></i>
{{/gh-tab}}
</ul>
<div class="form-group for-checkbox">
<label class="checkbox" for="static-page" {{action "togglePage" bubbles="false"}}>
{{one-way-checkbox model.page type="checkbox" name="static-page" id="static-page" class="gh-input post-setting-static-page" update=(action (mut model.page))}}
<span class="input-toggle-component"></span>
<p>Turn this post into a static page</p>
</label>
<label class="checkbox" for="featured" {{action "toggleFeatured" bubbles="false"}}>
{{one-way-checkbox model.featured type="checkbox" name="featured" id="featured" class="gh-input post-setting-featured" update=(action (mut model.featured))}}
<span class="input-toggle-component"></span>
<p>Feature this post</p>
</label>
</div>
</form>
</div>{{! .settings-menu-content }}
</div>{{! .post-settings-menu }}
<div class="{{if isViewingSubview 'settings-menu-pane-in' 'settings-menu-pane-out-right'}} settings-menu settings-menu-pane">
{{#gh-tab-pane}}
{{#if isViewingSubview}}
<div class="settings-menu-header subview">
<button {{action "closeSubview"}} class="back icon-arrow-left settings-menu-header-action"><span class="hidden">Back</span></button>
<h4>Meta Data</h4>
<div style="width:23px;">{{!flexbox space-between}}</div>
</div>
<div class="settings-menu-content">
<form {{action "discardEnter" on="submit"}}>
{{#gh-form-group errors=model.errors hasValidated=model.hasValidated property="metaTitle"}}
<label for="meta-title">Meta Title</label>
{{gh-input metaTitleScratch class="post-setting-meta-title" id="meta-title" name="post-setting-meta-title" focusOut=(action "setMetaTitle" metaTitleScratch) stopEnterKeyDownPropagation="true" update=(action (mut metaTitleScratch))}}
<p>Recommended: <b>70</b> characters. Youve used {{gh-count-down-characters metaTitleScratch 70}}</p>
{{gh-error-message errors=model.errors property="metaTitle"}}
{{/gh-form-group}}
{{#gh-form-group errors=model.errors hasValidated=model.hasValidated property="metaDescription"}}
<label for="meta-description">Meta Description</label>
{{gh-textarea metaDescriptionScratch class="post-setting-meta-description" id="meta-description" name="post-setting-meta-description" focusOut=(action "setMetaDescription" metaDescriptionScratch) stopEnterKeyDownPropagation="true" update=(action (mut metaDescriptionScratch))}}
<p>Recommended: <b>156</b> characters. Youve used {{gh-count-down-characters metaDescriptionScratch 156}}</p>
{{gh-error-message errors=model.errors property="metaDescription"}}
{{/gh-form-group}}
<div class="form-group">
<label>Search Engine Result Preview</label>
<div class="seo-preview">
<div class="seo-preview-title">{{seoTitle}}</div>
<div class="seo-preview-link">{{seoURL}}</div>
<div class="seo-preview-description">{{seoDescription}}</div>
</div>
</div>
</form>
</div>{{! .settings-menu-content }}
{{/if}}
{{/gh-tab-pane}}
</div>
</div>
{{/gh-tabs-manager}}