diff --git a/app/controllers/admin/communication/websites_controller.rb b/app/controllers/admin/communication/websites_controller.rb index 790967b167c67aceaf74ded78b4cc55698e790df..647071049e6f1974eb2b60f7bc98b9f9f3f423c8 100644 --- a/app/controllers/admin/communication/websites_controller.rb +++ b/app/controllers/admin/communication/websites_controller.rb @@ -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') diff --git a/app/views/admin/communication/websites/security.html.erb b/app/views/admin/communication/websites/security.html.erb index 9b9212efa187ec47f5e7424bf6ea1aa4bc55069c..7d5b7e0daa9d0de2725f9f3c9f22044b9c38b5ad 100644 --- a/app/views/admin/communication/websites/security.html.erb +++ b/app/views/admin/communication/websites/security.html.erb @@ -1,7 +1,7 @@ <% 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 %> diff --git a/app/views/admin/communication/websites/show.html.erb b/app/views/admin/communication/websites/show.html.erb index e7be9bca63024a5e6f4f707ac27c34b4faf2ebf2..18bb57db469db1c10bf88f9111582942818e6c27 100644 --- a/app/views/admin/communication/websites/show.html.erb +++ b/app/views/admin/communication/websites/show.html.erb @@ -33,6 +33,7 @@ class: button_classes %> <% end %> <% end %> + <%= static_link static_admin_communication_website_path(@website) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/communication/websites/static.html.erb b/app/views/admin/communication/websites/static.html.erb index 410015a86e15a217ec74db52bd2ae69810f7a879..3e04361f3358faa5b81f01b9e0220835eb6df57c 100644 --- a/app/views/admin/communication/websites/static.html.erb +++ b/app/views/admin/communication/websites/static.html.erb @@ -1,2 +1,6 @@ title: > <%= @about.to_s %> +external_domains: +<% @website.external_domains.each do |domain| %> + - "<%= domain %>" +<% end %> \ No newline at end of file diff --git a/config/routes/admin/communication.rb b/config/routes/admin/communication.rb index 29ce50cfe3a4754ed151dbb2960e4224b0b00c52..860d470eb45a7ebad8035a2b6a698943071d59cc 100644 --- a/config/routes/admin/communication.rb +++ b/config/routes/admin/communication.rb @@ -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'