Sha256: e73f3885e91b9af930d4efefea27a09862e826721805ce1bd22a0dc06a818794

Contents?: true

Size: 1.76 KB

Versions: 4

Compression:

Stored size: 1.76 KB

Contents

<%
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>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
umlaut-3.1.1 app/views/resolve/_citation.html.erb
umlaut-3.1.0 app/views/resolve/_citation.html.erb
umlaut-3.1.0.pre2 app/views/resolve/_citation.html.erb
umlaut-3.1.0.pre1 app/views/resolve/_citation.html.erb