Skip to content
Snippets Groups Projects
Commit d1134bdd authored by Arnaud Levy's avatar Arnaud Levy
Browse files

width settings

parent 2f6f86e3
No related branches found
No related tags found
No related merge requests found
Showing with 63 additions and 10 deletions
......@@ -41,4 +41,7 @@
#
class Communication::Website::Page::Accessibility < Communication::Website::Page
def draftable?
false
end
end
......@@ -41,6 +41,18 @@
#
class Communication::Website::Page::CommunicationPost < Communication::Website::Page
def full_width
true
end
def full_width_by_default?
true
end
def editable_width?
false
end
def current_git_path
"#{git_path_prefix}posts/_index.html"
end
......
......@@ -41,6 +41,18 @@
#
class Communication::Website::Page::EducationDiploma < Communication::Website::Page
def full_width
true
end
def full_width_by_default?
true
end
def editable_width?
false
end
def current_git_path
"#{git_path_prefix}diplomas/_index.html"
end
......
......@@ -41,6 +41,18 @@
#
class Communication::Website::Page::EducationProgram < Communication::Website::Page
def full_width
true
end
def full_width_by_default?
true
end
def editable_width?
false
end
def current_git_path
"#{git_path_prefix}programs/_index.html"
end
......
......@@ -49,6 +49,10 @@ class Communication::Website::Page::Home < Communication::Website::Page
true
end
def full_width_by_default?
true
end
def draftable?
false
end
......
......@@ -41,4 +41,7 @@
#
class Communication::Website::Page::LegalTerm < Communication::Website::Page
def draftable?
false
end
end
......@@ -41,4 +41,15 @@
#
class Communication::Website::Page::Sitemap < Communication::Website::Page
def draftable?
false
end
def full_width
false
end
def editable_width?
false
end
end
......@@ -30,10 +30,14 @@ module Communication::Website::Page::WithType
true
end
def full_width_by_default?
def editable_width?
true
end
def full_width_by_default?
false
end
def published_by_default?
true
end
......
......@@ -55,7 +55,7 @@ url = page.new_record? ? admin_communication_website_pages_path
label_method: ->(p) { sanitize p[:label] },
value_method: ->(p) { p[:id] } unless page.is_home? %>
<%= f.input :bodyclass if can?(:edit, @website) %>
<%= f.input :full_width %>
<%= f.input :full_width if page.editable_width? %>
</div>
</div>
<% else %>
......
......@@ -3,15 +3,7 @@ title: >
<%= @about.title %>
breadcrumb_title: "<%= @about.breadcrumb_title.blank? ? @about.title : @about.breadcrumb_title %>"
<%= render 'admin/application/static/permalink' %>
<%
case @about.kind
when 'education_programs',
'education_diplomas',
'communication_posts' %>
<%= render 'admin/application/static/design', full_width: true, toc_offcanvas: true %>
<% else %>
<%= render 'admin/application/static/design' %>
<% end %>
<% if @about.kind_persons? %>
has:
administrators: <%= @website.has_administrators? %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment