app/views/resolve/_citation.html.erb in umlaut-3.0.5 vs app/views/resolve/_citation.html.erb in umlaut-3.1.0.pre1
- old
+ new
@@ -1,87 +1,63 @@
-
-
-
-<table id="citation" width="100%" cellpadding="3" cellspacing="0">
-<%
-cite = @user_request.referent.to_citation
-#rft_metadata = @user_request.referent.metadata
-%>
-
- <tr>
- <td class="largeTextb" width="90" valign="TOP"><div align="right"><%= cite[:title_label] %>:</div></td>
-
- <td class="largeText"><%= cite[:title] %></td>
- </tr>
-<% # Try to warn if this could be a typo. If we have an rft.object_id, then
- # SFX recognized it as an actually existing journal. If not, then it
- # might be a typo. If it came from a manually entered citation, warn them.
-
- if display_not_found_warning?(@user_request)
-%>
- <tr><td class="largeTextb notice"><div align="right">(!) Warning:</div></td><td class="largeText notice"><%= umlaut_config.app_name %> does not know about a <%= (@user_request.referent.format).downcase %> with this name. Please check your entry.</td></tr>
-
-<% end %>
-
-
-<%
-@page_title = cite[:title]
-if cite[:author]
-%>
-<tr>
- <td width="90" class="largeTextb"><div align="right">Author:</div></td>
- <td class="largeText"><%= cite[:author] %></td>
- </tr>
-<%
-end
-if cite[:subtitle] %>
- <tr>
- <td width="90"><div align="right" class="smallTextb"><strong><%= cite[:subtitle_label] %>:</strong></div></td>
- <td><span class="smallText"><%= cite[:subtitle] %></span></td>
- </tr>
-<%
-end
-
-if (cite[:issn] && ! cite[:issn].empty?) %>
-<tr>
- <td><div align="right" class="smallTextb"><strong>ISSN:</strong></div></td>
- <td><span class="smallText"><%= cite[:issn] %></span></td>
-</tr>
-<%
-end
-
-if (cite[:isbn] && ! cite[:isbn].empty? ) %>
-<tr>
- <td><div align="right" class="smallTextb">ISBN:</strong></div></td>
- <td><span class="smallText"><%= cite[:isbn] %></span></td>
-</tr>
-<%
-end %>
-
-<% unless cite[:pub].blank? %>
-<tr>
- <td><div align="right" class="smallTextb">Publisher:</div></td>
- <td><span class="smallText"><%= cite[:pub] %> <td></tr>
-<% end %>
-
-<% unless cite[:date].blank? && cite[:volume].blank? && cite[:issue].blank? && cite[:page].blank? %>
- <tr>
- <td><div align="right" class="smallTextb">Published:</div></td>
- <td><span class="smallText">
- <%= date_format(cite[:date]) %>
-
- <% unless cite[:volume].blank? %>
- Volume: <%= cite[:volume] %>
- <% end %>
- <% unless cite[:issue].blank? %>
- Issue: <%= cite[:issue] %>
- <% end %>
- <% unless cite[:page].blank? %>
- Page: <%= cite[:page] %>
- <% end %>
- </span></td>
- </tr>
-<% end %>
-</table>
-
-
-
+<%
+cite = @user_request.referent.to_citation
+@page_title = cite[:title] %>
+
+<% if @user_request.referent.type_of_thing.present? %>
+ <p class="resource-type"><%=@user_request.referent.type_of_thing.titlecase %></p>
+<% end %>
+
+<h2 class="title"><%= cite[:title] %></h2>
+
+<% if cite[:author].present? || cite[:date].present? %>
+ <p class="author-and-date">
+ <% if cite[:author].present? %>
+ <span class="author"><%= cite[:author] %></span>
+ <% end %>
+
+ <% if cite[:author].present? && cite[:date].present? %>
+ <span class="sep">•</span>
+ <% end %>
+
+ <% if cite[:date].present? %>
+ <span class="date"><%= date_format(cite[:date]) %></span>
+ <% end %>
+ </p>
+<% end %>
+
+<p class="published_in">
+ <% if [:container_title, :volume, :issue, :page].find {|k| cite[k].present? } %>
+
+ <span class="published-label">Published in <%= cite[:container_label] %></span> <span class="container-title">
+ <%= cite[:container_title] %></span>.
+ <% end %>
+
+ <% if cite[:volume].present? %>
+ <span class="volume">Volume <%= cite[:volume] %></span>.
+ <% end %>
+
+ <% if cite[:issue].present? %>
+ <span class="issue">Issue <%= cite[:issue] %></span>.
+ <% end %>
+
+ <% if cite[:page].present? %>
+ <span class="page">Page <%= cite[:page] %></span>.
+ <% end %>
+</p>
+
+<dl class="citation-info">
+ <%= if cite[:pub].present?
+ content_tag(:dt, "Publisher:", :class => "publisher") +
+ content_tag(:dd, cite[:pub], :class => "publisher")
+ end %>
+ <%= if cite[:issn].present?
+ content_tag(:dt, "ISSN:", :class => "issn") +
+ content_tag(:dd, cite[:issn], :class => "issn")
+ end %>
+ <%= if cite[:isbn].present?
+ content_tag(:dt, "ISBN:", :class => "isbn") +
+ content_tag(:dd, cite[:isbn], :class => "isbn")
+ end %>
+
+ <%# todo, doi %>
+
+</dl>
\ No newline at end of file