Sha256: b560af826625f9d864528b88babb627d8fd848b51022efee4b92aeba9c9473b5

Contents?: true

Size: 851 Bytes

Versions: 6

Compression:

Stored size: 851 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>
    <ul>
      <% inflectionals_labels.each do |inf| %>
        <li><%= link_to inf.value, label_path(:published => inf.published? ? nil : 0, :id => inf) %></li>
      <% end %>
    </ul>
  <% end %>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
iqvoc_inflectionals-2.5.0 app/views/partials/inflectional/_base.html.erb
iqvoc_inflectionals-2.1.0 app/views/partials/inflectional/_base.html.erb
iqvoc_inflectionals-2.0.3 app/views/partials/inflectional/_base.html.erb
iqvoc_inflectionals-2.0.2 app/views/partials/inflectional/_base.html.erb
iqvoc_inflectionals-2.0.1 app/views/partials/inflectional/_base.html.erb
iqvoc_inflectionals-2.0.0 app/views/partials/inflectional/_base.html.erb