Unifies styles and views for admin geozones

This commit is contained in:
decabeza
2018-07-19 18:36:02 +02:00
parent f77327e93c
commit defc04a5dc
5 changed files with 40 additions and 42 deletions

View File

@@ -1,4 +1,3 @@
<% if @geozone.errors.any? %> <% if @geozone.errors.any? %>
<div id="error_explanation" data-alert class="callout alert" data-closable> <div id="error_explanation" data-alert class="callout alert" data-closable>

View File

@@ -2,7 +2,6 @@
<%= render 'errors' %> <%= render 'errors' %>
<div clas="row">
<div class="small-12 medium-6 large-4 column"> <div class="small-12 medium-6 large-4 column">
<%= f.label :name, t("admin.geozones.geozone.name") %> <%= f.label :name, t("admin.geozones.geozone.name") %>
<%= f.text_field :name, label: false %> <%= f.text_field :name, label: false %>
@@ -19,11 +18,8 @@
<%= f.label :census_code, t("admin.geozones.geozone.census_code") %> <%= f.label :census_code, t("admin.geozones.geozone.census_code") %>
<%= f.text_field :census_code, label: false %> <%= f.text_field :census_code, label: false %>
</div> </div>
</div>
<div class="row"> <div class="small-12 large-3 medium-3 column end">
<div class="actions small-12 large-3 medium-3 column"> <%= f.submit(class: "button success expanded", value: t("admin.geozones.edit.form.submit_button")) %>
<%= f.submit(class: "button expanded", value: t("admin.geozones.edit.form.submit_button")) %>
</div>
</div> </div>
<% end %> <% end %>

View File

@@ -1,9 +1,7 @@
<div class="row">
<div class="small-12 column">
<%= back_link_to admin_geozones_path, t("admin.geozones.edit.back") %> <%= back_link_to admin_geozones_path, t("admin.geozones.edit.back") %>
<h1><%= t("admin.geozones.edit.editing") %></h1> <div class="small-12 column">
<h2><%= t("admin.geozones.edit.editing") %></h2>
</div>
<%= render "form" %> <%= render 'form' %>
</div>
</div>

View File

@@ -1,5 +1,5 @@
<%= link_to t("admin.geozones.index.create"), <%= link_to t("admin.geozones.index.create"),
new_admin_geozone_path, class: "button success float-right" %> new_admin_geozone_path, class: "button float-right" %>
<h2 class="inline-block"><%= t("admin.geozones.index.title") %></h2> <h2 class="inline-block"><%= t("admin.geozones.index.title") %></h2>
@@ -10,7 +10,7 @@
<th><%= t("admin.geozones.geozone.external_code") %></th> <th><%= t("admin.geozones.geozone.external_code") %></th>
<th><%= t("admin.geozones.geozone.census_code") %></th> <th><%= t("admin.geozones.geozone.census_code") %></th>
<th><%= t("admin.geozones.geozone.coordinates") %></th> <th><%= t("admin.geozones.geozone.coordinates") %></th>
<th colspan="2"></th> <th><%= t("admin.actions.actions") %></th>
</tr> </tr>
</thead> </thead>
@@ -22,10 +22,17 @@
<td><%= geozone.census_code %></td> <td><%= geozone.census_code %></td>
<td class="break"><%= geozone.html_map_coordinates %></td> <td class="break"><%= geozone.html_map_coordinates %></td>
<td> <td>
<%= link_to t("admin.geozones.index.edit"), edit_admin_geozone_path(geozone), class: 'edit-banner button hollow' %> <div class="small-6 column">
</td> <%= link_to t("admin.geozones.index.edit"),
<td> edit_admin_geozone_path(geozone),
<%= link_to t("admin.geozones.index.delete"), admin_geozone_path(geozone), method: :delete, class: 'button hollow alert' %> class: "button hollow expanded" %>
</div>
<div class="small-6 column">
<%= link_to t("admin.geozones.index.delete"),
admin_geozone_path(geozone),
method: :delete,
class: "button hollow alert expanded" %>
</div>
</td> </td>
</tr> </tr>
<% end %> <% end %>

View File

@@ -1,9 +1,7 @@
<div class="geozone-new row">
<div class="small-12 column">
<%= back_link_to admin_geozones_path, t("admin.geozones.new.back") %> <%= back_link_to admin_geozones_path, t("admin.geozones.new.back") %>
<h1><%= t("admin.geozones.new.creating") %></h1> <div class="small-12 column">
<h2><%= t("admin.geozones.new.creating") %></h2>
</div>
<%= render "form" %> <%= render 'form' %>
</div>
</div>