diff --git a/template/templates/common/item_meta.html b/template/templates/common/item_meta.html index 21c802a79dfe0ad28f853d406c60c432fab55fe5..a78a8378aaa3659afeddd8f42a3da579b0a7b61d 100644 --- a/template/templates/common/item_meta.html +++ b/template/templates/common/item_meta.html @@ -42,6 +42,15 @@ title="{{ t "entry.shared_entry.title" }}" target="_blank">{{ icon "share" }}<span class="icon-label">{{ t "entry.shared_entry.label" }}</span></a> </li> + <li> + <a href="#" + data-confirm="true" + data-url="{{ route "unshareEntry" "entryID" .entry.ID }}" + data-label-question="{{ t "confirm.question" }}" + data-label-yes="{{ t "confirm.yes" }}" + data-label-no="{{ t "confirm.no" }}" + data-label-loading="{{ t "confirm.loading" }}">{{ icon "delete" }}<span class="icon-label">{{ t "entry.unshare.label" }}</span></a> + </li> {{ end }} {{ if .hasSaveEntry }} <li> diff --git a/template/templates/views/entry.html b/template/templates/views/entry.html index 1317d6c636b0c5ce9107ea2504d266113833aacc..106140f9ac94c4f12e9d941abf1ae615a27a1312 100644 --- a/template/templates/views/entry.html +++ b/template/templates/views/entry.html @@ -44,17 +44,28 @@ >{{ icon "save" }}<span class="icon-label">{{ t "entry.save.label" }}</span></a> </li> {{ end }} - <li> - {{ if .entry.ShareCode }} + {{ if .entry.ShareCode }} + <li> <a href="{{ route "sharedEntry" "shareCode" .entry.ShareCode }}" title="{{ t "entry.shared_entry.title" }}" target="_blank">{{ icon "share" }}<span class="icon-label">{{ t "entry.shared_entry.label" }}</span></a> - {{ else }} + </li> + <li> + <a href="#" + data-confirm="true" + data-url="{{ route "unshareEntry" "entryID" .entry.ID }}" + data-label-question="{{ t "confirm.question" }}" + data-label-yes="{{ t "confirm.yes" }}" + data-label-no="{{ t "confirm.no" }}" + data-label-loading="{{ t "confirm.loading" }}">{{ icon "delete" }}<span class="icon-label">{{ t "entry.unshare.label" }}</span></a> + </li> + {{ else }} + <li> <a href="{{ route "shareEntry" "entryID" .entry.ID }}" title="{{ t "entry.share.title" }}" target="_blank">{{ icon "share" }}<span class="icon-label">{{ t "entry.share.label" }}</span></a> - {{ end }} - </li> + </li> + {{ end }} <li> <a href="{{ .entry.URL | safeURL }}" target="_blank"