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

domains

parent 125d6bae
No related branches found
No related tags found
No related merge requests found
......@@ -7,14 +7,6 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites:
breadcrumb
end
def show
@all_pages = @website.pages.accessible_by(current_ability).for_language(current_website_language)
@pages = @all_pages.recent
@all_posts = @website.posts.accessible_by(current_ability).for_language(current_website_language)
@posts = @all_posts.recent
breadcrumb
end
def analytics
breadcrumb
add_breadcrumb t('communication.website.analytics')
......@@ -25,10 +17,6 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites:
add_breadcrumb t('communication.website.security')
end
def new
breadcrumb
end
def import
if request.post?
@website.import!
......@@ -45,6 +33,23 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites:
add_breadcrumb Communication::Website::Imported::Website.model_name.human
end
def show
@all_pages = @website.pages.accessible_by(current_ability).for_language(current_website_language)
@pages = @all_pages.recent
@all_posts = @website.posts.accessible_by(current_ability).for_language(current_website_language)
@posts = @all_posts.recent
breadcrumb
end
def static
@about = @website
render layout: false
end
def new
breadcrumb
end
def edit
breadcrumb
add_breadcrumb t('edit')
......
<% content_for :title, t('communication.website.security') %>
<%= osuny_panel "CSP" do %>
<ul>
<ul class="list-unstyled">
<% @website.external_domains.each do |domain| %>
<li><%= domain %></li>
<% end %>
......
......@@ -33,6 +33,7 @@
class: button_classes %>
<% end %>
<% end %>
<%= static_link static_admin_communication_website_path(@website) %>
<% end %>
<% content_for :action_bar_right do %>
......
title: >
<%= @about.to_s %>
external_domains:
<% @website.external_domains.each do |domain| %>
- "<%= domain %>"
<% end %>
\ No newline at end of file
......@@ -5,10 +5,11 @@ namespace :communication do
end
resources :websites do
member do
get :import
post :import
get :import
get :analytics
get :security
get :static
end
get 'style' => 'websites/preview#style', as: :style
get 'assets/*path' => 'websites/preview#assets'
......
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