Bug 10615 - Move saved reports action items into dropdown menu
authorOwen Leonard <oleonard@myacpl.org>
Fri, 19 Jul 2013 15:23:52 +0000 (11:23 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 16 Aug 2013 14:20:24 +0000 (14:20 +0000)
This patch moves saved reports "action" links (view, edit, run, etc)
into a dropdown menu triggered by clicking an "Actions" button.

To test you must have saved reports. View the saved reports page and
click the "Actions" button in the last column of the table. This should
trigger a menu. All options in the menu should work correctly.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
works and looks awesome

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Yes, exactly what I had in mind. Great improvement.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
koha-tmpl/intranet-tmpl/prog/img/glyphicons-halflings-white-koha.png [new file with mode: 0644]

index e792cab..2418043 100644 (file)
@@ -2422,8 +2422,11 @@ a.btn:visited{
 .dropdown-menu li {
     list-style: none outside none;
 }
+a.dropdown-toggle {
+    white-space: nowrap;
+}
 [class^="icon-"],[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings-koha.png");}
-.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings-white.png");}
+.icon-white,.nav-tabs>.active>a>[class^="icon-"],.nav-tabs>.active>a>[class*=" icon-"],.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../../img/glyphicons-halflings-white-koha.png");}
 a.disabled {
     color : #999999;
 }
index 8c34135..0138086 100644 (file)
@@ -287,18 +287,20 @@ canned reports and writing custom SQL reports.</p>
                     <th>Public</th>
                     [% IF (usecache) %] <th>Cache expiry (seconds)</th> [% END %]
                     <th>Saved results</th>
-                    <th>Saved SQL</th>
                     <th>&nbsp;</th>
-                    [% IF ( CAN_user_reports_create_reports ) %]
-                        <th>&nbsp;</th>
-                    [% END %]
                 </tr>
             </thead>
             <tbody>
                 [% FOREACH savedreport IN savedreports %]
                     [% UNLESS ( loop.odd ) %]<tr class="odd">[% ELSE %]<tr>[% END %]
                         <td>[% savedreport.id %]</td>
-                        <td>[% savedreport.report_name %]</td>
+                        <td>
+                            [% IF ( savedreport.report_name ) %]
+                                [% savedreport.report_name %]
+                            [% ELSE %]
+                                [ no name ]
+                            [% END %]
+                        </td>
                         <td>[% savedreport.type %]</td>
                         <td>[% savedreport.groupname %]</td>
                         <td>[% savedreport.subgroupname %]</td>
@@ -314,19 +316,24 @@ canned reports and writing custom SQL reports.</p>
                         <td>[% IF ( savedreport.date_run ) %]<a href="/cgi-bin/koha/reports/guided_reports.pl?phase=retrieve%20results&amp;id=[% savedreport.id %]">[% savedreport.date_run %]</a>[% END %]
                         </td>
                         <td>
-                            <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Show%20SQL">Show</a>
-                            [% IF ( CAN_user_reports_create_reports ) %]
-                                <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Edit%20SQL">Edit</a>
-                                <a title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% savedreport.savedsql |uri %]&amp;reportname=[% savedreport.report_name |uri %]&amp;notes=[% savedreport.notes |uri %]">Duplicate</a>
-                            [% END %]
-                        </td>
-                        <td>
-                            <a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Run%20this%20report">Run</a>
-                            <a href="/cgi-bin/koha/tools/scheduler.pl?id=[% savedreport.id %]">Schedule</a>
+                            <div class="dropdown">
+                                <a class="btn btn-mini dropdown-toggle" id="reportactions[% savedreport.id %]" role="button" data-toggle="dropdown" href="#">
+                                   Actions <b class="caret"></b>
+                                </a>
+                                <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="reportactions[% savedreport.id %]">
+                                    <li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Show%20SQL"><i class="icon-search"></i> Show</a></li>
+                                    [% IF ( CAN_user_reports_create_reports ) %]
+                                        <li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Edit%20SQL"><i class="icon-pencil"></i> Edit</a></li>
+                                        <li><a title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% savedreport.savedsql |uri %]&amp;reportname=[% savedreport.report_name |uri %]&amp;notes=[% savedreport.notes |uri %]"><i class="icon-copy"></i> Duplicate</a></li>
+                                    [% END %]
+                                    <li><a href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Run%20this%20report"><i class="icon-play"></i> Run</a></li>
+                                    <li><a href="/cgi-bin/koha/tools/scheduler.pl?id=[% savedreport.id %]"><i class="icon-time"></i> Schedule</a></li>
+                                    [% IF ( CAN_user_reports_create_reports ) %]
+                                        <li><a class="confirmdelete" title="Delete this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Delete%20Saved"><i class="icon-remove"></i> Delete</a></li>
+                                    [% END %]
+                                </ul>
+                            </div>
                         </td>
-                        [% IF ( CAN_user_reports_create_reports ) %]
-                            <td><a class="confirmdelete" title="Delete this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% savedreport.id %]&amp;phase=Delete%20Saved">Delete</a></td>
-                        [% END %]
                     </tr>
                 [% END %]
             </tbody>
diff --git a/koha-tmpl/intranet-tmpl/prog/img/glyphicons-halflings-white-koha.png b/koha-tmpl/intranet-tmpl/prog/img/glyphicons-halflings-white-koha.png
new file mode 100644 (file)
index 0000000..e4255ba
Binary files /dev/null and b/koha-tmpl/intranet-tmpl/prog/img/glyphicons-halflings-white-koha.png differ