Just use a format label in results + pubdate
authorDan Scott <dscott@laurentian.ca>
Wed, 18 Sep 2013 13:09:20 +0000 (09:09 -0400)
committerDan Wells <dbw2@calvin.edu>
Wed, 25 Sep 2013 22:41:15 +0000 (18:41 -0400)
Rather than having the format icon, which requires either hovering (not
generally available in mobile) or guessing what the strange symbol
means, just use the plain text format label.

In addition, move the brief pubdate from beside the author name to
beside the format label. This avoids confusion if the author name
already has birth or death dates beside it, like "Scott, Dan 1972-
2006". He's not dead yet!

As a bonus, this enables us to remove one table cell from the search
results.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/opac/parts/result/table.tt2

index ca6939f..021ffbe 100644 (file)
@@ -45,6 +45,7 @@
                                                 [% END %]
                                             </td>
                                             <td class='result_table_title_cell' name='result_table_title_cell'>
+                                                    <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
                                                     <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)) %]
@@ -72,11 +73,6 @@ END;
                                                                     authorquery = attrs.author | replace('[#"^$\+\-,\.:;&|\[\]()]', ' ');
                                                                     mkurl(ctx.opac_root _ '/results', {qtype => 'author', query => authorquery}, ['page'])
                                                                     -%]">[% attrs.author | html %]</a>
-                                                                    [%- UNLESS CGI.param('detail_record_view')
-                                                                        OR (show_more_details.default == 'true'
-                                                                        OR show_more_details.default == 'hide')
-                                                                    %] [% attrs.pubdate | html %]
-                                                                    [%- END -%]
 [%-
 FOR entry IN attrs.graphic_authors;
     FOR alt IN entry.graphic;
@@ -94,6 +90,21 @@ END;
 -%]
 
                                                     </div>
+                                                    <div id='bib_format' class='result_table_title_cell'>
+                                                    [%- IF attrs.format_label; %]
+                                                        [% attrs.format_label; %]
+                                                    [%- END %]
+                                                    [%- UNLESS CGI.param('detail_record_view')
+                                                        OR (show_more_details.default == 'true'
+                                                        OR show_more_details.default == 'hide')
+                                                    %] ([% attrs.pubdate | html %])
+                                                    [%- END -%]
+                                                    </div>
+                                                    <span name="googleBooksLink" class="hide_me">
+                                                        <a style='padding-left: 8px;'
+                                                            class='classic_link hide_me'
+                                                            name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
+                                                    </span>
                                                     <table cellpadding="0" cellspacing="0" border="0"
                                                         class="results_info_table">
                                                         [% IF args.holdings.size > 0 %]
@@ -273,22 +284,6 @@ END;
                                                 </div>
                                             </td>
 
-                                            <td name='result_table_format_cell' class='result_table_format_cell' width="1">
-
-                                                [% IF attrs.format_icon %]
-                                                <img title="[% attrs.format_label | html %]" alt="[% attrs.format_label | html %]" src="[% attrs.format_icon %]" />
-                                                [% END %]
-
-                                                <!-- unAPI link -->
-                                                <abbr class="unapi-id" title='tag:[% ctx.hostname %],[% date.format(date.now, '%Y') %]:biblio-record_entry/[% rec.id %]'></abbr>
-
-                                                <!-- Empty span used for creating Google Book Search-->
-                                                <span name="googleBooksLink" class="hide_me">
-                                                    <a style='padding-left: 8px;'
-                                                        class='classic_link hide_me'
-                                                        name="googleBooks-link">[% l("Browse in Google Books Search") %]</a>
-                                                </span>
-                                            </td>
                                             <td nowrap='nowrap' width="1" align="right">
                                                 <div class="result_table_utils_cont">
                                                     <div class="result_table_utils">