fix: visually disable/remove interactive elements in non-editable sheets

This commit is contained in:
Johannes Loher 2022-11-03 23:39:49 +01:00
parent a71a388fbf
commit 2023019d3a
6 changed files with 27 additions and 3 deletions

View file

@ -11,6 +11,7 @@ SPDX-License-Identifier: MIT
!-- @param title: The title to use for the link element (will be localized)
!-- @param type: An optional property to use as data-type attribute
}}
{{#if @root/editable}}
<div class="ds4-add-button">
<a class="control-{{documentType}}" title="{{localize title}}" data-action="create" {{#if type}}data-type="{{type}}"
{{/if}}>
@ -18,3 +19,4 @@ SPDX-License-Identifier: MIT
{{localize "DS4.UserInteractionAdd"}}
</a>
</div>
{{/if}}

View file

@ -13,8 +13,10 @@ SPDX-License-Identifier: MIT
!-- @param deleteTitle: The title to use for the delete link element (will be localized)
--}}
<div class="ds4-control-button-group">
{{#if @root/editable}}
<a class="ds4-control-button-group__button control-{{documentType}}" data-action="edit"
title="{{localize editTitle}}"><i class="fas fa-edit"></i></a>
<a class="ds4-control-button-group__button control-{{documentType}}" data-action="delete"
title="{{localize deleteTitle}}"><i class="fas fa-trash"></i></a>
{{/if}}
</div>