improves admin tags layout

This commit is contained in:
decabeza
2017-10-13 19:31:02 +02:00
parent 599c243f62
commit ae74e1ba07
3 changed files with 23 additions and 20 deletions

View File

@@ -1,39 +1,40 @@
<h2><%= t("admin.tags.index.add_tag") %></h2>
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
<div class="row">
<div class="small-12 medium-6 column">
<%= f.label :name, t("admin.tags.name.placeholder") %>
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
</div>
<div class="small-12 medium-6">
<%= f.label :name, t("admin.tags.name.placeholder") %>
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
</div>
<%= f.submit(t("admin.tags.create"), class: "button success") %>
<% end %>
<h3><%= t("admin.tags.index.title") %>: <%= page_entries_info @tags %></h3>
<hr>
<h3 class="margin"><%= t("admin.tags.index.title") %>: <%= page_entries_info @tags %></h3>
<table>
<thead>
<th scope="col" class="small-9"><%= t("admin.tags.index.title") %></th>
<th scope="col"><%= t("admin.actions.actions") %></th>
</thead>
<tbody>
<% @tags.each do |tag| %>
<tr>
<td class="with-button">
<td>
<%= form_for(tag,
url: admin_tag_path(tag),
as: :tag,
html: { id: "edit_tag_#{tag.id}", class: "text-right"}) do |f| %>
html: { id: "edit_tag_#{tag.id}"}) do |f| %>
<span class="float-left text-left">
<strong><%= tag.name %></strong>
</span>
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert on-hover" %>
<strong><%= tag.name %></strong>
<% end %>
</td>
<td>
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @tags %>

View File

@@ -901,11 +901,12 @@ en:
total: Total
proposals_with_notifications: Proposals with notifications
tags:
create: Create Topic
destroy: Destroy Topic
create: Create topic
destroy: Destroy topic
index:
add_tag: Add a new proposal topic
title: Proposal topics
topic: Topic
name:
placeholder: Type the name of the topic
users:

View File

@@ -903,11 +903,12 @@ es:
total: Total
proposals_with_notifications: Propuestas con notificaciones
tags:
create: Crear Tema
destroy: Eliminar Tema
create: Crear tema
destroy: Eliminar tema
index:
add_tag: Añade un nuevo tema de propuesta
title: Temas de propuesta
topic: Tema
name:
placeholder: Escribe el nombre del tema
users: