Sha256: 97edae856ac4863d4dfb9f2132f1a5ab9356ce80372ae55f841398fe130a5bd2

Contents?: true

Size: 815 Bytes

Versions: 2

Compression:

Stored size: 815 Bytes

Contents

<div class="relation panel">
  <h2><%= t("txt.views.labels.inflectionals") %></h2>
  <% labels_inflectionals_values = label.send(klass.name.to_relation_name).map(&:value) %>

  <%= labels_inflectionals_values.join(', ') %>

  <%
    all_inflectionals = Inflectional::Base.where(:value => labels_inflectionals_values).all
    # subtract initial and current version from the inflectionals collection
    inflectionals_labels = Iqvoc::XLLabel.base_class.find(all_inflectionals.map(&:label_id)-[label.published_version_id, label.id].compact)
  %>

  <% if inflectionals_labels.present? %>
    <p><%= t("txt.views.labels.inflectionals_used_in") %></p>
    <%= inflectionals_labels.map { |inf| link_to inf.value, label_path(:published => inf.published? ? nil : 0, :id => inf) }.join(', ').html_safe %>
  <% end %>
</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
iqvoc_inflectionals-2.11.4 app/views/partials/inflectional/_base.html.erb
iqvoc_inflectionals-2.11.3 app/views/partials/inflectional/_base.html.erb