app/views/decidim/admin/static_pages/index.html.erb in decidim-admin-0.15.2 vs app/views/decidim/admin/static_pages/index.html.erb in decidim-admin-0.16.0

- old
+ new

@@ -1,49 +1,7 @@ -<div class="card"> - <div class="card-divider"> - <% if allowed_to? :create, :static_page %> - <h2 class="card-title"><%= t "decidim.admin.titles.static_pages" %> <%= link_to t("static_pages.new.create", scope: "decidim.admin"), ["new", "static_page"], class: "button tiny button--title new" %></h2> - <% end %> - </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><%= t("last_notable_change", scope: "decidim.admin.static_pages.index") %></th> - <th></th> - </tr> - </thead> - <tbody> - <% @pages.each do |page| %> - <tr> - <td> - <%= link_to translated_attribute(page.title), ["edit", page] %><br /> - </td> - <td> - <%= l page.created_at, format: :short %> - </td> - <td> - <% if allowed_to? :update_notable_changes, :static_page, static_page: page %> - <%= @tos_version_formatted %> - <% end %> - </td> - <td class="table-list__actions"> - <% if allowed_to? :update, :static_page, static_page: page %> - <%= icon_link_to "pencil", ["edit", page], t("actions.edit", scope: "decidim.admin"), class: "action-icon--edit" %> - <% end %> +<% @topics.each do |topic| %> + <%= render partial: "topic", locals: { pages: topic.pages, topic: topic } %> +<% end %> - <%= icon_link_to "eye", decidim.page_path(page), t("actions.view", scope: "decidim.admin.static_pages"), class: "action-icon--preview" %> - - <% if allowed_to? :destroy, :static_page, static_page: 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 %> - </tbody> - </table> - </div> - </div> -</div> +<% if @orphan_pages.any? %> + <%= render partial: "topic", locals: { pages: @orphan_pages, topic: nil } %> +<% end %>