TPAC: Render record titles and authors consistently
authorDan Scott <dscott@laurentian.ca>
Thu, 11 Apr 2013 12:56:50 +0000 (05:56 -0700)
committerBen Shum <bshum@biblio.org>
Fri, 12 Apr 2013 15:21:00 +0000 (11:21 -0400)
Yamil Suarez noticed that the titles and authors in the call number
browse results page were presented differently than the regular search
results. This change removes some of the hard-coded <em> tags and "bold"
classes, in favour of new "record_author" and "record_title" CSS
classes. Now sites can simply change the CSS in one place to keep things
consistent between the two search results pages.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Yamil Suarez <yamil@yamil.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/css/style.css.tt2
Open-ILS/src/templates/opac/parts/record/cnbrowse.tt2
Open-ILS/src/templates/opac/parts/result/table.tt2

index e4c2cdd..587e62a 100644 (file)
@@ -1503,3 +1503,11 @@ a.preflib_change {
 #patron_usr_barcode_not_found {
     font-weight: bold; color: [% css_colors.text_alert %];
 }
+
+.record_title {
+    font-weight: bold;
+}
+
+.record_author {
+    font-style: italic;
+}
index 661c132..153dc9a 100644 (file)
                         [% END %]
                         <div class='cn_browse_info bold' name='cn_browse_cn'>[% cn.label | html %]</div>
                         <div class='cn_browse_info'>
-                            <a name='cn_browse_title' class='classic_link
+                            <a name='cn_browse_title' class='classic_link record_title'
                                 href="[% mkurl(ctx.opac_root _ '/record/' _ cn.record.id, {$loc_name => loc_value}, 1) %]">[% rec_attrs.title | html %]</a>
                         </div>
                         [% IF rec_attrs.author %]<div class='cn_browse_info'>
-                            <a name='cn_browse_author' class='classic_link'
+                            <a name='cn_browse_author' class='classic_link record_author'
                                 href="[%-
                                     authorquery = rec_attrs.author | replace('[,\.:;]', '');
                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery, $loc_name => loc_value}, 1)
index e0f3f2a..f77327c 100644 (file)
                                                 [% END %]
                                             </td>
                                             <td class='result_table_title_cell' name='result_table_title_cell'>
-                                                <div class="bold">
-                                                    <a name='record_[% rec.id %]' name='item_title'
+                                                    <a class='record_title' name='record_[% rec.id %]' name='item_title'
                                                         href="[% mkurl(ctx.opac_root _ '/record/' _ rec.id) %]"
                                                         [% HTML.attributes(title => l('Display record details for "[_1]"', attrs.title)) %]
                                                         class='search_link'>[% attrs.title | html %]</a>
-                                                </div>
 [%-
 FOR entry IN attrs.graphic_titles;
     FOR alt IN entry.graphic;
@@ -71,12 +69,12 @@ END;
 -%]
                                                 <div>
                                                     <div>
-                                                        <em><a title="[% l("Perform an Author Search") %]"
-                                                                name='item_author'
+                                                        <a title="[% l("Perform an Author Search") %]"
+                                                                class="record_author" name='item_author'
                                                                 href="[%- 
                                                                     authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', '');
                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
-                                                                    -%]">[% attrs.author | html %]</a></em>
+                                                                    -%]">[% attrs.author | html %]</a>
                                                                     [%- UNLESS CGI.param('detail_record_view')
                                                                         OR (show_more_details.default == 'true'
                                                                         OR show_more_details.default == 'hide')