[Rt-commit] rt branch, 5.0/use-dashboard-for-homepage-select-ui, repushed
? sunnavy
sunnavy at bestpractical.com
Fri May 28 12:31:09 EDT 2021
The branch 5.0/use-dashboard-for-homepage-select-ui was deleted and repushed:
was 654773c45c5cbd36b6bb9905d8029e6e8e1a9481
now 005e8c2c570c0e64162f81c25cb290614a4acc62
1: a9c334f14b ! 1: ed7e659428 Migrate "RT at a glance" homepage to dashboard
@@ -977,29 +977,29 @@
+%# END BPS TAGGED BLOCK }}}
+
+% for my $section ( sort keys %Dashboards ) {
-+<table class="table table-striped table-hover">
++<table class="table table-striped table-hover collection-as-table">
+ <thead>
-+ <th class="w-25"><% $section %></th>
-+ <th class="w-25"></th>
-+ <th class="w-25"></th>
-+ <th class="w-25"></th>
++ <th class="w-50 collection-as-table"><% $section %></th>
++ <th class="collection-as-table"></th>
++ <th class="collection-as-table"></th>
++ <th class="collection-as-table"></th>
+ </thead>
+ <tbody>
+% for my $dashboard ( @{$Dashboards{$section}} ) {
+% next if !$ShowEmpty && !$dashboard->{id};
+ <tr>
-+ <td><% $dashboard->{name} %></td>
-+ <td>
++ <td class="collection-as-table"><% $dashboard->{name} %></td>
++ <td class="collection-as-table">
+% if ( $dashboard->{view_link} ) {
+ <a href="<% $dashboard->{view_link} %>" target="_blank"><&|/l&>View Dashboard</&></a>
+% }
+ </td>
-+ <td>
++ <td class="collection-as-table">
+% if ( $dashboard->{edit_link} ) {
+ <a href="<% $dashboard->{edit_link} %>" target="_blank"><&|/l&>Edit Dashboard</&></a>
+% }
+ </td>
-+ <td>
++ <td class="collection-as-table">
+% if ( $dashboard->{id} == $Default ) {
+ <&|/l&>Current Homepage</&>
+% } else {
@@ -1075,8 +1075,8 @@
- &>
- <input type="hidden" name="dashboard_id" value="MyRT">
- <& /Elements/Submit, Name => "UpdateSearches", Label => loc('Save') &>
-+<&|/Widgets/TitleBox, title => loc('Set Homepage'), bodyclass => "", class => "mx-auto max-width-lg" &>
-+<form method="post" name="UpdateDefaultDashboard" class="mx-auto max-width-lg">
++<&|/Widgets/TitleBox, title => loc('Set Homepage'), bodyclass => "", class => "mx-auto max-width-xl" &>
++<form method="post" name="UpdateDefaultDashboard" class="mx-auto max-width-xl">
+ <div class="form-row">
+ <div class="col-12">
+ <& /Elements/SelectDashboard, Dashboards => GetDashboards(), Default => $default_dashboard_id &>
@@ -1085,8 +1085,13 @@
</form>
+</&>
- <&|/Widgets/TitleBox, title => loc('Options'), bodyclass => "", class => "mx-auto max-width-lg" &>
- <form method="post" action="MyRT.html">
+-<&|/Widgets/TitleBox, title => loc('Options'), bodyclass => "", class => "mx-auto max-width-lg" &>
+-<form method="post" action="MyRT.html">
++<&|/Widgets/TitleBox, title => loc('Options'), bodyclass => "", class => "mx-auto max-width-xl" &>
++<form method="post" action="MyRT.html" class="mx-auto max-width-xl">
+ <div class="form-row">
+ <div class="label col-auto">
+ <&|/l&>Rows per box</&>:
@@
</div>
</form>
@@ -1119,8 +1124,7 @@
- my ($defaults) = RT::System->new($session{'CurrentUser'})->Attributes->Named('HomepageSettings');
- $portlets = $defaults ? $defaults->Content : {};
-}
-+my $default_dashboard_id = $session{'CurrentUser'}->Preferences( DefaultDashboard => 0 );
-
+-
-my @sections;
-my %item_for;
-
@@ -1156,7 +1160,8 @@
- else {
- $RT::Logger->debug("Search ".$search->id." ($desc) appears to have no Content");
- }
--
++my $default_dashboard_id = $session{'CurrentUser'}->Preferences( DefaultDashboard => 0 );
+
- my $item;
- if ($object eq $sys && $SearchType eq 'Ticket') {
- $item = { type => 'system', name => $desc, label => $loc_desc };
2: 1a6cb3880d = 2: 2750af835f Add "New Dashboard" to prefs/global MyRT page menu for convenience
3: e239419981 = 3: cfcde667aa Update tests for the migration of "RT at a glance" => dashboard
4: 654773c45c ! 4: f5681752f4 Add docs for "RT at a glance" migration to use dashboard
@@ -24,3 +24,4 @@
+=back
+
=cut
+
-: ------- > 5: 005e8c2c57 Silently ignore saved searches current user doesn't have rights to view
More information about the rt-commit
mailing list