Sha256: 0fb6978a1aa79efb4e4cb875c17143e85de2d0293c1893fa39a35fbec93e1545

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

<div class="relation <%= Iqvoc::Concept.broader_relation_class.name.to_relation_name %>">
  <h4><%= Iqvoc::Concept.broader_relation_class.model_name.human(:count => 2) %></h4>
  <div class="relation-body block">
    <% if concept.top_term? %>
      <strong><%= concept.class.human_attribute_name("top_term") %></strong>
    <% end %>

    <%-
    only_published = params[:published] != "0"
    related_concepts = concept.related_concepts_for_relation_class(
      Iqvoc::Concept.broader_relation_class, only_published)
    -%>

    <% if related_concepts.length > 0 %>
      <div class="selector">
        <% parent = related_concepts.first
        parents = []
        while (parent && !parents.include?(parent))
          parents << parent
          parent = parent.related_concepts_for_relation_class(
            Iqvoc::Concept.broader_relation_class, only_published).first
        end %>
        <%= parents.map { |concept|
          render concept.class.inline_partial_name, :concept => concept
        }.join(" &laquo; ").html_safe %>
      </div>
    <% elsif not concept.top_term? %>
      <p>-</p>
    <% end %>
  </div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iqvoc-3.5.7 app/views/partials/concept/relation/skos/broader/_mono.html.erb