Bug 4532 - Use include file for bibliodefaultview logic
Summary: Use include file for bibliodefaultview logic
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 03:34 UTC by Owen Leonard
Modified: 2012-10-25 22:52 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed fix (17.63 KB, patch)
2010-05-19 16:09 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:28:17 UTC


---- Reported by oleonard@myacpl.org 2010-05-19 15:34:44 ----

The BiblioDefaultView and IntranetBiblioDefaultView preferences control which view should be used when the user clicks a link to a bibliographic record. Currently the logic for choosing this view is most often done in the template:

<!-- TMPL_IF name="BiblioDefaultViewmarc" -->
<a class="title" href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
<!-- TMPL_ELSIF NAME="BiblioDefaultViewlabeled_marc" -->
<a class="title" href="/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
<!-- TMPL_ELSIF NAME="BiblioDefaultViewisbd" -->
<a class="title" href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
<!-- TMPL_ELSE -->
<a class="title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
<!-- /TMPL_IF -->

This block of markup should be moved to an include file to simplify the process of building the templates. Existing templates should be updated to use this include. This should also simplify the process of updating templates which do not currently respect the default view preference.



---- Additional Comments From oleonard@myacpl.org 2010-05-19 16:09:09 ----

Created an attachment
Proposed fix

    Note that this new include builds only the first half of the anchor tag (<a>). Because title and subtitle are output differently on some pages, rendering of the second half of the tag is left to individual pages.
    
    Includes fixes for staff client templates.
    
    Change to basket.pl fixes a bug wherein the OPAC's bibliodefaultview preference was being checked instead of the staff client's.




--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:28 UTC  ---

This bug was previously known as _bug_ 4532 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4532
Imported an attachment (id=2148)

Actual time not defined. Setting to 0.0
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
The original submitter of attachment 2148 [details] [review] is unknown.
   Reassigning to the person who moved it here: chris@bigballofwax.co.nz.

Comment 1 Galen Charlton 2010-06-24 02:55:13 UTC
Pach pushed.  Please test and close.