[Rt-commit] rt branch, 5.0/dashboards-to-report-menu-2, repushed
Jim Brandt
jbrandt at bestpractical.com
Wed May 6 09:29:39 EDT 2020
The branch 5.0/dashboards-to-report-menu-2 was deleted and repushed:
was 6742e9544ed8554cdb18d0e3e34ee6f7132095b1
now 64fdc7c748858d1b885b58ae09fb9566a9a3ef28
1: 82136e8b8f = 1: 82136e8b8f Moved initial dashboards to the Reports menu.
2: 16957ce4c8 = 2: 16957ce4c8 Get the list of reports in the Reports menu from attribute
3: 64138321a3 = 3: 64138321a3 Add upgrade step: create the ReportsInMenu attribute if needed.
4: f046ab5d51 = 4: f046ab5d51 Fix tests to reflect changes in dashboard menu ids.
5: decfb5af82 = 5: decfb5af82 Update report menu description
6: c495b9bc38 ! 6: 90be973ada Add and remove reports from the Reports menu
@@ -68,11 +68,15 @@
-% }
<&|/Widgets/TitleBox, title => loc("Reset dashboards in menu") &>
- <form method="post" action="DashboardsInMenu.html">
+-<form method="post" action="DashboardsInMenu.html">
-<input type="hidden" name="Reset" value="1" />
-<input type="submit" class="button form-control btn btn-primary"" value="<% loc('Reset to default') %>">
-+ <input type="submit" name="ResetDashboards" class="button form-control btn btn-primary" value="<% loc('Reset dashboards to default') %>">
- </form>
+-</form>
++<div class="form-row mt-3 mb-1 ml-3">
++ <form method="post" action="DashboardsInMenu.html">
++ <input type="submit" name="ResetDashboards" class="button form-control btn btn-primary" value="<% loc('Reset dashboards to default') %>">
++ </form>
++</div>
</&>
+<&|/Widgets/TitleBox,
@@ -83,9 +87,11 @@
+</&>
+
+<&|/Widgets/TitleBox, title => loc("Reset reports in menu") &>
-+<form method="post" action="DashboardsInMenu.html">
-+ <input type="submit" name="ResetReports" class="button form-control btn btn-primary" value="<% loc('Reset reports to default') %>">
-+</form>
++<div class="form-row mt-3 mb-1 ml-3">
++ <form method="post" action="DashboardsInMenu.html">
++ <input type="submit" name="ResetReports" class="button form-control btn btn-primary" value="<% loc('Reset reports to default') %>">
++ </form>
++</div>
+</&>
<%INIT>
7: 6aaee7e842 = 7: e71fb69297 Add reports to global reports menu editor
8: f5618d678e ! 8: c86010d7af Add reports to user admin menu edit
@@ -9,6 +9,13 @@
<& /Elements/ListActions, actions => \@actions &>
+-<form method="post" action="DashboardsInMenu.html">
+-<input type="hidden" name="id" value="<% $id %>" />
+-<input type="hidden" name="Reset" value="1" />
+-<div class="form-row">
+- <div class="col-12">
+- <input type="submit" class="form-control btn btn-primary button" value="<%loc('Reset to default')%>">
+- </div>
+<&|/Widgets/TitleBox,
+ title => loc('Dashboards in menu'),
+ bodyclass => ""
@@ -17,17 +24,13 @@
+</&>
+
+<&|/Widgets/TitleBox, title => loc("Reset dashboards in menu") &>
- <form method="post" action="DashboardsInMenu.html">
--<input type="hidden" name="id" value="<% $id %>" />
--<input type="hidden" name="Reset" value="1" />
--<div class="form-row">
-- <div class="col-12">
-- <input type="submit" class="form-control btn btn-primary button" value="<%loc('Reset to default')%>">
-- </div>
--</div>
-+ <input type="hidden" name="id" value="<% $id %>" />
-+ <input type="submit" name="ResetDashboards" class="button form-control btn btn-primary" value="<% loc('Reset dashboards to default') %>">
- </form>
++<div class="form-row mt-3 mb-1 ml-3">
++ <form method="post" action="DashboardsInMenu.html">
++ <input type="hidden" name="id" value="<% $id %>" />
++ <input type="submit" name="ResetDashboards" class="button form-control btn btn-primary" value="<% loc('Reset dashboards to default') %>">
++ </form>
+ </div>
+-</form>
+</&>
-<br />
@@ -44,10 +47,12 @@
-<br />
-% }
+<&|/Widgets/TitleBox, title => loc("Reset reports in menu") &>
-+<form method="post" action="DashboardsInMenu.html">
-+ <input type="hidden" name="id" value="<% $id %>" />
-+ <input type="submit" name="ResetReports" class="button form-control btn btn-primary" value="<% loc('Reset reports to default') %>">
-+</form>
++<div class="form-row mt-3 mb-1 ml-3">
++ <form method="post" action="DashboardsInMenu.html">
++ <input type="hidden" name="id" value="<% $id %>" />
++ <input type="submit" name="ResetReports" class="button form-control btn btn-primary" value="<% loc('Reset reports to default') %>">
++ </form>
++</div>
+</&>
<%init>
@@ -56,16 +61,16 @@
$UserObj->Load($id) || Abort("Couldn't load user '" . ($id || '') . "'");
-my $title = loc("Dashboards in menu for the user [_1]", $UserObj->Name);
+my $title = loc("Reports menu for the user [_1]", $UserObj->Name);
-+
+
+-if ($ARGS{Reset}) {
+- my ($ok, $msg) = $UserObj->SetPreferences('DashboardsInMenu', {});
+- push @actions, $ok ? loc('Preferences saved for user [_1].', $UserObj->Name) : $msg;
+if ( $ARGS{ResetDashboards} ) {
+ # Empty DashboardsInMenu pref means to use system default.
+ my ( $ok, $msg ) = $UserObj->SetPreferences( 'DashboardsInMenu', {} );
+ push @actions, $ok ? loc( 'Preferences saved for user [_1].', $UserObj->Name ) : $msg;
+}
-
--if ($ARGS{Reset}) {
-- my ($ok, $msg) = $UserObj->SetPreferences('DashboardsInMenu', {});
-- push @actions, $ok ? loc('Preferences saved for user [_1].', $UserObj->Name) : $msg;
++
+if ( $ARGS{ResetReports} ) {
+ if ( $UserObj->Preferences('ReportsInMenu') ) {
+ # Empty ReportsInMenu pref means empty, not to use default,
9: f92c9786c4 = 9: 23247d40ce Update label to reflect new Reports menu location
10: 6742e9544e ! 10: 918394273d Update dashboard pref tests as we updated reset input name
@@ -14,3 +14,4 @@
$m->click;
$m->content_contains( 'Preferences saved', 'prefs saved' );
ok( $m->find_link( text => 'system foo' ), 'got system foo link' );
+
--: ------- > 11: 64fdc7c748 Note reports change in upgrading doc
More information about the rt-commit
mailing list