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">
<div class="container box">
<div class="row">
<div class="col-12">
<div class="form-group">
{{ focus-input type = "text" id = "new-section-name" value = newSectionName
2018-12-08 20:54:19 +00:00
class=(if newSectionNameMissing "mousetrap form-control form-control-lg is-invalid" "mousetrap form-control form-control-lg")
2018-06-04 14:37:21 +01:00
placeholder="Enter section name" autocomplete="off"}}
</div>
</div>
</div>
<div class="row">
<div class="col-12 col-md-6">
<div class="form-group">
<div class="new-section-caption">Select Section Type</div>
<ul class="preset-list">
{{ # each sections as | section | }}
2018-12-08 20:54:19 +00:00
<li class="item" {{ action "onInsertSection" section }} >
2018-06-04 14:37:21 +01:00
<div class="icon">
2018-12-08 20:54:19 +00:00
<img class="img" src="/sections/ {{ section .contentType }} .png" srcset="/sections/ {{ section .contentType }} @2x.png">
2018-06-04 14:37:21 +01:00
</div>
2018-12-08 20:54:19 +00:00
<div class="title"> {{ section .title }} </div>
2018-06-04 14:37:21 +01:00
</li>
{{ / each }}
</ul>
</div>
</div>
<div class="col-12 col-md-6">
2018-06-07 14:24:27 +01:00
<div class="new-section-caption">Select Re-usable Content</div>
2018-06-04 14:37:21 +01:00
{{ # if hasBlocks }}
<ul class="block-list">
{{ # each blocks as | block | }}
2018-12-06 14:10:00 +00:00
<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 }}
2018-12-08 20:54:19 +00:00
<div class="details" {{ action "onInsertBlock" block }} >
2018-06-04 14:37:21 +01:00
<div class="title text-truncate"> {{ block .title }} </div>
<div class="desc text-truncate"> {{ block .excerpt }} </div>
</div>
</li>
{{ / each }}
</ul>
{{ else }}
2018-06-07 14:24:27 +01:00
<div class="new-section-empty">You have no reusable content — publish any document section as a template for others to reuse</div>
2018-06-04 14:37:21 +01:00
{{ / if }}
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>