Sha256: f77adc2d6addb52ca8eb6b73e8c9b5e02ae7b299f926fffd326ef6aa4d61b44a

Contents?: true

Size: 979 Bytes

Versions: 2

Compression:

Stored size: 979 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) %>

  <% if labels_inflectionals_values.any? %>
    <ul>
      <% labels_inflectionals_values.each do |inf| %>
        <li><%= inf %></li>
      <% end %>
    </ul>
  <% end %>

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

2 entries across 2 versions & 1 rubygems

Version Path
iqvoc_inflectionals-2.9.0 app/views/partials/inflectional/_base.html.erb
iqvoc_inflectionals-2.8.0 app/views/partials/inflectional/_base.html.erb