app/views/decidim/initiatives/admin/initiatives/index.html.erb in decidim-initiatives-0.9.1 vs app/views/decidim/initiatives/admin/initiatives/index.html.erb in decidim-initiatives-0.11.0.pre1
- old
+ new
@@ -1,38 +1,38 @@
<div class="filters row">
<div class="column medium-3">
- <span class="dropdown-menu-inverted_label"><%= t('.filter_by') %> :</span>
+ <span class="dropdown-menu-inverted_label"><%= t(".filter_by") %> :</span>
<ul class="dropdown menu dropdown-inverted" data-dropdown-menu data-close-on-click-inside="false">
<li class="is-dropdown-submenu-parent">
<a href="#">
<% if @state.present? %>
<%= t(".filter.#{@state}") %>
<% else %>
- <%= t('.filter.all') %>
+ <%= t(".filter.all") %>
<% end %>
</a>
<ul class="menu is-dropdown-submenu">
- <li><%= link_to t('.filter.created'), url_for(state: 'created', q: @query) %></li>
- <li><%= link_to t('.filter.validating'), url_for(state: 'validating', q: @query) %></li>
- <li><%= link_to t('.filter.discarded'), url_for(state: 'discarded', q: @query) %></li>
- <li><%= link_to t('.filter.published'), url_for(state: 'published', q: @query) %></li>
- <li><%= link_to t('.filter.rejected'), url_for(state: 'rejected', q: @query) %></li>
- <li><%= link_to t('.filter.accepted'), url_for(state: 'accepted', q: @query) %></li>
- <li><%= link_to t('.filter.all'), url_for(q: @query) %></li>
+ <li><%= link_to t(".filter.created"), url_for(state: "created", q: @query) %></li>
+ <li><%= link_to t(".filter.validating"), url_for(state: "validating", q: @query) %></li>
+ <li><%= link_to t(".filter.discarded"), url_for(state: "discarded", q: @query) %></li>
+ <li><%= link_to t(".filter.published"), url_for(state: "published", q: @query) %></li>
+ <li><%= link_to t(".filter.rejected"), url_for(state: "rejected", q: @query) %></li>
+ <li><%= link_to t(".filter.accepted"), url_for(state: "accepted", q: @query) %></li>
+ <li><%= link_to t(".filter.all"), url_for(q: @query) %></li>
</ul>
</li>
</ul>
</div>
<div class="column medium-4">
- <%= form_tag '', method: :get do %>
+ <%= form_tag "", method: :get do %>
<div class="filters__search">
<div class="input-group">
- <%= search_field_tag :q, @query,label: false, class: 'input-group-field', placeholder: t('.search') %>
+ <%= search_field_tag :q, @query,label: false, class: "input-group-field", placeholder: t(".search") %>
<%= hidden_field_tag :state, @state %>
<div class="input-group-button">
<button type="submit" class="button button--muted">
- <%= icon 'magnifying-glass', aria_label: t('.search') %>
+ <%= icon "magnifying-glass", aria_label: t(".search") %>
</button>
</div>
</div>
</div>
<% end %>
@@ -48,56 +48,56 @@
<div class="card-section">
<div class="table-scroll">
<table class="table-list">
<thead>
<tr>
- <th><%= t('models.initiatives.fields.title', scope: 'decidim.admin') %></th>
- <th><%= t('models.initiatives.fields.state', scope: 'decidim.admin') %></th>
- <th><%= t('models.initiatives.fields.supports_count', scope: 'decidim.admin') %></th>
- <th><%= t('models.initiatives.fields.created_at', scope: 'decidim.admin') %></th>
- <th class="actions"><%=t '.actions_title' %></th>
+ <th><%= t("models.initiatives.fields.title", scope: "decidim.admin") %></th>
+ <th><%= t("models.initiatives.fields.state", scope: "decidim.admin") %></th>
+ <th><%= t("models.initiatives.fields.supports_count", scope: "decidim.admin") %></th>
+ <th><%= t("models.initiatives.fields.created_at", scope: "decidim.admin") %></th>
+ <th class="actions"><%= t ".actions_title" %></th>
</tr>
</thead>
<tbody>
<% @initiatives.each do |initiative| %>
<tr>
<td>
<% if can? :edit, initiative %>
- <%= link_to partially_translated_attribute(initiative.title),
+ <%= link_to translated_attribute(initiative.title),
decidim_admin_initiatives.edit_initiative_path(initiative.to_param) %>
<% else %>
- <%= partially_translated_attribute(initiative.title) %>
+ <%= translated_attribute(initiative.title) %>
<% end %>
</td>
<td><%= humanize_admin_state initiative.state %></td>
<td><%= initiative.supports_count %>/<%= initiative.scoped_type.supports_required %></td>
- <td><%=l initiative.created_at, format: :short %></td>
+ <td><%= l initiative.created_at, format: :short %></td>
<td class="table-list__actions">
<% if can? :preview, initiative %>
- <%= icon_link_to 'eye',
+ <%= icon_link_to "eye",
decidim_initiatives.initiative_path(initiative.to_param),
- t('.preview'),
- class: 'action-icon--preview',
- target: '_blank' %>
+ t(".preview"),
+ class: "action-icon--preview",
+ target: "_blank" %>
<% end %>
<% if can? :edit, initiative %>
- <%= icon_link_to 'pencil',
+ <%= icon_link_to "pencil",
decidim_admin_initiatives.edit_initiative_path(initiative.to_param),
- t('actions.configure', scope: 'decidim.admin'),
- class: 'action-icon--edit' %>
+ t("actions.configure", scope: "decidim.admin"),
+ class: "action-icon--edit" %>
<% end %>
<% if can? :read, initiative %>
- <%= icon_link_to 'print',
+ <%= icon_link_to "print",
decidim_admin_initiatives.initiative_path(initiative.to_param),
- t('.print',),
- class: 'action-icon--print' %>
+ t(".print",),
+ class: "action-icon--print" %>
<% end %>
</td>
<% end %>
</tbody>
</table>
- <%= paginate @initiatives, theme: 'decidim' %>
+ <%= paginate @initiatives, theme: "decidim" %>
</div>
</div>
</div>