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> <h2><%= t("admin.tags.index.add_tag") %></h2>
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %> <%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
<div class="small-12 medium-6">
<div class="row"> <%= f.label :name, t("admin.tags.name.placeholder") %>
<div class="small-12 medium-6 column"> <%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
<%= f.label :name, t("admin.tags.name.placeholder") %>
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder"), label: false %>
</div>
</div> </div>
<%= f.submit(t("admin.tags.create"), class: "button success") %> <%= f.submit(t("admin.tags.create"), class: "button success") %>
<% end %> <% 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> <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| %> <% @tags.each do |tag| %>
<tr> <tr>
<td class="with-button"> <td>
<%= form_for(tag, <%= form_for(tag,
url: admin_tag_path(tag), url: admin_tag_path(tag),
as: :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>
<strong><%= tag.name %></strong>
</span>
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert on-hover" %>
<% end %> <% end %>
</td> </td>
<td>
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: "button hollow alert" %>
</td>
</tr> </tr>
<% end %> <% end %>
</tbody>
</table> </table>
<%= paginate @tags %> <%= paginate @tags %>

View File

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

View File

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