Sha256: ae59961303c7494f76b235a84ff2f3a70d37725f5b2464a52a1ceadd5915e28b
Contents?: true
Size: 929 Bytes
Versions: 4
Compression:
Stored size: 929 Bytes
Contents
<%# # HasMany Index Partial This partial renders a has_many relationship, to be displayed on a resource's index page. By default, the relationship is rendered as a count of how many objects are associated through the relationship. ## Local variables: - `field`: An instance of [Administrate::Field::HasMany][1]. A wrapper around the has_many relationship pulled from the database. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany %> <%#= pluralize(field.data.size, field.attribute.to_s.humanize.downcase) %> <% if field.attribute == :period_selected_ranges && @page.class == Place%> <% if @page.period_pack.weekly? %> Option semaine aucun range <% else %> <%= t("administrate.fields.#{field.attribute.to_s}",total_count: field.data.count).html_safe %> <% end %> <% else %> <%= t("administrate.fields.#{field.attribute.to_s}",total_count: field.data.count).html_safe %> <% end %>
Version data entries
4 entries across 4 versions & 1 rubygems