Bug 16874: Making serials collections actions buttons
authorAleisha <aleishaamohia@hotmail.com>
Thu, 7 Jul 2016 22:20:55 +0000 (22:20 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Sep 2016 13:10:21 +0000 (13:10 +0000)
To test:
1) Go to serials -> Search a subscription (or make a new one)
2) Ensure that subscription has an end-date that has passed or will pass soon
3) Go to Serials collection (left sidebar menu)
4) Ensure that Subscription summary table has two buttons, Create routing list and Renew. These buttons should be bolded and the table cell highlighted
5) Ensure 'Print list' is a button in year tables below
6) Edit subscription to have a later end-date (will not expire soon)
7) Go back to serials collection
8) Ensure that table cell is no longer highlighted and buttons not bolded. Renew button should not be there.
9) Ensure that both buttons do not wrap when the browser is narrow

Sponsored-by: Catalyst IT
Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt

index 525cd0e..de0e492 100644 (file)
@@ -305,7 +305,7 @@ caption {
        margin : .3em 0;
 }
 
-span.problem {
+.problem {
        background-color : #FFFFCC;
        color : #990000;
        font-weight : bold;
index 9a79eca..f723626 100644 (file)
@@ -113,8 +113,7 @@ $(document).ready(function() {
   <th>Library</th>
   <th>Call number</th>
   <th>Notes</th>
-  [% IF ( routing && CAN_user_serials_routing ) %]<th>Routing</th>[% END %]
-  <th>Renew</th>
+  <th>&nbsp;</th>
 </tr>
 [% FOREACH subscription IN subscriptions %]
     <tr>
@@ -132,28 +131,26 @@ $(document).ready(function() {
                 <br /> Subscription closed
             [% END %]
         </td>
-        [% IF ( routing && CAN_user_serials_routing ) %]
-        <td>
-            [% UNLESS subscription.closed %]
+        [% IF ( subscription.abouttoexpire ) || ( subscription.subscriptionexpired ) %]<td class="problem actions">[% ELSE %]<td class="actions">[% END %]
+        [% UNLESS subscription.closed %]
+            [% IF ( routing && CAN_user_serials_routing ) %]
                 [% IF ( subscription.hasRouting ) %]
-                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit routing list</a>
+                    <a class="btn btn-mini" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]"><i class="fa fa-pencil"></i> Edit routing list</a>
                 [% ELSE %]
-                    <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new">Create routing list</a>
+                    <a class="btn btn-mini" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new"><i class="fa fa-plus"></i> Create routing list</a>
                 [% END %]
             [% END %]
-        </td>
-        [% END %]
-        [% UNLESS subscription.closed %]
-            [% IF ( subscription.abouttoexpire ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
+            [% IF ( subscription.abouttoexpire ) %]<a class="btn btn-mini" href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;"><i class="fa fa-refresh"></i> Renew</a>
             [% ELSE %]
-                [% IF ( subscription.subscriptionexpired ) %]<td class="problem"> <a href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;">Renew</a></td>
+                [% IF ( subscription.subscriptionexpired ) %]<a class="btn btn-mini" href="/cgi-bin/koha/serials/subscription-renew.pl?subscriptionid=[% subscription.subscriptionid %]" onclick="popup([% subscription.subscriptionid %]); return false;"><i class="fa fa-refresh"></i> Renew</a>
                 [% ELSE %]
-                    <td> &nbsp;</td>
+                    &nbsp;
                 [% END %]
             [% END %]
         [% ELSE %]
-            <td> &nbsp;</td>
+            &nbsp;
         [% END %]
+        </td>
       </tr>
 [% END %]
 [% IF ( subscr ) %]
@@ -303,8 +300,8 @@ $(document).ready(function() {
                     [% Branches.GetName( serial.branchcode ) %]
                 </td>
                 [% IF ( routing ) %]
-                <td>
-                    <a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq.replace("'", "\\'") |html %] ([% serial.publisheddate | $KohaDates %])'); return false" >Print list</a>
+                <td class="actions">
+                    <a href="" onclick="print_slip([% serial.subscriptionid |html %], '[% serial.serialseq.replace("'", "\\'") |html %] ([% serial.publisheddate | $KohaDates %])'); return false" class="btn btn-mini"><i class="fa fa-print"></i> Print list</a>
                 </td>
                 [% END %]
             </tr>