2017-12-07 19:43:46 +00:00
|
|
|
<div id={{concat "content-linker-modal-" page.id}} class="modal" tabindex="-1" role="dialog">
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">Insert Link</div>
|
|
|
|
<div class="modal-body">
|
2018-12-21 11:46:51 +00:00
|
|
|
<ul class="tabnav-control text-center">
|
2018-12-21 17:38:55 +00:00
|
|
|
{{#if hasSections}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<li class="tab {{if tab1Selected "selected"}}" {{action "onTabSelect" 1}} role="button" tabindex="0">Section</li>
|
2018-12-21 17:38:55 +00:00
|
|
|
{{/if}}
|
|
|
|
{{#if hasAttachments}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<li class="tab {{if tab2Selected "selected"}}" {{action "onTabSelect" 2}} role="button" tabindex="0">Attachment</li>
|
2018-12-21 17:38:55 +00:00
|
|
|
{{/if}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<li class="tab {{if tab3Selected "selected"}}" {{action "onTabSelect" 3}} role="button" tabindex="0">Search</li>
|
|
|
|
<li class="tab {{if tab4Selected "selected"}}" {{action "onTabSelect" 4}} role="button" tabindex="0">Network</li>
|
2018-12-21 11:46:51 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
{{#if showSections}}
|
|
|
|
<div class="content-linker-modal-container">
|
|
|
|
<p>Link to content within this document</p>
|
|
|
|
{{ui/ui-list-picker items=candidates.pages nameField="title" singleSelect=true onSelect=(action "setSelection")}}
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
2018-12-21 11:46:51 +00:00
|
|
|
{{/if}}
|
2016-10-26 17:31:05 -07:00
|
|
|
|
2018-12-21 11:46:51 +00:00
|
|
|
{{#if showAttachments}}
|
|
|
|
<div class="content-linker-modal-container">
|
|
|
|
<p>Link to an attachment within this document</p>
|
|
|
|
<div class="widget-list-picker">
|
|
|
|
<ul class="options">
|
|
|
|
{{#each candidates.attachments as |item|}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<li class="option {{if item.selected "selected"}}" {{action "setSelection" item}} role="button" tabindex="0">
|
2018-12-21 11:46:51 +00:00
|
|
|
<div class="text text-truncate">
|
|
|
|
<img class="icon" src="/assets/img/attachments/{{document/file-icon item.context}}">
|
|
|
|
{{item.title}}
|
|
|
|
</div>
|
|
|
|
{{#if item.selected}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<i class="dicon {{constants.Icon.Tick}}" aria-selected="true" />
|
2018-12-21 11:46:51 +00:00
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
2018-12-21 11:46:51 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2017-12-07 19:43:46 +00:00
|
|
|
|
2018-12-21 11:46:51 +00:00
|
|
|
{{#if showSearch}}
|
|
|
|
<div class="content-linker-modal-container">
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Search</label>
|
2019-02-28 15:11:46 +00:00
|
|
|
{{focus-input id="content-linker-search" type="input" class="form-control" value=keywords placeholder="keyword search" autocomplete="off" key-up=(action "onSearch")}}
|
2018-12-21 11:46:51 +00:00
|
|
|
<small class="form-text text-muted">Document name, content, attachment name</small>
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
2018-12-21 11:46:51 +00:00
|
|
|
{{#unless hasMatches}}
|
|
|
|
<p class="nothing">Nothing found.</p>
|
|
|
|
{{/unless}}
|
|
|
|
<div class="widget-list-picker">
|
|
|
|
<ul class="options">
|
|
|
|
{{#each matches.documents as |item|}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<li class="option {{if item.selected "selected"}}" {{action "setSelection" item}} role="button" tabindex="0">
|
2018-12-21 11:46:51 +00:00
|
|
|
<div class="text text-truncate">
|
|
|
|
{{item.title}}<br>{{item.context}}
|
|
|
|
</div>
|
|
|
|
{{#if item.selected}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<i class="dicon {{constants.Icon.Tick}}" aria-selected="true" />
|
2018-12-21 11:46:51 +00:00
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
{{#each matches.pages as |item|}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<li class="option {{if item.selected "selected"}}" {{action "setSelection" item}} role="button" tabindex="0">
|
2018-12-21 11:46:51 +00:00
|
|
|
<div class="text text-truncate">
|
|
|
|
{{item.title}}<br>{{item.context}}
|
|
|
|
</div>
|
|
|
|
{{#if item.selected}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<i class="dicon {{constants.Icon.Tick}}" aria-selected="true" />
|
2018-12-21 11:46:51 +00:00
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
{{#each matches.attachments as |item|}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<li class="option {{if item.selected "selected"}}" {{action "setSelection" item}} role="button" tabindex="0">
|
2018-12-21 11:46:51 +00:00
|
|
|
<div class="text text-truncate">
|
|
|
|
<img class="icon" src="/assets/img/attachments/{{document/file-icon item.context}}">
|
|
|
|
{{item.title}}
|
|
|
|
</div>
|
|
|
|
{{#if item.selected}}
|
2022-01-11 12:40:52 -05:00
|
|
|
<i class="dicon {{constants.Icon.Tick}}" aria-selected="true" />
|
2018-12-21 11:46:51 +00:00
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
2018-12-21 11:46:51 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2016-10-26 17:31:05 -07:00
|
|
|
|
2018-12-21 11:46:51 +00:00
|
|
|
{{#if showNetwork}}
|
|
|
|
<div class="content-linker-modal-container">
|
|
|
|
<p>Specify network drive/share/folder location</p>
|
|
|
|
<div class="form-group">
|
|
|
|
{{focus-input id="content-linker-networklocation" type="input" class="form-control" value=networkLocation placeholder="e.g. //share/folder" autocomplete="off"}}
|
|
|
|
<small class="form-text text-muted"></small>
|
2018-07-09 14:41:55 -04:00
|
|
|
</div>
|
2018-12-21 11:46:51 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2018-12-21 11:15:59 +00:00
|
|
|
{{ui/ui-button color=constants.Color.Gray light=true label=constants.Label.Close dismiss=true}}
|
|
|
|
{{ui/ui-button-gap}}
|
|
|
|
{{ui/ui-button color=constants.Color.Green light=true label=constants.Label.Insert onClick=(action "onInsertLink")}}
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-05 19:11:01 +00:00
|
|
|
</div>
|
2017-12-07 19:43:46 +00:00
|
|
|
</div>
|