diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-27 20:20:11 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-27 20:20:11 +0100 |
| commit | 2fb898ce714e282f5dfca365fe52abc15437f7ef (patch) | |
| tree | f585ca09e684eea5d8f05c09b739c2074860e1e6 /templates/list_xref.tpl | |
| parent | 2a1242bff74c3aa12953a6496004188edc61033a (diff) | |
| download | liberty-2fb898ce714e282f5dfca365fe52abc15437f7ef.tar.gz liberty-2fb898ce714e282f5dfca365fe52abc15437f7ef.tar.bz2 liberty-2fb898ce714e282f5dfca365fe52abc15437f7ef.zip | |
Allow xref tabs to suppress edit/delete buttons via allow_edit=false
list_xref.tpl: accept allow_edit param; assign $xrefAllowEdit for record
templates; hide Edit column header when allow_edit is false.
view_xref_*_record.tpl (8 files): gate hasUpdatePermission and
hasExpungePermission checks on $xrefAllowEdit|default:true so callers
can render xref data read-only without altering user permissions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates/list_xref.tpl')
| -rw-r--r-- | templates/list_xref.tpl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/list_xref.tpl b/templates/list_xref.tpl index e1a6bbc..9ac5a3e 100644 --- a/templates/list_xref.tpl +++ b/templates/list_xref.tpl @@ -1,4 +1,5 @@ {assign var=xrefcnt value=$gContent->mInfo.$source|default:[]|@count} + {assign var=xrefAllowEdit value=$allow_edit|default:true} {jstab title="$source_title ($xrefcnt)"} {legend legend=$source_title} <div class="form-group table-responsive"> @@ -15,7 +16,7 @@ <th>{tr}Ended{/tr}</th> {/if} <th>{tr}Updated{/tr}</th> - <th>{tr}Edit{/tr}</th> + {if $xrefAllowEdit}<th>{tr}Edit{/tr}</th>{/if} </tr> </thead> <tbody> |
