Skip to content
Snippets Groups Projects
Commit 74bb88ce authored by pabois's avatar pabois
Browse files

add prefix to duplicate content

parent 88218c47
No related branches found
No related tags found
No related merge requests found
......@@ -2,34 +2,35 @@
#
# Table name: communication_extranets
#
# 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
# 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
#
# Indexes
#
......
......@@ -12,6 +12,7 @@ module WithDuplication
def duplicate_instance
instance = self.dup
instance.title = I18n.t('copy_of', title: self.title)
instance.published = false if respond_to?(:published)
instance.published_at = nil if respond_to?(:published_at)
instance.save
......
......@@ -156,6 +156,7 @@ en:
cookies_consent_choice: Cookies consent choice
cookies_policy: Cookies policy
cookies_policy_url: https://www.osuny.org/politique-de-sobriete/
copy_of: Copy of %{title}
create: Create
date:
formats:
......
......@@ -156,6 +156,7 @@ fr:
cookies_consent_choice: Choix en matière de cookies
cookies_policy: Politique de cookies
cookies_policy_url: https://www.osuny.org/politique-de-sobriete/
copy_of: Copie de %{title}
create: Créer
date:
formats:
......
......@@ -105,8 +105,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_14_101635) do
t.datetime "updated_at", null: false
t.string "title"
t.boolean "published", default: true
t.uuid "heading_id"
t.uuid "communication_website_id"
t.uuid "heading_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"
......@@ -223,6 +223,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_14_101635) 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
......@@ -488,7 +489,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_14_101635) do
t.index ["university_id"], name: "index_communication_website_pages_on_university_id"
end
create_table "communication_website_permalinks", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t|
create_table "communication_website_permalinks", id: :uuid, default: -> { "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
......
......@@ -2,34 +2,35 @@
#
# Table name: communication_extranets
#
# 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
# 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
#
# Indexes
#
......
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