[Koha-patches] [PATCH] [replace previous](bug #3497) show publication year, or copyrightdate
Nahuel ANGELINETTI
nahuel.angelinetti at biblibre.com
Tue Aug 4 16:58:01 CEST 2009
This change the shelf view in opac, to show publication year, in the column "Year"(that was previously copyrightdate), and is there is no publication year, show copyright date.
---
C4/VirtualShelves.pm | 4 ++--
.../opac-tmpl/prog/en/modules/opac-shelves.tmpl | 14 ++++++++++----
2 files changed, 12 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..7a63e22 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>Year</th>
</tr></thead>
<tbody><!-- TMPL_LOOP NAME="itemsloop" -->
<!-- TMPL_IF NAME="toggle" -->
@@ -136,7 +136,13 @@ $.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_IF NAME="publicationyear" -->
+ <!-- TMPL_VAR NAME="publicationyear" -->
+ <!-- TMPL_ELSE -->
+ <!-- TMPL_VAR NAME="copyrightdate" -->
+ <!-- /TMPL_IF -->
+ </td>
</tr>
<!-- /TMPL_LOOP --></tbody><!-- /itemsloop -->
</table>
@@ -173,7 +179,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_year" --><option value="year" selected="selected">Year</option><!-- TMPL_ELSE --><option value=""></option><!-- /TMPL_IF -->
</select></li>
<li><label for="category">Category: </label>
<select name="category" id="category">
@@ -317,7 +323,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_year" --><option value="year" selected="selected">Year</option><!-- TMPL_ELSE --><option value="year">Year</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