diff --git a/app/controllers/admin/communication/websites/categories_controller.rb b/app/controllers/admin/communication/websites/categories_controller.rb index e2c6aefe9ed77c917b198f8e1f076b8f3a7d5292..6f0b27b6e3834c7866bc5398dafe4c45302b4f80 100644 --- a/app/controllers/admin/communication/websites/categories_controller.rb +++ b/app/controllers/admin/communication/websites/categories_controller.rb @@ -97,7 +97,7 @@ class Admin::Communication::Websites::CategoriesController < Admin::Communicatio def category_params params.require(:communication_website_category) .permit( - :website_id, :name, :description, :summary, :slug, :parent_id, + :website_id, :name, :meta_description, :summary, :slug, :parent_id, :featured_image, :featured_image_delete, :featured_image_infos, :featured_image_alt, :featured_image_credit ) .merge(university_id: current_university.id) diff --git a/app/controllers/admin/communication/websites/pages_controller.rb b/app/controllers/admin/communication/websites/pages_controller.rb index d05b57beb3629dac70bddd6dc2e5c19fbb8ffe07..2c1ce8f3c511caca7399b35dc71d7589f81bcc33 100644 --- a/app/controllers/admin/communication/websites/pages_controller.rb +++ b/app/controllers/admin/communication/websites/pages_controller.rb @@ -102,7 +102,7 @@ class Admin::Communication::Websites::PagesController < Admin::Communication::We params.require(:communication_website_page) .permit( :communication_website_id, :title, :breadcrumb_title, :bodyclass, - :description, :summary, :header_text, :text, :slug, :published, :full_width, + :meta_description, :summary, :header_text, :text, :slug, :published, :full_width, :featured_image, :featured_image_delete, :featured_image_infos, :featured_image_alt, :featured_image_credit, :parent_id, :language_id ) diff --git a/app/controllers/admin/communication/websites/posts_controller.rb b/app/controllers/admin/communication/websites/posts_controller.rb index 24e2ee377b1f7917a42708dec1d9f281d864e32e..a08c1e0c1bf0570922953cb0a70ec540fcd2e119 100644 --- a/app/controllers/admin/communication/websites/posts_controller.rb +++ b/app/controllers/admin/communication/websites/posts_controller.rb @@ -95,7 +95,7 @@ class Admin::Communication::Websites::PostsController < Admin::Communication::We def post_params params.require(:communication_website_post) .permit( - :university_id, :website_id, :title, :description, :summary, :text, + :university_id, :website_id, :title, :meta_description, :summary, :text, :published, :published_at, :slug, :pinned, :featured_image, :featured_image_delete, :featured_image_infos, :featured_image_alt, :featured_image_credit, :author_id, :language_id, category_ids: [] diff --git a/app/controllers/admin/education/programs_controller.rb b/app/controllers/admin/education/programs_controller.rb index f754feff815963decc3b747c61a521780e4b8c8d..4bc22f3298b91d20bea59e12c9b232a18cdf382f 100644 --- a/app/controllers/admin/education/programs_controller.rb +++ b/app/controllers/admin/education/programs_controller.rb @@ -110,7 +110,7 @@ class Admin::Education::ProgramsController < Admin::Education::ApplicationContro def program_params params.require(:education_program).permit( - :name, :short_name, :slug, :capacity, :continuing, :initial, :apprenticeship, :description, :summary, :published, + :name, :short_name, :slug, :capacity, :continuing, :initial, :apprenticeship, :meta_description, :summary, :published, :featured_image, :featured_image_delete, :featured_image_infos, :featured_image_alt, :featured_image_credit, :prerequisites, :objectives, :presentation, :registration, :pedagogy, :content, :registration_url, :evaluation, :accessibility, :pricing, :contacts, :opportunities, :results, :other, :main_information, diff --git a/app/controllers/admin/research/journals/papers_controller.rb b/app/controllers/admin/research/journals/papers_controller.rb index 91d6ae4a182ad4c01f44dbea61a13904e35c44bf..fc8dc28e94debde1f36dc3691c1093a9c61b7b43 100644 --- a/app/controllers/admin/research/journals/papers_controller.rb +++ b/app/controllers/admin/research/journals/papers_controller.rb @@ -60,7 +60,7 @@ class Admin::Research::Journals::PapersController < Admin::Research::Journals::A def paper_params params.require(:research_journal_paper) - .permit(:title, :slug, :text, :published, :published_at, :summary, :abstract, :description, :pdf, :references, :keywords, :research_journal_volume_id, person_ids: []) + .permit(:title, :slug, :text, :published, :published_at, :summary, :abstract, :meta_description, :pdf, :references, :keywords, :research_journal_volume_id, person_ids: []) .merge(university_id: current_university.id) end end diff --git a/app/controllers/admin/research/journals/volumes_controller.rb b/app/controllers/admin/research/journals/volumes_controller.rb index 069b4d1e14a582431ee6a2a757d36a1df8681add..5d693ca975adc44de6a0424e4f8ac50cd4c48aa4 100644 --- a/app/controllers/admin/research/journals/volumes_controller.rb +++ b/app/controllers/admin/research/journals/volumes_controller.rb @@ -58,7 +58,7 @@ class Admin::Research::Journals::VolumesController < Admin::Research::Journals:: def volume_params params.require(:research_journal_volume) .permit( - :title, :slug, :number, :keywords, :published, :published_at, :description, :text, + :title, :slug, :number, :keywords, :published, :published_at, :meta_description, :text, :featured_image, :featured_image_infos, :featured_image_delete, :featured_image_alt, :featured_image_credit ) .merge(university_id: current_university.id) diff --git a/app/controllers/admin/research/journals_controller.rb b/app/controllers/admin/research/journals_controller.rb index 070827385be943e06b4dc21091b35f099efe8eef..b05662b967515c579312fd9cc08e11d8c7d9d98f 100644 --- a/app/controllers/admin/research/journals_controller.rb +++ b/app/controllers/admin/research/journals_controller.rb @@ -53,7 +53,7 @@ class Admin::Research::JournalsController < Admin::Research::ApplicationControll def journal_params params.require(:research_journal) - .permit(:title, :description, :issn, :access_token, :repository) + .permit(:title, :meta_description, :issn, :access_token, :repository) .merge(university_id: current_university.id) end end diff --git a/app/controllers/admin/research/laboratories/axes_controller.rb b/app/controllers/admin/research/laboratories/axes_controller.rb index 5c672627a7cf8ea7e19a15b3adaf0aed281ccccb..4a75a6ccabee961ff2a3254b8718278d9bb3cd7a 100644 --- a/app/controllers/admin/research/laboratories/axes_controller.rb +++ b/app/controllers/admin/research/laboratories/axes_controller.rb @@ -55,7 +55,7 @@ class Admin::Research::Laboratories::AxesController < Admin::Research::Laborator def axis_params params.require(:research_laboratory_axis) - .permit(:name, :short_name, :description, :text) + .permit(:name, :short_name, :meta_description, :text) .merge(university_id: current_university.id) end end diff --git a/app/controllers/admin/university/organizations_controller.rb b/app/controllers/admin/university/organizations_controller.rb index 751395e80d693ec4fff8f8c28bbd2a6fcfee078d..ef5d4576a4e7d2fe661a82dd490cd63cdf095f0d 100644 --- a/app/controllers/admin/university/organizations_controller.rb +++ b/app/controllers/admin/university/organizations_controller.rb @@ -69,7 +69,7 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio def organization_params params.require(:university_organization) .permit( - :name, :long_name, :slug, :description, :summary, :active, :siren, :kind, + :name, :long_name, :slug, :meta_description, :summary, :active, :siren, :kind, :address, :zipcode, :city, :country, :text, :url, :phone, :email, :logo, :logo_delete, :logo_infos, diff --git a/app/controllers/admin/university/people_controller.rb b/app/controllers/admin/university/people_controller.rb index f6449552badc8d5510843c6950f587e9edb84069..68c9d699bde64b82035dcdbe7deae904f9151d1e 100644 --- a/app/controllers/admin/university/people_controller.rb +++ b/app/controllers/admin/university/people_controller.rb @@ -74,7 +74,7 @@ class Admin::University::PeopleController < Admin::University::ApplicationContro :slug, :first_name, :last_name, :email, :gender, :birthdate, :phone_mobile, :phone_professional, :phone_personal, :address, :zipcode, :city, :country, - :description, :summary, + :meta_description, :summary, :biography, :picture, :picture_delete, :picture_infos, :habilitation, :tenure, :url, :linkedin, :twitter, :is_researcher, :is_teacher, :is_administration, :is_alumnus, diff --git a/app/models/communication/website/category.rb b/app/models/communication/website/category.rb index d6d6174e7f6f5e6d2394ba641ef1b65783c5d98d..a22fb6efc8c72290b35d095a6b430e1d67659e21 100644 --- a/app/models/communication/website/category.rb +++ b/app/models/communication/website/category.rb @@ -3,11 +3,11 @@ # Table name: communication_website_categories # # id :uuid not null, primary key -# description :text # featured_image_alt :string # featured_image_credit :text # github_path :text # is_programs_root :boolean default(FALSE) +# meta_description :text # name :string # path :string # position :integer diff --git a/app/models/communication/website/imported/category.rb b/app/models/communication/website/imported/category.rb index b3f5841f8857526ae587fb6891185c3b2e12840a..6549a083592148bd6688d37d9d8dc303a42d5054 100644 --- a/app/models/communication/website/imported/category.rb +++ b/app/models/communication/website/imported/category.rb @@ -68,7 +68,7 @@ class Communication::Website::Imported::Category < ApplicationRecord sanitized_name = Wordpress.clean_string self.name.to_s category.name = sanitized_name unless sanitized_name.blank? # If there is no title, leave it with "Untitled" category.slug = slug - category.description = Wordpress.clean_string description.to_s + category.meta_description = Wordpress.clean_string description.to_s category.save end end diff --git a/app/models/communication/website/imported/page.rb b/app/models/communication/website/imported/page.rb index f4dbdce8b81fd6e8eaea69c81cbe758c6badc6f7..e064b3790967af46d6af7d30d45fab5fdba2c324 100644 --- a/app/models/communication/website/imported/page.rb +++ b/app/models/communication/website/imported/page.rb @@ -90,7 +90,7 @@ class Communication::Website::Imported::Page < ApplicationRecord sanitized_title = Wordpress.clean_string self.title.to_s page.title = sanitized_title unless sanitized_title.blank? # If there is no title, leave it with "Untitled" page.slug = slug - page.description = Wordpress.clean_string excerpt.to_s + page.meta_description = Wordpress.clean_string excerpt.to_s page.text = Wordpress.clean_html content.to_s page.published = true page.save diff --git a/app/models/communication/website/imported/post.rb b/app/models/communication/website/imported/post.rb index 8e2bcaec9fdd9d675bc39f557c55f873ce59a9c2..f8b8ac4be2b0b7711c627e4134a8780a50ef565a 100644 --- a/app/models/communication/website/imported/post.rb +++ b/app/models/communication/website/imported/post.rb @@ -93,7 +93,7 @@ class Communication::Website::Imported::Post < ApplicationRecord sanitized_title = Wordpress.clean_string self.title.to_s post.title = sanitized_title unless sanitized_title.blank? # If there is no title, leave it with "Untitled" post.slug = slug - post.description = Wordpress.clean_string excerpt.to_s + post.meta_description = Wordpress.clean_string excerpt.to_s post.text = Wordpress.clean_html content.to_s post.created_at = created_at post.updated_at = updated_at diff --git a/app/models/communication/website/page.rb b/app/models/communication/website/page.rb index 2a37ec772f27ee8500dce4e715f2a6c48032f649..d16d0e281d30a9e811a9909aef06c389bdabc82f 100644 --- a/app/models/communication/website/page.rb +++ b/app/models/communication/website/page.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/accessibility.rb b/app/models/communication/website/page/accessibility.rb index 0160fadeb066661ce8feec9e88393d787747dd53..a9819518ef78045d98d64203e9fecb33087f9376 100644 --- a/app/models/communication/website/page/accessibility.rb +++ b/app/models/communication/website/page/accessibility.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/administrator.rb b/app/models/communication/website/page/administrator.rb index c6b1ff524eab3b5546377f05654310cc8239e28b..c39764290a06a55d3a85f493c0090d88a432385e 100644 --- a/app/models/communication/website/page/administrator.rb +++ b/app/models/communication/website/page/administrator.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/author.rb b/app/models/communication/website/page/author.rb index 1c85fbc4c4ee8827d272381fae52460a6b250fd9..d80c8daede27aec05f573ec3b5b4b4b8ac305255 100644 --- a/app/models/communication/website/page/author.rb +++ b/app/models/communication/website/page/author.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/communication_post.rb b/app/models/communication/website/page/communication_post.rb index 4ea17f0207c3a0f1003429b931fc2e755720f72f..418530277d70a1cfa3d82fdab2f8ab0b0d95ace3 100644 --- a/app/models/communication/website/page/communication_post.rb +++ b/app/models/communication/website/page/communication_post.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/education_diploma.rb b/app/models/communication/website/page/education_diploma.rb index fa0ab72e51945918589d339368021815512cfb81..35cb9ca41068b94a7c7f366a0781448a63e88a5a 100644 --- a/app/models/communication/website/page/education_diploma.rb +++ b/app/models/communication/website/page/education_diploma.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/education_program.rb b/app/models/communication/website/page/education_program.rb index 5c4614e69fd5a03cf9472d4668e7437e038d001b..f6044605258fca6014f7faae337b9b8c88491cd2 100644 --- a/app/models/communication/website/page/education_program.rb +++ b/app/models/communication/website/page/education_program.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/home.rb b/app/models/communication/website/page/home.rb index 99e1db8ea4b9470f2215431820598ad358b50107..0d19444b5bde062e6cb954c76b6252b4dbe695ff 100644 --- a/app/models/communication/website/page/home.rb +++ b/app/models/communication/website/page/home.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/legal_term.rb b/app/models/communication/website/page/legal_term.rb index 60b88b52feb8e2b084d38373fdc02f293eb4a7b4..61ef387ca2740c5c9c48dae2c6d5603b34eabebe 100644 --- a/app/models/communication/website/page/legal_term.rb +++ b/app/models/communication/website/page/legal_term.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/organization.rb b/app/models/communication/website/page/organization.rb index daa23083dadbfe381b9cdc9c302a529793212aff..0fe98cfcce3b38aa8d7bf184575147e0e29c62de 100644 --- a/app/models/communication/website/page/organization.rb +++ b/app/models/communication/website/page/organization.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/person.rb b/app/models/communication/website/page/person.rb index b4fd596b4221b649719038f15c67d44e28805d7b..e035d5dd9085984c67003592f68424c943a11902 100644 --- a/app/models/communication/website/page/person.rb +++ b/app/models/communication/website/page/person.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/privacy_policy.rb b/app/models/communication/website/page/privacy_policy.rb index dedba6f179211bf832321427dfb8381b2d4910de..4b7d8da2638870a8c1c4fe0f245d251788a243f8 100644 --- a/app/models/communication/website/page/privacy_policy.rb +++ b/app/models/communication/website/page/privacy_policy.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/research_paper.rb b/app/models/communication/website/page/research_paper.rb index 2ebe4ddf3fccb7bc2654c754f47628e554df0076..a485ea2e8eacc31e1a5cc7648425ba7f43b34872 100644 --- a/app/models/communication/website/page/research_paper.rb +++ b/app/models/communication/website/page/research_paper.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/research_volume.rb b/app/models/communication/website/page/research_volume.rb index dc3e3fb9e07f3ae016bb2e9ffddf64b852754c72..0cb730dab1dca26cdab01fdadddf2e0fa22c58aa 100644 --- a/app/models/communication/website/page/research_volume.rb +++ b/app/models/communication/website/page/research_volume.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/researcher.rb b/app/models/communication/website/page/researcher.rb index 36748be37ab2c0a0ca2f340d706229340210180e..4dc3ca98d7c6bb366ead2726157c86b42f095fd6 100644 --- a/app/models/communication/website/page/researcher.rb +++ b/app/models/communication/website/page/researcher.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/sitemap.rb b/app/models/communication/website/page/sitemap.rb index 9842701408de862b58098cf2fe9a4e4542356c88..8848742f2dc200219bc1321f26228de9409b8567 100644 --- a/app/models/communication/website/page/sitemap.rb +++ b/app/models/communication/website/page/sitemap.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/page/teacher.rb b/app/models/communication/website/page/teacher.rb index 447a5c87abf9bcb7d1426a2594653f20394266ef..d9d1daacb49fb42432ad5155aa9d4d579030b7ce 100644 --- a/app/models/communication/website/page/teacher.rb +++ b/app/models/communication/website/page/teacher.rb @@ -5,13 +5,13 @@ # id :uuid not null, primary key # bodyclass :string # breadcrumb_title :string -# description :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) # github_path :text # header_text :text # kind :integer +# meta_description :text # position :integer default(0), not null # published :boolean default(FALSE) # slug :string diff --git a/app/models/communication/website/post.rb b/app/models/communication/website/post.rb index 5c3644455ad57281511b1bfc00c62ca48f7a6d34..1c2838ed8b6169547f007ade72c4c48cdcaedadf 100644 --- a/app/models/communication/website/post.rb +++ b/app/models/communication/website/post.rb @@ -3,10 +3,10 @@ # Table name: communication_website_posts # # id :uuid not null, primary key -# description :text # featured_image_alt :string # featured_image_credit :text # github_path :text +# meta_description :text # pinned :boolean default(FALSE) # published :boolean default(FALSE) # published_at :datetime @@ -87,7 +87,7 @@ class Communication::Website::Post < ApplicationRecord scope :for_pinned, -> (pinned) { where(pinned: pinned == 'true') } scope :for_search_term, -> (term) { where(" - unaccent(communication_website_posts.description) ILIKE unaccent(:term) OR + unaccent(communication_website_posts.meta_description) ILIKE unaccent(:term) OR unaccent(communication_website_posts.summary) ILIKE unaccent(:term) OR unaccent(communication_website_posts.text) ILIKE unaccent(:term) OR unaccent(communication_website_posts.title) ILIKE unaccent(:term) diff --git a/app/models/education/program.rb b/app/models/education/program.rb index 7383b24126521978d362795d338e53411e381cdc..6340df323983f5547450d6e55b59a76c36469318 100644 --- a/app/models/education/program.rb +++ b/app/models/education/program.rb @@ -9,12 +9,12 @@ # contacts :text # content :text # continuing :boolean -# description :text # duration :text # evaluation :text # featured_image_alt :string # featured_image_credit :text # initial :boolean +# meta_description :text # name :string # objectives :text # opportunities :text diff --git a/app/models/research/journal.rb b/app/models/research/journal.rb index 74055a6f97901594fde68af1a58387da7189872c..f88661be1c7b3d92ea9d218d5c0bb19fb5522ec0 100644 --- a/app/models/research/journal.rb +++ b/app/models/research/journal.rb @@ -2,15 +2,15 @@ # # Table name: research_journals # -# id :uuid not null, primary key -# access_token :string -# description :text -# issn :string -# repository :string -# title :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# access_token :string +# issn :string +# meta_description :text +# repository :string +# title :string +# created_at :datetime not null +# updated_at :datetime not null +# university_id :uuid not null, indexed # # Indexes # @@ -36,7 +36,7 @@ class Research::Journal < ApplicationRecord scope :ordered, -> { order(:title) } scope :for_search_term, -> (term) { where(" - unaccent(research_journals.description) ILIKE unaccent(:term) OR + unaccent(research_journals.meta_description) ILIKE unaccent(:term) OR unaccent(research_journals.issn) ILIKE unaccent(:term) OR unaccent(research_journals.repository) ILIKE unaccent(:term) OR unaccent(research_journals.title) ILIKE unaccent(:term) diff --git a/app/models/research/journal/paper.rb b/app/models/research/journal/paper.rb index b573dcd1d1a9ebc2c9fd38b72ad8462416ebf65c..baf4e402acbc66eba5f5233a53e234fc1aac8b05 100644 --- a/app/models/research/journal/paper.rb +++ b/app/models/research/journal/paper.rb @@ -4,8 +4,8 @@ # # id :uuid not null, primary key # abstract :text -# description :text # keywords :text +# meta_description :text # position :integer # published :boolean default(FALSE) # published_at :datetime diff --git a/app/models/research/journal/volume.rb b/app/models/research/journal/volume.rb index 2b14ba3bfcbc3268ca035b1ff3e09c56535a4104..858aad6addbdfb9439075d0f8cb7ebbb66302006 100644 --- a/app/models/research/journal/volume.rb +++ b/app/models/research/journal/volume.rb @@ -3,10 +3,10 @@ # Table name: research_journal_volumes # # id :uuid not null, primary key -# description :text # featured_image_alt :string # featured_image_credit :text # keywords :text +# meta_description :text # number :integer # published :boolean default(FALSE) # published_at :datetime diff --git a/app/models/research/laboratory/axis.rb b/app/models/research/laboratory/axis.rb index 9601058ec7bb7bb9ae7a29b6a7df0e2e1d06f020..69b47c682830bd9a8d28a9cbed60aca5896e4ed4 100644 --- a/app/models/research/laboratory/axis.rb +++ b/app/models/research/laboratory/axis.rb @@ -3,7 +3,7 @@ # Table name: research_laboratory_axes # # id :uuid not null, primary key -# description :text +# meta_description :text # name :string # position :integer # short_name :string diff --git a/app/models/university/organization.rb b/app/models/university/organization.rb index 0d0c3e53b8483dd4510ee126d8174e2a24d25df4..d1a6636d0bb30ab96b2f86340875083667f8f5c4 100644 --- a/app/models/university/organization.rb +++ b/app/models/university/organization.rb @@ -2,27 +2,27 @@ # # Table name: university_organizations # -# id :uuid not null, primary key -# active :boolean default(TRUE) -# address :string -# city :string -# country :string -# description :text -# email :string -# kind :integer default("company") -# long_name :string -# name :string -# nic :string -# phone :string -# siren :string -# slug :string -# summary :text -# text :text -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# active :boolean default(TRUE) +# address :string +# city :string +# country :string +# email :string +# kind :integer default("company") +# long_name :string +# meta_description :text +# name :string +# nic :string +# phone :string +# siren :string +# slug :string +# summary :text +# text :text +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# university_id :uuid not null, indexed # # Indexes # @@ -65,7 +65,7 @@ class University::Organization < ApplicationRecord unaccent(university_organizations.address) ILIKE unaccent(:term) OR unaccent(university_organizations.city) ILIKE unaccent(:term) OR unaccent(university_organizations.country) ILIKE unaccent(:term) OR - unaccent(university_organizations.description) ILIKE unaccent(:term) OR + unaccent(university_organizations.meta_description) ILIKE unaccent(:term) OR unaccent(university_organizations.email) ILIKE unaccent(:term) OR unaccent(university_organizations.long_name) ILIKE unaccent(:term) OR unaccent(university_organizations.name) ILIKE unaccent(:term) OR diff --git a/app/models/university/person.rb b/app/models/university/person.rb index 21b9d381e5a09f0e6ed5ab434a03213103f03874..4a7dc6a74b110671d05dd4fae4f8a8784f2c0946 100644 --- a/app/models/university/person.rb +++ b/app/models/university/person.rb @@ -8,7 +8,6 @@ # birthdate :date # city :string # country :string -# description :text # email :string # first_name :string # gender :integer @@ -20,6 +19,7 @@ # is_teacher :boolean # last_name :string # linkedin :string +# meta_description :text # name :string # phone_mobile :string # phone_personal :string @@ -147,7 +147,7 @@ class University::Person < ApplicationRecord unaccent(university_people.phone_personal) ILIKE unaccent(:term) OR unaccent(university_people.phone_professional) ILIKE unaccent(:term) OR unaccent(university_people.biography) ILIKE unaccent(:term) OR - unaccent(university_people.description) ILIKE unaccent(:term) OR + unaccent(university_people.meta_description) ILIKE unaccent(:term) OR unaccent(university_people.summary) ILIKE unaccent(:term) OR unaccent(university_people.twitter) ILIKE unaccent(:term) OR unaccent(university_people.linkedin) ILIKE unaccent(:term) OR diff --git a/app/models/university/person/administrator.rb b/app/models/university/person/administrator.rb index a32e336859d370f17cbe1c3989451bde8e5b39a0..7344064b889d083fb778a272dee969f1392349b0 100644 --- a/app/models/university/person/administrator.rb +++ b/app/models/university/person/administrator.rb @@ -8,7 +8,6 @@ # birthdate :date # city :string # country :string -# description :text # email :string # first_name :string # gender :integer @@ -20,6 +19,7 @@ # is_teacher :boolean # last_name :string # linkedin :string +# meta_description :text # name :string # phone_mobile :string # phone_personal :string diff --git a/app/models/university/person/alumnus.rb b/app/models/university/person/alumnus.rb index 9f7cbdf107120cf20472b2c12ceeb134da820c75..768ca14261fccbad907c4cdf5bc32d7bb8838768 100644 --- a/app/models/university/person/alumnus.rb +++ b/app/models/university/person/alumnus.rb @@ -8,7 +8,6 @@ # birthdate :date # city :string # country :string -# description :text # email :string # first_name :string # gender :integer @@ -20,6 +19,7 @@ # is_teacher :boolean # last_name :string # linkedin :string +# meta_description :text # name :string # phone_mobile :string # phone_personal :string diff --git a/app/models/university/person/author.rb b/app/models/university/person/author.rb index 247e50027d0a61bacc49b3cab2db8299e2e6785f..71dbd704e4a2b25eb04d09b54429685e074461d1 100644 --- a/app/models/university/person/author.rb +++ b/app/models/university/person/author.rb @@ -8,7 +8,6 @@ # birthdate :date # city :string # country :string -# description :text # email :string # first_name :string # gender :integer @@ -20,6 +19,7 @@ # is_teacher :boolean # last_name :string # linkedin :string +# meta_description :text # name :string # phone_mobile :string # phone_personal :string diff --git a/app/models/university/person/researcher.rb b/app/models/university/person/researcher.rb index 1abe5abdb8adace7a5d87b12056f8d0f5b6b1806..db8d3308be0db17c636298c3eade541da03c1b16 100644 --- a/app/models/university/person/researcher.rb +++ b/app/models/university/person/researcher.rb @@ -8,7 +8,6 @@ # birthdate :date # city :string # country :string -# description :text # email :string # first_name :string # gender :integer @@ -20,6 +19,7 @@ # is_teacher :boolean # last_name :string # linkedin :string +# meta_description :text # name :string # phone_mobile :string # phone_personal :string diff --git a/app/models/university/person/teacher.rb b/app/models/university/person/teacher.rb index 4f5e67355591e51fb13054e938f8d27370962337..6dae6e68a4c8563da453dde91e2655dc0a7010d8 100644 --- a/app/models/university/person/teacher.rb +++ b/app/models/university/person/teacher.rb @@ -8,7 +8,6 @@ # birthdate :date # city :string # country :string -# description :text # email :string # first_name :string # gender :integer @@ -20,6 +19,7 @@ # is_teacher :boolean # last_name :string # linkedin :string +# meta_description :text # name :string # phone_mobile :string # phone_personal :string diff --git a/app/services/importers/organizations.rb b/app/services/importers/organizations.rb index ecbb55d6696bd62f903821c9a6c6181387d4426d..81f340464469f8dc428844f60f859ed2da7b32bf 100644 --- a/app/services/importers/organizations.rb +++ b/app/services/importers/organizations.rb @@ -43,7 +43,7 @@ module Importers @kind = @hash[2].to_s.strip @siren = @hash[3].to_s.strip @nic = @hash[4].to_s.strip - @description = @hash[5].to_s.strip + @meta_description = @hash[5].to_s.strip @address = @hash[6].to_s.strip @zipcode = @hash[7].to_s.strip @city = @hash[8].to_s.strip @@ -64,7 +64,7 @@ module Importers @organization.kind = @kind.to_sym @organization.siren = @siren @organization.nic = @nic - @organization.description = @description + @organization.meta_description = @meta_description @organization.address = @address @organization.zipcode = @zipcode @organization.city = @city diff --git a/app/views/admin/application/meta_description/_form.html.erb b/app/views/admin/application/meta_description/_form.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..9e200ffd0bf26c30135650f6be8076759e8631a2 --- /dev/null +++ b/app/views/admin/application/meta_description/_form.html.erb @@ -0,0 +1,13 @@ +<div class="card"> + <div class="card-header"> + <h5 class="card-title mb-0"><%= t('seo') %></h5> + </div> + <div class="card-body"> + <%= f.input :meta_description, + label: t('admin.meta_description.label'), + hint: t('admin.meta_description.hint'), + input_html: { + value: about.meta_description&.gsub('&', '&') + } %> + </div> +</div> diff --git a/app/views/admin/application/meta_description/_show.html.erb b/app/views/admin/application/meta_description/_show.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..857e454221496b5d2936f1ba88c485442ee77dc0 --- /dev/null +++ b/app/views/admin/application/meta_description/_show.html.erb @@ -0,0 +1,13 @@ +<% unless about.meta_description.blank? %> + <div class="card flex-fill w-100"> + <div class="card-header"> + <h2 class="card-title mb-0"><%= t('seo') %></h2> + </div> + <div class="card-body"> + <p class="lead"> + <h3 class="h5"><%= t('admin.meta_description.label') %></h3> + <%= sanitize about.meta_description %> + </p> + </div> + </div> +<% end %> diff --git a/app/views/admin/application/meta_description/_static.html.erb b/app/views/admin/application/meta_description/_static.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..cc395a7e81c367ebc569315c81afb463047c3ed9 --- /dev/null +++ b/app/views/admin/application/meta_description/_static.html.erb @@ -0,0 +1,5 @@ +meta_description: > + <%= prepare_text_for_static @about.meta_description %> +<%# TODO: legacy: remove when theme doesn't use description_short anymore %> +description: > + <%= prepare_text_for_static @about.meta_description %> diff --git a/app/views/admin/communication/websites/categories/_form.html.erb b/app/views/admin/communication/websites/categories/_form.html.erb index 3ac988a84a6c4991de7a74bb8e4f7e1e65364e79..ad011b1a673c7e86d5318712f76221a90320a2c2 100644 --- a/app/views/admin/communication/websites/categories/_form.html.erb +++ b/app/views/admin/communication/websites/categories/_form.html.erb @@ -13,14 +13,7 @@ <%= render 'admin/application/summary/form', f: f, about: category %> </div> </div> - <div class="card"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: category %> </div> <div class="col-md-4"> <div class="card flex-fill w-100"> diff --git a/app/views/admin/communication/websites/categories/show.html.erb b/app/views/admin/communication/websites/categories/show.html.erb index 119b03aece26e35530ab559cfc7398939d5b23e1..64944461b65a86487b8d536788c667e2ed909fab 100644 --- a/app/views/admin/communication/websites/categories/show.html.erb +++ b/app/views/admin/communication/websites/categories/show.html.erb @@ -38,27 +38,8 @@ <% end %> </div> </div> - <% if @category.featured_image.attached? && @category.featured_image.variable? %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('activerecord.attributes.communication/website/category.featured_image') %></h5> - </div> - <div class="card-body"> - <%= image_tag @category.featured_image.variant(resize: '600'), class: 'img-fluid mb-3' %><br> - </div> - </div> - <% end %> - <% if @category.description.present? %> - <div class="card"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <h3 class="h5"><%= Communication::Website::Category.human_attribute_name('description') %></h3> - <%= simple_format @category.description %> - </div> - </div> - <% end %> + <%= render 'admin/application/featured_image/show', about: @category %> + <%= render 'admin/application/meta_description/show', about: @category %> </div> </div> <% if @posts.total_count > 0 %> diff --git a/app/views/admin/communication/websites/categories/static.html.erb b/app/views/admin/communication/websites/categories/static.html.erb index 00c8b304bcdb73c6e72cd2b7feef3e63331fdac8..015ae14d9c4ec618638cbc5d99dd237a9c6fd2c6 100644 --- a/app/views/admin/communication/websites/categories/static.html.erb +++ b/app/views/admin/communication/websites/categories/static.html.erb @@ -13,8 +13,7 @@ children: <% end %> position: <%= @about.position %> <%= render 'admin/communication/unsplash/static' %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> <%= render 'admin/application/summary/static' %> <%= render 'admin/communication/blocks/static', about: @about %> --- diff --git a/app/views/admin/communication/websites/pages/_form.html.erb b/app/views/admin/communication/websites/pages/_form.html.erb index be01510a2f49ea94fefa12effe2f8db77dc81f6d..68da89fc81714da8d08b6305a805fe9010bfe753 100644 --- a/app/views/admin/communication/websites/pages/_form.html.erb +++ b/app/views/admin/communication/websites/pages/_form.html.erb @@ -20,14 +20,7 @@ url = page.new_record? ? admin_communication_website_pages_path <%= f.input :text, as: :summernote if page.text&.to_plain_text.present? %> </div> </div> - <div class="card"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: page %> </div> <div class="col-md-4"> <% unless page.is_home? %> diff --git a/app/views/admin/communication/websites/pages/show.html.erb b/app/views/admin/communication/websites/pages/show.html.erb index a2410b086042930691b5c177e49c256bc7530625..2219e246dc7dfab2738a88aa4e35d1c18a53cf06 100644 --- a/app/views/admin/communication/websites/pages/show.html.erb +++ b/app/views/admin/communication/websites/pages/show.html.erb @@ -45,11 +45,6 @@ <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('path') %></h3> <p><%= @page.path %></p> - <% if @page.description.present? %> - <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('description') %></h3> - <%= simple_format @page.description %> - <% end %> - <% if @page.parent %> <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('parent') %></h3> <p><%= link_to_if can?(:read, @page.parent), @@ -93,6 +88,7 @@ </div> </div> <%= render 'admin/application/featured_image/show', about: @page %> + <%= render 'admin/application/meta_description/show', about: @page %> </div> </div> <% end %> diff --git a/app/views/admin/communication/websites/pages/static.html.erb b/app/views/admin/communication/websites/pages/static.html.erb index a7178b1ac861f5216821ff05bb17a3cc5655d314..1c31214a481bb0fee8f49068cf1cb8ce3776591e 100644 --- a/app/views/admin/communication/websites/pages/static.html.erb +++ b/app/views/admin/communication/websites/pages/static.html.erb @@ -20,8 +20,7 @@ children: - <%= child.path %> <% end %> <% end %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> <%= render 'admin/application/summary/static' %> header_text: >- <%= prepare_html_for_static @about.header_text, @website.university %> diff --git a/app/views/admin/communication/websites/posts/_form.html.erb b/app/views/admin/communication/websites/posts/_form.html.erb index 314dc9d85040f5265ffe60b2e91d00f769796d3c..1cfe0a7deda6e65ce393b71880cbf9b78e4ab665 100644 --- a/app/views/admin/communication/websites/posts/_form.html.erb +++ b/app/views/admin/communication/websites/posts/_form.html.erb @@ -31,14 +31,7 @@ </div> </div> <div class="col-md-6"> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: post %> </div> </div> </div> diff --git a/app/views/admin/communication/websites/posts/show.html.erb b/app/views/admin/communication/websites/posts/show.html.erb index dc23ed4d22e43a36c6b028e98de369c8834b6f2d..e37dba9adefcc5743eba08bb64d3ec4b8523c5f5 100644 --- a/app/views/admin/communication/websites/posts/show.html.erb +++ b/app/views/admin/communication/websites/posts/show.html.erb @@ -48,13 +48,10 @@ <% end %> <h3 class="h5"><%= Communication::Website::Post.human_attribute_name('slug') %></h3> <p><%= @post.slug %></p> - <% if @post.description.present? %> - <h3 class="h5"><%= Communication::Website::Post.human_attribute_name('description') %></h3> - <%= simple_format @post.description %> - <% end %> </div> </div> <%= render 'admin/application/featured_image/show', about: @post %> + <%= render 'admin/application/meta_description/show', about: @post %> </div> </div> <% end %> diff --git a/app/views/admin/communication/websites/posts/static.html.erb b/app/views/admin/communication/websites/posts/static.html.erb index a2471e461a9fbaa840df6f1907dccecf728c4cbb..3da24344ae40e7bf3c3b0ef8a75b7bd0508e1f93 100644 --- a/app/views/admin/communication/websites/posts/static.html.erb +++ b/app/views/admin/communication/websites/posts/static.html.erb @@ -17,8 +17,7 @@ categories: <% end %> <% end %> <%= render 'admin/communication/unsplash/static' %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> <%= render 'admin/application/summary/static' %> <%= render 'admin/communication/blocks/static', about: @about %> --- diff --git a/app/views/admin/education/programs/_form.html.erb b/app/views/admin/education/programs/_form.html.erb index 91e6c80644627ad1c4e66e01120b1b4964910cc9..6a0272b412347ac7ffa1123250d3a64ae920afb5 100644 --- a/app/views/admin/education/programs/_form.html.erb +++ b/app/views/admin/education/programs/_form.html.erb @@ -137,14 +137,7 @@ value_method: ->(p) { p[:id] } %> <% end %> <%= render 'admin/application/featured_image/edit', about: program, f: f %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: program %> </div> </div> diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb index 2176d739c6c7d57e591b0545948af30fc778d65b..22a263d579ba7b6713a76144b35319d37783d319 100644 --- a/app/views/admin/education/programs/show.html.erb +++ b/app/views/admin/education/programs/show.html.erb @@ -138,17 +138,7 @@ <% end %> <% end %> <%= render 'admin/application/featured_image/show', about: @program %> - <% if @program.description.present? %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <h3 class="h5"><%= Education::Program.human_attribute_name('description') %></h3> - <%= simple_format @program.description %> - </div> - </div> - <% end %> + <%= render 'admin/application/meta_description/show', about: @program %> </div> </div> diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index 60d10268f48791f48b51d2d1c66f01f0d95320fe..9ba44d41b29f414c01f068431b34e1ad88b8e583 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -16,8 +16,7 @@ downloadable_summary: <%= @about.downloadable_summary.blob_id %> <% end %> registration_url: > <%= @about.registration_url %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> <%= render 'admin/application/summary/static' %> presentation: > <%= prepare_text_for_static @about.presentation %> diff --git a/app/views/admin/research/journals/_form.html.erb b/app/views/admin/research/journals/_form.html.erb index d8c98a3afbb8c838e0e52f489dcae23859f2ed93..3573f57b2c8a2b305f81d3eded484ac0e16f8508 100644 --- a/app/views/admin/research/journals/_form.html.erb +++ b/app/views/admin/research/journals/_form.html.erb @@ -11,6 +11,9 @@ </div> </div> </div> + <div class="col-md-6"> + <%= render 'admin/application/meta_description/form', f: f, about: journal %> + </div> </div> <% content_for :action_bar_right do %> <%= submit f %> diff --git a/app/views/admin/research/journals/papers/_form.html.erb b/app/views/admin/research/journals/papers/_form.html.erb index dea53a6c43c7b5fde7fc42b596e0f886eed89dd7..e733d046260ff095c6d6c84b583ea7bbfd570496 100644 --- a/app/views/admin/research/journals/papers/_form.html.erb +++ b/app/views/admin/research/journals/papers/_form.html.erb @@ -37,14 +37,7 @@ <%= f.association :people, collection: current_university.people.researchers.ordered, as: :check_boxes %> </div> </div> - <div class="card"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: paper %> </div> </div> <% content_for :action_bar_right do %> diff --git a/app/views/admin/research/journals/papers/show.html.erb b/app/views/admin/research/journals/papers/show.html.erb index 29fd353324e1e38e14c2d6dcc8f20934bf9a1c85..f3bf6ca7c1dfc7c1eb0527c5ba3a449ebf8a44df 100644 --- a/app/views/admin/research/journals/papers/show.html.erb +++ b/app/views/admin/research/journals/papers/show.html.erb @@ -59,20 +59,7 @@ <% end %> </div> </div> - <% if @paper.description.present? %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <h3 class="h5"> - <%= Research::Journal::Paper.human_attribute_name('description') %> - </h3> - <%= simple_format @paper.description %> - </div> - </div> - <% end %> - + <%= render 'admin/application/meta_description/show', about: @paper %> </div> </div> diff --git a/app/views/admin/research/journals/papers/static.html.erb b/app/views/admin/research/journals/papers/static.html.erb index 8b0c77f29b587bd6710d258797046682415b5215..3e38a4349020456c7c991042ffeb36951b823b27 100644 --- a/app/views/admin/research/journals/papers/static.html.erb +++ b/app/views/admin/research/journals/papers/static.html.erb @@ -1,8 +1,6 @@ --- title: "<%= @about.title %>" slug: "<%= @about.slug %>" -description: > - <%= prepare_text_for_static @about.description %> <% if @about.volume && @about.volume.path %> volumes: - "<%= @about.volume.path %>" @@ -18,6 +16,7 @@ researchers: <% @about.people.each do |person| %> - "<%= person.slug %>" <% end %> +<%= render 'admin/application/meta_description/static' %> <%= render 'admin/application/summary/static' %> abstract: "<%= @about.abstract %>" references: "<%= @about.references %>" diff --git a/app/views/admin/research/journals/show.html.erb b/app/views/admin/research/journals/show.html.erb index b01f2f5754e52f0b7cf2acf28dc79c8f9b769be2..be32a34b38d55e410e7cc1b3bc59db929bdb7024 100644 --- a/app/views/admin/research/journals/show.html.erb +++ b/app/views/admin/research/journals/show.html.erb @@ -54,6 +54,8 @@ <%= render 'admin/research/journals/papers/list', papers: @papers %> </div> +<%= render 'admin/application/meta_description/show', about: @journal %> + <% content_for :action_bar_left do %> <%= destroy_link @journal %> <% end %> diff --git a/app/views/admin/research/journals/static.html.erb b/app/views/admin/research/journals/static.html.erb index 726cde68ddd358917b370d315c5e8e7be26e74e8..278021cc4d71c3261f878527995c083d3f06fd59 100644 --- a/app/views/admin/research/journals/static.html.erb +++ b/app/views/admin/research/journals/static.html.erb @@ -3,6 +3,5 @@ title: > <%= @about.title %> issn: > <%= @about.issn %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> --- diff --git a/app/views/admin/research/journals/volumes/_form.html.erb b/app/views/admin/research/journals/volumes/_form.html.erb index fa9e56696100fcbe80a8b2eec077fed31b37cedf..3bcfdafabf5fbee101692ea5532772df5e732d13 100644 --- a/app/views/admin/research/journals/volumes/_form.html.erb +++ b/app/views/admin/research/journals/volumes/_form.html.erb @@ -13,28 +13,7 @@ <%= f.input :text, as: :summernote %> </div> </div> - <div class="row"> - <div class="col-md-6"> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> - </div> - </div> - <div class="col-md-6"> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: volume %> </div> <div class="col-md-4"> <div class="card flex-fill w-100"> diff --git a/app/views/admin/research/journals/volumes/show.html.erb b/app/views/admin/research/journals/volumes/show.html.erb index df930f88d4dd2a13b6e2929eb3ad2612ea468a58..9d58f2d987330b67ef766cb39c56dab37d46d7a4 100644 --- a/app/views/admin/research/journals/volumes/show.html.erb +++ b/app/views/admin/research/journals/volumes/show.html.erb @@ -67,17 +67,7 @@ </div> </div> <%= render 'admin/application/featured_image/show', about: @volume %> - <% if @volume.description.present? %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <h3 class="h5"><%= Research::Journal::Volume.human_attribute_name('description') %></h3> - <%= simple_format @volume.description %> - </div> - </div> - <% end %> + <%= render 'admin/application/meta_description/show', about: @volume %> </div> </div> diff --git a/app/views/admin/research/journals/volumes/static.html.erb b/app/views/admin/research/journals/volumes/static.html.erb index 2bba1c9be528fbe07dbeb1b1ddddffe3e05253d2..bd0d0a26b7b6cc0766697c261044303cfa11a4ec 100644 --- a/app/views/admin/research/journals/volumes/static.html.erb +++ b/app/views/admin/research/journals/volumes/static.html.erb @@ -7,7 +7,6 @@ keywords: > <%= @about.keywords %> date: "<%= @about.published_at.iso8601 %>" <%= render 'admin/communication/unsplash/static' %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> --- <%= prepare_html_for_static @about.text, @about.university %> diff --git a/app/views/admin/research/laboratories/axes/_form.html.erb b/app/views/admin/research/laboratories/axes/_form.html.erb index 409265d9f5f19c7cf8827e8487dc443614b46894..c4d484522cbedc5a595729513443a263f473fa55 100644 --- a/app/views/admin/research/laboratories/axes/_form.html.erb +++ b/app/views/admin/research/laboratories/axes/_form.html.erb @@ -22,14 +22,7 @@ </div> </div> <div class="col-md-4"> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: axis %> </div> </div> <% content_for :action_bar_right do %> diff --git a/app/views/admin/research/laboratories/axes/show.html.erb b/app/views/admin/research/laboratories/axes/show.html.erb index a9477f5d11d54ec06e9c3ffa77741f7fa2c03cd2..a937db7ca0dcf7160fc9a4172eec2f1317acfd87 100644 --- a/app/views/admin/research/laboratories/axes/show.html.erb +++ b/app/views/admin/research/laboratories/axes/show.html.erb @@ -17,17 +17,7 @@ </div> </div> <div class="col-md-4"> - <% if @axis.description.present? %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <h3 class="h5"><%= Research::Laboratory::Axis.human_attribute_name('description') %></h3> - <%= simple_format @axis.description %> - </div> - </div> - <% end %> + <%= render 'admin/application/meta_description/show', about: @axis %> </div> </div> diff --git a/app/views/admin/university/organizations/_form.html.erb b/app/views/admin/university/organizations/_form.html.erb index 6cbb7ab9c838e840abbb01f6ed790fd39042960b..741e8064280bd2dac6da1a6f903b966a150cce15 100644 --- a/app/views/admin/university/organizations/_form.html.erb +++ b/app/views/admin/university/organizations/_form.html.erb @@ -93,14 +93,7 @@ direct_upload: true %> </div> </div> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: organization %> </div> </div> <% content_for :action_bar_right do %> diff --git a/app/views/admin/university/organizations/imports/new.html.erb b/app/views/admin/university/organizations/imports/new.html.erb index b1fb765b4c7d82ec0a4d99bc3b93358e91832930..7ce59642e217238cc4fe7f09a0b1650ecbcd1f79 100644 --- a/app/views/admin/university/organizations/imports/new.html.erb +++ b/app/views/admin/university/organizations/imports/new.html.erb @@ -49,7 +49,7 @@ <td>00052</td> </tr> <tr> - <th>description</th> + <th>meta description</th> <td>Le quotidien de référence</td> </tr> <tr> diff --git a/app/views/admin/university/organizations/show.html.erb b/app/views/admin/university/organizations/show.html.erb index 5c33a452ecb527bd59645c7f00d5a42a5d2eeda4..be7f63ca8640721b1db8b1488717d00c86537b38 100644 --- a/app/views/admin/university/organizations/show.html.erb +++ b/app/views/admin/university/organizations/show.html.erb @@ -103,17 +103,7 @@ </div> </div> <% end %> - <% if @organization.description.present? %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <h3 class="h5"><%= University::Organization.human_attribute_name('description') %></h3> - <%= simple_format @organization.description %> - </div> - </div> - <% end %> + <%= render 'admin/application/meta_description/show', about: @organization %> </div> </div> diff --git a/app/views/admin/university/organizations/static.html.erb b/app/views/admin/university/organizations/static.html.erb index 545b9d65f24afe190482c563b538684f1f393d80..e69cbb20736f8d9bef992b47f3144f8dcbb8daff 100644 --- a/app/views/admin/university/organizations/static.html.erb +++ b/app/views/admin/university/organizations/static.html.erb @@ -2,7 +2,6 @@ title: > <%= @about.to_s %> <%= render 'admin/application/static/permalink' %> -<%= render 'admin/application/summary/static' %> <%= render 'admin/application/static/design', full_width: true, toc_offcanvas: true %> long_name: > <%= @about.long_name %> @@ -21,8 +20,8 @@ logo: "<%= @about.logo.blob.id %>" <% if @about.logo_on_dark_background.attached? %> logo_on_dark_background: "<%= @about.logo_on_dark_background.blob.id %>" <% end %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> +<%= render 'admin/application/summary/static' %> <%= render 'admin/communication/blocks/static', about: @about %> --- <%= prepare_html_for_static @about.text, @about.university %> diff --git a/app/views/admin/university/people/_form.html.erb b/app/views/admin/university/people/_form.html.erb index 49717c74e14dfff2a04a8fab4aa267c67230ce80..eb779753b07d82c90ced9616a05f1db067272520 100644 --- a/app/views/admin/university/people/_form.html.erb +++ b/app/views/admin/university/people/_form.html.erb @@ -144,14 +144,7 @@ direct_upload: true %> </div> </div> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <%= f.input :description %> - </div> - </div> + <%= render 'admin/application/meta_description/form', f: f, about: person %> </div> </div> <% content_for :action_bar_right do %> diff --git a/app/views/admin/university/people/_main_infos.html.erb b/app/views/admin/university/people/_main_infos.html.erb index a17490eb076d2fc0cfdccef259eaeb7ef348c35a..c5ba7226d311eb98ae327b8a8e8f5f89636fafe1 100644 --- a/app/views/admin/university/people/_main_infos.html.erb +++ b/app/views/admin/university/people/_main_infos.html.erb @@ -92,16 +92,6 @@ </div> </div> <% end %> - <% if person.description.present? %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('seo') %></h5> - </div> - <div class="card-body"> - <h3 class="h5"><%= University::Person.human_attribute_name('description') %></h3> - <%= simple_format person.description %> - </div> - </div> - <% end %> + <%= render 'admin/application/meta_description/show', about: person %> </div> </div> diff --git a/app/views/admin/university/people/administrators/static.html.erb b/app/views/admin/university/people/administrators/static.html.erb index a9c89c3f8f5748c5a06e6cc1702e2b3228b58470..5902a5d2070e642c75f59da2e8dde750634b3fe0 100644 --- a/app/views/admin/university/people/administrators/static.html.erb +++ b/app/views/admin/university/people/administrators/static.html.erb @@ -9,6 +9,6 @@ first_name: > <%= @about.first_name %> last_name: > <%= @about.last_name %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> +<%= render 'admin/application/summary/static' %> --- diff --git a/app/views/admin/university/people/authors/static.html.erb b/app/views/admin/university/people/authors/static.html.erb index 7551467dd9db87c3d875ee4971b625b811ac4d89..5759db851d6dd42b4457ac640fd83fd71dc0decf 100644 --- a/app/views/admin/university/people/authors/static.html.erb +++ b/app/views/admin/university/people/authors/static.html.erb @@ -9,6 +9,6 @@ first_name: > <%= @about.first_name %> last_name: > <%= @about.last_name %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> +<%= render 'admin/application/summary/static' %> --- diff --git a/app/views/admin/university/people/researchers/static.html.erb b/app/views/admin/university/people/researchers/static.html.erb index a18df13be078a9bbac0ee5605e6757b9597d54cd..84b7176db352c054aef825fec92ad25d2524ebc6 100644 --- a/app/views/admin/university/people/researchers/static.html.erb +++ b/app/views/admin/university/people/researchers/static.html.erb @@ -9,6 +9,6 @@ first_name: > <%= @about.first_name %> last_name: > <%= @about.last_name %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> +<%= render 'admin/application/summary/static' %> --- diff --git a/app/views/admin/university/people/static.html.erb b/app/views/admin/university/people/static.html.erb index a029e8015f562f4dfb6afa9525e4967c377a3988..7907da37d0e73356bb6f1cbb3d5f7ba96069778a 100644 --- a/app/views/admin/university/people/static.html.erb +++ b/app/views/admin/university/people/static.html.erb @@ -2,6 +2,7 @@ title: > <%= @about.to_s %> <%= render 'admin/application/static/permalink' %> +<%= render 'admin/application/meta_description/static' %> <%= render 'admin/application/summary/static' %> <%= render 'admin/application/static/design', full_width: true, toc_offcanvas: true %> first_name: > @@ -21,8 +22,6 @@ website: >- <% if @about.best_picture.attached? %> image: "<%= @about.best_picture.blob.id %>" <% end %> -description: > - <%= prepare_text_for_static @about.description %> roles: <% if @about.author.for_website?(@website) %> - author diff --git a/app/views/admin/university/people/teachers/static.html.erb b/app/views/admin/university/people/teachers/static.html.erb index 5d5d5d01f305515b3c5b9c5666d6318bbcad2ef6..b2d59e7b9ad73586918679effb5c26e0074e8fd4 100644 --- a/app/views/admin/university/people/teachers/static.html.erb +++ b/app/views/admin/university/people/teachers/static.html.erb @@ -9,6 +9,6 @@ first_name: > <%= @about.first_name %> last_name: > <%= @about.last_name %> -description: > - <%= prepare_text_for_static @about.description %> +<%= render 'admin/application/meta_description/static' %> +<%= render 'admin/application/summary/static' %> --- diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index df55fba0d43874027d6ba4440f21b8eedbe91974..25fe01c37e8266330e52a26ad7325dc23df7ed22 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -84,7 +84,6 @@ en: url: URL communication/website/category: children: Children categories - description: Meta Description featured_image: Featured image featured_image_alt: Alt text name: Name @@ -112,7 +111,6 @@ en: bodyclass: Specific CSS class breadcrumb_title: Title in breadcrumbs children: Children pages - description: Meta description featured_image: Featured image featured_image_alt: Alt text full_width: Full width @@ -129,7 +127,6 @@ en: author: Author category: Category categories: Categories - description: Meta description featured_image: Featured image featured_image_alt: Alt text featured_image_credit: Credit @@ -678,11 +675,6 @@ en: git_branch: 'If blank, default branch will be used' git_endpoint: 'If blank, default will be used (https://github.com or https://gitlab.com/api/v4)' languages: 'If you select at least one language the website will be considered as possibly multilingual, and therefore all urls will be prefixed with the language (/fr, /en)' - communication_website_category: - description: If this field is empty the main text's begining will be used. communication_website_page: breadcrumb_title: If the field is empty, page title will be used in breadcrumbs. - description: If this field is empty, the "lead text" field will be used. If also emty the main text's begining will be used. full_width: On large screens, a full width page uses all available space for the content. This is good for landing pages, or to make them spectacular. If the page is not full width, the content column will be smaller to make reading easier. The unused space might be used for a table of contents. - communication_website_post: - description: If this field is empty, the "lead text" field will be used. If also emty the main text's begining will be used. diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index c582619902b9b7a8e3a8f44dd14a1f85889c141c..fb1cf9db0a94cb396d7400ba0a495ab50dc53e3c 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -84,7 +84,6 @@ fr: url: URL communication/website/category: children: Catégories enfants - description: Meta Description featured_image: Image à la une featured_image_alt: Texte alternatif name: Nom @@ -112,7 +111,6 @@ fr: bodyclass: Classe CSS spécifique breadcrumb_title: Nom affiché dans le fil d'ariane children: Pages enfants - description: Description pour le référencement naturel featured_image: Image à la une featured_image_alt: Texte alternatif full_width: Pleine largeur @@ -129,7 +127,6 @@ fr: author: Auteur·rice category: Catégorie categories: Catégories - description: Description pour le référencement naturel featured_image: Image à la une featured_image_alt: Texte alternatif featured_image_credit: Crédit @@ -680,13 +677,9 @@ fr: git_branch: 'Laisser vide pour la branche par défaut' git_endpoint: 'Laisser vide pour les valeurs par défaut (https://github.com ou https://gitlab.com/api/v4)' languages: 'Si vous sélectionnez au moins une langue le site sera considéré comme possiblement multilingue et donc toutes les urls seront préfixées avec la langue (/fr, /en)' - communication_website_category: - description: Si ce champ est vide le début du texte principal sera utilisé. communication_website_page: breadcrumb_title: Si ce champ est vide le titre de la page sera utilisé dans le fil d'Ariane. - description: Si ce champ est vide le "chapô" sera utilisé. Si il est également vide le début du texte principal sera utilisé. full_width: Sur de grands écrans, la page en pleine largeur utilisera tout l'espace disponible, ce qui est pertinent pour événementialiser une page. Si la page n'est pas en pleine largeur, l'espace dédié au contenu sera réduit pour faciliter la lecture, et l'espace libre pourra être utilisé pour une table des matières facilitant la navigation. text: Ce champ est déprécié, le contenu ne s'affichera pas sur le site. communication_website_post: - description: Si ce champ est vide le "chapô" sera utilisé. Si il est également vide le début du texte principal sera utilisé. text: Ce champ est déprécié, le contenu ne s'affichera pas sur le site. diff --git a/config/locales/education/en.yml b/config/locales/education/en.yml index 9fb1724fd4b6f4f35e4cd589c96cb70ae3d20375..a55b2560703b58df704aec88c1ba9742e55bb2ad 100644 --- a/config/locales/education/en.yml +++ b/config/locales/education/en.yml @@ -40,7 +40,6 @@ en: capacity: Capacity contacts: Contacts continuing: Continuing training - description: Meta Description diploma: Diploma duration: Duration downloadable_summary: Downloadable summary @@ -138,20 +137,19 @@ en: simple_form: hints: education_diploma: - ects: European Credits Transfer System duration: Duration can be set as hours or days and it can be estimated. + ects: European Credits Transfer System education_program: + accessibility: Conditions of reception and access for people with disabilities (premises, adaptation of the means of provision). capacity: People per cohort + duration: The duration can be expressed in hours or days. It can also be lumped or estimated. ects: European Credits Transfer System - prerequisites: Necessary or indispensable prerequisites for a given service. The absence of prerequisites must be mentioned. + evaluation: Means mobilised to measure with objective criteria the beneficiary's achievements during and/or at the end of the service. objectives: "A statement of the skills and competences, both targeted and assessable, that will be acquired during the performance. Ability: the ability to apply knowledge and use skills to complete tasks and solve problems. Competence: demonstrated ability to apply knowledge, skills and personal, social or methodological dispositions in work or study/training situations for professional or personal development." - duration: The duration can be expressed in hours or days. It can also be lumped or estimated. - registration: "Access time: estimated time between the beneficiary's application and the start of the service." - pricing: Price of the service or tariff conditions. pedagogy: Teaching methods and/or means and/or tools used to carry out the service provided. - evaluation: Means mobilised to measure with objective criteria the beneficiary's achievements during and/or at the end of the service. - accessibility: Conditions of reception and access for people with disabilities (premises, adaptation of the means of provision). - description: Plain text without HTML, dedicated to SEO + prerequisites: Necessary or indispensable prerequisites for a given service. The absence of prerequisites must be mentioned. + pricing: Price of the service or tariff conditions. + registration: "Access time: estimated time between the beneficiary's application and the start of the service." include_blanks: defaults: program: "Select a program" diff --git a/config/locales/education/fr.yml b/config/locales/education/fr.yml index 066098e5563ef3ca394a576cdd6985b527c48fb7..afe79e85b5e83c198395300c34a49d1376da0d7a 100644 --- a/config/locales/education/fr.yml +++ b/config/locales/education/fr.yml @@ -40,7 +40,6 @@ fr: capacity: Capacité contacts: Contacts continuing: Formation continue - description: Meta Description diploma: Diplôme duration: Durée downloadable_summary: Document de synthèse téléchargeable @@ -138,20 +137,19 @@ fr: simple_form: hints: education_diploma: - ects: European Credits Transfer System duration: La durée peut être exprimée en heure ou en jour. Elle peut également être forfaitisée ou estimée. + ects: European Credits Transfer System education_program: + accessibility: Conditions d'accueil et d’accès des publics en situation de handicap (locaux, adaptation des moyens de la prestation). capacity: Nombre de places disponibles par promotion + duration: La durée peut être exprimée en heure ou en jour. Elle peut également être forfaitisée ou estimée. ects: European Credits Transfer System - prerequisites: Préalables nécessaires ou indispensables pour bénéficier d'une prestation déterminée. L'absence de prérequis doit être mentionnée. + evaluation: Moyens mobilisés pour mesurer à l'aide de critères objectifs les acquis du bénéficiaire en cours et/ou à la fin de la prestation. objectives: "Énoncé des aptitudes et compétences, visées et évaluables, qui seront acquises au cours de la prestation. Aptitude : capacité d'appliquer un savoir et d'utiliser un savoir-faire pour réaliser des tâches et résoudre des problèmes. Compétences : capacité avérée de mettre en œuvre des savoirs, des savoir-faire et des dispositions personnelles, sociales ou méthodologiques dans des situations de travail ou d’études/formations, pour le développement professionnel ou personnel." - duration: La durée peut être exprimée en heure ou en jour. Elle peut également être forfaitisée ou estimée. - registration: "Délai d’accès : durée estimée entre la demande du bénéficiaire et le début de la prestation." - pricing: Prix de la prestation ou conditions tarifaires. pedagogy: Modalités pédagogiques et/ou moyens et/ou outils utilisés pour mener à bien la prestation dispensée. - evaluation: Moyens mobilisés pour mesurer à l'aide de critères objectifs les acquis du bénéficiaire en cours et/ou à la fin de la prestation. - accessibility: Conditions d'accueil et d’accès des publics en situation de handicap (locaux, adaptation des moyens de la prestation). - description: Texte simple, sans HTML, pour le SEO + prerequisites: Préalables nécessaires ou indispensables pour bénéficier d'une prestation déterminée. L'absence de prérequis doit être mentionnée. + pricing: Prix de la prestation ou conditions tarifaires. + registration: "Délai d’accès : durée estimée entre la demande du bénéficiaire et le début de la prestation." include_blanks: defaults: program: "Sélectionnez une formation" diff --git a/config/locales/en.yml b/config/locales/en.yml index 496ba1cc3fc1002bda8b6fe9f2f13acbaf44e13b..7111d639871b85688a42c0efdc2659adab05647e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -96,6 +96,9 @@ en: sentence_without_link: Value inherited sentence_html: Value inherited from %{link} status: Inherited value + meta_description: + hint: Plain text without HTML, dedicated to SEO + label: Meta description pending_tasks: label: Background tasks pending hint: Those tasks precompute your data in order to minimize its carbon footprint. It creates a delay before your changes are online. diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 046e74c7490b04735d9ea23ed7639f9379f38e16..844af3b00b1cc948cda76c971bf586426e1fc7d0 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -96,6 +96,9 @@ fr: sentence_without_link: Valeur héritée sentence_html: Valeur héritée de %{link} status: Valeur héritée + meta_description: + hint: Texte simple, dédié au SEO + label: Meta description pending_tasks: label: Tâches en cours de traitement hint: L'exécution de ces tâches contribue à diminuer l'empreinte carbone du numérique, en précalculant ce qui peut l'être. Cela peut générer un délai avant que vos modifications ne soient visibles. diff --git a/config/locales/research/en.yml b/config/locales/research/en.yml index 09f9bc0711bc530b6766cbd1d9ac4183f18aff91..7e0270965abc5b8d78550366fbf035c41ff09f3c 100644 --- a/config/locales/research/en.yml +++ b/config/locales/research/en.yml @@ -28,7 +28,6 @@ en: title: Title research/journal/paper: abstract: Abstract - description: Meta Description keywords: Keywords pdf: PDF published: Published? @@ -40,7 +39,6 @@ en: research/journal/volume: featured_image: Cover featured_image_alt: Alt text - description: Meta Description keywords: Keywords number: Number published: Published? @@ -54,7 +52,6 @@ en: name: Name zipcode: Zipcode research/laboratory/axis: - description: Meta Description name: Name short_name: Short name text: Text @@ -75,10 +72,5 @@ en: other: Researchers simple_form: hints: - research_journal_paper: - description: If this field is empty the main text's begining will be used. research_journal_volume: cover: JPG or PNG file - description: If this field is empty the main text's begining will be used. - research_laboratory_axis: - description: If this field is empty the main text's begining will be used. diff --git a/config/locales/research/fr.yml b/config/locales/research/fr.yml index 1dc6d8e66c89d7aed3c3f8fecb497aa5a3937abe..2b5e8e04aa3bca8f8bf0d8be788c77d68dcb0c91 100644 --- a/config/locales/research/fr.yml +++ b/config/locales/research/fr.yml @@ -28,7 +28,6 @@ fr: title: Titre research/journal/paper: abstract: Extrait - description: Meta Description keywords: Mots clés pdf: PDF published: Publié ? @@ -40,7 +39,6 @@ fr: research/journal/volume: featured_image: Couverture featured_image_alt: Texte alternatif - description: Meta Description keywords: Mots clés number: Numéro published: Publié ? @@ -54,7 +52,6 @@ fr: name: Nom zipcode: Code postal research/laboratory/axis: - description: Meta Description name: Nom short_name: Nom court text: Texte @@ -75,10 +72,5 @@ fr: other: Chercheu·rs·ses simple_form: hints: - research_journal_paper: - description: Si ce champ est vide le début de l'extrait sera utilisé. research_journal_volume: cover: Fichier JPG ou PNG - description: Si ce champ est vide le début du texte principal sera utilisé. - research_laboratory_axis: - description: Si ce champ est vide le début du texte principal sera utilisé. diff --git a/config/locales/university/en.yml b/config/locales/university/en.yml index 17babc0fd7b4dc4698309425935d4203cf4b17a3..59c16d2d285745f6f5c3755845c953cafededbbd 100644 --- a/config/locales/university/en.yml +++ b/config/locales/university/en.yml @@ -34,7 +34,6 @@ en: communication_website_posts: Posts contacts: Contact information country: Country - description: Meta description education_programs: Programs email: Email essentials: Essentials @@ -84,7 +83,6 @@ en: city: City contact: Contact information country: Country - description: Meta description email: Email kind: Kind legal: Legal information diff --git a/config/locales/university/fr.yml b/config/locales/university/fr.yml index 8ab4f5e4d8f6687582da574ac31d69b81b127b13..045293d1a75929ee11fa2520da297a0cab21a0ec 100644 --- a/config/locales/university/fr.yml +++ b/config/locales/university/fr.yml @@ -34,7 +34,6 @@ fr: communication_website_posts: Actualités contacts: Coordonnées country: Pays - description: Meta description education_programs: Formations email: Email essentials: Informations essentielles @@ -84,7 +83,6 @@ fr: city: Ville contact: Informations de contact country: Pays - description: Meta description email: Email kind: Type legal: Informations légales diff --git a/db/migrate/20230109143628_rename_description_to_meta_description.rb b/db/migrate/20230109143628_rename_description_to_meta_description.rb new file mode 100644 index 0000000000000000000000000000000000000000..30b6d6a31ca804b9fe2d696c7363b525f626ddc3 --- /dev/null +++ b/db/migrate/20230109143628_rename_description_to_meta_description.rb @@ -0,0 +1,14 @@ +class RenameDescriptionToMetaDescription < ActiveRecord::Migration[7.0] + def change + rename_column :communication_website_categories, :description, :meta_description + rename_column :communication_website_pages, :description, :meta_description + rename_column :communication_website_posts, :description, :meta_description + rename_column :education_programs, :description, :meta_description + rename_column :research_journals, :description, :meta_description + rename_column :research_journal_papers, :description, :meta_description + rename_column :research_journal_volumes, :description, :meta_description + rename_column :research_laboratory_axes, :description, :meta_description + rename_column :university_organizations, :description, :meta_description + rename_column :university_people, :description, :meta_description + end +end diff --git a/db/schema.rb b/db/schema.rb index 0199ee059c86832142a43bd84725d1a28662ab99..e241f54c624010c707e9243d129f8ee5549e5cec 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do +ActiveRecord::Schema[7.0].define(version: 2023_01_09_143628) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -121,7 +121,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "name" - t.text "description" + t.text "meta_description" t.integer "position" t.datetime "created_at", null: false t.datetime "updated_at", null: false @@ -303,7 +303,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" - t.text "description" + t.text "meta_description" t.string "slug" t.text "path" t.uuid "parent_id" @@ -347,7 +347,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.uuid "university_id", null: false t.uuid "communication_website_id", null: false t.string "title" - t.text "description" + t.text "meta_description" t.boolean "published", default: false t.datetime "published_at", precision: nil t.datetime "created_at", null: false @@ -480,7 +480,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.integer "position", default: 0 t.string "slug" t.string "path" - t.text "description" + t.text "meta_description" t.boolean "published", default: false t.string "featured_image_alt" t.text "accessibility" @@ -580,7 +580,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.boolean "published", default: false t.integer "position" t.text "text" - t.text "description" + t.text "meta_description" t.text "summary" t.index ["research_journal_id"], name: "index_research_journal_papers_on_research_journal_id" t.index ["research_journal_volume_id"], name: "index_research_journal_papers_on_research_journal_volume_id" @@ -603,7 +603,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.datetime "published_at", precision: nil t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.text "description" + t.text "meta_description" t.text "keywords" t.string "slug" t.string "featured_image_alt" @@ -617,7 +617,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do 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 "description" + t.text "meta_description" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "access_token" @@ -642,7 +642,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.uuid "university_id", null: false t.uuid "research_laboratory_id", null: false t.string "name" - t.text "description" + t.text "meta_description" t.integer "position" t.datetime "created_at", null: false t.datetime "updated_at", null: false @@ -699,7 +699,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.uuid "university_id", null: false t.string "name" t.string "long_name" - t.text "description" + t.text "meta_description" t.string "address" t.string "zipcode" t.string "city" @@ -732,7 +732,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do t.datetime "updated_at", null: false t.string "phone_mobile" t.string "email" - t.text "description" + t.text "meta_description" t.boolean "habilitation", default: false t.boolean "tenure", default: false t.text "biography" diff --git a/test/fixtures/communication/website/posts.yml b/test/fixtures/communication/website/posts.yml index b22a2192021f05de1ec6d53b02be488180473feb..8a2cbd33b616566e8787a71c542a9dacb2e2fa01 100644 --- a/test/fixtures/communication/website/posts.yml +++ b/test/fixtures/communication/website/posts.yml @@ -3,10 +3,10 @@ # Table name: communication_website_posts # # id :uuid not null, primary key -# description :text # featured_image_alt :string # featured_image_credit :text # github_path :text +# meta_description :text # pinned :boolean default(FALSE) # published :boolean default(FALSE) # published_at :datetime diff --git a/test/fixtures/university/organizations.yml b/test/fixtures/university/organizations.yml index 351f7219f613570971209f9d80aed7e96710dd82..09c3edddb2ed8df6a454251c01f7f5c3655847f3 100644 --- a/test/fixtures/university/organizations.yml +++ b/test/fixtures/university/organizations.yml @@ -2,27 +2,27 @@ # # Table name: university_organizations # -# id :uuid not null, primary key -# active :boolean default(TRUE) -# address :string -# city :string -# country :string -# description :text -# email :string -# kind :integer default("company") -# long_name :string -# name :string -# nic :string -# phone :string -# siren :string -# slug :string -# summary :text -# text :text -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# active :boolean default(TRUE) +# address :string +# city :string +# country :string +# email :string +# kind :integer default("company") +# long_name :string +# meta_description :text +# name :string +# nic :string +# phone :string +# siren :string +# slug :string +# summary :text +# text :text +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# university_id :uuid not null, indexed # # Indexes # diff --git a/test/models/university/organization_test.rb b/test/models/university/organization_test.rb index 04e6d40e7f7a94a0e1dd793eabdea183f4503d44..0de663bacbde2975cb0f8356d4c744c2b2bb3e9b 100644 --- a/test/models/university/organization_test.rb +++ b/test/models/university/organization_test.rb @@ -2,27 +2,27 @@ # # Table name: university_organizations # -# id :uuid not null, primary key -# active :boolean default(TRUE) -# address :string -# city :string -# country :string -# description :text -# email :string -# kind :integer default("company") -# long_name :string -# name :string -# nic :string -# phone :string -# siren :string -# slug :string -# summary :text -# text :text -# url :string -# zipcode :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# active :boolean default(TRUE) +# address :string +# city :string +# country :string +# email :string +# kind :integer default("company") +# long_name :string +# meta_description :text +# name :string +# nic :string +# phone :string +# siren :string +# slug :string +# summary :text +# text :text +# url :string +# zipcode :string +# created_at :datetime not null +# updated_at :datetime not null +# university_id :uuid not null, indexed # # Indexes #