2018-06-04 14:37:21 +01:00
<div id="add-section-modal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-80" role="document">
<div class="modal-content">
<div class="modal-header">Insert Section</div>
<div class="modal-body">
<div id="new-section-wizard" class="new-section-wizard">
2018-12-21 11:46:51 +00:00
<div class="box">
<div class="form-group">
{{ focus-input type = "text" id = "new-section-name" value = newSectionName
class=(if newSectionNameMissing "mousetrap form-control form-control-lg is-invalid" "mousetrap form-control form-control-lg")
placeholder="Enter section name" autocomplete="off"}}
2018-06-04 14:37:21 +01:00
</div>
2018-12-21 11:46:51 +00:00
<div class="form-group">
<div class="new-section-caption">Select Section Type</div>
<ul class="preset-list">
{{ # each sections as | section | }}
<li class="item" {{ action "onInsertSection" section }} >
<div class="icon">
<img class="img" src="/sections/ {{ section .contentType }} .png" srcset="/sections/ {{ section .contentType }} @2x.png">
</div>
<div class="title"> {{ section .title }} </div>
</li>
{{ / each }}
</ul>
2018-06-04 14:37:21 +01:00
</div>
2018-12-21 11:46:51 +00:00
<div class="new-section-caption">Select Re-usable Content</div>
{{ # if hasBlocks }}
<ul class="block-list">
{{ # each blocks as | block | }}
<li class="item">
{{ # attach-tooltip showDelay = 1 0 0 0 }} Published by {{ block .firstname }} {{ block .lastname }} , {{ time-ago block .created }} — used {{ block .used }} times {{ / attach-tooltip }}
<div class="details" {{ action "onInsertBlock" block }} >
<div class="title text-truncate"> {{ block .title }} </div>
<div class="desc text-truncate"> {{ block .excerpt }} </div>
</div>
</li>
{{ / each }}
</ul>
{{ else }}
<div class="new-section-empty">You have no reusable content — publish any document section as a template for others to reuse</div>
{{ / if }}
2018-06-04 14:37:21 +01:00
</div>
</div>
</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 .Cancel dismiss = true }}
2018-06-04 14:37:21 +01:00
</div>
</div>
</div>
</div>