[Rt-commit] rt branch, 4.4/add-messages-assets-display, created. rt-4.4.2-241-gaeb907081

Craig Kaiser craig at bestpractical.com
Tue Jun 26 19:54:54 EDT 2018


The branch, 4.4/add-messages-assets-display has been created
        at  aeb907081b669ce92ab7b19e39113955c34389ee (commit)

- Log -----------------------------------------------------------------
commit aeb907081b669ce92ab7b19e39113955c34389ee
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Tue Jun 26 15:10:59 2018 -0400

    Add results array ref to assets display page
    
    Make it easier to push messages to the assets display page. Currently
    the results array is stored in the session, it is simplier to store
    messages in a results array.

diff --git a/share/html/Asset/Display.html b/share/html/Asset/Display.html
index 3a57f012a..e57f3f203 100644
--- a/share/html/Asset/Display.html
+++ b/share/html/Asset/Display.html
@@ -48,9 +48,9 @@
 <& /Elements/Header, Title => loc("Asset #[_1]: [_2]", $asset->id, $asset->Name) &>
 <& /Elements/Tabs &>
 
-% $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Asset => $asset);
+% $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Asset => $asset, Results => \@results);
 
-<& /Elements/ListActions &>
+<& /Elements/ListActions, actions => \@results &>
 
 <span class="catalog <% CSSClass($asset->CatalogObj->Name) %>">
 <& Elements/ShowSummary, AssetObj => $asset &>
@@ -70,6 +70,7 @@
 $id => undef
 </%args>
 <%init>
+my @results;
 my $asset = LoadAsset($id);
-$m->callback(CallbackName => 'BeforeDisplay', ARGSRef => \%ARGS, Asset => $asset);
+$m->callback(CallbackName => 'BeforeDisplay', ARGSRef => \%ARGS, Asset => $asset, Results => \@results);
 </%init>

-----------------------------------------------------------------------


More information about the rt-commit mailing list