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

Merge branch 'main' into deuxfleurs-git

parents 88045973 a6835789
No related branches found
Tags v1.2.1
No related merge requests found
Showing
with 58 additions and 23 deletions
class Api::Osuny::Server::WebsitesController < Api::Osuny::ApplicationController
skip_before_action :verify_authenticity_token, only: [:theme_released]
def index
@websites = Communication::Website.in_production
end
def theme_released
if params[:secret_key].present? && params[:secret_key] == ENV['OSUNY_API_AUTOUPDATE_THEME_KEY']
Communication::Website.autoupdate_websites
......
class Api::Osuny::ServerController < Api::Osuny::ApplicationController
def index
end
end
......@@ -53,6 +53,11 @@ class Communication::Website::Page::Administrator < Communication::Website::Page
website.administrators.where(language_id: language_id).map(&:administrator)
end
# Not listed in any menu because it makes "Équipe" unclickable (opens submenu)
def default_menu_identifier
''
end
protected
def current_git_path
......
......@@ -49,6 +49,11 @@ class Communication::Website::Page::Author < Communication::Website::Page
website.authors.where(language_id: language_id).map(&:author)
end
# Not listed in any menu because it makes "Équipe" unclickable (opens submenu)
def default_menu_identifier
''
end
protected
def current_git_path
......
......@@ -54,6 +54,11 @@ class Communication::Website::Page::CommunicationAgendaArchive < Communication::
website.feature_agenda
end
# Not listed in any menu because it makes "Agenda" unclickable (opens submenu)
def default_menu_identifier
''
end
def dependencies
super +
[website.config_default_languages] +
......
......@@ -53,6 +53,11 @@ class Communication::Website::Page::Researcher < Communication::Website::Page
website.researchers.where(language_id: language_id).map(&:researcher)
end
# Not listed in any menu because it makes "Équipe" unclickable (opens submenu)
def default_menu_identifier
''
end
protected
def current_git_path
......
......@@ -47,6 +47,11 @@ class Communication::Website::Page::Teacher < Communication::Website::Page
website.about && website.about&.respond_to?(:teachers)
end
# Not listed in any menu because it makes "Équipe" unclickable (opens submenu)
def default_menu_identifier
''
end
def dependencies
super +
[website.config_default_languages] +
......
---
title: >
title: >-
<%= @about.to_s %>
linkTitle: >-
<%= @about.to_s_alphabetical %>
<%= render 'admin/application/static/permalink' %>
<%= render 'admin/application/meta_description/static' %>
<%= render 'admin/application/summary/static' %>
......
json.communication do
json.url api_osuny_communication_path
end
json.server do
json.url api_osuny_server_path
end
end
\ No newline at end of file
json.websites do
json.url api_osuny_server_websites_path
end
json.array! @websites.each do |website|
json.name website.name
json.url website.url
end
......@@ -9,9 +9,7 @@ namespace :api do
post ':website_id/posts/import' => 'posts#import'
end
end
get 'server' => 'server#index'
namespace :server do
get 'websites' => 'websites#index'
post 'websites/theme-released' => 'websites#theme_released'
end
end
......
......@@ -8,7 +8,35 @@ namespace :app do
desc 'Fix things'
task fix: :environment do
{
'7e153490-6230-479f-828c-072156fa7844' => 'www.aliceetlescryptotrolls.org',
'3ccd06c9-5a99-44d3-8ffd-bc061bb200d7' => 'www.aorganisation.org',
'c35fdb1e-8f27-4861-9299-3a0b1de075e4' => 'formation.osuny.org',
'c48c69c3-028f-4719-9a3c-40b40f285ed0' => 'example.osuny.org',
'a592b498-401d-4a04-8096-619e79c99373' => 'example-journal.osuny.org',
'43823665-2bc0-4f2e-9908-9a2ea51d8923' => 'francoisnemeta',
'6f38ca23-a2bf-4e18-a61a-ad3f8e173b39' => 'lab.noesya.coop',
'ed7786de-7779-42b9-826e-eee1539e5f13' => 'levelesyeux',
'5b500a04-660b-455a-baeb-615e2ecd17c5' => 'www.numeriqueinteretgeneral.org',
'1a601e73-61f5-4c97-849f-7e8d56184c6c' => 'osuny.org',
'826c808b-2234-410b-9756-79bb0b474c66' => 'presse.noesya.coop',
'523447c2-67d0-4e3e-adb4-c4af6dd95fa4' => 'sane.noesya.coop',
'6db97e73-44df-4d9a-9d43-8ada6ce1e1bd' => 'climbing.sebastiengaya.fr',
'0aee4b28-85b6-463c-9395-f300fa131763' => 'support.osuny.org',
'd6aae95e-0071-421a-8d2f-cca82901abeb' => 'works.noesya.coop',
'0c5f68cd-12a0-4df1-bb48-f1d0541f9d37' => 'www.technorealisme.org',
'330c8a78-486b-4a59-953c-22153a4538f0' => 'chatons',
'72d9f79d-612f-426c-8b83-3be498a6be0a' => 'www.planetonstage.org',
'4c5d277e-eded-4052-8461-1e72fe12294a' => 'movecommons',
'5b5f01ed-3376-46a3-a113-80500f4d71cf' => 'lescodessurlatable',
'e44bab13-4105-47bd-9577-f147af46ff5c' => 'labibliothech',
'5ff011e4-e87f-451f-8d20-93d22bf7fc83' => 'idn-site',
'40996a72-11c5-44d1-98c1-010d063f0cfb' => 'deuxfleurs-garage',
'72b79e5c-bd2c-4531-bf8d-bf8f4e7ddd90' => 'cecilefreydf'
}.each do |id, identifier|
Communication::Website.find(id).update_columns deuxfleurs_hosting: true,
deuxfleurs_identifier: identifier
end
end
namespace :websites do
......
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