Minor fix for non-existent pubdates in search results
authorDan Scott <dscott@laurentian.ca>
Wed, 18 Sep 2013 17:13:41 +0000 (13:13 -0400)
committerDan Wells <dbw2@calvin.edu>
Wed, 25 Sep 2013 22:41:41 +0000 (18:41 -0400)
If you do not have a pubdate, it is better etter to have nothing follow
the format label than "()".

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 4edda2e..394bfe8 100644 (file)
@@ -96,10 +96,14 @@ END;
                                                         [% 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 -%]
+                                                            OR (show_more_details.default == 'true'
+                                                            OR show_more_details.default == 'hide');
+                                                            IF attrs.pubdate;
+                                                                pubdate_clean = attrs.pubdate | html;
+                                                                l(" ([_1])", pubdate_clean);
+                                                            END;
+                                                        END
+                                                    -%]
                                                     </div>
                                                     <span name="googleBooksLink" class="hide_me">
                                                         <a style='padding-left: 8px;'