rt 4.0.23
[freeside.git] / rt / share / html / Elements / Tabs
index 6eae81d..3e28e25 100755 (executable)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -516,10 +516,15 @@ my $build_main_nav = sub {
                     if $obj->CurrentUserCanSubscribe;
                 $tabs->child( show         => title => loc('Show'),         path => "/Dashboards/" . $obj->id . "/" . $obj->Name)
             }
+        } else {
+            my $tabs = PageMenu();
+            if ( $dashboard->CurrentUserCanCreateAny ) {
+                # FREESIDE: provide a way to create dashboards
+                $tabs->child('dashboard_create' => title => loc('New Dashboard'), path => "/Dashboards/Modify.html?Create=1");
+            }
         }
     }
 
-
     if ( $request_path =~ m{^/Ticket/} ) {
         if ( ( $DECODED_ARGS->{'id'} || '' ) =~ /^(\d+)$/ ) {
             my $id  = $1;