Improves styles for admin

This commit is contained in:
Alberto Garcia Cabeza
2015-08-23 11:45:43 +02:00
parent 30d685ec32
commit 908d19e2e7
6 changed files with 89 additions and 10 deletions

View File

@@ -175,6 +175,10 @@ body.admin {
padding: rem-calc(6) rem-calc(12);
}
.button.tiny.success {
margin-left: rem-calc(12);
}
// 04. Stats
// - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@@ -1,18 +1,33 @@
<h2><%= t("admin.comments.index.title") %></h2>
<!-- Filters for pending and archived comments (example on "/admin/organizations/index.html.erb")-->
<dl class="sub-nav">
<dt><%= t("admin.comments.index.filter") %>:</dt>
<dd class="active"><%= t("admin.comments.filters.all") %></dd>
<dd><%= t("admin.comments.filters.pending") %></dd>
<dd><%= t("admin.comments.filters.archived") %></dd>
</dl>
<!-- Filters for pending and archived comments (example on "/admin/organizations/index.html.erb")-->
<h3><%= page_entries_info @comments %></h3>
<ul class="admin-list">
<% @comments.each do |comment| %>
<li id="<%= dom_id(comment) %>">
<div class="row">
<div class="small-12 medium-10 column">
<div class="small-12 medium-8 column">
<%= comment.body %>
<!-- Link to debate of this comment -->
<%= link_to t("admin.comments.index.show_debate"), "#" %>
<!-- /. Link to debate of this comment -->
</div>
<div class="small-12 medium-2 column">
<div class="small-6 medium-4 column text-right">
<!-- Link to archive this comment -->
<%= link_to t("admin.actions.archive"), "#", class: "button radius tiny warning" %>
<!-- /. Link to archive this comment -->
<%= link_to t("admin.actions.restore"), restore_admin_comment_path(comment),
method: :put, data: { confirm: t("admin.actions.confirm") },
class: "button radius small success right" %>
class: "button radius tiny success" %>
</div>
</div>
</li>

View File

@@ -1,5 +1,14 @@
<h2><%= t("admin.debates.index.title") %></h2>
<!-- Filters for pending and archived debates (example on "/admin/organizations/index.html.erb")-->
<dl class="sub-nav">
<dt><%= t("admin.debates.index.filter") %>:</dt>
<dd class="active"><%= t("admin.debates.filters.all") %></dd>
<dd><%= t("admin.debates.filters.pending") %></dd>
<dd><%= t("admin.debates.filters.archived") %></dd>
</dl>
<!-- Filters for pending and archived debates (example on "/admin/organizations/index.html.erb")-->
<h3><%= page_entries_info @debates %></h3>
<ul class="admin-list">
@@ -10,6 +19,10 @@
<%= link_to t("admin.actions.restore"), restore_admin_debate_path(debate),
method: :put, data: { confirm: t("admin.actions.confirm") },
class: "button radius tiny success right" %>
<!-- Link to archive this debate -->
<%= link_to t("admin.actions.archive"), "#", class: "button radius tiny warning right" %>
<!-- /. Link to archive this debate -->
</li>
<% end %>
</ul>

View File

@@ -1,7 +1,20 @@
<h2><%= t('admin.organizations.index.title') %></h2>
<h2><%= t("admin.organizations.index.title") %></h2>
<!-- Search organizations -->
<%= form_for(User.new, url: search_admin_officials_path, as: :user, method: :get) do |f| %>
<div class="row">
<div class="small-12 medium-6 column">
<%= text_field_tag :email, "", placeholder: t("admin.officials.index.search_email_placeholder") %>
</div>
<div class="form-inline small-12 medium-6 column">
<%= f.submit t("admin.officials.index.search"), class: "button radius success" %>
</div>
</div>
<% end %>
<!-- /. Search organizations -->
<dl class="sub-nav">
<dt><%= t('admin.organizations.index.filter') %>:</dt>
<dt><%= t("admin.organizations.index.filter") %>:</dt>
<% @valid_filters.each do |filter| %>
<% if @filter == filter %>
@@ -21,28 +34,36 @@
<td><%= organization.name %></td>
<td><%= organization.email %></td>
<td><%= organization.phone_number %></td>
<!-- Badge collective name, "collective" by default -->
<td>Colectivo</td>
<!-- /. Badge collective name, "collective" by default -->
<% if organization.verified? %>
<td class="verified">
<i class="icon-check"></i>
<%= t('admin.organizations.index.verified') %>
<%= t("admin.organizations.index.verified") %>
</td>
<% end %>
<% if organization.rejected? %>
<td class="rejected">
<i class="icon-x"></i>
<%= t('admin.organizations.index.rejected') %>
<%= t("admin.organizations.index.rejected") %>
</td>
<% end %>
<td>
<!-- Edit collective bagde, "collective" by default -->
<%= link_to t("admin.organizations.index.edit"), "", class: "button radius tiny secondary" %>
<!-- /. Edit collective bagde, "collective" by default -->
</td>
<% if can? :verify, organization %>
<td>
<%= link_to t('admin.organizations.index.verify'),
<%= link_to t("admin.organizations.index.verify"),
verify_admin_organization_path(organization, request.query_parameters),
method: :put, class: "button radius tiny success"
%>
</td>
<% end %>
<% if can? :reject, organization %>
<td><%= link_to t('admin.organizations.index.reject'),
<td><%= link_to t("admin.organizations.index.reject"),
reject_admin_organization_path(organization, request.query_parameters),
method: :put, class: "button radius tiny alert"
%>

View File

@@ -25,6 +25,7 @@ en:
verified: Verified
rejected: Rejected
filter: Filter
edit: Edit
filters:
all: All
pending: Pending
@@ -35,6 +36,7 @@ en:
hide_author: Ban author
restore: Restore
confirm: 'Are you sure?'
archive: Archive
tags:
index:
title: 'Debate topics'
@@ -46,15 +48,26 @@ en:
comments:
index:
title: Hidden comments
show_debate: Show debate
filter: Filter
restore:
success: The comment has been restored
filters:
all: All
pending: Pending
archived: Archived
debates:
index:
title: Hidden debates
filter: Filter
show:
back: Back
restore:
success: The debate has been restored
filters:
all: All
pending: Pending
archived: Archived
users:
index:
title: Banned users

View File

@@ -25,6 +25,7 @@ es:
verified: Verificada
rejected: Rechazada
filter: Filtro
edit: Editar
filters:
all: Todas
pending: Pendientes
@@ -35,26 +36,38 @@ es:
hide_author: Bloquear al autor
restore: Volver a mostrar
confirm: '¿Estás seguro?'
archive: Archivar
tags:
index:
title: 'Temas de debate'
add_tag: 'Añade un nuevo tema de debate'
mark_as_featured: 'Proponer etiqueta al crear debate'
mark_as_featured: 'Proponer tema al crear debate'
name:
placeholder: 'Escribe el nombre del tema'
destroy: Elimina la etiqueta
comments:
index:
title: Comentarios ocultos
show_debate: Ver debate
filter: Filtro
restore:
success: El comentario ha sido permitido
filters:
all: Todos
pending: Pendientes
archived: Archivados
debates:
index:
title: Debates ocultos
filter: Filtro
show:
back: Volver
restore:
success: El debate ha sido permitido
filters:
all: Todos
pending: Pendientes
archived: Archivados
users:
index:
title: Usuarios bloqueados