68 lines
2.2 KiB
Plaintext
68 lines
2.2 KiB
Plaintext
<h2><%= t("admin.organizations.index.title") %></h2>
|
|
|
|
<!-- Search organizations -->
|
|
<%= form_for(Organization.new, url: search_admin_organizations_path, method: :get) do |f| %>
|
|
<div class="row">
|
|
<div class="small-12 medium-6 column">
|
|
<%= text_field_tag :term, "", placeholder: t("admin.organizations.index.search_placeholder") %>
|
|
</div>
|
|
<div class="form-inline small-12 medium-6 column">
|
|
<%= f.submit t("admin.organizations.index.search"), class: "button success" %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<!-- /. Search organizations -->
|
|
|
|
<%= render 'shared/filter_subnav', i18n_namespace: "admin.organizations.index" %>
|
|
|
|
<h3><%= page_entries_info @organizations %></h3>
|
|
|
|
<table>
|
|
<% hidden = 0 %>
|
|
<% @organizations.each do |organization| %>
|
|
<% hidden += 1 and next if organization.user.nil? || organization.user.hidden? %>
|
|
<tr id="<%= dom_id(organization) %>">
|
|
<td><p><%= organization.name %></p></td>
|
|
<td><p><%= organization.email %></p></td>
|
|
<td><p><%= organization.phone_number %></p></td>
|
|
<td><p><%= organization.responsible_name %></p></td>
|
|
<% if organization.verified? %>
|
|
<td class="verified text-center">
|
|
<span class="icon-check"></span>
|
|
<%= t("admin.organizations.index.verified") %>
|
|
</td>
|
|
<% end %>
|
|
<% if can? :verify, organization %>
|
|
<td>
|
|
<%= link_to t("admin.organizations.index.verify"),
|
|
verify_admin_organization_path(organization, request.query_parameters),
|
|
method: :put, class: "button success expanded"
|
|
%>
|
|
</td>
|
|
<% end %>
|
|
<% if organization.rejected? %>
|
|
<td class="rejected text-center">
|
|
<span class="icon-x"></span>
|
|
<%= t("admin.organizations.index.rejected") %>
|
|
</td>
|
|
<% end %>
|
|
<% if can? :reject, organization %>
|
|
<td>
|
|
<%= link_to t("admin.organizations.index.reject"),
|
|
reject_admin_organization_path(organization, request.query_parameters),
|
|
method: :put, class: "button hollow alert expanded"
|
|
%>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
|
|
<% if hidden > 0 %>
|
|
<div class="callout primary">
|
|
<%= t("admin.organizations.index.hidden_count_html", count: hidden) %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= paginate @organizations %>
|