app/views/decidim/admin/static_pages/index.html.erb in decidim-admin-0.0.6 vs app/views/decidim/admin/static_pages/index.html.erb in decidim-admin-0.0.7

- old
+ new

@@ -1,40 +1,41 @@ -<% provide :title do %> - <h2><%= t "decidim.admin.titles.static_pages" %></h2> -<% end %> +<div class="card"> + <div class="card-divider"> + <h2 class="card-title"><%= t "decidim.admin.titles.static_pages" %> <%= link_to t("static_pages.new.title", scope: "decidim.admin"), ['new', 'static_page'], class: 'button tiny button--title new' %></h2> + </div> + <div class="card-section"> + <div class="table-scroll"> + <table class="table-list"> + <thead> + <tr> + <th><%= t("models.static_page.fields.title", scope: "decidim.admin") %></th> + <th><%= t("models.static_page.fields.created_at", scope: "decidim.admin") %></th> + <th></th> + </tr> + </thead> + <tbody> + <% @pages.each do |page| %> + <tr> + <td> + <%= link_to translated_attribute(page.title), page %><br /> + </td> + <td> + <%= l page.created_at, format: :short %> + </td> + <td class="table-list__actions"> + <% if can? :update, page %> + <%= icon_link_to "pencil", ['edit', page], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> + <% end %> -<div class="actions title"> - <%= link_to t("actions.new", scope: "decidim.admin", name: t("models.static_page.name", scope: "decidim.admin")), ['new', 'static_page'], class: 'new' %> -</div> + <%= icon_link_to "eye", decidim.page_path(page), t("actions.view", scope: "decidim.admin.static_pages"), class: "action-icon--preview" %> -<table class="stack"> - <thead> - <tr> - <th><%= t("models.static_page.fields.title", scope: "decidim.admin") %></th> - <th><%= t("models.static_page.fields.created_at", scope: "decidim.admin") %></th> - <th class="actions"><%= t("actions.title", scope: "decidim.admin") %></th> - </tr> - </thead> - <tbody> - <% @pages.each do |page| %> - <tr> - <td> - <%= link_to translated_attribute(page.title), page %><br /> - </td> - <td> - <%= l page.created_at, format: :short %> - </td> - <td class="actions"> - <% if can? :update, page %> - <%= link_to t("actions.edit", scope: "decidim.admin"), ['edit', page] %> + <% if can? :destroy, page %> + <%= icon_link_to "circle-x", page, t("actions.destroy", scope: "decidim.admin"), class: "action-icon--remove", method: :delete, data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> + <% end %> + </td> + </tr> <% end %> - - <% if can? :destroy, page %> - <%= link_to t("actions.destroy", scope: "decidim.admin"), page, method: :delete, class: "small alert button", data: { confirm: t("actions.confirm_destroy", scope: "decidim.admin") } %> - <% end %> - - <%= link_to t("actions.view", scope: "decidim.admin.static_pages"), decidim.page_path(page) %> - </td> - </tr> - <% end %> - </tbody> -</table> + </tbody> + </table> + </div> + </div> +</div>