improves styles for admin organizations views
This commit is contained in:
@@ -1,67 +1,79 @@
|
|||||||
<h2><%= t("admin.organizations.index.title") %></h2>
|
<h2><%= t("admin.organizations.index.title") %></h2>
|
||||||
|
|
||||||
<!-- Search organizations -->
|
<div class="small-12 medium-6">
|
||||||
<%= form_for(Organization.new, url: search_admin_organizations_path, method: :get) do |f| %>
|
<%= form_for(Organization.new, url: search_admin_organizations_path, method: :get) do |f| %>
|
||||||
<div class="row">
|
<div class="input-group">
|
||||||
<div class="small-12 medium-6 column">
|
|
||||||
<%= text_field_tag :term, "", placeholder: t("admin.organizations.index.search_placeholder") %>
|
<%= text_field_tag :term, "", placeholder: t("admin.organizations.index.search_placeholder") %>
|
||||||
|
|
||||||
|
<div class="input-group-button">
|
||||||
|
<%= f.submit t("admin.organizations.index.search"), class: "button" %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-inline small-12 medium-6 column">
|
<% end %>
|
||||||
<%= f.submit t("admin.organizations.index.search"), class: "button success" %>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<!-- /. Search organizations -->
|
|
||||||
|
|
||||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.organizations.index" %>
|
<%= render 'shared/filter_subnav', i18n_namespace: "admin.organizations.index" %>
|
||||||
|
|
||||||
<h3><%= page_entries_info @organizations %></h3>
|
<% if @organizations.any? %>
|
||||||
|
<h3 class="margin"><%= page_entries_info @organizations %></h3>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<% hidden = 0 %>
|
<% hidden = 0 %>
|
||||||
<% @organizations.each do |organization| %>
|
<thead>
|
||||||
<% hidden += 1 and next if organization.user.nil? || organization.user.hidden? %>
|
<th scpope="col"><%= t("admin.organizations.index.name") %></th>
|
||||||
<tr id="<%= dom_id(organization) %>">
|
<th scpope="col"><%= t("admin.organizations.index.email") %></th>
|
||||||
<td><p><%= organization.name %></p></td>
|
<th scpope="col"><%= t("admin.organizations.index.phone_number") %></th>
|
||||||
<td><p><%= organization.email %></p></td>
|
<th scpope="col"><%= t("admin.organizations.index.responsible_name") %></th>
|
||||||
<td><p><%= organization.phone_number %></p></td>
|
<th scpope="col"><%= t("admin.shared.status") %></th>
|
||||||
<td><p><%= organization.responsible_name %></p></td>
|
<th scpope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||||
<% if organization.verified? %>
|
</thead>
|
||||||
<td class="verified text-center">
|
<tbody>
|
||||||
<span class="icon-check"></span>
|
<% @organizations.each do |organization| %>
|
||||||
<%= t("admin.organizations.index.verified") %>
|
<% hidden += 1 and next if organization.user.nil? || organization.user.hidden? %>
|
||||||
</td>
|
<tr id="<%= dom_id(organization) %>">
|
||||||
<% end %>
|
<td><%= organization.name %></td>
|
||||||
<% if can? :verify, organization %>
|
<td><%= organization.email %></td>
|
||||||
|
<td><%= organization.phone_number %></td>
|
||||||
|
<td><%= organization.responsible_name %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("admin.organizations.index.verify"),
|
<% if organization.verified? %>
|
||||||
verify_admin_organization_path(organization, request.query_parameters),
|
<span class="icon-check"></span>
|
||||||
method: :put, class: "button success expanded"
|
<%= t("admin.organizations.index.verified") %>
|
||||||
%>
|
<% elsif organization.rejected? %>
|
||||||
|
<span class="icon-x rejected"></span>
|
||||||
|
<%= t("admin.organizations.index.rejected") %>
|
||||||
|
<% else %>
|
||||||
|
<span class="icon-eye"></span>
|
||||||
|
<%= t("admin.organizations.index.pending") %>
|
||||||
|
<% end %>
|
||||||
</td>
|
</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>
|
<td>
|
||||||
<%= link_to t("admin.organizations.index.reject"),
|
<% if can? :verify, organization %>
|
||||||
reject_admin_organization_path(organization, request.query_parameters),
|
<%= link_to t("admin.organizations.index.verify"),
|
||||||
method: :put, class: "button hollow alert expanded"
|
verify_admin_organization_path(organization, request.query_parameters),
|
||||||
%>
|
method: :put, class: "button success small-5" %>
|
||||||
</td>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<% if hidden > 0 %>
|
<% if can? :reject, organization %>
|
||||||
|
<%= link_to t("admin.organizations.index.reject"),
|
||||||
|
reject_admin_organization_path(organization, request.query_parameters),
|
||||||
|
method: :put, class: "button hollow alert small-5"%>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<% if hidden > 0 %>
|
||||||
|
<div class="callout warning">
|
||||||
|
<%= t("admin.organizations.index.hidden_count_html", count: hidden) %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= paginate @organizations %>
|
||||||
|
<% else %>
|
||||||
<div class="callout primary">
|
<div class="callout primary">
|
||||||
<%= t("admin.organizations.index.hidden_count_html", count: hidden) %>
|
<%= t("admin.organizations.index.no_organizations") %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= paginate @organizations %>
|
|
||||||
|
|||||||
@@ -1,56 +1,68 @@
|
|||||||
<h2><%= t("admin.organizations.search.title") %></h2>
|
<h2><%= t("admin.organizations.search.title") %></h2>
|
||||||
|
|
||||||
<!-- Search organizations -->
|
<div class="small-12 medium-6">
|
||||||
<%= form_for(Organization.new, url: search_admin_organizations_path, method: :get) do |f| %>
|
<%= form_for(Organization.new, url: search_admin_organizations_path, method: :get) do |f| %>
|
||||||
<div class="row">
|
<div class="input-group">
|
||||||
<div class="small-12 medium-6 column">
|
|
||||||
<%= text_field_tag :term, "", placeholder: t("admin.organizations.index.search_placeholder") %>
|
<%= text_field_tag :term, "", placeholder: t("admin.organizations.index.search_placeholder") %>
|
||||||
|
<div class="input-group-button">
|
||||||
|
<%= f.submit t("admin.organizations.index.search"), class: "button" %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-inline small-12 medium-6 column">
|
<% end %>
|
||||||
<%= f.submit t("admin.organizations.index.search"), class: "button success" %>
|
</div>
|
||||||
</div>
|
|
||||||
|
<% if @organizations.any? %>
|
||||||
|
<h3 class="margin"><%= page_entries_info @organizations %></h3>
|
||||||
|
|
||||||
|
<table id="search-results">
|
||||||
|
<thead>
|
||||||
|
<th scpope="col"><%= t("admin.organizations.index.name") %></th>
|
||||||
|
<th scpope="col"><%= t("admin.organizations.index.email") %></th>
|
||||||
|
<th scpope="col"><%= t("admin.organizations.index.phone_number") %></th>
|
||||||
|
<th scpope="col"><%= t("admin.organizations.index.responsible_name") %></th>
|
||||||
|
<th scpope="col"><%= t("admin.shared.status") %></th>
|
||||||
|
<th scpope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<% @organizations.each do |organization| %>
|
||||||
|
<tr>
|
||||||
|
<td><%= organization.name %></td>
|
||||||
|
<td><%= organization.email %></td>
|
||||||
|
<td><%= organization.phone_number %></td>
|
||||||
|
<td><%= organization.responsible_name %></td>
|
||||||
|
<td>
|
||||||
|
<% if organization.verified? %>
|
||||||
|
<span class="icon-check"></span>
|
||||||
|
<%= t("admin.organizations.index.verified") %>
|
||||||
|
<% elsif organization.rejected? %>
|
||||||
|
<span class="icon-x"></span>
|
||||||
|
<%= t("admin.organizations.index.rejected") %>
|
||||||
|
<% else %>
|
||||||
|
<span class="icon-eye"></span>
|
||||||
|
<%= t("admin.organizations.index.pending") %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if can? :verify, organization %>
|
||||||
|
<%= link_to t("admin.organizations.index.verify"),
|
||||||
|
verify_admin_organization_path(organization, request.query_parameters),
|
||||||
|
method: :put, class: "button success small-5" %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if can? :reject, organization %>
|
||||||
|
<%= link_to t("admin.organizations.index.reject"),
|
||||||
|
reject_admin_organization_path(organization, request.query_parameters),
|
||||||
|
method: :put, class: "button hollow alert small-5" %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<%= paginate @organizations %>
|
||||||
|
<% else %>
|
||||||
|
<div class="callout alert">
|
||||||
|
<%= t("admin.organizations.search.no_results") %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- /. Search organizations -->
|
|
||||||
|
|
||||||
<h3><%= page_entries_info @organizations %></h3>
|
|
||||||
|
|
||||||
<table id="search-results">
|
|
||||||
<% @organizations.each do |organization| %>
|
|
||||||
<tr>
|
|
||||||
<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>
|
|
||||||
|
|
||||||
<%= paginate @organizations %>
|
|
||||||
@@ -712,6 +712,12 @@ en:
|
|||||||
hidden_count_html:
|
hidden_count_html:
|
||||||
one: There is also <strong>one organisation</strong> with no users or with a hidden user.
|
one: There is also <strong>one organisation</strong> with no users or with a hidden user.
|
||||||
other: There are <strong>%{count} organisations</strong> with no users or with a hidden user.
|
other: There are <strong>%{count} organisations</strong> with no users or with a hidden user.
|
||||||
|
name: Name
|
||||||
|
email: Email
|
||||||
|
phone_number: Phone
|
||||||
|
responsible_name: Responsible
|
||||||
|
status: Status
|
||||||
|
no_organizations: There are no organizations.
|
||||||
reject: Reject
|
reject: Reject
|
||||||
rejected: Rejected
|
rejected: Rejected
|
||||||
search: Search
|
search: Search
|
||||||
@@ -719,8 +725,10 @@ en:
|
|||||||
title: Organisations
|
title: Organisations
|
||||||
verified: Verified
|
verified: Verified
|
||||||
verify: Verify
|
verify: Verify
|
||||||
|
pending: Pending
|
||||||
search:
|
search:
|
||||||
title: Search Organisations
|
title: Search Organisations
|
||||||
|
no_results: No organizations found.
|
||||||
proposals:
|
proposals:
|
||||||
index:
|
index:
|
||||||
filter: Filter
|
filter: Filter
|
||||||
|
|||||||
@@ -714,6 +714,12 @@ es:
|
|||||||
hidden_count_html:
|
hidden_count_html:
|
||||||
one: Hay además <strong>una organización</strong> sin usuario o con el usuario bloqueado.
|
one: Hay además <strong>una organización</strong> sin usuario o con el usuario bloqueado.
|
||||||
other: Hay <strong>%{count} organizaciones</strong> sin usuario o con el usuario bloqueado.
|
other: Hay <strong>%{count} organizaciones</strong> sin usuario o con el usuario bloqueado.
|
||||||
|
name: Nombre
|
||||||
|
email: Email
|
||||||
|
phone_number: Teléfono
|
||||||
|
responsible_name: Responsable
|
||||||
|
status: Estado
|
||||||
|
no_organizations: No hay organizaciones.
|
||||||
reject: Rechazar
|
reject: Rechazar
|
||||||
rejected: Rechazada
|
rejected: Rechazada
|
||||||
search: Buscar
|
search: Buscar
|
||||||
@@ -721,8 +727,10 @@ es:
|
|||||||
title: Organizaciones
|
title: Organizaciones
|
||||||
verified: Verificada
|
verified: Verificada
|
||||||
verify: Verificar
|
verify: Verificar
|
||||||
|
pending: Pendiente
|
||||||
search:
|
search:
|
||||||
title: Buscar Organizaciones
|
title: Buscar Organizaciones
|
||||||
|
no_results: No se han encontrado organizaciones.
|
||||||
proposals:
|
proposals:
|
||||||
index:
|
index:
|
||||||
filter: Filtro
|
filter: Filtro
|
||||||
|
|||||||
Reference in New Issue
Block a user