dries layout admin views

moves common <div class='left'> to layout
This commit is contained in:
Juanjo Bazán
2015-08-17 15:01:36 +02:00
parent d758958b9b
commit af3e356b88
5 changed files with 54 additions and 59 deletions

View File

@@ -1,14 +1,12 @@
<div class="left"> <h1><%= t("admin.comments.index.title") %></h1>
<h1><%= t("admin.comments.index.title") %></h1>
<ul> <ul>
<% @comments.each do |comment| %> <% @comments.each do |comment| %>
<li id="<%= dom_id(comment) %>"> <li id="<%= dom_id(comment) %>">
<%= comment.body %> <%= comment.body %>
<%= link_to t("admin.actions.restore"), restore_admin_comment_path(comment), <%= link_to t("admin.actions.restore"), restore_admin_comment_path(comment),
method: :put, data: { confirm: t("admin.actions.confirm") } %> method: :put, data: { confirm: t("admin.actions.confirm") } %>
</li> </li>
<% end %> <% end %>
</ul> </ul>
</div>

View File

@@ -1,13 +1,11 @@
<div class="left"> <h1><%= t("admin.debates.index.title") %></h1>
<h1><%= t("admin.debates.index.title") %></h1>
<ul> <ul>
<% @debates.each do |debate| %> <% @debates.each do |debate| %>
<%= link_to admin_debate_path(debate) do %> <%= link_to admin_debate_path(debate) do %>
<li id="<%= dom_id(debate) %>"> <li id="<%= dom_id(debate) %>">
<%= link_to debate.title, admin_debate_path(debate) %> <%= link_to debate.title, admin_debate_path(debate) %>
</li> </li>
<% end %>
<% end %> <% end %>
</ul> <% end %>
</div> </ul>

View File

@@ -1,13 +1,11 @@
<div class="left"> <h1><%= t("admin.debates.index.title") %></h1>
<h1><%= t("admin.debates.index.title") %></h1>
<div>
<div><%= @debate.title %></div>
<div><%= @debate.description %></div>
<div> <div>
<div><%= @debate.title %></div> <%= link_to t('admin.actions.restore'), restore_admin_debate_path(@debate),
<div><%= @debate.description %></div> method: :put, data: { confirm: t('admin.actions.confirm') } %>
<div>
<%= link_to t('admin.actions.restore'), restore_admin_debate_path(@debate),
method: :put, data: { confirm: t('admin.actions.confirm') } %>
</div>
</div> </div>
</div> </div>

View File

@@ -1,28 +1,26 @@
<div class="left"> <h1><%= t("admin.tags.index.add_tag") %></h1>
<h1><%= t("admin.tags.index.add_tag") %></h1>
<%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %> <%= form_for(@tag, url: admin_tags_path, as: :tag) do |f| %>
<%= f.text_field :name, placeholder: t("admin.tags.name.placeholder") %> <%= f.text_field :name, placeholder: t("admin.tags.name.placeholder") %>
<%= f.check_box :featured, label: false %> <%= f.check_box :featured, label: false %>
<%= t("admin.tags.mark_as_featured") %> <%= t("admin.tags.mark_as_featured") %>
<%= f.submit(class: "button radius small") %> <%= f.submit(class: "button radius small") %>
<% end %>
<h1><%= t("admin.tags.index.title") %></h1>
<ul>
<% @tags.each do |tag| %>
<li>
<strong><%= tag.name %></strong>
<%= form_for(tag, url: admin_tag_path(tag), as: :tag, html: { id: "edit_tag_#{tag.id}"}) do |f| %>
<%= f.check_box :featured, label: false, id: "tag_featured_#{tag.id}" %>
<%= t("admin.tags.mark_as_featured") %>
<%= f.submit(class: "button radius tiny") %>
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: 'button tiny alert' %>
<% end %>
</li>
<% end %> <% end %>
</ul>
<h1><%= t("admin.tags.index.title") %></h1>
<ul>
<% @tags.each do |tag| %>
<li>
<strong><%= tag.name %></strong>
<%= form_for(tag, url: admin_tag_path(tag), as: :tag, html: { id: "edit_tag_#{tag.id}"}) do |f| %>
<%= f.check_box :featured, label: false, id: "tag_featured_#{tag.id}" %>
<%= t("admin.tags.mark_as_featured") %>
<%= f.submit(class: "button radius tiny") %>
<%= link_to t("admin.tags.destroy"), admin_tag_path(tag), method: :delete, class: 'button tiny alert' %>
<% end %>
</li>
<% end %>
</ul>
</div>

View File

@@ -27,7 +27,10 @@
<%= side_menu %> <%= side_menu %>
</div> </div>
<%= yield %> <div class="left">
<%= yield %>
</div>
</body> </body>
</html> </html>