lib/alexandria/ui/iconview_tooltips.rb in alexandria-book-collection-manager-0.7.1 vs lib/alexandria/ui/iconview_tooltips.rb in alexandria-book-collection-manager-0.7.2

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + # -*- ruby -*- # # Copyright (C) 2007 kksou # Copyright (C) 2008,2009 Cathal Mc Ginley # Copyright (C) 2011, 2014, 2016 Matijs van Zuijlen @@ -57,18 +59,14 @@ html = '' unless title.empty? html += "<b>#{CGI.escapeHTML(title)}</b>" html += "\n" unless authors.empty? end - unless authors.empty? - html += "<i>#{CGI.escapeHTML(authors)}</i>" - end + html += "<i>#{CGI.escapeHTML(authors)}</i>" unless authors.empty? html += "\n" if !title.empty? || !authors.empty? html += '<small>' - if publisher && !publisher.empty? - html += CGI.escapeHTML(publisher).to_s - end + html += CGI.escapeHTML(publisher).to_s if publisher && !publisher.empty? if year && !year.empty? html += ' ' if publisher && !publisher.empty? html += "(#{year})" end