[Koha-patches] [PATCH] (bug #3497) show publication year instead of copyright date

Nahuel ANGELINETTI nahuel.angelinetti at biblibre.com
Mon Aug 3 16:23:06 CEST 2009


This chaneg the shelf view in opac, to show publication year that is more usefull than the copyright date.
---
 C4/VirtualShelves.pm                               |    4 ++--
 .../opac-tmpl/prog/en/modules/opac-shelves.tmpl    |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm
index 9c85602..7bf5dda 100644
--- a/C4/VirtualShelves.pm
+++ b/C4/VirtualShelves.pm
@@ -264,8 +264,8 @@ sub GetShelfContents ($;$$$) {
 		($sortfield) = $sth2->fetchrow_array;
 	}
     my $query =
-       " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded,
-	   			biblio.*, biblioitems.itemtype, itemtypes.*
+       " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*,
+	   			biblio.*, biblioitems.itemtype, biblioitems.publicationyear
          FROM   virtualshelfcontents vc
 		 LEFT JOIN biblio      ON      vc.biblionumber =      biblio.biblionumber
 		 LEFT JOIN biblioitems ON  biblio.biblionumber = biblioitems.biblionumber
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
index 2c2cbde..6b4fda6 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
@@ -108,7 +108,7 @@ $.tablesorter.addParser({
             <!-- TMPL_UNLESS NAME="item-level_itypes" --><th>Item Type</th><!-- /TMPL_UNLESS -->
             <th>Title</th>
             <th>Author</th>
-            <th>Copyright</th>
+            <th>Publication Year</th>
         </tr></thead>
             <tbody><!-- TMPL_LOOP NAME="itemsloop" -->
                 <!-- TMPL_IF NAME="toggle" -->
@@ -136,7 +136,7 @@ $.tablesorter.addParser({
               <!-- COinS / OpenURL --><span class="Z3988" title="<!-- TMPL_VAR NAME="coins" -->"></span>
             </td>
             <td><!-- TMPL_VAR NAME="author" --></td>
-            <td><!-- TMPL_VAR NAME="copyrightdate" --></td>
+            <td><!-- TMPL_VAR NAME="publicationyear" --></td>
         </tr>
                 <!-- /TMPL_LOOP --></tbody><!-- /itemsloop -->
     </table>
@@ -173,7 +173,7 @@ $.tablesorter.addParser({
             <select name="sortfield">
             <!-- TMPL_IF NAME="sort_title" --><option value="title" selected="selected">Title</option><!-- TMPL_ELSE --><option value="title">Title</option><!-- /TMPL_IF -->
             <!-- TMPL_IF NAME="sort_author" --><option value="author" selected="selected">Author</option><!-- TMPL_ELSE --><option value="author">Author</option><!-- /TMPL_IF -->
-            <!-- TMPL_IF NAME="sort_copyrightdate" --><option value="copyrightdate" selected="selected">Copyrightdate</option><!-- TMPL_ELSE --><option value="copyrightdate">Copyrightdate</option><!-- /TMPL_IF -->
+            <!-- TMPL_IF NAME="sort_publicationyear" --><option value="publicationyear" selected="selected">Publicationyear</option><!-- TMPL_ELSE --><option value=""></option><!-- /TMPL_IF -->
             </select></li>
             <li><label for="category">Category: </label>
                 <select name="category" id="category">
@@ -317,7 +317,7 @@ $.tablesorter.addParser({
                 <select name="sortfield">
                 <!-- TMPL_IF NAME="sort_title" --><option value="title" selected="selected">Title</option><!-- TMPL_ELSE --><option value="title">Title</option><!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="sort_author" --><option value="author" selected="selected">Author</option><!-- TMPL_ELSE --><option value="author">Author</option><!-- /TMPL_IF -->
-                <!-- TMPL_IF NAME="sort_copyrightdate" --><option value="copyrightdate" selected="selected">Copyrightdate</option><!-- TMPL_ELSE --><option value="copyrightdate">Copyrightdate</option><!-- /TMPL_IF -->
+                <!-- TMPL_IF NAME="sort_" --><option value="" selected="selected"></option><!-- TMPL_ELSE --><option value=""></option><!-- /TMPL_IF -->
                 </select></li>
                 <li><label for="category">Category:</label>
                 <select name="category" id="category">
-- 
1.6.0.4




More information about the Koha-patches mailing list