Manager: regenerate views template to match the new version
This commit is contained in:
parent
b1c273e254
commit
9297cbc642
14 changed files with 141 additions and 152 deletions
|
@ -1,20 +0,0 @@
|
|||
%table.collection-data{ "aria-labelledby": "page-title" }
|
||||
%thead
|
||||
%tr
|
||||
- collection_presenter.attribute_types.each do |attr_name, attr_type|
|
||||
%th.cell-label{ class: "cell-label--#{attr_type.html_class} cell-label--#{collection_presenter.ordered_html_class(attr_name)}", scope: "col" }
|
||||
= link_to(sanitized_order_params.merge(collection_presenter.order_params_for(attr_name))) do
|
||||
= t("helpers.label.#{resource_name}.#{attr_name}", default: attr_name.to_s).titleize
|
||||
|
||||
- if collection_presenter.ordered_by?(attr_name)
|
||||
%span.cell-label__sort-indicator{ class: "cell-label__sort-indicator--#{collection_presenter.ordered_html_class(attr_name)}" }
|
||||
= svg_tag("administrate/sort_arrow.svg", "sort_arrow", width: "13", height: "13")
|
||||
%th{ colspan: "2", scope: "col" }
|
||||
|
||||
%tbody
|
||||
- resources.each do |resource|
|
||||
%tr.table__row{ role: "link", tabindex: "0", "data-url": polymorphic_path([namespace, resource]) }
|
||||
- collection_presenter.attributes_for(resource).each do |attribute|
|
||||
%td.cell-data{ class: "cell-data--#{attribute.html_class}" }
|
||||
= link_to polymorphic_path([namespace, resource]), class: "action-show table__link-plain" do
|
||||
= render_field attribute
|
|
@ -1,5 +0,0 @@
|
|||
- if flash.any?
|
||||
.flashes
|
||||
- flash.each do |key, value|
|
||||
.flash{ class: "flash--#{key}" }
|
||||
= value
|
|
@ -1,9 +0,0 @@
|
|||
- Administrate::Engine.javascripts.each do |js_path|
|
||||
= javascript_include_tag js_path
|
||||
|
||||
= yield :javascript
|
||||
|
||||
- if Rails.env.test?
|
||||
= javascript_tag do
|
||||
$.fx.off = true;
|
||||
$.ajaxSetup({ async: false });
|
26
app/views/manager/application/_navigation.html.erb
Normal file
26
app/views/manager/application/_navigation.html.erb
Normal file
|
@ -0,0 +1,26 @@
|
|||
<%#
|
||||
# Navigation
|
||||
|
||||
This partial is used to display the navigation in Administrate.
|
||||
By default, the navigation contains navigation links
|
||||
for all resources in the admin dashboard,
|
||||
as defined by the routes in the `admin/` namespace
|
||||
%>
|
||||
|
||||
<nav class="navigation" role="navigation">
|
||||
<%= link_to "Se déconnecter", manager_sign_out_path, method: :delete, class: "navigation__link" %>
|
||||
|
||||
<hr />
|
||||
|
||||
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
|
||||
<%= link_to(
|
||||
display_resource_name(resource),
|
||||
[namespace, resource.path],
|
||||
class: "navigation__link navigation__link--#{nav_link_state(resource)}"
|
||||
) %>
|
||||
<% end %>
|
||||
|
||||
<hr />
|
||||
|
||||
<%= link_to "Delayed Job", manager_delayed_job_path, class: "navigation__link" %>
|
||||
</nav>
|
|
@ -1,16 +0,0 @@
|
|||
%ul.sidebar__list
|
||||
%li
|
||||
= link_to "Se déconnecter", manager_sign_out_path, method: :delete, class: "sidebar__link"
|
||||
|
||||
%hr{ style: "margin-bottom: 0;" }
|
||||
|
||||
%ul.sidebar__list
|
||||
- Administrate::Namespace.new(namespace).resources.each do |resource|
|
||||
%li
|
||||
= link_to(display_resource_name(resource), [namespace, resource], class: "sidebar__link sidebar__link--#{nav_link_state(resource)}")
|
||||
|
||||
%hr{ style: "margin-bottom: 0;" }
|
||||
|
||||
%ul.sidebar__list
|
||||
%li
|
||||
= link_to "Delayed Job", manager_delayed_job_path, class: "sidebar__link"
|
|
@ -1,15 +0,0 @@
|
|||
- content_for(:title) do
|
||||
= display_resource_name(page.resource_name)
|
||||
|
||||
- content_for(:search) do
|
||||
- if show_search_bar
|
||||
= render "search", search_term: search_term
|
||||
|
||||
%header.header
|
||||
%h1.header__heading#page-title
|
||||
= content_for(:title)
|
||||
.header__actions
|
||||
|
||||
= render "collection", collection_presenter: page, resources: resources
|
||||
|
||||
= paginate resources
|
|
@ -1,13 +0,0 @@
|
|||
- content_for(:title) { page.page_title }
|
||||
|
||||
%header.header
|
||||
%h1.header__heading= content_for(:title)
|
||||
.header__actions
|
||||
|
||||
%dl
|
||||
- page.attributes.each do |attribute|
|
||||
%dt.attribute-label
|
||||
= t("helpers.label.#{resource_name}.#{attribute.name}", default: attribute.name.titleize)
|
||||
|
||||
%dd.attribute-data{ class: "attribute-data--#{attribute.html_class}" }
|
||||
= render_field attribute
|
Loading…
Add table
Add a link
Reference in a new issue