Sha256: 37d58f98ae801e5ab461b59f380afc703178bbeaeeebd197cbceedd4f6282240

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

<%= content_tag :div, :class => "relation translation panel", :lang => (lang if defined?(concept)) do %>
  <% if defined?(concept) %>
    <h2><%= klass.model_name.human(:count => 2) %> <small><%= "#{t("languages.#{lang}", :default => lang.to_s)}" %></small></h2>
    <div class="relation-body">
      <%-
        items = concept.labels_for_labeling_class_and_language(klass, lang.to_s)
        items = items.select { |item| can?(:read, item) }
      -%>
      <%= item_listing(items) do |label|
        link_to label.value, label_path(:id => label), class: label.published? ? '' : 'unpublished'
      end
    %>
    </div>
  <% elsif defined?(label) %>
    <h2><%= klass.model_name.human %> <%= t("txt.common.of") %></h2>
    <div class="relation-body">
      <%-
        items = label.concepts_for_labeling_class(klass)
        items = items.select { |item| can?(:read, item) }
      -%>
      <%= item_listing(items) do |c|
        link_to c.to_s, concept_path(:id => c), class: c.published? ? '' : 'unpublished'
      end
    %>
    </div>
  <% end %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
iqvoc_skosxl-2.9.1 app/views/partials/labeling/skosxl/_base.html.erb
iqvoc_skosxl-2.9.0 app/views/partials/labeling/skosxl/_base.html.erb
iqvoc_skosxl-2.8.1 app/views/partials/labeling/skosxl/_base.html.erb
iqvoc_skosxl-2.8.0 app/views/partials/labeling/skosxl/_base.html.erb
iqvoc_skosxl-2.7.0 app/views/partials/labeling/skosxl/_base.html.erb