[Bps-public-commit] rt-extension-assets branch, bug-fixes, created. 12bb15ea57bf0bd2dd31e56a41676742fcfb8434

Jim Brandt jbrandt at bestpractical.com
Fri Dec 13 14:44:20 EST 2013


The branch, bug-fixes has been created
        at  12bb15ea57bf0bd2dd31e56a41676742fcfb8434 (commit)

- Log -----------------------------------------------------------------
commit e7841f96f7f8b5505ce29a47230ced1a0250cbae
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Dec 12 10:25:13 2013 -0500

    Update Assets Admin page with correct menu

diff --git a/html/Admin/Assets/index.html b/html/Admin/Assets/index.html
index 551ee60..b1318b2 100644
--- a/html/Admin/Assets/index.html
+++ b/html/Admin/Assets/index.html
@@ -47,4 +47,4 @@
 %# END BPS TAGGED BLOCK }}}
 <& /Elements/Header, Title => loc('Asset Administration') &>
 <& /Elements/Tabs &>
-<& /Elements/ListMenu, menu => Menu()->child('tools')->child('config')->child('assets') &>
+<& /Elements/ListMenu, menu => Menu()->child('admin')->child('assets') &>

commit 83c9423c68d78fac03fca41107c0b1e694616acc
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Dec 12 10:27:12 2013 -0500

    Add link descriptions for Asset Admin page

diff --git a/html/Callbacks/RT-Extension-Assets/Elements/Tabs/Privileged b/html/Callbacks/RT-Extension-Assets/Elements/Tabs/Privileged
index 227ecf7..c580072 100644
--- a/html/Callbacks/RT-Extension-Assets/Elements/Tabs/Privileged
+++ b/html/Callbacks/RT-Extension-Assets/Elements/Tabs/Privileged
@@ -76,11 +76,17 @@ $global_cfs->child("assets", title => loc("Assets"), path => "/Admin/Global/Cust
 my $config = Menu()->child("admin");
 if ($config) {
     my $assets   = $config->child("tools")->add_before("assets", title => loc("Assets"), path => "/Admin/Assets/");
-    my $catalogs = $assets->child("catalogs", title => loc("Catalogs"), path => "/Admin/Assets/Catalogs/");
+    my $catalogs = $assets->child("catalogs",
+        title => loc("Catalogs"),
+        description => loc("Modify asset catalogs"),
+        path => "/Admin/Assets/Catalogs/");
     $catalogs->child("select", title => loc("Select"), path => $catalogs->path);
     $catalogs->child("create", title => loc("Create"), path => "Create.html");
 
-    my $cfs = $assets->child("cfs", title => loc("Custom Fields"), path => "/Admin/CustomFields/?Type=" . RT::Asset->CustomFieldLookupType);
+    my $cfs = $assets->child("cfs",
+        title => loc("Custom Fields"),
+        description => loc("Modify asset custom fields"),
+        path => "/Admin/CustomFields/?Type=" . RT::Asset->CustomFieldLookupType);
     $cfs->child("select", title => loc("Select"), path => $cfs->path);
     $cfs->child("create", title => loc("Create"), path => "/Admin/CustomFields/Modify.html?Create=1&LookupType=" . RT::Asset->CustomFieldLookupType);
 }

commit db7dc90a4367a11c77443e430a1f47eac96bd0cd
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Dec 12 11:04:35 2013 -0500

    Pass correct parameter name Asset with asset it

diff --git a/html/Callbacks/RT-Extension-Assets/Elements/Tabs/SelfService b/html/Callbacks/RT-Extension-Assets/Elements/Tabs/SelfService
index de03baf..95e481c 100644
--- a/html/Callbacks/RT-Extension-Assets/Elements/Tabs/SelfService
+++ b/html/Callbacks/RT-Extension-Assets/Elements/Tabs/SelfService
@@ -65,7 +65,7 @@ if ($Path =~ m{^/SelfService/Asset/} and $DECODED_ARGS->{id}) {
 
     if (Menu->child("new")) {
         my $actions = $page->child("actions", title => loc("Actions"));
-        $actions->child("create-linked-ticket", title => loc("Create linked ticket"), path => "/SelfService/Asset/CreateLinkedTicket.html?id=$id");
+        $actions->child("create-linked-ticket", title => loc("Create linked ticket"), path => "/SelfService/Asset/CreateLinkedTicket.html?Asset=$id");
     }
 }
 </%init>

commit 625965ad60d40b985c3d37467e3f00c31c6540f1
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Thu Dec 12 11:10:44 2013 -0500

    Don't set a DefaultCatalog by default
    
    Setting it to the name of the initial default catalog led to an
    error if you changed the name of the default catalog, which we
    recommned.
    
    Leave the Set line in the config file as an example, but comment
    it out.

diff --git a/etc/Assets_Config.pm b/etc/Assets_Config.pm
index 587a92f..c7a631b 100644
--- a/etc/Assets_Config.pm
+++ b/etc/Assets_Config.pm
@@ -72,7 +72,7 @@ last-selected catalog thereafter.
 
 =cut
 
-Set($DefaultCatalog, 'General assets');
+# Set($DefaultCatalog, 'General assets');
 
 =item C<$AssetSearchFields>
 

commit 26b7e8d50d5551688d435575289546bf952e535b
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Dec 13 09:50:32 2013 -0500

    Add rights section to default assets configuration
    
    Without rights, rights checks for status changes in the lifecycle
    default to ModifyTicket or DeleteTicket, which isn't right for
    asset changes.

diff --git a/etc/Assets_Config.pm b/etc/Assets_Config.pm
index c7a631b..c537e42 100644
--- a/etc/Assets_Config.pm
+++ b/etc/Assets_Config.pm
@@ -43,7 +43,9 @@ Set(%Lifecycles,
             stolen    => [qw(allocated)],
             deleted   => [qw(allocated)],
         },
-
+        rights => {
+            '* -> *'        => 'ModifyAsset',
+        },
         actions => {
             '* -> allocated' => { label => "Allocate" },
             '* -> in-use'    => { label => "Now in-use" },

commit 12bb15ea57bf0bd2dd31e56a41676742fcfb8434
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Dec 13 14:43:27 2013 -0500

    Don't show User Summary link on SelfService pages

diff --git a/html/Asset/Elements/ShowRoleMembers b/html/Asset/Elements/ShowRoleMembers
index 975f4ff..e0c72d7 100644
--- a/html/Asset/Elements/ShowRoleMembers
+++ b/html/Asset/Elements/ShowRoleMembers
@@ -56,7 +56,11 @@
 %     if ($Note) {
  <span class="note"><% $Note %></span>
 %     }
-</a><a class="user-summary" href="<%RT->Config->Get('WebPath')%>/User/Summary.html?id=<% $user->Id %>">User Summary</a></h3>
+</a>
+% if ( $session{'CurrentUser'}->Privileged ){
+<a class="user-summary" href="<%RT->Config->Get('WebPath')%>/User/Summary.html?id=<% $user->Id %>">User Summary</a>
+% }
+</h3>
 % }
   <div class="details">
 <& /User/Elements/UserInfo,

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



More information about the Bps-public-commit mailing list