diff --git a/app/controllers/admin/communication/websites_controller.rb b/app/controllers/admin/communication/websites_controller.rb index 9f311420edce99712300778865889c6f0d7886b4..796e197834980f45cde6a6f05b01b0c58cdb6e31 100644 --- a/app/controllers/admin/communication/websites_controller.rb +++ b/app/controllers/admin/communication/websites_controller.rb @@ -89,6 +89,7 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites: :name, :url, :repository, :about_type, :about_id, :in_production, :git_provider, :git_endpoint, :git_branch, :plausible_url, :feature_posts, :feature_agenda, + :social_mastodon, :social_x, :social_linkedin, :social_youtube, :social_vimeo, :social_peertube, :social_instagram, :social_facebook, :social_tiktok, :deployment_status_badge, :autoupdate_theme, language_ids: [] ] attribute_names << :access_token unless params[:communication_website][:access_token].blank? diff --git a/app/models/communication/extranet.rb b/app/models/communication/extranet.rb index 1a4615b3d6c6865f180dd318b43f9c1268235907..0dc31636314ab864924471003317609996665e7c 100644 --- a/app/models/communication/extranet.rb +++ b/app/models/communication/extranet.rb @@ -2,35 +2,34 @@ # # Table name: communication_extranets # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# allow_experiences_modification :boolean default(TRUE) -# color :string -# cookies_policy :text -# css :text -# feature_alumni :boolean default(FALSE) -# feature_contacts :boolean default(FALSE) -# feature_jobs :boolean default(FALSE) -# feature_library :boolean default(FALSE) -# feature_posts :boolean default(FALSE) -# has_sso :boolean default(FALSE) -# home_sentence :text -# host :string -# name :string -# privacy_policy :text -# registration_contact :string -# sass :text -# sso_button_label :string -# sso_cert :text -# sso_mapping :jsonb -# sso_name_identifier_format :string -# sso_provider :integer default("saml") -# sso_target_url :string -# terms :text -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# color :string +# cookies_policy :text +# css :text +# feature_alumni :boolean default(FALSE) +# feature_contacts :boolean default(FALSE) +# feature_jobs :boolean default(FALSE) +# feature_library :boolean default(FALSE) +# feature_posts :boolean default(FALSE) +# has_sso :boolean default(FALSE) +# home_sentence :text +# host :string +# name :string +# privacy_policy :text +# registration_contact :string +# sass :text +# sso_button_label :string +# sso_cert :text +# sso_mapping :jsonb +# sso_name_identifier_format :string +# sso_provider :integer default("saml") +# sso_target_url :string +# terms :text +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb index 39f1f18be53a58493ec7bb80ef16c64c01ba3ce3..8ba01a97bcf0b70c4838a65a6c1ec80d0f35691e 100644 --- a/app/models/communication/website.rb +++ b/app/models/communication/website.rb @@ -16,6 +16,15 @@ # name :string # plausible_url :string # repository :string +# social_facebook :string +# social_instagram :string +# social_linkedin :string +# social_mastodon :string +# social_peertube :string +# social_tiktok :string +# social_vimeo :string +# social_x :string +# social_youtube :string # style :text # style_updated_at :date # theme_version :string default("NA") diff --git a/app/models/communication/website/configs/base.rb b/app/models/communication/website/configs/base.rb index bdaf514d64d6b238b81ee1fdb5051c85c8a7cbe5..9b7fa604c17341528509a83ffc6ab87097f34fe4 100644 --- a/app/models/communication/website/configs/base.rb +++ b/app/models/communication/website/configs/base.rb @@ -16,6 +16,15 @@ # name :string # plausible_url :string # repository :string +# social_facebook :string +# social_instagram :string +# social_linkedin :string +# social_mastodon :string +# social_peertube :string +# social_tiktok :string +# social_vimeo :string +# social_x :string +# social_youtube :string # style :text # style_updated_at :date # theme_version :string default("NA") diff --git a/app/models/communication/website/configs/default_languages.rb b/app/models/communication/website/configs/default_languages.rb index 2ba91739b05cdeaf4a968c653a7fb33cefa15df3..47d7ec2edff86fc8bd2237d2e01fa24d342d1ea5 100644 --- a/app/models/communication/website/configs/default_languages.rb +++ b/app/models/communication/website/configs/default_languages.rb @@ -16,6 +16,15 @@ # name :string # plausible_url :string # repository :string +# social_facebook :string +# social_instagram :string +# social_linkedin :string +# social_mastodon :string +# social_peertube :string +# social_tiktok :string +# social_vimeo :string +# social_x :string +# social_youtube :string # style :text # style_updated_at :date # theme_version :string default("NA") diff --git a/app/models/communication/website/configs/default_permalinks.rb b/app/models/communication/website/configs/default_permalinks.rb index 1ec87b7aa512caabdcfcd9607006fff6ccc86d45..20b02d54915db8cc4869ae6dc9c6ccb906685b33 100644 --- a/app/models/communication/website/configs/default_permalinks.rb +++ b/app/models/communication/website/configs/default_permalinks.rb @@ -16,6 +16,15 @@ # name :string # plausible_url :string # repository :string +# social_facebook :string +# social_instagram :string +# social_linkedin :string +# social_mastodon :string +# social_peertube :string +# social_tiktok :string +# social_vimeo :string +# social_x :string +# social_youtube :string # style :text # style_updated_at :date # theme_version :string default("NA") diff --git a/app/models/communication/website/configs/development_config.rb b/app/models/communication/website/configs/development_config.rb index 2dc3d1862247d8cccd6b0b9765727a610931c945..25cdeed1bf74674465bc71db1929252e61c22415 100644 --- a/app/models/communication/website/configs/development_config.rb +++ b/app/models/communication/website/configs/development_config.rb @@ -16,6 +16,15 @@ # name :string # plausible_url :string # repository :string +# social_facebook :string +# social_instagram :string +# social_linkedin :string +# social_mastodon :string +# social_peertube :string +# social_tiktok :string +# social_vimeo :string +# social_x :string +# social_youtube :string # style :text # style_updated_at :date # theme_version :string default("NA") diff --git a/app/models/communication/website/configs/production_config.rb b/app/models/communication/website/configs/production_config.rb index 0011aba777778f2c306a7e97345caad0ce47e18d..8f3a51424c4dad862237f24fdbc11a907a873be8 100644 --- a/app/models/communication/website/configs/production_config.rb +++ b/app/models/communication/website/configs/production_config.rb @@ -16,6 +16,15 @@ # name :string # plausible_url :string # repository :string +# social_facebook :string +# social_instagram :string +# social_linkedin :string +# social_mastodon :string +# social_peertube :string +# social_tiktok :string +# social_vimeo :string +# social_x :string +# social_youtube :string # style :text # style_updated_at :date # theme_version :string default("NA") diff --git a/app/models/communication/website/page/communication_agenda_archive.rb b/app/models/communication/website/page/communication_agenda_archive.rb index e544ec3eec977bc138edb9ef3735eea9e822915d..0432d1c8510dc66da4a23f9ab347a068bed35821 100644 --- a/app/models/communication/website/page/communication_agenda_archive.rb +++ b/app/models/communication/website/page/communication_agenda_archive.rb @@ -1,3 +1,46 @@ +# == Schema Information +# +# Table name: communication_website_pages +# +# id :uuid not null, primary key +# bodyclass :string +# breadcrumb_title :string +# featured_image_alt :string +# featured_image_credit :text +# full_width :boolean default(FALSE) +# header_text :text +# kind :integer +# meta_description :text +# position :integer default(0), not null +# published :boolean default(FALSE) +# slug :string +# summary :text +# text :text +# title :string +# type :string +# created_at :datetime not null +# updated_at :datetime not null +# communication_website_id :uuid not null, indexed +# language_id :uuid not null, indexed +# original_id :uuid indexed +# parent_id :uuid indexed +# university_id :uuid not null, indexed +# +# Indexes +# +# index_communication_website_pages_on_communication_website_id (communication_website_id) +# index_communication_website_pages_on_language_id (language_id) +# index_communication_website_pages_on_original_id (original_id) +# index_communication_website_pages_on_parent_id (parent_id) +# index_communication_website_pages_on_university_id (university_id) +# +# Foreign Keys +# +# fk_rails_1a42003f06 (parent_id => communication_website_pages.id) +# fk_rails_280107c62b (communication_website_id => communication_websites.id) +# fk_rails_304f57360f (original_id => communication_website_pages.id) +# fk_rails_d208d15a73 (university_id => universities.id) +# class Communication::Website::Page::CommunicationAgendaArchive < Communication::Website::Page def editable_width? false @@ -26,4 +69,4 @@ class Communication::Website::Page::CommunicationAgendaArchive < Communication:: def current_git_path @current_git_path ||= "#{git_path_prefix}events/archives/_index.html" end -end \ No newline at end of file +end diff --git a/app/views/admin/communication/websites/_form.html.erb b/app/views/admin/communication/websites/_form.html.erb index 1c20c4e24cfd29d839e194fa3e4d20d7b41c1cac..b984f5fa72cb650d99f28662624baf2993c91cf7 100644 --- a/app/views/admin/communication/websites/_form.html.erb +++ b/app/views/admin/communication/websites/_form.html.erb @@ -19,41 +19,48 @@ <%= f.association :default_language, include_blank: t('simple_form.include_blanks.defaults.language'), input_html: (@website.persisted? ? { disabled: true } : { class: "js-default-language" }) %> <% end %> </div> - <div class="col-xl-8"> + <div class="col-xl-4"> <%= osuny_panel t('communication.website.git') do %> - <div class="row"> - <div class="col-xl-6"> - <%= f.input :autoupdate_theme %> - <%= f.input :git_provider, include_blank: false %> - <%= f.input :git_endpoint %> - <%= f.input :deployment_status_badge, - as: :string, - input_html: { - autocomplete: 'deployment_status_badge', - role: 'presentation' - } - %> - </div> - <div class="col-xl-6"> - <%= f.input :access_token, - as: :string, - placeholder: masked_string(f.object.access_token), - hint: t("simple_form.hints.communication_website.access_token_#{f.object.access_token.blank? ? 'without' : 'with'}_existing").html_safe, - input_html: { - autocomplete: 'access_token', - role: 'presentation', - value: '' - } - %> - <%= f.input :repository %> - <%= f.input :git_branch %> - </div> - </div> + <%= f.input :autoupdate_theme %> + <%= f.input :git_provider, include_blank: false %> + <%= f.input :git_endpoint %> + <%= f.input :deployment_status_badge, + as: :string, + input_html: { + autocomplete: 'deployment_status_badge', + role: 'presentation' + } + %> + <%= f.input :access_token, + as: :string, + placeholder: masked_string(f.object.access_token), + hint: t("simple_form.hints.communication_website.access_token_#{f.object.access_token.blank? ? 'without' : 'with'}_existing").html_safe, + input_html: { + autocomplete: 'access_token', + role: 'presentation', + value: '' + } + %> + <%= f.input :repository %> + <%= f.input :git_branch %> <% end %> <%= osuny_panel t('communication.website.analytics') do %> <%= f.input :plausible_url %> <% end %> </div> + <div class="col-xl-4"> + <%= osuny_panel Communication::Website.human_attribute_name('social') do %> + <%= f.input :social_mastodon %> + <%= f.input :social_peertube %> + <%= f.input :social_x %> + <%= f.input :social_linkedin %> + <%= f.input :social_youtube %> + <%= f.input :social_vimeo %> + <%= f.input :social_instagram %> + <%= f.input :social_facebook %> + <%= f.input :social_tiktok %> + <% end %> + </div> </div> <% content_for :action_bar_right do %> <%= submit f %> diff --git a/app/views/admin/communication/websites/static.html.erb b/app/views/admin/communication/websites/static.html.erb index 3e04361f3358faa5b81f01b9e0220835eb6df57c..dfa54600cf947b8d94ee71c9e5b9bb4c575c0c84 100644 --- a/app/views/admin/communication/websites/static.html.erb +++ b/app/views/admin/communication/websites/static.html.erb @@ -3,4 +3,13 @@ title: > external_domains: <% @website.external_domains.each do |domain| %> - "<%= domain %>" +<% end %> +social: +<% +[:mastodon, :peertube, :x, :linkedin, :youtube, :vimeo, :instagram, :facebook, :tiktok].each do |network| + value = @website.send "social_#{network}" + next if value.blank? +%> + <%= network %>: >- + <%= value %> <% end %> \ No newline at end of file diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index fcced216b30339327115dc5e6e43a1b17b0d3d35..c566584512b3f4c882b95d5152e880f56bbba6a0 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -149,6 +149,16 @@ en: name: Name plausible_url: Plausible dashboard URL repository: Repository + social: Social media + social_facebook: "Facebook (private, belongs to Meta)" + social_instagram: "Instagram (private, belongs to Meta)" + social_linkedin: "LinkedIn (private, belongs to Microsoft)" + social_mastodon: Mastodon (free) + social_peertube: Peertube (free) + social_tiktok: "TikTok (private)" + social_vimeo: "Vimeo (private)" + social_x: "X, ex-Twitter (private)" + social_youtube: "Youtube (private, belongs to Google)" url: URL communication/website/agenda/event: dates: Dates diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 83f21d2b647e6da97e6bf7fd0edd20c0c479dd93..58b5c9cdfa6eb0d479f0a43c84c64dafd4f6c8f2 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -149,6 +149,16 @@ fr: name: Nom plausible_url: Tableau de bord Plausible repository: Référentiel + social: Réseaux sociaux + social_facebook: "Facebook (privatif, appartient à Meta)" + social_instagram: "Instagram (privatif, appartient à Meta)" + social_linkedin: "LinkedIn (privatif, appartient à Microsoft)" + social_mastodon: Mastodon (libre) + social_peertube: Peertube (libre) + social_tiktok: "TikTok (privatif)" + social_vimeo: "Vimeo (privatif)" + social_x: "X, ex-Twitter (privatif)" + social_youtube: "Youtube (privatif, appartient à Google)" url: URL communication/website/agenda/event: dates: Dates diff --git a/db/migrate/20230913130910_add_social_networks_to_communication_websites.rb b/db/migrate/20230913130910_add_social_networks_to_communication_websites.rb new file mode 100644 index 0000000000000000000000000000000000000000..a8462c6891985f0271946b228b25468a2e7c943e --- /dev/null +++ b/db/migrate/20230913130910_add_social_networks_to_communication_websites.rb @@ -0,0 +1,12 @@ +class AddSocialNetworksToCommunicationWebsites < ActiveRecord::Migration[7.0] + def change + add_column :communication_websites, :social_mastodon, :string + add_column :communication_websites, :social_x, :string + add_column :communication_websites, :social_linkedin, :string + add_column :communication_websites, :social_youtube, :string + add_column :communication_websites, :social_vimeo, :string + add_column :communication_websites, :social_peertube, :string + add_column :communication_websites, :social_instagram, :string + add_column :communication_websites, :social_facebook, :string + end +end diff --git a/db/migrate/20230914101635_add_tiktok_to_communication_websites.rb b/db/migrate/20230914101635_add_tiktok_to_communication_websites.rb new file mode 100644 index 0000000000000000000000000000000000000000..a3cbdaab5ba8bff42050e243c38626b8079e5d62 --- /dev/null +++ b/db/migrate/20230914101635_add_tiktok_to_communication_websites.rb @@ -0,0 +1,5 @@ +class AddTiktokToCommunicationWebsites < ActiveRecord::Migration[7.0] + def change + add_column :communication_websites, :social_tiktok, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index fc7099dc703e6f60746ec55e45e848458e1b1594..3e8dc7af3adc319cb87945af495598ef110547d5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,13 +10,13 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do +ActiveRecord::Schema[7.0].define(version: 2023_09_14_101635) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" enable_extension "unaccent" - create_table "action_text_rich_texts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "action_text_rich_texts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name", null: false t.text "body" t.string "record_type", null: false @@ -26,7 +26,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["record_type", "record_id", "name"], name: "index_action_text_rich_texts_uniqueness", unique: true end - create_table "active_storage_attachments", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_attachments", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false t.uuid "record_id", null: false @@ -36,7 +36,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end - create_table "active_storage_blobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_blobs", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "key", null: false t.string "filename", null: false t.string "content_type" @@ -50,13 +50,13 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_active_storage_blobs_on_university_id" end - create_table "active_storage_variant_records", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "active_storage_variant_records", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "blob_id", null: false t.string "variation_digest", null: false t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true end - create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "administration_qualiopi_criterions", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.integer "number" t.text "name" t.text "description" @@ -64,7 +64,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.datetime "updated_at", null: false end - create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "administration_qualiopi_indicators", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "criterion_id", null: false t.integer "number" t.text "name" @@ -94,7 +94,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_communication_block_headings_on_university_id" end - create_table "communication_blocks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_blocks", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "about_type" t.uuid "about_id" @@ -105,8 +105,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.datetime "updated_at", null: false t.string "title" t.boolean "published", default: true - t.uuid "communication_website_id" t.uuid "heading_id" + t.uuid "communication_website_id" t.index ["about_type", "about_id"], name: "index_communication_website_blocks_on_about" t.index ["communication_website_id"], name: "index_communication_blocks_on_communication_website_id" t.index ["heading_id"], name: "index_communication_blocks_on_heading_id" @@ -195,7 +195,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_communication_extranet_posts_on_university_id" end - create_table "communication_extranets", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_extranets", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.uuid "university_id", null: false t.string "host" @@ -223,7 +223,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.text "home_sentence" t.text "sass" t.text "css" - t.boolean "allow_experiences_modification", default: true t.index ["about_type", "about_id"], name: "index_communication_extranets_on_about" t.index ["university_id"], name: "index_communication_extranets_on_university_id" end @@ -254,7 +253,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_communication_website_agenda_events_on_university_id" end - create_table "communication_website_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "name" @@ -302,7 +301,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "index_communication_website_connections_on_website_id" end - create_table "communication_website_git_files", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_git_files", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "previous_path" t.string "about_type", null: false t.uuid "about_id", null: false @@ -314,7 +313,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "index_communication_website_git_files_on_website_id" end - create_table "communication_website_imported_authors", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_authors", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "author_id" @@ -330,7 +329,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "idx_communication_website_imported_auth_on_website" end - create_table "communication_website_imported_categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_categories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "category_id" @@ -348,7 +347,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "idx_communication_website_imported_cat_on_website" end - create_table "communication_website_imported_media", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_media", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "identifier" t.jsonb "data" t.text "file_url" @@ -363,7 +362,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "index_communication_website_imported_media_on_website_id" end - create_table "communication_website_imported_pages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_pages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "page_id" @@ -387,7 +386,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "index_communication_website_imported_pages_on_website_id" end - create_table "communication_website_imported_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "post_id" @@ -412,7 +411,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "index_communication_website_imported_posts_on_website_id" end - create_table "communication_website_imported_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_imported_websites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.integer "status", default: 0 @@ -422,7 +421,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "index_communication_website_imported_websites_on_website_id" end - create_table "communication_website_menu_items", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_menu_items", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.uuid "menu_id", null: false @@ -442,7 +441,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "index_communication_website_menu_items_on_website_id" end - create_table "communication_website_menus", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_menus", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -458,7 +457,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_communication_website_menus_on_university_id" end - create_table "communication_website_pages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_pages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -472,10 +471,10 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.boolean "published", default: false t.string "featured_image_alt" t.text "text" + t.text "summary" t.string "breadcrumb_title" t.text "header_text" t.integer "kind" - t.text "summary" t.string "bodyclass" t.uuid "language_id", null: false t.text "featured_image_credit" @@ -489,7 +488,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_communication_website_pages_on_university_id" end - create_table "communication_website_permalinks", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_permalinks", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "website_id", null: false t.string "about_type", null: false @@ -503,7 +502,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["website_id"], name: "index_communication_website_permalinks_on_website_id" end - create_table "communication_website_posts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_website_posts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" @@ -528,7 +527,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_communication_website_posts_on_university_id" end - create_table "communication_websites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "communication_websites", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "url" @@ -551,6 +550,15 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.boolean "autoupdate_theme", default: true t.boolean "feature_posts", default: true t.boolean "feature_agenda", default: false + t.string "social_mastodon" + t.string "social_x" + t.string "social_linkedin" + t.string "social_youtube" + t.string "social_vimeo" + t.string "social_peertube" + t.string "social_instagram" + t.string "social_facebook" + t.string "social_tiktok" t.index ["about_type", "about_id"], name: "index_communication_websites_on_about" t.index ["default_language_id"], name: "index_communication_websites_on_default_language_id" t.index ["university_id"], name: "index_communication_websites_on_university_id" @@ -586,7 +594,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["priority", "run_at"], name: "delayed_jobs_priority" end - create_table "education_academic_years", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_academic_years", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.integer "year" t.datetime "created_at", null: false @@ -601,7 +609,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_person_id", "education_academic_year_id"], name: "index_person_academic_year" end - create_table "education_cohorts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_cohorts", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "program_id", null: false t.uuid "academic_year_id", null: false @@ -622,7 +630,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_person_id", "education_cohort_id"], name: "index_person_cohort" end - create_table "education_diplomas", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_diplomas", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "short_name" t.integer "level", default: 0 @@ -636,7 +644,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_education_diplomas_on_university_id" end - create_table "education_programs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_programs", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.integer "capacity" @@ -696,7 +704,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["education_program_id", "user_id"], name: "index_education_programs_users_on_program_id_and_user_id" end - create_table "education_schools", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "education_schools", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "address" @@ -727,7 +735,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_emergency_messages_on_university_id", where: "(university_id IS NOT NULL)" end - create_table "imports", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "imports", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.integer "number_of_lines" t.jsonb "processing_errors" t.integer "kind" @@ -740,7 +748,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["user_id"], name: "index_imports_on_user_id" end - create_table "languages", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "languages", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "iso_code" t.datetime "created_at", null: false @@ -814,7 +822,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_research_journal_paper_kinds_on_university_id" end - create_table "research_journal_papers", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_papers", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "title" t.datetime "published_at", precision: nil t.uuid "university_id", null: false @@ -851,7 +859,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["researcher_id"], name: "index_research_journal_papers_researchers_on_researcher_id" end - create_table "research_journal_volumes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journal_volumes", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_journal_id", null: false t.string "title" @@ -871,7 +879,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_research_journal_volumes_on_university_id" end - create_table "research_journals", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_journals", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "title" t.text "meta_description" @@ -882,7 +890,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_research_journals_on_university_id" end - create_table "research_laboratories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_laboratories", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "address" @@ -901,7 +909,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_person_id", "research_laboratory_id"], name: "person_laboratory" end - create_table "research_laboratory_axes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_laboratory_axes", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_laboratory_id", null: false t.string "name" @@ -915,7 +923,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_research_laboratory_axes_on_university_id" end - create_table "research_theses", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "research_theses", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "research_laboratory_id", null: false t.uuid "author_id", null: false @@ -933,7 +941,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_research_theses_on_university_id" end - create_table "universities", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "universities", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.string "name" t.string "identifier" t.string "address" @@ -969,7 +977,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_university_organization_categories_on_university_id" end - create_table "university_organizations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_organizations", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "name" t.string "long_name" @@ -1011,7 +1019,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["organization_id"], name: "index_university_organizations_categories_on_organization_id" end - create_table "university_people", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_people", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "user_id" t.string "last_name" @@ -1067,7 +1075,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_university_person_categories_on_university_id" end - create_table "university_person_experiences", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_experiences", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "person_id", null: false t.uuid "organization_id", null: false @@ -1081,7 +1089,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_university_person_experiences_on_university_id" end - create_table "university_person_involvements", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_person_involvements", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.uuid "person_id", null: false t.integer "kind" @@ -1096,7 +1104,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["university_id"], name: "index_university_person_involvements_on_university_id" end - create_table "university_roles", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "university_roles", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "target_type" t.uuid "target_id" @@ -1118,7 +1126,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_07_152751) do t.index ["user_id"], name: "index_user_favorites_on_user_id" end - create_table "users", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + create_table "users", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "first_name" t.string "last_name" diff --git a/test/fixtures/communication/extranets.yml b/test/fixtures/communication/extranets.yml index 5b00f559b78ac19b9a3871e2736923e92e325c4b..c4a72564511a4905256b44eff1b90d9ad95d76db 100644 --- a/test/fixtures/communication/extranets.yml +++ b/test/fixtures/communication/extranets.yml @@ -2,35 +2,34 @@ # # Table name: communication_extranets # -# id :uuid not null, primary key -# about_type :string indexed => [about_id] -# allow_experiences_modification :boolean default(TRUE) -# color :string -# cookies_policy :text -# css :text -# feature_alumni :boolean default(FALSE) -# feature_contacts :boolean default(FALSE) -# feature_jobs :boolean default(FALSE) -# feature_library :boolean default(FALSE) -# feature_posts :boolean default(FALSE) -# has_sso :boolean default(FALSE) -# home_sentence :text -# host :string -# name :string -# privacy_policy :text -# registration_contact :string -# sass :text -# sso_button_label :string -# sso_cert :text -# sso_mapping :jsonb -# sso_name_identifier_format :string -# sso_provider :integer default("saml") -# sso_target_url :string -# terms :text -# created_at :datetime not null -# updated_at :datetime not null -# about_id :uuid indexed => [about_type] -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# about_type :string indexed => [about_id] +# color :string +# cookies_policy :text +# css :text +# feature_alumni :boolean default(FALSE) +# feature_contacts :boolean default(FALSE) +# feature_jobs :boolean default(FALSE) +# feature_library :boolean default(FALSE) +# feature_posts :boolean default(FALSE) +# has_sso :boolean default(FALSE) +# home_sentence :text +# host :string +# name :string +# privacy_policy :text +# registration_contact :string +# sass :text +# sso_button_label :string +# sso_cert :text +# sso_mapping :jsonb +# sso_name_identifier_format :string +# sso_provider :integer default("saml") +# sso_target_url :string +# terms :text +# created_at :datetime not null +# updated_at :datetime not null +# about_id :uuid indexed => [about_type] +# university_id :uuid not null, indexed # # Indexes # diff --git a/test/fixtures/communication/websites.yml b/test/fixtures/communication/websites.yml index 2bc9f4d0c2481ff0f66f32708ce81edc3beef959..e4a7fe2de9e4f78663e7a3fb0453d4defbef5be2 100644 --- a/test/fixtures/communication/websites.yml +++ b/test/fixtures/communication/websites.yml @@ -16,6 +16,15 @@ # name :string # plausible_url :string # repository :string +# social_facebook :string +# social_instagram :string +# social_linkedin :string +# social_mastodon :string +# social_peertube :string +# social_tiktok :string +# social_vimeo :string +# social_x :string +# social_youtube :string # style :text # style_updated_at :date # theme_version :string default("NA")