diff --git a/app/assets/stylesheets/admin/appstack/style.sass b/app/assets/stylesheets/admin/appstack/style.sass index da124eacb9b6cd95671114c41045bf472101ebea..d0c9e8f1e2a46a76709b6d74798a105955c25e44 100644 --- a/app/assets/stylesheets/admin/appstack/style.sass +++ b/app/assets/stylesheets/admin/appstack/style.sass @@ -92,9 +92,6 @@ h1 box-shadow: none padding: 0.5rem 0 -.draft - opacity: 0.5 - .btn-light[target=_blank]::after filter: invert(0) diff --git a/app/assets/stylesheets/admin/commons/style.sass b/app/assets/stylesheets/admin/commons/style.sass new file mode 100644 index 0000000000000000000000000000000000000000..6792bc31581b7fba2aee808547acca2856526b8e --- /dev/null +++ b/app/assets/stylesheets/admin/commons/style.sass @@ -0,0 +1,7 @@ +.draft + td + opacity: 0.5 + &:last-of-type // Buttons + opacity: 1 +.handle + cursor: move \ No newline at end of file diff --git a/app/controllers/admin/communication/websites/categories_controller.rb b/app/controllers/admin/communication/websites/categories_controller.rb index 580c9497cc35ffd75ef28633b6044854c65bbadd..e2c6aefe9ed77c917b198f8e1f076b8f3a7d5292 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, :text, :slug, :parent_id, + :website_id, :name, :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 94cb1747c8b96b4fac87176771417c4341317b03..d05b57beb3629dac70bddd6dc2e5c19fbb8ffe07 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, :description_short, :header_text, :text, :slug, :published, :full_width, + :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 0b432a85668a56f2dbb9afd84fbcd4f3aee8ee36..24e2ee377b1f7917a42708dec1d9f281d864e32e 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, :description_short, :text, + :university_id, :website_id, :title, :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/diplomas_controller.rb b/app/controllers/admin/education/diplomas_controller.rb index 7daecf16927767ffb13d5f869249c3af378feaa5..0898fac6fb041c9feb6d6f988a22f869d4f2aa96 100644 --- a/app/controllers/admin/education/diplomas_controller.rb +++ b/app/controllers/admin/education/diplomas_controller.rb @@ -64,6 +64,6 @@ class Admin::Education::DiplomasController < Admin::Education::ApplicationContro def diploma_params params.require(:education_diploma) - .permit(:name, :short_name, :description_short, :level, :ects, :duration) + .permit(:name, :short_name, :summary, :level, :ects, :duration) end end diff --git a/app/controllers/admin/education/programs_controller.rb b/app/controllers/admin/education/programs_controller.rb index 8d8638ab5f46bed77909643197eb46457630232d..f754feff815963decc3b747c61a521780e4b8c8d 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, :description_short, :published, + :name, :short_name, :slug, :capacity, :continuing, :initial, :apprenticeship, :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 205c59c45f6639fa7bd0bddf444e88d59cc9ed30..91d6ae4a182ad4c01f44dbea61a13904e35c44bf 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, :abstract, :description, :pdf, :references, :keywords, :research_journal_volume_id, person_ids: []) + .permit(:title, :slug, :text, :published, :published_at, :summary, :abstract, :description, :pdf, :references, :keywords, :research_journal_volume_id, person_ids: []) .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 c08bf99f4bdde3020910262cb0e268db7377b9bd..751395e80d693ec4fff8f8c28bbd2a6fcfee078d 100644 --- a/app/controllers/admin/university/organizations_controller.rb +++ b/app/controllers/admin/university/organizations_controller.rb @@ -69,11 +69,11 @@ class Admin::University::OrganizationsController < Admin::University::Applicatio def organization_params params.require(:university_organization) .permit( - :name, :long_name, :slug, :description, :description_short, :active, :siren, :kind, + :name, :long_name, :slug, :description, :summary, :active, :siren, :kind, :address, :zipcode, :city, :country, :text, :url, :phone, :email, - :logo, :logo_delete, :logo_infos, - :logo_on_dark_background, :logo_on_dark_background_delete, :logo_on_dark_background_infos, + :logo, :logo_delete, :logo_infos, + :logo_on_dark_background, :logo_on_dark_background_delete, :logo_on_dark_background_infos, ) end end diff --git a/app/controllers/admin/university/people_controller.rb b/app/controllers/admin/university/people_controller.rb index 63e11047b019a0bb1a9118ef4e70ed782305d441..f6449552badc8d5510843c6950f587e9edb84069 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, :description_short, + :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/controllers/extranet/personal_data_controller.rb b/app/controllers/extranet/personal_data_controller.rb index 62e632303346671c0cde885aa83b6cf6c37e7efe..0da2e83a64a58dfa92e0a46d055495f9845e66fc 100644 --- a/app/controllers/extranet/personal_data_controller.rb +++ b/app/controllers/extranet/personal_data_controller.rb @@ -26,7 +26,7 @@ class Extranet::PersonalDataController < Extranet::ApplicationController def person_params params.require(:university_person) .permit( - :gender, :birthdate, :description_short, :biography, + :gender, :birthdate, :summary, :biography, :phone_mobile, :phone_professional, :phone_personal, :address, :zipcode, :city, :country, :url, :linkedin, :twitter diff --git a/app/models/communication/website/category.rb b/app/models/communication/website/category.rb index 1d3d87c76bac03cbf4af9916db090c2f35f33c1e..d6d6174e7f6f5e6d2394ba641ef1b65783c5d98d 100644 --- a/app/models/communication/website/category.rb +++ b/app/models/communication/website/category.rb @@ -12,7 +12,7 @@ # path :string # position :integer # slug :string -# text :text +# summary :text # created_at :datetime not null # updated_at :datetime not null # communication_website_id :uuid not null, indexed diff --git a/app/models/communication/website/menu/item.rb b/app/models/communication/website/menu/item.rb index 151b7505b7e61a458a8ccafcf292c960fadd6227..f66fa1e69f565d1ea0e4ce6b45ace2007123a787 100644 --- a/app/models/communication/website/menu/item.rb +++ b/app/models/communication/website/menu/item.rb @@ -36,7 +36,6 @@ class Communication::Website::Menu::Item < ApplicationRecord include Sanitizable include WithTree include WithPosition - include WithTargets attr_accessor :skip_publication_callback @@ -53,22 +52,11 @@ class Communication::Website::Menu::Item < ApplicationRecord blank: 0, url: 10, page: 20, - programs: 30, program: 31, - diplomas: 32, diploma: 33, - posts: 40, category: 41, post: 42, - organizations: 45, - persons: 50, - administrators: 51, - authors: 52, - researchers: 53, - teachers: 54, - volumes: 60, volume: 61, - papers: 62, paper: 63 }, _prefix: :kind @@ -79,25 +67,14 @@ class Communication::Website::Menu::Item < ApplicationRecord def self.icon_for(kind) icons = { - 'administrators' => Icon::UNIVERSITY_PERSON_ADMINISTRATORS, - 'authors' => Icon::UNIVERSITY_PERSON, 'blank' => 'font', 'diploma' => Icon::EDUCATION_DIPLOMA, - 'diplomas' => Icon::EDUCATION_DIPLOMA, - 'posts' => Icon::COMMUNICATION_WEBSITE_POST, 'post' => Icon::COMMUNICATION_WEBSITE_POST, 'category' => Icon::COMMUNICATION_WEBSITE_POST, 'page' => Icon::COMMUNICATION_WEBSITE_PAGE, 'program' => Icon::EDUCATION_PROGRAM, - 'programs' => Icon::EDUCATION_PROGRAM, 'paper' => Icon::RESEARCH_LABORATORY, - 'papers' => Icon::RESEARCH_LABORATORY, - 'volumes' => Icon::RESEARCH_LABORATORY, 'volume' => Icon::RESEARCH_LABORATORY, - 'researchers' => Icon::RESEARCH_RESEARCHER, - 'organizations' => Icon::UNIVERSITY_ORGANIZATION, - 'persons' => Icon::UNIVERSITY_PERSON, - 'teachers' => Icon::EDUCATION_TEACHER, 'url' => 'globe', } "fas fa-#{icons[kind]}" if icons.has_key? kind @@ -108,17 +85,17 @@ class Communication::Website::Menu::Item < ApplicationRecord end def static_target - target = nil - active = website.send "menu_item_kind_#{kind}?" - return nil unless active - # Les méthodes target_for_ sont définies dans le concern WithTarget - method = "target_for_#{kind}" - # Le true sert à examiner les méthodes protected - target = respond_to?(method, true) ? send(method) - : about&.path - return nil if target.nil? - target.end_with?('/') ? target - : "#{target}/" + test_kind_method = "menu_item_kind_#{kind}?" + return nil if website.respond_to?(test_kind_method) && !website.public_send(test_kind_method) + + case kind + when "blank" + '' + when "url" + url + else + about.new_permalink_in_website(website).computed_path + end end def list_of_other_items diff --git a/app/models/communication/website/menu/item/with_targets.rb b/app/models/communication/website/menu/item/with_targets.rb deleted file mode 100644 index fc977c98c2b79b699b7839a5158ddcfeb3b47687..0000000000000000000000000000000000000000 --- a/app/models/communication/website/menu/item/with_targets.rb +++ /dev/null @@ -1,91 +0,0 @@ -module Communication::Website::Menu::Item::WithTargets - extend ActiveSupport::Concern - - protected - - def target_for_blank - '' - end - - def target_for_url - url - end - - # TODO should be replaced by permalink - - def target_for_page - Static.clean_path about.path if about&.published - end - - def target_for_programs - Static.clean_path website.special_page(Communication::Website::Page::EducationProgram).path - end - - def target_for_program - Static.clean_path "#{website.special_page(Communication::Website::Page::EducationProgram).path}#{about.path}" - end - - def target_for_diploma - Static.clean_path "#{website.special_page(Communication::Website::Page::EducationDiploma).path}#{about.slug}" - end - - def target_for_diplomas - Static.clean_path website.special_page(Communication::Website::Page::EducationDiploma).path - end - - def target_for_posts - Static.clean_path website.special_page(Communication::Website::Page::CommunicationPost).path - end - - def target_for_post - return unless about&.published? - Static.clean_path "#{website.special_page(Communication::Website::Page::CommunicationPost).path}#{about.path}" - end - - def target_for_category - return unless about - Static.clean_path "#{website.special_page(Communication::Website::Page::CommunicationPost).path}#{about.path}" - end - - def target_for_organizations - Static.clean_path website.special_page(Communication::Website::Page::Organization).path - end - - def target_for_persons - Static.clean_path website.special_page(Communication::Website::Page::Person).path - end - - def target_for_administrators - Static.clean_path website.special_page(Communication::Website::Page::Administrator).path - end - - def target_for_authors - Static.clean_path website.special_page(Communication::Website::Page::Author).path - end - - def target_for_researchers - Static.clean_path website.special_page(Communication::Website::Page::Researcher).path - end - - def target_for_teachers - Static.clean_path website.special_page(Communication::Website::Page::Teacher).path - end - - def target_for_volumes - Static.clean_path website.special_page(Communication::Website::Page::ResearchVolume).path - end - - def target_for_volume - return unless about&.published && about&.published_at - Static.clean_path "#{website.special_page(Communication::Website::Page::ResearchVolume).path}#{about.path}" - end - - def target_for_papers - Static.clean_path website.special_page(Communication::Website::Page::ResearchPaper).path - end - - def target_for_paper - return unless about&.published && about&.published_at - Static.clean_path "#{website.special_page(Communication::Website::Page::ResearchPaper).path}#{about.path}" - end -end diff --git a/app/models/communication/website/page.rb b/app/models/communication/website/page.rb index 8997909a2f593e3bdd2d489c0db726ce0acc90a2..2a37ec772f27ee8500dce4e715f2a6c48032f649 100644 --- a/app/models/communication/website/page.rb +++ b/app/models/communication/website/page.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/accessibility.rb b/app/models/communication/website/page/accessibility.rb index fc13d78e0b0e1ecbe8b991548b0fa0b3248924d4..0160fadeb066661ce8feec9e88393d787747dd53 100644 --- a/app/models/communication/website/page/accessibility.rb +++ b/app/models/communication/website/page/accessibility.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/administrator.rb b/app/models/communication/website/page/administrator.rb index f1372fa608f836c8d1802f3273d1256a75ecbcdd..c6b1ff524eab3b5546377f05654310cc8239e28b 100644 --- a/app/models/communication/website/page/administrator.rb +++ b/app/models/communication/website/page/administrator.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/author.rb b/app/models/communication/website/page/author.rb index c759a1d047b6eed97499ee164ba45edbe04a6964..1c85fbc4c4ee8827d272381fae52460a6b250fd9 100644 --- a/app/models/communication/website/page/author.rb +++ b/app/models/communication/website/page/author.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/communication_post.rb b/app/models/communication/website/page/communication_post.rb index fffa8c8960ba91d40c29c4f1ff647e4869515a2e..4ea17f0207c3a0f1003429b931fc2e755720f72f 100644 --- a/app/models/communication/website/page/communication_post.rb +++ b/app/models/communication/website/page/communication_post.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/education_diploma.rb b/app/models/communication/website/page/education_diploma.rb index 70741dd42c9664f1d4be55cf0c453e5c8a243bfe..fa0ab72e51945918589d339368021815512cfb81 100644 --- a/app/models/communication/website/page/education_diploma.rb +++ b/app/models/communication/website/page/education_diploma.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/education_program.rb b/app/models/communication/website/page/education_program.rb index 105ec7616da8453c776b2e4ba84b795eda6c3e3d..5c4614e69fd5a03cf9472d4668e7437e038d001b 100644 --- a/app/models/communication/website/page/education_program.rb +++ b/app/models/communication/website/page/education_program.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/home.rb b/app/models/communication/website/page/home.rb index 5a32844fc49a14df2b94fc178ba8d13baa97f1e3..99e1db8ea4b9470f2215431820598ad358b50107 100644 --- a/app/models/communication/website/page/home.rb +++ b/app/models/communication/website/page/home.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/legal_term.rb b/app/models/communication/website/page/legal_term.rb index 4fcb1e8e77c1beb8e927d8d35ea46c3118daa942..60b88b52feb8e2b084d38373fdc02f293eb4a7b4 100644 --- a/app/models/communication/website/page/legal_term.rb +++ b/app/models/communication/website/page/legal_term.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/organization.rb b/app/models/communication/website/page/organization.rb index a3aadb64678bb2c9279755cdfa0d9b96b5a4152a..daa23083dadbfe381b9cdc9c302a529793212aff 100644 --- a/app/models/communication/website/page/organization.rb +++ b/app/models/communication/website/page/organization.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/person.rb b/app/models/communication/website/page/person.rb index 532a81d8fd2176c748bcdb6d8fb96daece59a796..b4fd596b4221b649719038f15c67d44e28805d7b 100644 --- a/app/models/communication/website/page/person.rb +++ b/app/models/communication/website/page/person.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/privacy_policy.rb b/app/models/communication/website/page/privacy_policy.rb index 81f934737a5b63c4090c605701f1b1be16e01990..dedba6f179211bf832321427dfb8381b2d4910de 100644 --- a/app/models/communication/website/page/privacy_policy.rb +++ b/app/models/communication/website/page/privacy_policy.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/research_paper.rb b/app/models/communication/website/page/research_paper.rb index 7a1cbda059b662d416750a97ca82df022db845a7..2ebe4ddf3fccb7bc2654c754f47628e554df0076 100644 --- a/app/models/communication/website/page/research_paper.rb +++ b/app/models/communication/website/page/research_paper.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/research_volume.rb b/app/models/communication/website/page/research_volume.rb index a893a5dfbdddb48aea1506f7e96d8b225f5fd898..dc3e3fb9e07f3ae016bb2e9ffddf64b852754c72 100644 --- a/app/models/communication/website/page/research_volume.rb +++ b/app/models/communication/website/page/research_volume.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/researcher.rb b/app/models/communication/website/page/researcher.rb index 1ca11e14428307a76bb64be019a57030cf67e55e..36748be37ab2c0a0ca2f340d706229340210180e 100644 --- a/app/models/communication/website/page/researcher.rb +++ b/app/models/communication/website/page/researcher.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/sitemap.rb b/app/models/communication/website/page/sitemap.rb index 97f15c8f4a3d18cfe383e5a34918e126f9062835..9842701408de862b58098cf2fe9a4e4542356c88 100644 --- a/app/models/communication/website/page/sitemap.rb +++ b/app/models/communication/website/page/sitemap.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/page/teacher.rb b/app/models/communication/website/page/teacher.rb index 589936078501ca5b0e01bd802f92180bc905b4d6..447a5c87abf9bcb7d1426a2594653f20394266ef 100644 --- a/app/models/communication/website/page/teacher.rb +++ b/app/models/communication/website/page/teacher.rb @@ -6,7 +6,6 @@ # bodyclass :string # breadcrumb_title :string # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # full_width :boolean default(FALSE) @@ -16,6 +15,7 @@ # position :integer default(0), not null # published :boolean default(FALSE) # slug :string +# summary :text # text :text # title :string # type :string diff --git a/app/models/communication/website/post.rb b/app/models/communication/website/post.rb index 17cfd60cce77c2a77394c11b4c5b93054e5d7eb3..5c3644455ad57281511b1bfc00c62ca48f7a6d34 100644 --- a/app/models/communication/website/post.rb +++ b/app/models/communication/website/post.rb @@ -4,7 +4,6 @@ # # id :uuid not null, primary key # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # github_path :text @@ -12,6 +11,7 @@ # published :boolean default(FALSE) # published_at :datetime # slug :text +# summary :text # text :text # title :string # created_at :datetime not null @@ -88,7 +88,7 @@ class Communication::Website::Post < ApplicationRecord scope :for_search_term, -> (term) { where(" unaccent(communication_website_posts.description) ILIKE unaccent(:term) OR - unaccent(communication_website_posts.description_short) 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) ", term: "%#{sanitize_sql_like(term)}%") diff --git a/app/models/communication/website/with_menus.rb b/app/models/communication/website/with_menus.rb index 27109fbc71593f2ae22122a477a48ab2ea6d2371..d25cf040425b6139407765b2f8f99f0b938637a6 100644 --- a/app/models/communication/website/with_menus.rb +++ b/app/models/communication/website/with_menus.rb @@ -12,23 +12,11 @@ module Communication::Website::WithMenus def menu_item_kinds Communication::Website::Menu::Item.kinds.reject do |key, value| - active = send "menu_item_kind_#{key}?" - !active + method_name = "menu_item_kind_#{key}?" + respond_to?(method_name) && !public_send(method_name) end end - def menu_item_kind_blank? - true - end - - def menu_item_kind_url? - true - end - - def menu_item_kind_page? - pages.any? - end - def menu_item_kind_programs? has_education_programs? end @@ -45,37 +33,10 @@ module Communication::Website::WithMenus has_education_diplomas? end - def menu_item_kind_posts? - has_communication_posts? - end - - def menu_item_kind_category? - has_communication_categories? - end - - def menu_item_kind_post? - has_communication_posts? - end - - def menu_item_kind_organizations? - # TODO: has_organization takes a looong time when having a lot of blocks. - # when we have a direct relation between website & organizations re-adjust this test. - # has_organizations? - true - end - - def menu_item_kind_persons? - has_persons? - end - def menu_item_kind_administrators? has_administrators? end - def menu_item_kind_authors? - has_authors? - end - def menu_item_kind_researchers? has_researchers? end diff --git a/app/models/education/diploma.rb b/app/models/education/diploma.rb index 614f4afd87d2970da8891f77d9f65eb777c96f84..f01e1db3bc274743ec9918ff0d368f3c262fcd35 100644 --- a/app/models/education/diploma.rb +++ b/app/models/education/diploma.rb @@ -2,17 +2,17 @@ # # Table name: education_diplomas # -# id :uuid not null, primary key -# description_short :text -# duration :text -# ects :integer -# level :integer default("not_applicable") -# name :string -# short_name :string -# slug :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# duration :text +# ects :integer +# level :integer default("not_applicable") +# name :string +# short_name :string +# slug :string +# summary :text +# created_at :datetime not null +# updated_at :datetime not null +# university_id :uuid not null, indexed # # Indexes # diff --git a/app/models/education/program.rb b/app/models/education/program.rb index 9cfa03597eedbf3c7a38dde7201fb84ff339b4a4..7383b24126521978d362795d338e53411e381cdc 100644 --- a/app/models/education/program.rb +++ b/app/models/education/program.rb @@ -10,7 +10,6 @@ # content :text # continuing :boolean # description :text -# description_short :text # duration :text # evaluation :text # featured_image_alt :string @@ -32,6 +31,7 @@ # results :text # short_name :string # slug :string +# summary :text # created_at :datetime not null # updated_at :datetime not null # diploma_id :uuid indexed diff --git a/app/models/research/journal/paper.rb b/app/models/research/journal/paper.rb index d257f16a5c07b33900bb5145714662409120023d..b573dcd1d1a9ebc2c9fd38b72ad8462416ebf65c 100644 --- a/app/models/research/journal/paper.rb +++ b/app/models/research/journal/paper.rb @@ -11,6 +11,7 @@ # published_at :datetime # references :text # slug :string +# summary :text # text :text # title :string # created_at :datetime not null diff --git a/app/models/university/organization.rb b/app/models/university/organization.rb index d135675b09cfc9ab2d57665b9d7e129b95fff5cb..0d0c3e53b8483dd4510ee126d8174e2a24d25df4 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 -# description_short :text -# email :string -# kind :integer default("company") -# long_name :string -# name :string -# nic :string -# phone :string -# siren :string -# slug :string -# 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 +# 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 # # Indexes # diff --git a/app/models/university/person.rb b/app/models/university/person.rb index 665f932887e7a2550088967bd41fdf2ae0a3338c..21b9d381e5a09f0e6ed5ab434a03213103f03874 100644 --- a/app/models/university/person.rb +++ b/app/models/university/person.rb @@ -9,7 +9,6 @@ # city :string # country :string # description :text -# description_short :text # email :string # first_name :string # gender :integer @@ -26,6 +25,7 @@ # phone_personal :string # phone_professional :string # slug :string +# summary :text # tenure :boolean default(FALSE) # twitter :string # url :string @@ -148,7 +148,7 @@ class University::Person < ApplicationRecord 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.description_short) 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 unaccent(university_people.address) ILIKE unaccent(:term) OR diff --git a/app/models/university/person/administrator.rb b/app/models/university/person/administrator.rb index d90758a2487459dfce9196a368037dfee4243978..a32e336859d370f17cbe1c3989451bde8e5b39a0 100644 --- a/app/models/university/person/administrator.rb +++ b/app/models/university/person/administrator.rb @@ -9,7 +9,6 @@ # city :string # country :string # description :text -# description_short :text # email :string # first_name :string # gender :integer @@ -26,6 +25,7 @@ # phone_personal :string # phone_professional :string # slug :string +# summary :text # tenure :boolean default(FALSE) # twitter :string # url :string diff --git a/app/models/university/person/alumnus.rb b/app/models/university/person/alumnus.rb index 028735cba03b3b8def67741a10ca1670082a2863..9f7cbdf107120cf20472b2c12ceeb134da820c75 100644 --- a/app/models/university/person/alumnus.rb +++ b/app/models/university/person/alumnus.rb @@ -9,7 +9,6 @@ # city :string # country :string # description :text -# description_short :text # email :string # first_name :string # gender :integer @@ -26,6 +25,7 @@ # phone_personal :string # phone_professional :string # slug :string +# summary :text # tenure :boolean default(FALSE) # twitter :string # url :string diff --git a/app/models/university/person/author.rb b/app/models/university/person/author.rb index a41fe14bfffcd7fe9cc90a07ced424a0efe0e0bb..247e50027d0a61bacc49b3cab2db8299e2e6785f 100644 --- a/app/models/university/person/author.rb +++ b/app/models/university/person/author.rb @@ -9,7 +9,6 @@ # city :string # country :string # description :text -# description_short :text # email :string # first_name :string # gender :integer @@ -26,6 +25,7 @@ # phone_personal :string # phone_professional :string # slug :string +# summary :text # tenure :boolean default(FALSE) # twitter :string # url :string diff --git a/app/models/university/person/researcher.rb b/app/models/university/person/researcher.rb index 2a54ba57de38d7633616e26caa27ae85f3554c11..1abe5abdb8adace7a5d87b12056f8d0f5b6b1806 100644 --- a/app/models/university/person/researcher.rb +++ b/app/models/university/person/researcher.rb @@ -9,7 +9,6 @@ # city :string # country :string # description :text -# description_short :text # email :string # first_name :string # gender :integer @@ -26,6 +25,7 @@ # phone_personal :string # phone_professional :string # slug :string +# summary :text # tenure :boolean default(FALSE) # twitter :string # url :string diff --git a/app/models/university/person/teacher.rb b/app/models/university/person/teacher.rb index 7d74764617dd1d8613017b80d454759790dcae49..4f5e67355591e51fb13054e938f8d27370962337 100644 --- a/app/models/university/person/teacher.rb +++ b/app/models/university/person/teacher.rb @@ -9,7 +9,6 @@ # city :string # country :string # description :text -# description_short :text # email :string # first_name :string # gender :integer @@ -26,6 +25,7 @@ # phone_personal :string # phone_professional :string # slug :string +# summary :text # tenure :boolean default(FALSE) # twitter :string # url :string diff --git a/app/views/admin/application/chapo/_form.html.erb b/app/views/admin/application/chapo/_form.html.erb deleted file mode 100644 index d0c17e7fc5ccf2dcd48e298234201634b89c60e0..0000000000000000000000000000000000000000 --- a/app/views/admin/application/chapo/_form.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= f.input :description_short, - input_html: { - value: about.description_short&.gsub('&', '&') - } %> diff --git a/app/views/admin/application/chapo/_show.html.erb b/app/views/admin/application/chapo/_show.html.erb deleted file mode 100644 index 9730ef2d4474ac5a107b21d23f040e9b08d8ee4a..0000000000000000000000000000000000000000 --- a/app/views/admin/application/chapo/_show.html.erb +++ /dev/null @@ -1,12 +0,0 @@ -<% unless about.description_short.blank? %> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h2 class="card-title mb-0 h5"><%= about.class.human_attribute_name('description_short') %></h2> - </div> - <div class="card-body"> - <p class="lead"> - <%= sanitize about.description_short %> - </p> - </div> - </div> -<% end %> diff --git a/app/views/admin/application/chapo/_static.html.erb b/app/views/admin/application/chapo/_static.html.erb deleted file mode 100644 index 588ada7e10e204c796428aebfb447f95290128d9..0000000000000000000000000000000000000000 --- a/app/views/admin/application/chapo/_static.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -description_short: > - <%= prepare_text_for_static @about.description_short %> diff --git a/app/views/admin/application/summary/_form.html.erb b/app/views/admin/application/summary/_form.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..3fdf29c4744dbdab83e3479023ad2614e2966382 --- /dev/null +++ b/app/views/admin/application/summary/_form.html.erb @@ -0,0 +1,5 @@ +<%= f.input :summary, + label: t('admin.summary'), + input_html: { + value: about.summary&.gsub('&', '&') + } %> diff --git a/app/views/admin/application/summary/_show.html.erb b/app/views/admin/application/summary/_show.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..8e2cedf8edfbf12f92f6a9d833c42b6607e29757 --- /dev/null +++ b/app/views/admin/application/summary/_show.html.erb @@ -0,0 +1,12 @@ +<% unless about.summary.blank? %> + <div class="card flex-fill w-100"> + <div class="card-header"> + <h2 class="card-title mb-0 h5"><%= t('admin.summary') %></h2> + </div> + <div class="card-body"> + <p class="lead"> + <%= sanitize about.summary %> + </p> + </div> + </div> +<% end %> diff --git a/app/views/admin/application/summary/_static.html.erb b/app/views/admin/application/summary/_static.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..a90e39b2275cf65eeb5cd7b97848d69f133d5518 --- /dev/null +++ b/app/views/admin/application/summary/_static.html.erb @@ -0,0 +1,5 @@ +summary: > + <%= prepare_text_for_static @about.summary %> +<%# TODO: legacy: remove when theme doesn't use description_short anymore %> +description_short: > + <%= prepare_text_for_static @about.summary %> diff --git a/app/views/admin/communication/blocks/templates/pages/_preview.html.erb b/app/views/admin/communication/blocks/templates/pages/_preview.html.erb index a6d774fc34add2227c03d2502b77f8ece0b3056a..e6f7fbbc386e74e620e3f6d622a8e4e49d71682b 100644 --- a/app/views/admin/communication/blocks/templates/pages/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/pages/_preview.html.erb @@ -12,9 +12,9 @@ class: 'img-fluid mb-3' %> <% end %> <% if @block.template.show_description %> - <p><%= element.description_short %></p> + <p><%= element.summary %></p> <% end %> </div> <% end %> </div> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/admin/communication/blocks/templates/posts/_preview.html.erb b/app/views/admin/communication/blocks/templates/posts/_preview.html.erb index 61501a272d25a67b445702f1343ea7bff7d852fa..f6e2422c3e90fc4f2dc7ce0b8fd4735a47ee83ef 100644 --- a/app/views/admin/communication/blocks/templates/posts/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/posts/_preview.html.erb @@ -5,7 +5,7 @@ <article class="post"> <div> <p class="title"><%= post %></p> - <p><%= post.description_short %></p> + <p><%= post.summary %></p> <time datetime="<%= post.published_at %>"><%= post.published_at.to_date %></time> </div> <% if post.best_featured_image.attached? %> @@ -17,4 +17,4 @@ </div> <% end %> <% end %> -</div> \ No newline at end of file +</div> diff --git a/app/views/admin/communication/websites/categories/_form.html.erb b/app/views/admin/communication/websites/categories/_form.html.erb index ca666d4069c86caa7ba19209dfef336b8cb73d4b..3ac988a84a6c4991de7a74bb8e4f7e1e65364e79 100644 --- a/app/views/admin/communication/websites/categories/_form.html.erb +++ b/app/views/admin/communication/websites/categories/_form.html.erb @@ -10,7 +10,7 @@ </div> <div class="card-body"> <%= f.input :name %> - <%= f.input :text %> + <%= render 'admin/application/summary/form', f: f, about: category %> </div> </div> <div class="card"> diff --git a/app/views/admin/communication/websites/categories/show.html.erb b/app/views/admin/communication/websites/categories/show.html.erb index 851734a6c269fa8048d50a26c96dc5704f2b4ed3..119b03aece26e35530ab559cfc7398939d5b23e1 100644 --- a/app/views/admin/communication/websites/categories/show.html.erb +++ b/app/views/admin/communication/websites/categories/show.html.erb @@ -3,15 +3,7 @@ <%= render 'admin/communication/websites/sidebar' do %> <div class="row"> <div class="col-md-8"> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h2 class="card-title mb-0 h5"><%= t('content') %></h2> - </div> - <div class="card-body"> - <h3 class="h5"><%= Communication::Website::Category.human_attribute_name('text') %></h3> - <%= sanitize @category.text %> - </div> - </div> + <%= render 'admin/application/summary/show', about: @category %> <%= render 'admin/communication/blocks/list', about: @category %> </div> <div class="col-md-4"> diff --git a/app/views/admin/communication/websites/categories/static.html.erb b/app/views/admin/communication/websites/categories/static.html.erb index 21d8a6f55435e9388b73cffa8ec714488c1060b6..00c8b304bcdb73c6e72cd2b7feef3e63331fdac8 100644 --- a/app/views/admin/communication/websites/categories/static.html.erb +++ b/app/views/admin/communication/websites/categories/static.html.erb @@ -15,7 +15,6 @@ position: <%= @about.position %> <%= render 'admin/communication/unsplash/static' %> description: > <%= prepare_text_for_static @about.description %> -description_short: > - <%= prepare_text_for_static @about.text %> +<%= 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 2d23eb6206036552eab6df88d1e71972d5d76b74..be01510a2f49ea94fefa12effe2f8db77dc81f6d 100644 --- a/app/views/admin/communication/websites/pages/_form.html.erb +++ b/app/views/admin/communication/websites/pages/_form.html.erb @@ -15,7 +15,7 @@ url = page.new_record? ? admin_communication_website_pages_path <div class="card-body"> <%= f.input :title %> <%= f.input :breadcrumb_title %> - <%= render 'admin/application/chapo/form', f: f, about: page %> + <%= render 'admin/application/summary/form', f: f, about: page %> <%= f.input :header_text, as: :string %> <%= f.input :text, as: :summernote if page.text&.to_plain_text.present? %> </div> diff --git a/app/views/admin/communication/websites/pages/show.html.erb b/app/views/admin/communication/websites/pages/show.html.erb index f54b86f51bfee3af0be45becdae7773a9c8e3c45..a2410b086042930691b5c177e49c256bc7530625 100644 --- a/app/views/admin/communication/websites/pages/show.html.erb +++ b/app/views/admin/communication/websites/pages/show.html.erb @@ -5,7 +5,7 @@ <div class="row"> <div class="col-md-8"> - <%= render 'admin/application/chapo/show', about: @page %> + <%= render 'admin/application/summary/show', about: @page %> <%= render 'admin/communication/blocks/list', about: @page %> <% if @page.is_special_page? %> diff --git a/app/views/admin/communication/websites/pages/static.html.erb b/app/views/admin/communication/websites/pages/static.html.erb index 3c635081d23bca305079e10262a0c50b5ada8f73..a7178b1ac861f5216821ff05bb17a3cc5655d314 100644 --- a/app/views/admin/communication/websites/pages/static.html.erb +++ b/app/views/admin/communication/websites/pages/static.html.erb @@ -22,7 +22,7 @@ children: <% end %> description: > <%= prepare_text_for_static @about.description %> -<%= render 'admin/application/chapo/static' %> +<%= render 'admin/application/summary/static' %> header_text: >- <%= prepare_html_for_static @about.header_text, @website.university %> legacy_text: > diff --git a/app/views/admin/communication/websites/posts/_form.html.erb b/app/views/admin/communication/websites/posts/_form.html.erb index 3e0e689a6a0efb57939de546122694714d68e854..314dc9d85040f5265ffe60b2e91d00f769796d3c 100644 --- a/app/views/admin/communication/websites/posts/_form.html.erb +++ b/app/views/admin/communication/websites/posts/_form.html.erb @@ -10,7 +10,7 @@ </div> <div class="card-body"> <%= f.input :title %> - <%= render 'admin/application/chapo/form', f: f, about: post %> + <%= render 'admin/application/summary/form', f: f, about: post %> <%= f.input :text, as: :summernote if post.text&.to_plain_text.present? %> </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 37fd3ef303103db72d7f43d1cc4c2c12347c325f..dc23ed4d22e43a36c6b028e98de369c8834b6f2d 100644 --- a/app/views/admin/communication/websites/posts/show.html.erb +++ b/app/views/admin/communication/websites/posts/show.html.erb @@ -3,7 +3,7 @@ <%= render 'admin/communication/websites/sidebar' do %> <div class="row"> <div class="col-md-8"> - <%= render 'admin/application/chapo/show', about: @post %> + <%= render 'admin/application/summary/show', about: @post %> <%= render 'admin/communication/blocks/list', about: @post %> </div> <div class="col-md-4"> diff --git a/app/views/admin/communication/websites/posts/static.html.erb b/app/views/admin/communication/websites/posts/static.html.erb index 85218433f72c6fb817c0ffd13a63c59c9f74e8f4..a2471e461a9fbaa840df6f1907dccecf728c4cbb 100644 --- a/app/views/admin/communication/websites/posts/static.html.erb +++ b/app/views/admin/communication/websites/posts/static.html.erb @@ -19,7 +19,7 @@ categories: <%= render 'admin/communication/unsplash/static' %> description: > <%= prepare_text_for_static @about.description %> -<%= render 'admin/application/chapo/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/education/diplomas/_form.html.erb b/app/views/admin/education/diplomas/_form.html.erb index 92a2231019d026ef707ed4b710f1725a1531f303..1e542c819cf933bcd281e47a8e1402d6dea8e16b 100644 --- a/app/views/admin/education/diplomas/_form.html.erb +++ b/app/views/admin/education/diplomas/_form.html.erb @@ -23,7 +23,7 @@ <%= f.input :duration, as: :string %> </div> </div> - <%= render 'admin/application/chapo/form', f: f, about: diploma %> + <%= render 'admin/application/summary/form', f: f, about: diploma %> </div> </div> </div> diff --git a/app/views/admin/education/diplomas/show.html.erb b/app/views/admin/education/diplomas/show.html.erb index 94a064589e9e719ea9b8d69cda06fc55289184d0..87594dffb92555b2d6e4a6dfed12f20eef9cabfc 100644 --- a/app/views/admin/education/diplomas/show.html.erb +++ b/app/views/admin/education/diplomas/show.html.erb @@ -2,7 +2,7 @@ <div class="row"> <div class="col-lg-8"> - <%= render 'admin/application/chapo/show', about: @diploma %> + <%= render 'admin/application/summary/show', about: @diploma %> <%= render 'admin/communication/blocks/list', about: @diploma %> <div class="card flex-fill w-100"> <div class="card-header"> @@ -13,7 +13,7 @@ <%= render 'admin/education/programs/list', programs: @programs, hide_diploma: true %> - + </div> </div> <div class="col-lg-4"> diff --git a/app/views/admin/education/diplomas/static.html.erb b/app/views/admin/education/diplomas/static.html.erb index ee3fad817e0b7ce1bb05ad0d671b753f895da64e..a8bc3a230cb7088a33aeefb42c5bf39399454653 100644 --- a/app/views/admin/education/diplomas/static.html.erb +++ b/app/views/admin/education/diplomas/static.html.erb @@ -5,7 +5,7 @@ title: > <%= render 'admin/application/static/design', full_width: true, toc_offcanvas: true %> short_name: > <%= prepare_text_for_static @about.short_name %> -<%= render 'admin/application/chapo/static' %> +<%= render 'admin/application/summary/static' %> level: <%= @about.level_i18n %> ects: <%= @about.ects %> duration: > diff --git a/app/views/admin/education/programs/_form.html.erb b/app/views/admin/education/programs/_form.html.erb index 09b2944641cf2356dd62d3934cdb80b6091704bf..91e6c80644627ad1c4e66e01120b1b4964910cc9 100644 --- a/app/views/admin/education/programs/_form.html.erb +++ b/app/views/admin/education/programs/_form.html.erb @@ -13,7 +13,7 @@ <%= f.input :short_name %> </div> </div> - <%= render 'admin/application/chapo/form', f: f, about: program %> + <%= render 'admin/application/summary/form', f: f, about: program %> <div class="row"> <div class="col-lg-6"> <%= f.association :diploma, diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb index bb849cad05966193b59a22fbdc7af6bc704023bb..2176d739c6c7d57e591b0545948af30fc778d65b 100644 --- a/app/views/admin/education/programs/show.html.erb +++ b/app/views/admin/education/programs/show.html.erb @@ -2,6 +2,7 @@ <div class="row"> <div class="col-lg-8 col-xxl-9"> + <%= render 'admin/application/summary/show', about: @program %> <%= render 'admin/education/programs/forms/part', part: :essential, collapsed: false do %> @@ -15,12 +16,6 @@ <%= Education::Program.human_attribute_name('diploma') %> </h3> <p><%= link_to @program.diploma, [:admin, @program.diploma] if @program.diploma %></p> - <h3 class="h5 mt-4"> - <%= Education::Program.human_attribute_name('description_short') %> - </h3> - <p class="lead"> - <%= sanitize @program.description_short %> - </p> <% if @program.schools.any? %> <h3 class="h5 mt-4"> <%= Education::Program.human_attribute_name('schools') %> @@ -58,7 +53,7 @@ <%= Education::Program.human_attribute_name('downloadable_summary') %> </h3> <p><%= link_to "#{@program.downloadable_summary.filename} (#{ number_to_human_size @program.downloadable_summary.blob.byte_size })", - url_for(@program.downloadable_summary), + url_for(@program.downloadable_summary), target: :_blank %></p> <% end %> </div> diff --git a/app/views/admin/education/programs/static.html.erb b/app/views/admin/education/programs/static.html.erb index 6ec092b2840973beeeb9ff47acde5cc88212b15e..60d10268f48791f48b51d2d1c66f01f0d95320fe 100644 --- a/app/views/admin/education/programs/static.html.erb +++ b/app/views/admin/education/programs/static.html.erb @@ -18,7 +18,7 @@ registration_url: > <%= @about.registration_url %> description: > <%= prepare_text_for_static @about.description %> -<%= render 'admin/application/chapo/static' %> +<%= render 'admin/application/summary/static' %> presentation: > <%= prepare_text_for_static @about.presentation %> position: <%= @about.position %> diff --git a/app/views/admin/research/journals/papers/_form.html.erb b/app/views/admin/research/journals/papers/_form.html.erb index f3e6cc44ad3e47fb182c367a28509fe077df8c4b..dea53a6c43c7b5fde7fc42b596e0f886eed89dd7 100644 --- a/app/views/admin/research/journals/papers/_form.html.erb +++ b/app/views/admin/research/journals/papers/_form.html.erb @@ -10,6 +10,7 @@ </div> <div class="card-body"> <%= f.input :title, as: :text, input_html: { rows: 3 } %> + <%= render 'admin/application/summary/form', f: f, about: paper %> <%= f.input :abstract, as: :text, input_html: { rows: 8 } %> <%= f.input :pdf %> <%= f.input :text, as: :summernote %> diff --git a/app/views/admin/research/journals/papers/show.html.erb b/app/views/admin/research/journals/papers/show.html.erb index 8abc2ab2fde974c9ac2f18972df9908b9441b5ce..29fd353324e1e38e14c2d6dcc8f20934bf9a1c85 100644 --- a/app/views/admin/research/journals/papers/show.html.erb +++ b/app/views/admin/research/journals/papers/show.html.erb @@ -19,6 +19,7 @@ <p><%= @paper.references %></p> </div> </div> + <%= render 'admin/application/summary/show', about: @paper %> </div> <div class="col-md-4"> <div class="card flex-fill w-100"> diff --git a/app/views/admin/research/journals/papers/static.html.erb b/app/views/admin/research/journals/papers/static.html.erb index e59d272ad84b0becdb4485a7981ac40d70fbc5b3..8b0c77f29b587bd6710d258797046682415b5215 100644 --- a/app/views/admin/research/journals/papers/static.html.erb +++ b/app/views/admin/research/journals/papers/static.html.erb @@ -18,7 +18,7 @@ researchers: <% @about.people.each do |person| %> - "<%= person.slug %>" <% end %> -description_short: "<%= @about.abstract %>" +<%= render 'admin/application/summary/static' %> abstract: "<%= @about.abstract %>" references: "<%= @about.references %>" --- diff --git a/app/views/admin/university/organizations/_form.html.erb b/app/views/admin/university/organizations/_form.html.erb index 8ed0a659f2b896e86b598f70f86a7878b351e4a1..6cbb7ab9c838e840abbb01f6ed790fd39042960b 100644 --- a/app/views/admin/university/organizations/_form.html.erb +++ b/app/views/admin/university/organizations/_form.html.erb @@ -10,7 +10,7 @@ </div> <div class="card-body"> <%= f.input :name %> - <%= f.input :description_short %> + <%= render 'admin/application/summary/form', f: f, about: organization %> <%= f.input :text, as: :summernote, input_html: { diff --git a/app/views/admin/university/organizations/show.html.erb b/app/views/admin/university/organizations/show.html.erb index d86da0cbad2468e1cbbcf7766b3e4962f5a39ae2..5c33a452ecb527bd59645c7f00d5a42a5d2eeda4 100644 --- a/app/views/admin/university/organizations/show.html.erb +++ b/app/views/admin/university/organizations/show.html.erb @@ -1,7 +1,7 @@ <% content_for :title, @organization %> <div class="row"> <div class="col-md-8"> - <%= render 'admin/application/chapo/show', about: @organization %> + <%= render 'admin/application/summary/show', about: @organization %> <% if strip_tags(@organization.text.to_html).present? %> <div class="card"> <div class="card-header"> diff --git a/app/views/admin/university/organizations/static.html.erb b/app/views/admin/university/organizations/static.html.erb index 2a42d094104a948956795922460cd5fbccd8a561..545b9d65f24afe190482c563b538684f1f393d80 100644 --- a/app/views/admin/university/organizations/static.html.erb +++ b/app/views/admin/university/organizations/static.html.erb @@ -2,7 +2,7 @@ title: > <%= @about.to_s %> <%= render 'admin/application/static/permalink' %> -<%= render 'admin/application/chapo/static' %> +<%= render 'admin/application/summary/static' %> <%= render 'admin/application/static/design', full_width: true, toc_offcanvas: true %> long_name: > <%= @about.long_name %> diff --git a/app/views/admin/university/people/_form.html.erb b/app/views/admin/university/people/_form.html.erb index e2db4f3ec89079232afc56a774fe398a299251e4..49717c74e14dfff2a04a8fab4aa267c67230ce80 100644 --- a/app/views/admin/university/people/_form.html.erb +++ b/app/views/admin/university/people/_form.html.erb @@ -27,7 +27,7 @@ <%= f.input :birthdate, discard_year: true, include_blank: true %> </div> </div> - <%= f.input :description_short %> + <%= render 'admin/application/summary/form', f: f, about: person %> <%= f.input :biography, as: :summernote, input_html: { diff --git a/app/views/admin/university/people/_main_infos.html.erb b/app/views/admin/university/people/_main_infos.html.erb index 50528559592ca92c0c0303d39c1fbc4a7d34ad87..a17490eb076d2fc0cfdccef259eaeb7ef348c35a 100644 --- a/app/views/admin/university/people/_main_infos.html.erb +++ b/app/views/admin/university/people/_main_infos.html.erb @@ -1,6 +1,6 @@ <div class="row"> <div class="col-md-8 col-xl-9"> - <%= render 'admin/application/chapo/show', about: person %> + <%= render 'admin/application/summary/show', about: person %> <div class="card flex-fill w-100"> <div class="card-header"> @@ -32,10 +32,6 @@ <p><%= value %></p> <% end %> - <% unless person.description_short.blank? %> - <h3 class="h5"><%= University::Person.human_attribute_name('description_short') %></h3> - <%= simple_format person.description_short %> - <% end %> <% unless person.biography.blank? %> <h3 class="h5"><%= University::Person.human_attribute_name('biography') %></h3> <%= person.biography %> diff --git a/app/views/admin/university/people/static.html.erb b/app/views/admin/university/people/static.html.erb index c6b15cb1357300e884dc613a65364dbd414f7a2f..a029e8015f562f4dfb6afa9525e4967c377a3988 100644 --- a/app/views/admin/university/people/static.html.erb +++ b/app/views/admin/university/people/static.html.erb @@ -2,7 +2,7 @@ title: > <%= @about.to_s %> <%= render 'admin/application/static/permalink' %> -<%= render 'admin/application/chapo/static' %> +<%= render 'admin/application/summary/static' %> <%= render 'admin/application/static/design', full_width: true, toc_offcanvas: true %> first_name: > <%= @about.first_name %> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 4922963ac56fc45fc3c156bcc6b0a58e3c3ef821..df55fba0d43874027d6ba4440f21b8eedbe91974 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -85,7 +85,6 @@ en: communication/website/category: children: Children categories description: Meta Description - text: Lead text featured_image: Featured image featured_image_alt: Alt text name: Name @@ -114,7 +113,6 @@ en: breadcrumb_title: Title in breadcrumbs children: Children pages description: Meta description - description_short: Lead text featured_image: Featured image featured_image_alt: Alt text full_width: Full width @@ -132,7 +130,6 @@ en: category: Category categories: Categories description: Meta description - description_short: Lead text featured_image: Featured image featured_image_alt: Alt text featured_image_credit: Credit diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 5d056fb340739616c5b431ad689999b31bb27c1e..c582619902b9b7a8e3a8f44dd14a1f85889c141c 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -85,7 +85,6 @@ fr: communication/website/category: children: Catégories enfants description: Meta Description - text: Chapô featured_image: Image à la une featured_image_alt: Texte alternatif name: Nom @@ -114,7 +113,6 @@ fr: breadcrumb_title: Nom affiché dans le fil d'ariane children: Pages enfants description: Description pour le référencement naturel - description_short: Chapô featured_image: Image à la une featured_image_alt: Texte alternatif full_width: Pleine largeur @@ -132,7 +130,6 @@ fr: category: Catégorie categories: Catégories description: Description pour le référencement naturel - description_short: Chapô featured_image: Image à la une featured_image_alt: Texte alternatif featured_image_credit: Crédit @@ -593,7 +590,7 @@ fr: slug: formations title: "Formations" home: - slug: + slug: title: Accueil legal_term: slug: mentions-legales diff --git a/config/locales/education/en.yml b/config/locales/education/en.yml index d758b6f565355807b6c456f5b71cc95b82bfbb2c..9fb1724fd4b6f4f35e4cd589c96cb70ae3d20375 100644 --- a/config/locales/education/en.yml +++ b/config/locales/education/en.yml @@ -28,13 +28,12 @@ en: school: School year: Year education/diploma: - name: Name - short_name: Short name - level: Level - programs: Programs duration: Duration ects: ECTS - description_short: Lead text + level: Level + name: Name + programs: Programs + short_name: Short name education/program: accessibility: Accessibilité apprenticeship: Apprenticeship @@ -42,7 +41,6 @@ en: contacts: Contacts continuing: Continuing training description: Meta Description - description_short: Lead text diploma: Diploma duration: Duration downloadable_summary: Downloadable summary diff --git a/config/locales/education/fr.yml b/config/locales/education/fr.yml index 5271cc3aeb1d6a6b939e593d8f05942377140fbd..066098e5563ef3ca394a576cdd6985b527c48fb7 100644 --- a/config/locales/education/fr.yml +++ b/config/locales/education/fr.yml @@ -28,13 +28,12 @@ fr: school: École year: Année education/diploma: - name: Nom - short_name: Nom abrégé - level: Niveau - programs: Formations duration: Durée ects: Crédits ECTS - description_short: Chapô + level: Niveau + name: Nom + programs: Formations + short_name: Nom abrégé education/program: accessibility: Accessibilité apprenticeship: Apprentissage @@ -42,7 +41,6 @@ fr: contacts: Contacts continuing: Formation continue description: Meta Description - description_short: Chapô diploma: Diplôme duration: Durée downloadable_summary: Document de synthèse téléchargeable diff --git a/config/locales/en.yml b/config/locales/en.yml index 95c347b9d4d3b4a493dc83d4ec1b7b9694ff867f..496ba1cc3fc1002bda8b6fe9f2f13acbaf44e13b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -106,6 +106,7 @@ en: successfully_quit_html: "<i>%{model}</i> successfully quit <i>%{target}</i>." successfully_removed_html: "<i>%{model}</i> was successfully removed." successfully_updated_html: "<i>%{model}</i> was successfully updated." + summary: Summary users_alerts: already_confirmed: "Your account has already been confirmed." not_locked_html: '<i>%{model}</i> was not locked.' diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 9ffb1b8cbdc713758bdc7b8bc32a5845a46fc531..046e74c7490b04735d9ea23ed7639f9379f38e16 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -106,6 +106,7 @@ fr: successfully_quit_html: "<i>%{model}</i> a bien quitté <i>%{target}</i>." successfully_removed_html: "<i>%{model}</i> a bien été retiré(e)." successfully_updated_html: "<i>%{model}</i> a bien été mis(e) à jour." + summary: Résumé users_alerts: already_confirmed: "Votre compte est déjà confirmé." not_locked_html: "<i>%{model}</i> n'était pas verrouillé(e)." diff --git a/config/locales/university/en.yml b/config/locales/university/en.yml index 52fd1f628ded4205cd82c740106f9cecac60b69f..17babc0fd7b4dc4698309425935d4203cf4b17a3 100644 --- a/config/locales/university/en.yml +++ b/config/locales/university/en.yml @@ -35,7 +35,6 @@ en: contacts: Contact information country: Country description: Meta description - description_short: Lead text education_programs: Programs email: Email essentials: Essentials @@ -81,24 +80,23 @@ en: person: Person target_id: '' university/organization: - name: Name - long_name: Long name - description: Meta description - description_short: Lead text - text: Text - contact: Contact information - legal: Legal information address: Address - zipcode: Zipcode city: City + contact: Contact information country: Country - url: Website - phone: Telephone + description: Meta description email: Email + kind: Kind + legal: Legal information logo: Logo for light backgrounds (default) logo_on_dark_background: Logo for dark backgrounds (optional) - kind: Kind + long_name: Long name + name: Name + phone: Telephone siren: Legal identification number + text: Text + url: Website + zipcode: Zipcode university/role: description: Description people: People diff --git a/config/locales/university/fr.yml b/config/locales/university/fr.yml index f97f306a5f22dbcec6dad7d3de8838fe377bbe19..8ab4f5e4d8f6687582da574ac31d69b81b127b13 100644 --- a/config/locales/university/fr.yml +++ b/config/locales/university/fr.yml @@ -35,7 +35,6 @@ fr: contacts: Coordonnées country: Pays description: Meta description - description_short: Chapô education_programs: Formations email: Email essentials: Informations essentielles @@ -81,24 +80,23 @@ fr: person: Personne target_id: '' university/organization: - name: Nom - long_name: Nom complet - description: Meta description - description_short: Chapô - text: Texte - contact: Informations de contact - legal: Informations légales address: Adresse - zipcode: Code postal city: Ville + contact: Informations de contact country: Pays - url: Site Web - phone: Téléphone + description: Meta description email: Email + kind: Type + legal: Informations légales logo: Logo sur fond clair (par défaut) logo_on_dark_background: Logo sur fond sombre (optionnel) - kind: Type + long_name: Nom complet + name: Nom + phone: Téléphone siren: Numéro de SIREN + text: Texte + url: Site Web + zipcode: Code postal university/role: description: Description people: Personnes diff --git a/db/migrate/20230106130950_set_about_from_menu_item_kind.rb b/db/migrate/20230106130950_set_about_from_menu_item_kind.rb new file mode 100644 index 0000000000000000000000000000000000000000..61a69f1f719e69e5a01eea80c5be215b6215544a --- /dev/null +++ b/db/migrate/20230106130950_set_about_from_menu_item_kind.rb @@ -0,0 +1,24 @@ +class SetAboutFromMenuItemKind < ActiveRecord::Migration[7.0] + def change + mapping = { + '30' => Communication::Website::Page::EducationProgram, + '32' => Communication::Website::Page::EducationDiploma, + '40' => Communication::Website::Page::CommunicationPost, + '45' => Communication::Website::Page::Organization, + '50' => Communication::Website::Page::Person, + '51' => Communication::Website::Page::Administrator, + '52' => Communication::Website::Page::Author, + '53' => Communication::Website::Page::Researcher, + '54' => Communication::Website::Page::Teacher, + '60' => Communication::Website::Page::ResearchVolume, + '62' => Communication::Website::Page::ResearchPaper + } + + kinds = mapping.keys.map(&:to_i) + Communication::Website::Menu::Item.includes(:website).where(kind: kinds).find_each do |menu_item| + page_class = mapping[menu_item.kind_before_type_cast.to_s] + about = menu_item.website.special_page(page_class) + menu_item.update(about: about, kind: :page) + end + end +end diff --git a/db/migrate/20230106132654_migrate_to_rails7_sha256_signature.rb b/db/migrate/20230106132654_migrate_to_rails7_sha256_signature.rb index be9ae9c9b6d70956b09b540cfead5c080f099f08..7723cc42f17451548e3c79737e4c7b38445cfd91 100644 --- a/db/migrate/20230106132654_migrate_to_rails7_sha256_signature.rb +++ b/db/migrate/20230106132654_migrate_to_rails7_sha256_signature.rb @@ -35,7 +35,7 @@ class MigrateToRails7Sha256Signature < ActiveRecord::Migration[7.0] begin # Try to find blob with ID from SHA1-signed_id key_generator = ActiveSupport::KeyGenerator.new( - Rails.application.secrets.secret_key_base, + Rails.application.secret_key_base, iterations: 1000, hash_digest_class: OpenSSL::Digest::SHA1 ) diff --git a/db/migrate/20230109110701_rename_description_short_to_summary.rb b/db/migrate/20230109110701_rename_description_short_to_summary.rb new file mode 100644 index 0000000000000000000000000000000000000000..604646f1a6f6252e94f0412f4b50450ca03c7f1d --- /dev/null +++ b/db/migrate/20230109110701_rename_description_short_to_summary.rb @@ -0,0 +1,10 @@ +class RenameDescriptionShortToSummary < ActiveRecord::Migration[7.0] + def change + rename_column :communication_website_pages, :description_short, :summary + rename_column :communication_website_posts, :description_short, :summary + rename_column :education_diplomas, :description_short, :summary + rename_column :education_programs, :description_short, :summary + rename_column :university_organizations, :description_short, :summary + rename_column :university_people, :description_short, :summary + end +end diff --git a/db/migrate/20230109132016_rename_categories_text_to_summary.rb b/db/migrate/20230109132016_rename_categories_text_to_summary.rb new file mode 100644 index 0000000000000000000000000000000000000000..acbd8d5a85b738c7830931d4b956b6d3d462ef49 --- /dev/null +++ b/db/migrate/20230109132016_rename_categories_text_to_summary.rb @@ -0,0 +1,5 @@ +class RenameCategoriesTextToSummary < ActiveRecord::Migration[7.0] + def change + rename_column :communication_website_categories, :text, :summary + end +end diff --git a/db/migrate/20230109140347_add_summary_to_research_papers.rb b/db/migrate/20230109140347_add_summary_to_research_papers.rb new file mode 100644 index 0000000000000000000000000000000000000000..19141adc0989a9135c7954a80b35e352672a84ce --- /dev/null +++ b/db/migrate/20230109140347_add_summary_to_research_papers.rb @@ -0,0 +1,5 @@ +class AddSummaryToResearchPapers < ActiveRecord::Migration[7.0] + def change + add_column :research_journal_papers, :summary, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 0afdf7c295968f61853ebb0f5141d292a431fee6..0199ee059c86832142a43bd84725d1a28662ab99 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_06_132654) do +ActiveRecord::Schema[7.0].define(version: 2023_01_09_140347) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -132,7 +132,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_132654) do t.boolean "is_programs_root", default: false t.string "path" t.string "featured_image_alt" - t.text "text" + t.text "summary" t.text "featured_image_credit" t.index ["communication_website_id"], name: "idx_communication_website_post_cats_on_communication_website_id" t.index ["parent_id"], name: "index_communication_website_categories_on_parent_id" @@ -314,7 +314,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_132654) do t.text "github_path" t.string "featured_image_alt" t.text "text" - t.text "description_short" + t.text "summary" t.string "breadcrumb_title" t.text "header_text" t.integer "kind" @@ -358,7 +358,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_132654) do t.boolean "pinned", default: false t.string "featured_image_alt" t.text "text" - t.text "description_short" + t.text "summary" t.uuid "language_id" t.text "featured_image_credit" t.index ["author_id"], name: "index_communication_website_posts_on_author_id" @@ -465,7 +465,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_132654) do t.datetime "updated_at", null: false t.integer "ects" t.text "duration" - t.text "description_short" + t.text "summary" t.index ["university_id"], name: "index_education_diplomas_on_university_id" end @@ -503,7 +503,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_132654) do t.boolean "initial" t.boolean "apprenticeship" t.string "registration_url" - t.text "description_short" + t.text "summary" t.index ["diploma_id"], name: "index_education_programs_on_diploma_id" t.index ["parent_id"], name: "index_education_programs_on_parent_id" t.index ["university_id"], name: "index_education_programs_on_university_id" @@ -581,6 +581,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_132654) do t.integer "position" t.text "text" t.text "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" t.index ["university_id"], name: "index_research_journal_papers_on_university_id" @@ -714,7 +715,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_132654) do t.string "slug" t.text "text" t.string "nic" - t.text "description_short" + t.text "summary" t.index ["university_id"], name: "index_university_organizations_on_university_id" end @@ -739,7 +740,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_06_132654) do t.string "twitter" t.string "linkedin" t.boolean "is_alumnus", default: false - t.text "description_short" + t.text "summary" t.boolean "is_author" t.string "name" t.integer "gender" diff --git a/test/fixtures/communication/website/posts.yml b/test/fixtures/communication/website/posts.yml index 40e32e5fd9a3db3577dfb2e3ee6d9975362568bb..b22a2192021f05de1ec6d53b02be488180473feb 100644 --- a/test/fixtures/communication/website/posts.yml +++ b/test/fixtures/communication/website/posts.yml @@ -4,7 +4,6 @@ # # id :uuid not null, primary key # description :text -# description_short :text # featured_image_alt :string # featured_image_credit :text # github_path :text @@ -12,6 +11,7 @@ # published :boolean default(FALSE) # published_at :datetime # slug :text +# summary :text # text :text # title :string # created_at :datetime not null diff --git a/test/fixtures/education/diplomas.yml b/test/fixtures/education/diplomas.yml index 7116f21534a281ab68866531c530e3811ad0801f..03ebcb6c3c2b335da001641ef79b055312b49ed7 100644 --- a/test/fixtures/education/diplomas.yml +++ b/test/fixtures/education/diplomas.yml @@ -2,17 +2,17 @@ # # Table name: education_diplomas # -# id :uuid not null, primary key -# description_short :text -# duration :text -# ects :integer -# level :integer default("not_applicable") -# name :string -# short_name :string -# slug :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# duration :text +# ects :integer +# level :integer default("not_applicable") +# name :string +# short_name :string +# slug :string +# summary :text +# created_at :datetime not null +# updated_at :datetime not null +# university_id :uuid not null, indexed # # Indexes # diff --git a/test/fixtures/university/organizations.yml b/test/fixtures/university/organizations.yml index 6643990449ea289284e78cdfd7d0fc3bc2434af7..351f7219f613570971209f9d80aed7e96710dd82 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 -# description_short :text -# email :string -# kind :integer default("company") -# long_name :string -# name :string -# nic :string -# phone :string -# siren :string -# slug :string -# 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 +# 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 # # Indexes # diff --git a/test/models/education/diploma_test.rb b/test/models/education/diploma_test.rb index 3e7e16a4df5ccd72166de69214d284207ee5e35c..31cecbf3bd9f43eb1ffb811f0114498aa1abdfa7 100644 --- a/test/models/education/diploma_test.rb +++ b/test/models/education/diploma_test.rb @@ -2,17 +2,17 @@ # # Table name: education_diplomas # -# id :uuid not null, primary key -# description_short :text -# duration :text -# ects :integer -# level :integer default("not_applicable") -# name :string -# short_name :string -# slug :string -# created_at :datetime not null -# updated_at :datetime not null -# university_id :uuid not null, indexed +# id :uuid not null, primary key +# duration :text +# ects :integer +# level :integer default("not_applicable") +# name :string +# short_name :string +# slug :string +# summary :text +# 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 bb3781c188907a250c42061a4923957c56fc6ab2..04e6d40e7f7a94a0e1dd793eabdea183f4503d44 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 -# description_short :text -# email :string -# kind :integer default("company") -# long_name :string -# name :string -# nic :string -# phone :string -# siren :string -# slug :string -# 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 +# 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 # # Indexes #