mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
1bd4b5cda7
no issue - show a delete icon when a snippet is hovered in plus/slash menus - show a confirmation dialog when the delete icon is clicked - keep menus open whilst displaying the delete confirmation dialog
26 lines
1.4 KiB
Handlebars
26 lines
1.4 KiB
Handlebars
{{#each @itemSections as |section sectionIndex|}}
|
|
{{#if section.items}}
|
|
{{#if (or (not section.developerExperiment) (enable-developer-experiments))}}
|
|
<div class="flex flex-column justify-center {{unless (eq sectionIndex 0) "mt3"}} mb2 pl4 pr4 pt3 midlightgrey ttu f-supersmall fw5 tracked-3" style="min-width: calc(100% - 3.2rem); {{unless (eq sectionIndex 0) "border-top: 1px solid #e5eff5;"}}">
|
|
{{section.title}}
|
|
</div>
|
|
{{#each section.items as |item|}}
|
|
{{#if (or (not item.developerExperiment) (enable-developer-experiments))}}
|
|
<div
|
|
class="{{if (eq item @selectedItem) "kg-cardmenu-card-selected"}} {{kg-style "cardmenu-card"}}"
|
|
data-kg="cardmenu-card"
|
|
role="menuitem"
|
|
{{on "click" (fn @itemClicked item)}}
|
|
>
|
|
<div class="{{kg-style "cardmenu-icon"}} {{item.iconClass}}" aria-hidden="true">{{svg-jar item.icon class="w7 h7"}}</div>
|
|
<div class="{{kg-style "cardmenu-label"}}">{{item.label}}</div>
|
|
{{#if item.deleteClicked}}
|
|
<span class="kg-cardmenu-action-icon" {{on "click" item.deleteClicked}}>{{svg-jar "trash"}}</span>
|
|
{{/if}}
|
|
</div>
|
|
{{/if}}
|
|
{{/each}}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/each}}
|