summaryrefslogtreecommitdiff
path: root/templates/view_xref_address_record.tpl
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-25 16:56:05 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-25 16:56:05 +0100
commit98a222ddbaa5ca0dc7d914d4912af8055d46dbc4 (patch)
treeb90036736e0c371dfddc452074ebaa71a8b7182f /templates/view_xref_address_record.tpl
parentc35e539cf4777eead5500d3229c4a84669db8c5e (diff)
downloadliberty-98a222ddbaa5ca0dc7d914d4912af8055d46dbc4.tar.gz
liberty-98a222ddbaa5ca0dc7d914d4912af8055d46dbc4.tar.bz2
liberty-98a222ddbaa5ca0dc7d914d4912af8055d46dbc4.zip
Add generic xref record templates and sub-template rendering to liberty
list_xref.tpl now uses 7-column layout (Type/Link/Key/Value/Date/Updated/ Edit) and delegates row rendering to view_xref_{template}_record.tpl, matching the template name stored in liberty_xref_source. Eight generic record templates added (text, contact, phone, address, date, bank, sig, locate) using hasUpdatePermission()/hasExpungePermission() throughout. edit_xref.php gains expunge/stepXref handling for Delete and Restore actions, with permission checks scoped per action branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates/view_xref_address_record.tpl')
-rw-r--r--templates/view_xref_address_record.tpl28
1 files changed, 28 insertions, 0 deletions
diff --git a/templates/view_xref_address_record.tpl b/templates/view_xref_address_record.tpl
new file mode 100644
index 0000000..d7efba4
--- /dev/null
+++ b/templates/view_xref_address_record.tpl
@@ -0,0 +1,28 @@
+{strip}
+<td>{$gContent->mInfo.$source[xref].source_title|escape}</td>
+<td>&nbsp;</td>
+<td>{$gContent->mInfo.$source[xref].xkey_ext|escape}, {$gContent->mInfo.$source[xref].xkey|escape}</td>
+<td>{$gContent->mInfo.$source[xref].data|escape}</td>
+<td>
+ {if $source ne 'history'}
+ {$gContent->mInfo.$source[xref].start_date|bit_short_date}
+ {else}
+ {$gContent->mInfo.$source[xref].end_date|bit_short_date}
+ {/if}
+</td>
+<td>{$gContent->mInfo.$source[xref].last_update_date|bit_short_date}</td>
+<td>
+ <span class="actionicon">
+ {if $gContent->hasUpdatePermission() && $source ne 'history'}
+ {smartlink ititle="Edit" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-edit" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id}
+ {/if}
+ {if $gContent->hasExpungePermission()}
+ {if $source eq 'history'}
+ {smartlink ititle="Restore" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-edit" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id expunge=-1}
+ {else}
+ {smartlink ititle="Delete" ipackage="liberty" ifile="edit_xref.php" booticon="icon-note-delete" content_id=$gContent->mInfo.content_id xref_id=$gContent->mInfo.$source[xref].xref_id expunge=1}
+ {/if}
+ {/if}
+ </span>
+</td>
+{/strip}