diff --git a/app/controllers/admin/communication/websites/agenda/events_controller.rb b/app/controllers/admin/communication/websites/agenda/events_controller.rb index 4ab259b7e17760de7bda58ba64db264e1e151f38..e866aaee9e3fbce565a72e146029524fedaf9653 100644 --- a/app/controllers/admin/communication/websites/agenda/events_controller.rb +++ b/app/controllers/admin/communication/websites/agenda/events_controller.rb @@ -1,5 +1,5 @@ class Admin::Communication::Websites::Agenda::EventsController < Admin::Communication::Websites::Agenda::ApplicationController - load_and_authorize_resource class: Communication::Website::Agenda::Event, + load_and_authorize_resource class: Communication::Website::Agenda::Event, through: :website before_action :load_categories, only: [:new, :edit, :create, :update] @@ -23,7 +23,7 @@ class Admin::Communication::Websites::Agenda::EventsController < Admin::Communic def static @about = @event - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def new @@ -39,7 +39,7 @@ class Admin::Communication::Websites::Agenda::EventsController < Admin::Communic @event.website = @website @event.add_photo_import params[:photo_import] if @event.save_and_sync - redirect_to admin_communication_website_agenda_event_path(@event), + redirect_to admin_communication_website_agenda_event_path(@event), notice: t('admin.successfully_created_html', model: @event.to_s) else breadcrumb @@ -50,7 +50,7 @@ class Admin::Communication::Websites::Agenda::EventsController < Admin::Communic def update @event.add_photo_import params[:photo_import] if @event.update_and_sync(event_params) - redirect_to admin_communication_website_agenda_event_path(@event), + redirect_to admin_communication_website_agenda_event_path(@event), notice: t('admin.successfully_updated_html', model: @event.to_s) else breadcrumb @@ -66,7 +66,7 @@ class Admin::Communication::Websites::Agenda::EventsController < Admin::Communic def destroy @event.destroy - redirect_to admin_communication_website_agenda_events_url, + redirect_to admin_communication_website_agenda_events_url, notice: t('admin.successfully_destroyed_html', model: @event.to_s) end protected @@ -83,7 +83,7 @@ class Admin::Communication::Websites::Agenda::EventsController < Admin::Communic .permit( :title, :subtitle, :meta_description, :summary, :published, :slug, :featured_image, :featured_image_delete, :featured_image_infos, :featured_image_alt, :featured_image_credit, - :from_day, :from_hour, :to_day, :to_hour, + :from_day, :from_hour, :to_day, :to_hour, category_ids: [] ) .merge( diff --git a/app/controllers/admin/communication/websites/categories_controller.rb b/app/controllers/admin/communication/websites/categories_controller.rb index 0bed01ad6f1dc4f4cb9a840a807d127adde85691..f03eade5680f6127ce5bd6b1c99e9e3286d1efff 100644 --- a/app/controllers/admin/communication/websites/categories_controller.rb +++ b/app/controllers/admin/communication/websites/categories_controller.rb @@ -39,7 +39,7 @@ class Admin::Communication::Websites::CategoriesController < Admin::Communicatio def static @about = @category - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def new diff --git a/app/controllers/admin/communication/websites/menus_controller.rb b/app/controllers/admin/communication/websites/menus_controller.rb index 441bbd9987c6aa6991a6d4760ef9bbe28454ea61..7b41a656909ac22c90eed6a5acf58f41bb3370e3 100644 --- a/app/controllers/admin/communication/websites/menus_controller.rb +++ b/app/controllers/admin/communication/websites/menus_controller.rb @@ -16,7 +16,7 @@ class Admin::Communication::Websites::MenusController < Admin::Communication::We def static @about = @menu - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def new diff --git a/app/controllers/admin/communication/websites/pages_controller.rb b/app/controllers/admin/communication/websites/pages_controller.rb index ec188547031ffc785b57ac48e146945991b8e978..96fdd11c66969b0a6b96f6d6f01e705509bb4a19 100644 --- a/app/controllers/admin/communication/websites/pages_controller.rb +++ b/app/controllers/admin/communication/websites/pages_controller.rb @@ -56,7 +56,7 @@ class Admin::Communication::Websites::PagesController < Admin::Communication::We def static @about = @page - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def preview diff --git a/app/controllers/admin/communication/websites/posts_controller.rb b/app/controllers/admin/communication/websites/posts_controller.rb index ba642280dc0210fe67caccdc57a9c5391c058b8f..b5ad1275b5b9f563755be07b6b3212e94d2679c1 100644 --- a/app/controllers/admin/communication/websites/posts_controller.rb +++ b/app/controllers/admin/communication/websites/posts_controller.rb @@ -53,7 +53,7 @@ class Admin::Communication::Websites::PostsController < Admin::Communication::We def static @about = @post - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def new diff --git a/app/controllers/admin/communication/websites_controller.rb b/app/controllers/admin/communication/websites_controller.rb index cd77a57143929e40b4a99e477a2451577cae5599..510430455e30eb23ae928cb9df339fdab61d3eb5 100644 --- a/app/controllers/admin/communication/websites_controller.rb +++ b/app/controllers/admin/communication/websites_controller.rb @@ -35,7 +35,7 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites: def static @about = @website - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def new @@ -77,7 +77,7 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites: def website_params attribute_names = [ :name, :url, :repository, :about_type, :about_id, :in_production, - :git_provider, :git_endpoint, :git_branch, :plausible_url, + :git_provider, :git_endpoint, :git_branch, :plausible_url, :feature_posts, :feature_agenda, :deuxfleurs_hosting, :default_image, :default_image_delete, :social_mastodon, :social_x, :social_linkedin, :social_youtube, :social_vimeo, :social_peertube, :social_instagram, :social_facebook, :social_tiktok, :social_email, :social_github, diff --git a/app/controllers/admin/education/diplomas_controller.rb b/app/controllers/admin/education/diplomas_controller.rb index fdde0bd5b0974af274e4917e5ab64cd6e3280731..b8551112e8ef444d92815f0bdabc334f2bb8a990 100644 --- a/app/controllers/admin/education/diplomas_controller.rb +++ b/app/controllers/admin/education/diplomas_controller.rb @@ -14,7 +14,7 @@ class Admin::Education::DiplomasController < Admin::Education::ApplicationContro def static @about = @diploma @website = @diploma.websites&.first - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def new diff --git a/app/controllers/admin/education/programs_controller.rb b/app/controllers/admin/education/programs_controller.rb index 2e94f58bf2e07621db23aa0193ef21150335fd78..79c5f805082dc6dd8f74d43800b906d929719b23 100644 --- a/app/controllers/admin/education/programs_controller.rb +++ b/app/controllers/admin/education/programs_controller.rb @@ -55,7 +55,7 @@ class Admin::Education::ProgramsController < Admin::Education::ApplicationContro def static @about = @program @website = @program.websites&.first - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def preview diff --git a/app/controllers/admin/research/hal/publications_controller.rb b/app/controllers/admin/research/hal/publications_controller.rb index cefc974e8690c32ed6519bb63b205ad1425f756f..43dfaf8392241184bcad0b43d38bb296c99f704d 100644 --- a/app/controllers/admin/research/hal/publications_controller.rb +++ b/app/controllers/admin/research/hal/publications_controller.rb @@ -13,7 +13,7 @@ class Admin::Research::Hal::PublicationsController < Admin::Research::Hal::Appli def static @about = @publication @website = @publication.websites&.first || current_university.websites.first - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def destroy diff --git a/app/controllers/admin/research/journals/papers/kinds_controller.rb b/app/controllers/admin/research/journals/papers/kinds_controller.rb index 7d27734cb2e5eab7ebc53b4e55d0d2bba13cfb70..6086c3e849e86279335ada3caa7207b823a4af90 100644 --- a/app/controllers/admin/research/journals/papers/kinds_controller.rb +++ b/app/controllers/admin/research/journals/papers/kinds_controller.rb @@ -17,7 +17,7 @@ class Admin::Research::Journals::Papers::KindsController < Admin::Research::Jour if @website.nil? render plain: "Pas de site Web lié au journal" else - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end end diff --git a/app/controllers/admin/research/journals/papers_controller.rb b/app/controllers/admin/research/journals/papers_controller.rb index 03d30393273b012bac8475e3e6c917aaa0aa6c64..5ef35c499bfd6d39b777842f8e45baec5f6d5fb1 100644 --- a/app/controllers/admin/research/journals/papers_controller.rb +++ b/app/controllers/admin/research/journals/papers_controller.rb @@ -17,7 +17,7 @@ class Admin::Research::Journals::PapersController < Admin::Research::Journals::A if @website.nil? render plain: "Pas de site Web lié au journal" else - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end end diff --git a/app/controllers/admin/research/journals/volumes_controller.rb b/app/controllers/admin/research/journals/volumes_controller.rb index 343b40ce0ae0a8a97f505c7324c59f643dc6a1e1..96ca3f83dfb9b84a05bce74ca82f2d4ade90c4ce 100644 --- a/app/controllers/admin/research/journals/volumes_controller.rb +++ b/app/controllers/admin/research/journals/volumes_controller.rb @@ -17,7 +17,7 @@ class Admin::Research::Journals::VolumesController < Admin::Research::Journals:: if @website.nil? render plain: "Pas de site Web lié au journal" else - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end end diff --git a/app/controllers/admin/university/organizations_controller.rb b/app/controllers/admin/university/organizations_controller.rb index 0c3247502426e9b2038b7264bb4029f18611b15b..dc944ced83ccab242d0906752119624df6120560 100644 --- a/app/controllers/admin/university/organizations_controller.rb +++ b/app/controllers/admin/university/organizations_controller.rb @@ -32,8 +32,8 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio .search_by_siren_or_name(@term) .ordered @organizations = @organizations.joins(:language) - .where(languages: { - iso_code: language.iso_code + .where(languages: { + iso_code: language.iso_code }) if language.present? end @@ -56,7 +56,7 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio def static @about = @organization @website = @organization.websites&.first - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def new diff --git a/app/controllers/admin/university/people_controller.rb b/app/controllers/admin/university/people_controller.rb index 40e865f399bf0aa612cbe789d05e16611b3d23cd..df3b4a7878c7b57ac2fa1f81758a4d39c0260eb5 100644 --- a/app/controllers/admin/university/people_controller.rb +++ b/app/controllers/admin/university/people_controller.rb @@ -54,7 +54,7 @@ class Admin::University::PeopleController < Admin::University::ApplicationContro def static @about = @person @website = @person.websites&.first - render layout: false + render layout: false, content_type: "text/plain; charset=utf-8" end def new