Bug 15853 - Add author and link columns to opac course reserves table
authorNick Clemens <nick@bywatersolutions.com>
Fri, 3 Jun 2016 18:49:25 +0000 (14:49 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 15 Jul 2016 18:04:09 +0000 (18:04 +0000)
To test:
1 - Add some course reserves
2 - View the table in staff and opac, there is no column for author or
link
3 - Apply patch
4 - You shoudl see these columns
5 - Link should contain item uri if present, fallback to title 856$u,
  then be blank if niether

Sponsored by:
    Southeastern Wisconsin Information Technology Exchange, Inc (SWITCH)
    (http://caspian.switchinc.org/)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Might be good to add this table to the column visibility tool if you
plan to add more columns.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt

index 0bd675b..ea9fda8 100644 (file)
@@ -73,6 +73,7 @@
                 <thead>
                     <tr>
                         <th class="antithe">Title</th>
+                        <th>Author</th>
                         <th>Barcode</th>
                         <th>Call number</th>
                         [% IF item_level_itypes %]<th>Item type</th>[% END %]
@@ -84,6 +85,7 @@
                         [% IF CAN_user_coursereserves_add_reserves %]<th class="NoSort">&nbsp;<!-- Edit --></th>[% END %]
                         [% IF CAN_user_coursereserves_delete_reserves %]<th class="NoSort">&nbsp;<!-- Remove --></th>[% END %]
                         <th class="NoSort">Other course reserves</th>
+                        <th>Link</th>
                     </tr>
                 </thead>
 
@@ -91,6 +93,7 @@
                     [% FOREACH cr IN course_reserves %]
                         <tr>
                             <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
+                            <td>[% cr.item.author %]</td>
                             <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% cr.item.itemnumber %]&amp;biblionumber=[% cr.item.biblionumber %]&amp;bi=[% cr.item.biblioitemnumber %]">[% cr.item.barcode %]</a></td>
                             <td>[% cr.item.itemcallnumber %]</td>
                             [% IF item_level_itypes %]
                                     [% END %]
                                 [% END %]
                             </td>
+                            <td>
+                                [% IF (cr.item.uri) %]
+                                    <a href="[% cr.item.uri %]">Item URI</a>
+                                [% ELSIF (cr.item.url) %]
+                                    <a href="[% cr.item.url %]">Record URL</a>
+                                [% END %]
+                            </td>
                         </tr>
                     [% END %]
                 </tbody>
index 70d45b1..fd2e739 100644 (file)
@@ -50,6 +50,7 @@
                         <thead>
                             <tr>
                                 <th class="anti-the">Title</th>
+                                <th>Author</th>
                                 <th>Item type</th>
                                 <th>Location</th>
                                 <th>Collection</th>
@@ -58,6 +59,7 @@
                                 <th>Status</th>
                                 <th class="title-string">Date due</th>
                                 <th>Notes</th>
+                                <th>Link</th>
                             </tr>
                         </thead>
 
@@ -65,6 +67,7 @@
                             [% FOREACH cr IN course_reserves %]
                                 <tr>
                                     <td><a href="opac-detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></td>
+                                    <td>[% cr.item.author %]</td>
                                     <td>[% ItemTypes.GetDescription( cr.item.itype ) %]</td>
                                     <td>[% Branches.GetName( cr.item.holdingbranch ) %] <br/> <i>[% AuthorisedValues.GetByCode( 'LOC', cr.item.location ) %]</i></td>
                                     <td>[% AuthorisedValues.GetByCode( 'CCODE', cr.item.ccode ) %]</td>
                                             [% cr.item.itemnotes %]
                                         [% END %]
                                     </td>
+                                    <td>[% IF (cr.item.uri) %]
+                                            <a href="[% cr.item.uri %]">Item URI</a>
+                                        [% ELSIF (cr.item.url) %]
+                                            <a href="[% cr.item.url %]">Record URL</a>
+                                        [% END %]
+                                    </td>
                                 </tr>
                             [% END %]
                         </tbody>