DEV: composer.hbs: fix indentation
This commit is contained in:
parent
1703270055
commit
f900efaa4a
|
@ -6,136 +6,136 @@
|
||||||
save=(action "save")}}
|
save=(action "save")}}
|
||||||
<div class="grippie"></div>
|
<div class="grippie"></div>
|
||||||
{{#if visible}}
|
{{#if visible}}
|
||||||
{{composer-messages composer=model
|
{{composer-messages composer=model
|
||||||
messageCount=messageCount
|
messageCount=messageCount
|
||||||
addLinkLookup=(action "addLinkLookup")}}
|
addLinkLookup=(action "addLinkLookup")}}
|
||||||
{{#if model.viewOpenOrFullscreen}}
|
{{#if model.viewOpenOrFullscreen}}
|
||||||
<div class="reply-area {{if canEditTags 'with-tags'}}">
|
<div class="reply-area {{if canEditTags 'with-tags'}}">
|
||||||
<div class='composer-fields'>
|
<div class='composer-fields'>
|
||||||
{{plugin-outlet name="composer-open" args=(hash model=model)}}
|
{{plugin-outlet name="composer-open" args=(hash model=model)}}
|
||||||
<div class='reply-to'>
|
<div class='reply-to'>
|
||||||
{{#unless model.viewFullscreen}}
|
|
||||||
<div class="reply-details">
|
|
||||||
{{composer-action-title
|
|
||||||
model=model
|
|
||||||
openComposer=(action "openComposer")
|
|
||||||
closeComposer=(action "closeComposer")
|
|
||||||
canWhisper=canWhisper
|
|
||||||
tabindex=8}}
|
|
||||||
{{plugin-outlet name="composer-action-after" noTags=true args=(hash model=model)}}
|
|
||||||
|
|
||||||
{{#unless site.mobileView}}
|
|
||||||
{{#if isWhispering}}
|
|
||||||
<span class='whisper'>{{d-icon "far-eye-slash"}}</span>
|
|
||||||
{{/if}}
|
|
||||||
{{#if model.unlistTopic}}
|
|
||||||
<span class='whisper'>({{i18n 'composer.unlist'}})</span>
|
|
||||||
{{/if}}
|
|
||||||
{{#if model.noBump}}
|
|
||||||
<span class="no-bump">{{d-icon "anchor"}}</span>
|
|
||||||
{{/if}}
|
|
||||||
{{/unless}}
|
|
||||||
|
|
||||||
{{#if canEdit}}
|
|
||||||
{{#link-to-input onClick=(action "displayEditReason") showInput=showEditReason icon="info-circle" class="display-edit-reason"}}
|
|
||||||
{{text-field value=editReason tabindex="7" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
|
|
||||||
{{/link-to-input}}
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
{{/unless}}
|
|
||||||
{{composer-toggles composeState=model.composeState
|
|
||||||
toggleComposer=(action "toggle")
|
|
||||||
toggleToolbar=(action "toggleToolbar")
|
|
||||||
toggleFullscreen=(action "fullscreenComposer")}}
|
|
||||||
</div>
|
|
||||||
{{#unless model.viewFullscreen}}
|
{{#unless model.viewFullscreen}}
|
||||||
{{#if model.canEditTitle}}
|
<div class="reply-details">
|
||||||
{{#if model.creatingPrivateMessage}}
|
{{composer-action-title
|
||||||
<div class='user-selector'>
|
model=model
|
||||||
{{composer-user-selector topicId=topicModel.id
|
openComposer=(action "openComposer")
|
||||||
usernames=model.targetRecipients
|
closeComposer=(action "closeComposer")
|
||||||
hasGroups=model.hasTargetGroups
|
canWhisper=canWhisper
|
||||||
focusTarget=focusTarget
|
tabindex=8}}
|
||||||
class="users-input"}}
|
{{plugin-outlet name="composer-action-after" noTags=true args=(hash model=model)}}
|
||||||
{{#if showWarning}}
|
|
||||||
<label class='add-warning'>
|
|
||||||
{{input type="checkbox" checked=model.isWarning tabindex="3"}}
|
|
||||||
{{i18n "composer.add_warning"}}
|
|
||||||
</label>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
<div class="title-and-category {{if showPreview 'with-preview'}}">
|
{{#unless site.mobileView}}
|
||||||
|
{{#if isWhispering}}
|
||||||
{{composer-title composer=model lastValidatedAt=lastValidatedAt focusTarget=focusTarget}}
|
<span class='whisper'>{{d-icon "far-eye-slash"}}</span>
|
||||||
|
|
||||||
{{#if model.showCategoryChooser}}
|
|
||||||
<div class="category-input">
|
|
||||||
{{category-chooser
|
|
||||||
value=model.categoryId
|
|
||||||
tabindex="3"
|
|
||||||
onChange=(action (mut model.categoryId))
|
|
||||||
isDisabled=disableCategoryChooser
|
|
||||||
options=(hash
|
|
||||||
scopedCategoryId=scopedCategoryId
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
{{popup-input-tip validation=categoryValidation}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if canEditTags}}
|
{{#if model.unlistTopic}}
|
||||||
{{mini-tag-chooser
|
<span class='whisper'>({{i18n 'composer.unlist'}})</span>
|
||||||
value=model.tags
|
{{/if}}
|
||||||
tabindex=4
|
{{#if model.noBump}}
|
||||||
isDisabled=disableTagsChooser
|
<span class="no-bump">{{d-icon "anchor"}}</span>
|
||||||
onChange=(action (mut model.tags))
|
{{/if}}
|
||||||
options=(hash
|
{{/unless}}
|
||||||
categoryId=model.categoryId
|
|
||||||
minimum=model.minimumRequiredTags
|
{{#if canEdit}}
|
||||||
)
|
{{#link-to-input onClick=(action "displayEditReason") showInput=showEditReason icon="info-circle" class="display-edit-reason"}}
|
||||||
}}
|
{{text-field value=editReason tabindex="7" id="edit-reason" maxlength="255" placeholderKey="composer.edit_reason_placeholder"}}
|
||||||
{{popup-input-tip validation=tagValidation}}
|
{{/link-to-input}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/unless}}
|
||||||
|
{{composer-toggles composeState=model.composeState
|
||||||
|
toggleComposer=(action "toggle")
|
||||||
|
toggleToolbar=(action "toggleToolbar")
|
||||||
|
toggleFullscreen=(action "fullscreenComposer")}}
|
||||||
|
</div>
|
||||||
|
{{#unless model.viewFullscreen}}
|
||||||
|
{{#if model.canEditTitle}}
|
||||||
|
{{#if model.creatingPrivateMessage}}
|
||||||
|
<div class='user-selector'>
|
||||||
|
{{composer-user-selector topicId=topicModel.id
|
||||||
|
usernames=model.targetRecipients
|
||||||
|
hasGroups=model.hasTargetGroups
|
||||||
|
focusTarget=focusTarget
|
||||||
|
class="users-input"}}
|
||||||
|
{{#if showWarning}}
|
||||||
|
<label class='add-warning'>
|
||||||
|
{{input type="checkbox" checked=model.isWarning tabindex="3"}}
|
||||||
|
{{i18n "composer.add_warning"}}
|
||||||
|
</label>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{plugin-outlet name="composer-fields" args=(hash model=model)}}
|
<div class="title-and-category {{if showPreview 'with-preview'}}">
|
||||||
{{/unless}}
|
|
||||||
|
|
||||||
</div>
|
{{composer-title composer=model lastValidatedAt=lastValidatedAt focusTarget=focusTarget}}
|
||||||
|
|
||||||
{{composer-editor topic=topic
|
{{#if model.showCategoryChooser}}
|
||||||
composer=model
|
<div class="category-input">
|
||||||
lastValidatedAt=lastValidatedAt
|
{{category-chooser
|
||||||
canWhisper=canWhisper
|
value=model.categoryId
|
||||||
storeToolbarState=(action "storeToolbarState")
|
tabindex="3"
|
||||||
onPopupMenuAction=(action "onPopupMenuAction")
|
onChange=(action (mut model.categoryId))
|
||||||
showUploadModal=(route-action "showUploadSelector")
|
isDisabled=disableCategoryChooser
|
||||||
popupMenuOptions=popupMenuOptions
|
options=(hash
|
||||||
draftStatus=model.draftStatus
|
scopedCategoryId=scopedCategoryId
|
||||||
isUploading=isUploading
|
)
|
||||||
allowUpload=allowUpload
|
}}
|
||||||
uploadIcon=uploadIcon
|
{{popup-input-tip validation=categoryValidation}}
|
||||||
isCancellable=isCancellable
|
</div>
|
||||||
uploadProgress=uploadProgress
|
{{/if}}
|
||||||
groupsMentioned=(action "groupsMentioned")
|
{{#if canEditTags}}
|
||||||
cannotSeeMention=(action "cannotSeeMention")
|
{{mini-tag-chooser
|
||||||
importQuote=(action "importQuote")
|
value=model.tags
|
||||||
togglePreview=(action "togglePreview")
|
tabindex=4
|
||||||
showToolbar=showToolbar
|
isDisabled=disableTagsChooser
|
||||||
afterRefresh=(action "afterRefresh")
|
onChange=(action (mut model.tags))
|
||||||
focusTarget=focusTarget}}
|
options=(hash
|
||||||
|
categoryId=model.categoryId
|
||||||
|
minimum=model.minimumRequiredTags
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{{popup-input-tip validation=tagValidation}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class='submit-panel'>
|
{{plugin-outlet name="composer-fields" args=(hash model=model)}}
|
||||||
{{plugin-outlet name="composer-fields-below" args=(hash model=model)}}
|
{{/unless}}
|
||||||
|
|
||||||
<div class='save-or-cancel'>
|
</div>
|
||||||
{{#unless model.viewFullscreen}}
|
|
||||||
{{composer-save-button action=(action "save")
|
{{composer-editor topic=topic
|
||||||
icon=saveIcon
|
composer=model
|
||||||
label=saveLabel
|
lastValidatedAt=lastValidatedAt
|
||||||
disableSubmit=disableSubmit}}
|
canWhisper=canWhisper
|
||||||
|
storeToolbarState=(action "storeToolbarState")
|
||||||
|
onPopupMenuAction=(action "onPopupMenuAction")
|
||||||
|
showUploadModal=(route-action "showUploadSelector")
|
||||||
|
popupMenuOptions=popupMenuOptions
|
||||||
|
draftStatus=model.draftStatus
|
||||||
|
isUploading=isUploading
|
||||||
|
allowUpload=allowUpload
|
||||||
|
uploadIcon=uploadIcon
|
||||||
|
isCancellable=isCancellable
|
||||||
|
uploadProgress=uploadProgress
|
||||||
|
groupsMentioned=(action "groupsMentioned")
|
||||||
|
cannotSeeMention=(action "cannotSeeMention")
|
||||||
|
importQuote=(action "importQuote")
|
||||||
|
togglePreview=(action "togglePreview")
|
||||||
|
showToolbar=showToolbar
|
||||||
|
afterRefresh=(action "afterRefresh")
|
||||||
|
focusTarget=focusTarget}}
|
||||||
|
|
||||||
|
<div class='submit-panel'>
|
||||||
|
{{plugin-outlet name="composer-fields-below" args=(hash model=model)}}
|
||||||
|
|
||||||
|
<div class='save-or-cancel'>
|
||||||
|
{{#unless model.viewFullscreen}}
|
||||||
|
{{composer-save-button action=(action "save")
|
||||||
|
icon=saveIcon
|
||||||
|
label=saveLabel
|
||||||
|
disableSubmit=disableSubmit}}
|
||||||
|
|
||||||
{{#if site.mobileView}}
|
{{#if site.mobileView}}
|
||||||
<a href {{action "cancel"}} class='cancel' tabindex="6" title={{i18n 'cancel'}}>
|
<a href {{action "cancel"}} class='cancel' tabindex="6" title={{i18n 'cancel'}}>
|
||||||
|
@ -150,89 +150,87 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
|
{{#if site.mobileView}}
|
||||||
{{#if site.mobileView}}
|
{{#if whisperOrUnlistTopic}}
|
||||||
{{#if whisperOrUnlistTopic}}
|
<span class='whisper'>
|
||||||
<span class='whisper'>
|
{{d-icon "far-eye-slash"}}
|
||||||
{{d-icon "far-eye-slash"}}
|
</span>
|
||||||
</span>
|
|
||||||
{{/if}}
|
|
||||||
{{#if model.noBump}}
|
|
||||||
<span class="no-bump">{{d-icon "anchor"}}</span>
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#if model.noBump}}
|
||||||
|
<span class="no-bump">{{d-icon "anchor"}}</span>
|
||||||
{{#if isUploading}}
|
|
||||||
<div id="file-uploading">
|
|
||||||
{{loading-spinner size="small"}}<span>{{i18n 'upload_selector.uploading'}} {{uploadProgress}}%</span>
|
|
||||||
{{#if isCancellable}}
|
|
||||||
<a href id="cancel-file-upload" {{action "cancelUpload"}}>{{d-icon "times"}}</a>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div id='draft-status' class={{if isUploading 'hidden'}}>
|
{{/if}}
|
||||||
{{#if model.draftSaving}}<div class="spinner small"></div>{{/if}}
|
|
||||||
{{#if model.draftSaved}}{{d-icon 'check' class='save-animation'}}{{/if}}
|
{{#if isUploading}}
|
||||||
{{#if model.draftStatus}}
|
<div id="file-uploading">
|
||||||
<span title={{model.draftStatus}}>
|
{{loading-spinner size="small"}}<span>{{i18n 'upload_selector.uploading'}} {{uploadProgress}}%</span>
|
||||||
{{#if model.draftConflictUser}}
|
{{#if isCancellable}}
|
||||||
{{avatar model.draftConflictUser imageSize="small"}} {{d-icon 'user-edit'}}
|
<a href id="cancel-file-upload" {{action "cancelUpload"}}>{{d-icon "times"}}</a>
|
||||||
{{else}}
|
|
||||||
{{d-icon 'sync-alt'}}
|
|
||||||
{{/if}}
|
|
||||||
{{#unless site.mobileView}}
|
|
||||||
{{model.draftStatus}}
|
|
||||||
{{/unless}}
|
|
||||||
</span>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{/if}}
|
||||||
|
<div id='draft-status' class={{if isUploading 'hidden'}}>
|
||||||
{{#if site.mobileView}}
|
{{#if model.draftSaving}}<div class="spinner small"></div>{{/if}}
|
||||||
{{#if allowUpload}}
|
{{#if model.draftSaved}}{{d-icon 'check' class='save-animation'}}{{/if}}
|
||||||
<a class="btn btn-default no-text mobile-file-upload {{if isUploading 'hidden'}}">
|
{{#if model.draftStatus}}
|
||||||
{{d-icon uploadIcon}}
|
<span title={{model.draftStatus}}>
|
||||||
</a>
|
{{#if model.draftConflictUser}}
|
||||||
{{/if}}
|
{{avatar model.draftConflictUser imageSize="small"}} {{d-icon 'user-edit'}}
|
||||||
|
{{else}}
|
||||||
<a href class="btn btn-default no-text mobile-preview" title={{i18n 'composer.show_preview'}} {{action "togglePreview"}}>
|
{{d-icon 'sync-alt'}}
|
||||||
{{d-icon "desktop"}}
|
{{/if}}
|
||||||
</a>
|
{{#unless site.mobileView}}
|
||||||
|
{{model.draftStatus}}
|
||||||
{{#if showPreview}}
|
{{/unless}}
|
||||||
{{d-button action=(action "togglePreview") class="hide-preview" label="composer.hide_preview"}}
|
</span>
|
||||||
{{/if}}
|
|
||||||
{{else}}
|
|
||||||
<a href {{action "togglePreview"}} class='toggle-preview'>{{html-safe toggleText}}</a>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{else}}
|
{{#if site.mobileView}}
|
||||||
<div class='saving-text'>
|
{{#if allowUpload}}
|
||||||
{{#if model.createdPost}}
|
<a class="btn btn-default no-text mobile-file-upload {{if isUploading 'hidden'}}">
|
||||||
{{i18n 'composer.saved'}} <a class='permalink' href={{createdPost.url}} {{action "viewNewReply"}}>{{i18n 'composer.view_new_post'}}</a>
|
{{d-icon uploadIcon}}
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<a href class="btn btn-default no-text mobile-preview" title={{i18n 'composer.show_preview'}} {{action "togglePreview"}}>
|
||||||
|
{{d-icon "desktop"}}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{{#if showPreview}}
|
||||||
|
{{d-button action=(action "togglePreview") class="hide-preview" label="composer.hide_preview"}}
|
||||||
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{i18n 'composer.saving'}} {{loading-spinner size="small"}}
|
<a href {{action "togglePreview"}} class='toggle-preview'>{{html-safe toggleText}}</a>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class='draft-text'>
|
{{else}}
|
||||||
{{#if model.topic}}
|
<div class='saving-text'>
|
||||||
{{d-icon "share"}} {{html-safe draftTitle}}
|
{{#if model.createdPost}}
|
||||||
{{else}}
|
{{i18n 'composer.saved'}} <a class='permalink' href={{createdPost.url}} {{action "viewNewReply"}}>{{i18n 'composer.view_new_post'}}</a>
|
||||||
{{i18n "composer.saved_draft"}}
|
{{else}}
|
||||||
{{/if}}
|
{{i18n 'composer.saving'}} {{loading-spinner size="small"}}
|
||||||
</div>
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
{{composer-toggles composeState=model.composeState
|
<div class='draft-text'>
|
||||||
toggleFullscreen=(action "openIfDraft")
|
{{#if model.topic}}
|
||||||
toggleComposer=(action "toggle")
|
{{d-icon "share"}} {{html-safe draftTitle}}
|
||||||
toggleToolbar=(action "toggleToolbar")}}
|
{{else}}
|
||||||
|
{{i18n "composer.saved_draft"}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
|
||||||
{{/if}}
|
{{composer-toggles composeState=model.composeState
|
||||||
|
toggleFullscreen=(action "openIfDraft")
|
||||||
|
toggleComposer=(action "toggle")
|
||||||
|
toggleToolbar=(action "toggleToolbar")}}
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue