[Bps-public-commit] RT-Extension-PreviewInSearch branch show-history-page-initial-callback created. 0.06-1-gb458017
BPS Git Server
git at git.bestpractical.com
Tue Jan 30 21:25:01 UTC 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "RT-Extension-PreviewInSearch".
The branch, show-history-page-initial-callback has been created
at b458017274798fe1607de469f12e8afde8286953 (commit)
- Log -----------------------------------------------------------------
commit b458017274798fe1607de469f12e8afde8286953
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Jan 30 16:24:24 2024 -0500
Change to use Initial callback and set PathPrefix instead
diff --git a/html/Callbacks/RT-Extension-PreviewInSearch/Elements/ShowHistoryPage/Initial b/html/Callbacks/RT-Extension-PreviewInSearch/Elements/ShowHistoryPage/Initial
new file mode 100644
index 0000000..e860f6c
--- /dev/null
+++ b/html/Callbacks/RT-Extension-PreviewInSearch/Elements/ShowHistoryPage/Initial
@@ -0,0 +1,13 @@
+<%ARGS>
+$ARGSRef
+</%ARGS>
+<%INIT>
+my $ShowHistory = RT->Config->Get("ShowHistory", $session{'CurrentUser'});
+if ($ShowHistory eq "scroll") {
+ # if scrolling history the paths assume you are on Ticket/Display.html
+ # eg AttachmentPath is set to Attachment instead of the full path
+ # this means the paths do not work for the search preview
+ # fix the paths to be full paths so they work
+ $ARGSRef->{PathPrefix} = RT->Config->Get('WebPath') . '/Ticket/';
+}
+</%INIT>
diff --git a/html/Callbacks/RT-Extension-PreviewInSearch/Elements/ShowHistoryPage/ModifyPaths b/html/Callbacks/RT-Extension-PreviewInSearch/Elements/ShowHistoryPage/ModifyPaths
deleted file mode 100644
index af4e1dd..0000000
--- a/html/Callbacks/RT-Extension-PreviewInSearch/Elements/ShowHistoryPage/ModifyPaths
+++ /dev/null
@@ -1,24 +0,0 @@
-<%ARGS>
-$ARGSRef
-</%ARGS>
-<%INIT>
-my $ShowHistory = RT->Config->Get("ShowHistory", $session{'CurrentUser'});
-if ($ShowHistory eq "scroll") {
- # if scrolling history the paths assume you are on Ticket/Display.html
- # eg AttachmentPath is set to Attachment instead of the full path
- # this means the paths do not work for the search preview
- # fix the paths to be full paths so they work
- if ( $ARGSRef->{AttachmentPath} ne ( RT->Config->Get('WebPath') . '/Ticket/Attachment' ) ) {
- $ARGSRef->{AttachmentPath} = RT->Config->Get('WebPath') . '/Ticket/Attachment';
- }
- if ( $ARGSRef->{ForwardPath} ne ( RT->Config->Get('WebPath') . '/Ticket/Forward.html' ) ) {
- $ARGSRef->{ForwardPath} = RT->Config->Get('WebPath') . '/Ticket/Forward.html';
- }
- if ( $ARGSRef->{UpdatePath} ne ( RT->Config->Get('WebPath') . '/Ticket/Update.html' ) ) {
- $ARGSRef->{UpdatePath} = RT->Config->Get('WebPath') . '/Ticket/Update.html';
- }
- if ( $ARGSRef->{EmailRecordPath} ne ( RT->Config->Get('WebPath') . '/Ticket/ShowEmailRecord.html' ) ) {
- $ARGSRef->{EmailRecordPath} = RT->Config->Get('WebPath') . '/Ticket/ShowEmailRecord.html';
- }
-}
-</%INIT>
-----------------------------------------------------------------------
hooks/post-receive
--
RT-Extension-PreviewInSearch
More information about the Bps-public-commit
mailing list