summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-25 16:22:41 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-25 16:22:41 +0100
commitc35e539cf4777eead5500d3229c4a84669db8c5e (patch)
tree4463479714ffcc69ec53c35cf799979e394c33a5 /templates
parentfb30cd3317e01ebe8e748e4bcf1482e4c324b9b9 (diff)
downloadliberty-c35e539cf4777eead5500d3229c4a84669db8c5e.tar.gz
liberty-c35e539cf4777eead5500d3229c4a84669db8c5e.tar.bz2
liberty-c35e539cf4777eead5500d3229c4a84669db8c5e.zip
list_xref: fix icon, add allow_add guard, remove debug comment
Use icon-note-add to match contact package. Add button now requires allow_add=true (passed by edit templates only), isValid(), and hasUpdatePermission() — so it never appears on view pages or new content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/list_xref.tpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/list_xref.tpl b/templates/list_xref.tpl
index b234e68..2552fb6 100644
--- a/templates/list_xref.tpl
+++ b/templates/list_xref.tpl
@@ -47,9 +47,9 @@
</tbody>
</table>
</div>
- {if $gContent->hasUpdatePermission() && $source ne 'history'}
+ {if $allow_add && $gContent->isValid() && $gContent->hasUpdatePermission() && $source ne 'history'}
<div>
- {smartlink ititle="Add record" ipackage="liberty" ifile="add_xref.php" booticon="fa-plus" content_id=$gContent->mInfo.content_id xref_type=$xref_type}
+ {smartlink ititle="Add record" ipackage="liberty" ifile="add_xref.php" booticon="icon-note-add" content_id=$gContent->mInfo.content_id xref_type=$xref_type}
</div>
{/if}
{/legend}