From 174238635bfd568b0e7fe8e1daa31452f3a78366 Mon Sep 17 00:00:00 2001 From: Owen Leonard <oleonard@myacpl.org> Date: Wed, 10 Jul 2013 09:51:26 -0400 Subject: [PATCH] Bug 10566 - Improve OPAC course reserves pages This patch makes various improvements to the OPAC course reserve pages: - Descriptive page titles for both pages. - More compact display of course information on course detail page (a list instead of a table, consistent with other displays of similar information in Koha). - Correct capitalization. - Added label and fieldset to course reserve search form. - Added breadcrumb navigatio nto course reserve detail page as a path back to course reserves main page. To test, apply the patch and confirm that the changes haven't broken anything and are an improvement. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 50 ++++++++++ .../prog/en/modules/opac-course-details.tt | 95 +++++++++++-------- .../prog/en/modules/opac-course-reserves.tt | 14 ++-- 3 files changed, 113 insertions(+), 46 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 6fd9a90..7fdb79b 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -165,6 +165,56 @@ fieldset.action p { margin-bottom : 1em; } +div.rows+div.rows { + margin-top : .6em; +} + +div.rows { + float : left; + clear : left; + margin: 0 0 0 0; + padding: 0; + width: 100%; +} + + +div.rows span.label { + float: left; + font-weight : bold; + width: 9em; + margin-right: 1em; + text-align: left; +} + +div.rows ol { + padding: .5em 1em 0 0; + list-style-type: none; +} + +div.rows ol li li { + border-bottom: 0; +} + +div.rows li { + border-bottom : 1px solid #EEE; + float : left; + clear : left; + padding-bottom: .2em; + padding-top: .1em; + list-style-type: none; + width: 100%; +} + +div.rows ul li:first-child { + float: none; + clear: none; + margin-left: 0; +} + +div.rows ul li { + margin-left : 9em; +} + form { display : inline; margin : 0; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt index 70ed2d1..fdf9a08 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-details.tt @@ -3,7 +3,7 @@ [% USE ItemTypes %] [% USE Branches %] [% INCLUDE 'doc-head-open.inc' %] -[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Course reserves for [% course.course_name %] [% INCLUDE 'doc-head-close.inc' %] </head> <body id="opac-main"> @@ -13,49 +13,64 @@ <div id="doc2" class="yui-t7"> <div id="yui-main"> + <h2><a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a> ⇢ Course reserves for <i>[% course.course_name %]</i></h2> + <div class="rows clearfix"> + <ol> + [% IF ( course.term ) %]<li><span class="label">Term:</span> [% AuthorisedValues.GetByCode( 'TERM', course.term ) %]</li>[% END %] + <li><span class="label">Department:</span> [% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]</li> + [% IF ( course.course_number ) %]<li><span class="label">Course number:</span> [% course.course_number %]</li>[% END %] + [% IF ( course.section ) %]<li><span class="label">Section:</span> [% course.section %]</li>[% END %] + [% IF ( course.instructors ) %] + <li><span class="label">Instructors:</span> + <ul> + [% FOREACH i IN course.instructors %] + <li><div class="instructor">[% i.firstname %] [% i.surname %]</div></li> + [% END %] + </ul> + </li> + [% END %] + [% IF ( course.public_note ) %]<li><span class="label">Notes:</span> [% course.public_note %]</li>[% END %] + </ol> + </div> - <table> - <tr><th>Course Name</th><td>[% course.course_name %]</td></tr> - <tr><th>Term</th><td>[% AuthorisedValues.GetByCode( 'TERM', course.term ) %]</td></tr> - <tr><th>Department</th><td>[% AuthorisedValues.GetByCode( 'DEPARTMENT', course.department ) %]</td></tr> - <tr><th>Course Number</th><td>[% course.course_number %]</td></tr> - <tr><th>Section</th><td>[% course.section %]</td></tr> - <tr><th>Instructors</th><td>[% FOREACH i IN course.instructors %]<div class="instructor">[% i.firstname %] [% i.surname %]</div>[% END %]</td></tr> - <tr><th>Notes</th><td>[% course.public_note %]</td></tr> - </table> - - <table> - <thead> - <tr> - <th>Title</th> - <th>Item type</th> - <th>Location</th> - <th>Collection</th> - <th>Call number</th> - <th>Copy</th> - <th>Status</td> - <th>Date due</td> - <th>Notes</th> - </tr> - </thead> - - <tbody> - [% FOREACH cr IN course_reserves %] + [% IF ( course_reserves ) %] + <table> + <thead> <tr> - <td><a href="opac-detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></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> - <td>[% cr.item.itemcallnumber %]</td> - <td>[% cr.item.copynumber %]</td> - <td>[% INCLUDE 'item-status.inc' item = cr.item %]</td> - <td>[% cr.issue.date_due | $KohaDates %]</td> - <td>[% cr.public_note %]</td> + <th>Title</th> + <th>Item type</th> + <th>Location</th> + <th>Collection</th> + <th>Call number</th> + <th>Copy</th> + <th>Status</td> + <th>Date due</td> + <th>Notes</th> </tr> - [% END %] - </tbody> - </table> + </thead> + <tbody> + [% FOREACH cr IN course_reserves %] + <tr> + <td><a href="opac-detail.pl?biblionumber=[% cr.item.biblionumber %]">[% cr.item.title %]</a></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> + <td>[% cr.item.itemcallnumber %]</td> + <td>[% cr.item.copynumber %]</td> + <td>[% INCLUDE 'item-status.inc' item = cr.item %]</td> + <td>[% cr.issue.date_due | $KohaDates %]</td> + <td>[% cr.public_note %]</td> + </tr> + [% END %] + </tbody> + </table> + [% ELSE %] + <br style="clear:both;" /> + <div class="dialog message"> + <p>No reserves have been selected for this course.</p> + </div> + [% END %] </div> </div> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-reserves.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-reserves.tt index 98965c9..12fea16 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-reserves.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-course-reserves.tt @@ -1,7 +1,7 @@ [% USE AuthorisedValues %] [% INCLUDE 'doc-head-open.inc' %] -[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Courses [% INCLUDE 'doc-head-close.inc' %] </head> <body id="opac-main"> @@ -15,14 +15,16 @@ <div class="yui-b"> <div class="yui-g"> + <h1>Courses</h1> <div id="search-toolbar"> - <form id="search_courses_form"> - <input type="text" name="search_on" id="search_on" /> - <input type="submit" value="Search" /> + <form action="/cgi-bin/koha/opac-course-reserves.pl" method="get" id="search_courses_form"> + <fieldset> + <label for="search_on">Search courses:</label> <input type="text" name="search_on" id="search_on" /> + <input type="submit" value="Search" /> + </fieldset> </form> - </div><!-- /toolbar --> + </div><!-- /search-toolbar --> - <h1>Courses</h1> <table id="course_reserves_table"> <thead> <tr> -- 1.7.2.5