From 7da02e2be806fb6daeacc4b110e6b116275f93dd Mon Sep 17 00:00:00 2001 From: Arnaud Levy <arnaud.levy@noesya.coop> Date: Fri, 18 Oct 2024 09:38:49 +0200 Subject: [PATCH] Simplification de la page formation (#2343) * wip * wip * clean * mix pedagogy and results * text --- .../education/programs/parts_controller.rb | 28 +--------- .../admin/education/programs/_form.html.erb | 26 +++++++-- .../programs/parts/admission.html.erb | 22 ++++---- ...ssion.html.erb => admission_edit.html.erb} | 20 +++---- .../programs/parts/certification.html.erb | 2 + ...n.html.erb => certification_edit.html.erb} | 0 .../programs/parts/edit_pedagogy.html.erb | 56 ------------------- .../programs/parts/edit_presentation.html.erb | 32 ----------- .../programs/parts/edit_results.html.erb | 22 -------- .../programs/parts/pedagogy.html.erb | 18 ++++-- .../programs/parts/pedagogy_edit.html.erb | 56 +++++++++++++++++++ .../programs/parts/presentation.html.erb | 40 ------------- .../education/programs/parts/results.html.erb | 17 ------ .../admin/education/programs/show.html.erb | 23 ++++++++ config/locales/education/en.yml | 20 ++----- config/locales/education/fr.yml | 20 ++----- .../admin/education/program_navigation.rb | 6 -- config/routes/admin/education.rb | 18 +++--- 18 files changed, 157 insertions(+), 269 deletions(-) rename app/views/admin/education/programs/parts/{edit_admission.html.erb => admission_edit.html.erb} (79%) rename app/views/admin/education/programs/parts/{edit_certification.html.erb => certification_edit.html.erb} (100%) delete mode 100644 app/views/admin/education/programs/parts/edit_pedagogy.html.erb delete mode 100644 app/views/admin/education/programs/parts/edit_presentation.html.erb delete mode 100644 app/views/admin/education/programs/parts/edit_results.html.erb create mode 100644 app/views/admin/education/programs/parts/pedagogy_edit.html.erb delete mode 100644 app/views/admin/education/programs/parts/presentation.html.erb delete mode 100644 app/views/admin/education/programs/parts/results.html.erb diff --git a/app/controllers/admin/education/programs/parts_controller.rb b/app/controllers/admin/education/programs/parts_controller.rb index 5cdfc81d5..f61245b18 100644 --- a/app/controllers/admin/education/programs/parts_controller.rb +++ b/app/controllers/admin/education/programs/parts_controller.rb @@ -6,17 +6,6 @@ class Admin::Education::Programs::PartsController < Admin::Education::Programs:: :load_localization, :redirect_if_not_localized - def presentation - breadcrumb - add_breadcrumb t('education.program.parts.presentation.label') - end - - def edit_presentation - breadcrumb - add_breadcrumb t('education.program.parts.presentation.label'), presentation_admin_education_program_path(id: @program, program_id: nil) - add_breadcrumb t('edit') - end - def pedagogy @teacher_involvements = @program.university_person_involvements .includes(:person) @@ -25,7 +14,7 @@ class Admin::Education::Programs::PartsController < Admin::Education::Programs:: add_breadcrumb t('education.program.parts.pedagogy.label') end - def edit_pedagogy + def pedagogy_edit @teacher_people = current_university.people .teachers .accessible_by(current_ability) @@ -35,24 +24,13 @@ class Admin::Education::Programs::PartsController < Admin::Education::Programs:: add_breadcrumb t('edit') end - def results - breadcrumb - add_breadcrumb t('education.program.parts.results.label') - end - - def edit_results - breadcrumb - add_breadcrumb t('education.program.parts.results.label'), results_admin_education_program_path(id: @program, program_id: nil) - add_breadcrumb t('edit') - end - def admission @roles = @program.university_roles.ordered breadcrumb add_breadcrumb t('education.program.parts.admission.label') end - def edit_admission + def admission_edit breadcrumb add_breadcrumb t('education.program.parts.admission.label'), admission_admin_education_program_path(id: @program, program_id: nil) add_breadcrumb t('edit') @@ -63,7 +41,7 @@ class Admin::Education::Programs::PartsController < Admin::Education::Programs:: add_breadcrumb t('education.program.parts.certification.label') end - def edit_certification + def certification_edit breadcrumb add_breadcrumb t('education.program.parts.certification.label'), certification_admin_education_program_path(id: @program, program_id: nil) add_breadcrumb t('edit') diff --git a/app/views/admin/education/programs/_form.html.erb b/app/views/admin/education/programs/_form.html.erb index 1a22ab271..e4474750b 100644 --- a/app/views/admin/education/programs/_form.html.erb +++ b/app/views/admin/education/programs/_form.html.erb @@ -16,14 +16,14 @@ </div> <%= render 'admin/application/summary/form', f: lf, about: l10n %> <div class="row"> - <div class="col-lg-6"> + <div class="col-lg-4"> <%= f.association :diploma, collection: osuny_collection(current_university.diplomas, localized: true) %> <%= f.association :schools, as: :check_boxes, collection: osuny_collection(current_university.education_schools, localized: true) %> </div> - <div class="col-lg-6"> + <div class="col-lg-8"> <%= lf.input :url %> <%= lf.input :duration %> <%= lf.input :downloadable_summary, @@ -33,13 +33,31 @@ </div> <%= osuny_separator %> <div class="row"> - <div class="col-lg-6"> + <div class="col-lg-4"> <%= render 'admin/application/shared_image/edit', f: lf, about: l10n %> </div> - <div class="col-lg-6"> + <div class="col-lg-8"> <%= render 'admin/application/meta_description/form', f: lf, about: l10n %> </div> </div> + <%= osuny_separator %> + <div class="row"> + <div class="col-lg-4"> + <%= osuny_label t('education.program.registration_scheme') %> + <div class="mb-n3"><%= f.input :initial %></div> + <div class="mb-n3"><%= f.input :continuing %></div> + <div><%= f.input :apprenticeship %></div> + <%= f.input :capacity %> + </div> + <div class="col-lg-8"> + <%= lf.input :presentation, + as: :summernote, + input_html: { + data: { 'summernote-config' => 'mini' } + } %> + <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :objectives %> + </div> + </div> </div> <div class="col-lg-4 col-xxl-3"> <%= render 'admin/education/programs/forms/part', part: :technical do %> diff --git a/app/views/admin/education/programs/parts/admission.html.erb b/app/views/admin/education/programs/parts/admission.html.erb index 801787b16..17a7f71bc 100644 --- a/app/views/admin/education/programs/parts/admission.html.erb +++ b/app/views/admin/education/programs/parts/admission.html.erb @@ -1,34 +1,36 @@ <% content_for :title, @l10n %> +<p class="lead mb-5"><%= t('education.program.parts.admission.hint') %> + <div class="row"> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :prerequisites %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :registration %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :other %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :pricing %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :pricing_initial %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :pricing_continuing %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :pricing_apprenticeship %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :accessibility %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :contacts %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <% if @l10n.registration_url.present? %> <%= osuny_label Education::Program.human_attribute_name(:registration_url) %> <p><%= link_to @l10n.registration_url, @l10n.registration_url, target: :_blank %></p> diff --git a/app/views/admin/education/programs/parts/edit_admission.html.erb b/app/views/admin/education/programs/parts/admission_edit.html.erb similarity index 79% rename from app/views/admin/education/programs/parts/edit_admission.html.erb rename to app/views/admin/education/programs/parts/admission_edit.html.erb index 320ec55eb..bb42be366 100644 --- a/app/views/admin/education/programs/parts/edit_admission.html.erb +++ b/app/views/admin/education/programs/parts/admission_edit.html.erb @@ -7,34 +7,34 @@ <%= f.hidden_field :part, value: 'admission' %> <div class="row"> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :prerequisites %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :registration %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :other %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :pricing %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :pricing_initial %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :pricing_continuing %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :pricing_apprenticeship %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :accessibility %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :contacts %> </div> - <div class="col-lg-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= lf.input :registration_url %> </div> </div> diff --git a/app/views/admin/education/programs/parts/certification.html.erb b/app/views/admin/education/programs/parts/certification.html.erb index d3dc24978..7738d2814 100644 --- a/app/views/admin/education/programs/parts/certification.html.erb +++ b/app/views/admin/education/programs/parts/certification.html.erb @@ -1,5 +1,7 @@ <% content_for :title, @l10n %> +<p class="lead mb-5"><%= t('education.program.parts.certification.hint') %> + <div class="row mb-5"> <div class="col-lg-4 mb-4"> <%= osuny_label Education::Program.human_attribute_name(:qualiopi_certified) %> diff --git a/app/views/admin/education/programs/parts/edit_certification.html.erb b/app/views/admin/education/programs/parts/certification_edit.html.erb similarity index 100% rename from app/views/admin/education/programs/parts/edit_certification.html.erb rename to app/views/admin/education/programs/parts/certification_edit.html.erb diff --git a/app/views/admin/education/programs/parts/edit_pedagogy.html.erb b/app/views/admin/education/programs/parts/edit_pedagogy.html.erb deleted file mode 100644 index 428a08a44..000000000 --- a/app/views/admin/education/programs/parts/edit_pedagogy.html.erb +++ /dev/null @@ -1,56 +0,0 @@ -<% content_for :title, @l10n %> -<%= simple_form_for [:admin, @program] do |f| %> - <%= f.simple_fields_for :localizations, @l10n do |lf| %> - <%= f.error_notification %> - <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> - <%= lf.hidden_field :language_id, value: current_language.id %> - <%= f.hidden_field :part, value: 'pedagogy' %> - - <div class="row"> - <div class="col-lg-4"> - <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :content %> - </div> - <div class="col-lg-4"> - <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :pedagogy %> - </div> - <div class="col-lg-4"> - <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :evaluation %> - </div> - </div> - <div class="row mb-2"> - <div class="col-md-8"> - <label class="form-label"> - <%= t('education.teachings') %> - </label> - </div> - <div class="col-md-4 text-end"> - <%= link_to_add_association t('add'), - f, - :university_person_involvements, - class: button_classes, - partial: 'admin/education/programs/involvement_fields', - data: { - 'association-insertion-method': 'append', - 'association-insertion-node': '#involvements', - } %> - </div> - </div> - <div id="involvements"> - <% - sorted_involvements = @program.university_person_involvements - .sort_by { |involvement| - involvement.person&.to_s_alphabetical_in(current_language).to_s - } - %> - <%= f.simple_fields_for :university_person_involvements, - sorted_involvements, - include_id: false do |involvement_f| %> - <%= render 'admin/education/programs/involvement_fields', f: involvement_f, include_id: true %> - <% end %> - </div> - - <% content_for :action_bar_right do %> - <%= submit f %> - <% end %> - <% end %> -<% end %> diff --git a/app/views/admin/education/programs/parts/edit_presentation.html.erb b/app/views/admin/education/programs/parts/edit_presentation.html.erb deleted file mode 100644 index 60daf44ae..000000000 --- a/app/views/admin/education/programs/parts/edit_presentation.html.erb +++ /dev/null @@ -1,32 +0,0 @@ -<% content_for :title, @l10n %> -<%= simple_form_for [:admin, @program] do |f| %> - <%= f.simple_fields_for :localizations, @l10n do |lf| %> - <%= f.error_notification %> - <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> - <%= lf.hidden_field :language_id, value: current_language.id %> - <%= f.hidden_field :part, value: 'presentation' %> - <div class="row"> - <div class="col-lg-3"> - <%= osuny_label t('education.program.registration_scheme') %> - <div class="mb-n3"><%= f.input :initial %></div> - <div class="mb-n3"><%= f.input :continuing %></div> - <div><%= f.input :apprenticeship %></div> - <%= f.input :capacity %> - </div> - <div class="offset-lg-1 col-lg-4"> - <%= lf.input :presentation, - as: :summernote, - input_html: { - data: { 'summernote-config' => 'mini' } - } %> - </div> - <div class="col-lg-4"> - <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :objectives %> - </div> - </div> - - <% content_for :action_bar_right do %> - <%= submit f %> - <% end %> - <% end %> -<% end %> diff --git a/app/views/admin/education/programs/parts/edit_results.html.erb b/app/views/admin/education/programs/parts/edit_results.html.erb deleted file mode 100644 index 01477ac65..000000000 --- a/app/views/admin/education/programs/parts/edit_results.html.erb +++ /dev/null @@ -1,22 +0,0 @@ -<% content_for :title, @l10n %> -<%= simple_form_for [:admin, @program] do |f| %> - <%= f.simple_fields_for :localizations, @l10n do |lf| %> - <%= f.error_notification %> - <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> - <%= lf.hidden_field :language_id, value: current_language.id %> - <%= f.hidden_field :part, value: 'results' %> - - <div class="row"> - <div class="col-lg-4"> - <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :opportunities %> - </div> - <div class="col-lg-4"> - <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :results %> - </div> - </div> - - <% content_for :action_bar_right do %> - <%= submit f %> - <% end %> - <% end %> -<% end %> diff --git a/app/views/admin/education/programs/parts/pedagogy.html.erb b/app/views/admin/education/programs/parts/pedagogy.html.erb index 95c73910a..836f1cbee 100644 --- a/app/views/admin/education/programs/parts/pedagogy.html.erb +++ b/app/views/admin/education/programs/parts/pedagogy.html.erb @@ -1,19 +1,27 @@ <% content_for :title, @l10n %> +<p class="lead mb-5"><%= t('education.program.parts.pedagogy.hint') %> + <div class="row"> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :content %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :pedagogy %> </div> - <div class="col-lg-4 mb-4"> + <div class="col-xxl-4 col-md-6 mb-4"> <%= render 'admin/application/property/text', object: @l10n, property: :evaluation %> </div> + <div class="col-xxl-4 col-md-6 mb-4"> + <%= render 'admin/application/property/text', object: @l10n, property: :opportunities %> + </div> + <div class="col-xxl-4 col-md-6 mb-4"> + <%= render 'admin/application/property/text', object: @l10n, property: :results %> + </div> </div> +<%= osuny_label t('education.teachings') %> <% if @teacher_involvements.any? %> - <%= osuny_label t('education.teachings') %> <div class="row g-2 mb-3"> <% @teacher_involvements.each do |involvement| person = involvement.person @@ -33,6 +41,8 @@ </div> <% end %> </div> +<% else %> + <p>-</p> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/education/programs/parts/pedagogy_edit.html.erb b/app/views/admin/education/programs/parts/pedagogy_edit.html.erb new file mode 100644 index 000000000..d3752f833 --- /dev/null +++ b/app/views/admin/education/programs/parts/pedagogy_edit.html.erb @@ -0,0 +1,56 @@ +<% content_for :title, @l10n %> +<%= simple_form_for [:admin, @program] do |f| %> + <%= f.simple_fields_for :localizations, @l10n do |lf| %> + <%= f.error_notification %> + <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> + <%= lf.hidden_field :language_id, value: current_language.id %> + <%= f.hidden_field :part, value: 'pedagogy' %> + + <div class="row mb-5"> + <div class="col-xxl-4 col-md-6 mb-4"> + <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :content %> + </div> + <div class="col-xxl-4 col-md-6 mb-4"> + <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :pedagogy %> + </div> + <div class="col-xxl-4 col-md-6 mb-4"> + <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :evaluation %> + </div> + <div class="col-xxl-4 col-md-6 mb-4"> + <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :opportunities %> + </div> + <div class="col-xxl-4 col-md-6 mb-4"> + <%= render 'admin/education/programs/forms/input_with_inheritance', f: lf, property: :results %> + </div> + </div> + + <%= osuny_panel t('education.teachings'), small: true do %> + <%= link_to_add_association t('add'), + f, + :university_person_involvements, + class: button_classes, + partial: 'admin/education/programs/involvement_fields', + data: { + 'association-insertion-method': 'append', + 'association-insertion-node': '#involvements', + } %> + <div id="involvements" class="mt-3"> + <% + sorted_involvements = @program.university_person_involvements + .sort_by { |involvement| + involvement.person&.to_s_alphabetical_in(current_language).to_s + } + %> + <%= f.simple_fields_for :university_person_involvements, + sorted_involvements, + include_id: false do |involvement_f| %> + <%= render 'admin/education/programs/involvement_fields', f: involvement_f, include_id: true %> + <% end %> + </div> + <% end %> + + <% content_for :action_bar_right do %> + <%= submit f %> + <% end %> + <% end %> +<% end %> diff --git a/app/views/admin/education/programs/parts/presentation.html.erb b/app/views/admin/education/programs/parts/presentation.html.erb deleted file mode 100644 index 5b153b65e..000000000 --- a/app/views/admin/education/programs/parts/presentation.html.erb +++ /dev/null @@ -1,40 +0,0 @@ -<% content_for :title, @l10n %> - -<div class="row"> - <div class="col-lg-3"> - <%= osuny_label t('education.program.registration_scheme') %> - <table class="table"> - <tbody> - <tr> - <th><%= Education::Program.human_attribute_name('initial') %></th> - <td class="text-end"><%= t @program.initial %></td> - </tr> - <tr> - <th><%= Education::Program.human_attribute_name('continuing') %></th> - <td class="text-end"><%= t @program.continuing %></td> - </tr> - <tr> - <th><%= Education::Program.human_attribute_name('apprenticeship') %></th> - <td class="text-end"><%= t @program.apprenticeship %></td> - </tr> - <tr> - <th><%= Education::Program.human_attribute_name('capacity') %></th> - <td class="text-end"><%= @program.capacity %></td> - </tr> - </tbody> - </table> - </div> - <div class="offset-lg-1 col-lg-4"> - <%= render 'admin/application/property/text', object: @l10n, property: :presentation %> - </div> - <div class="col-lg-4"> - <%= render 'admin/application/property/text', object: @l10n, property: :objectives %> - </div> -</div> - -<% content_for :action_bar_right do %> - <%= link_to_if can?(:edit, @program), - t('edit'), - edit_presentation_admin_education_program_path(@program), - class: button_classes %> -<% end %> diff --git a/app/views/admin/education/programs/parts/results.html.erb b/app/views/admin/education/programs/parts/results.html.erb deleted file mode 100644 index 25bf33fd0..000000000 --- a/app/views/admin/education/programs/parts/results.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<% content_for :title, @l10n %> - -<div class="row mb-5"> - <div class="col-lg-4"> - <%= render 'admin/application/property/text', object: @l10n, property: :opportunities %> - </div> - <div class="col-lg-4"> - <%= render 'admin/application/property/text', object: @l10n, property: :results %> - </div> -</div> - -<% content_for :action_bar_right do %> - <%= link_to_if can?(:edit, @program), - t('edit'), - edit_results_admin_education_program_path(@program), - class: button_classes %> -<% end %> diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb index 98ab284c5..ddc0cdb94 100644 --- a/app/views/admin/education/programs/show.html.erb +++ b/app/views/admin/education/programs/show.html.erb @@ -36,6 +36,27 @@ <% end %> </ul> <% end %> + <%= osuny_label t('education.program.registration_scheme') %> + <table class="table"> + <tbody> + <tr> + <th><%= Education::Program.human_attribute_name('initial') %></th> + <td class="text-end"><%= t @program.initial %></td> + </tr> + <tr> + <th><%= Education::Program.human_attribute_name('continuing') %></th> + <td class="text-end"><%= t @program.continuing %></td> + </tr> + <tr> + <th><%= Education::Program.human_attribute_name('apprenticeship') %></th> + <td class="text-end"><%= t @program.apprenticeship %></td> + </tr> + <tr> + <th><%= Education::Program.human_attribute_name('capacity') %></th> + <td class="text-end"><%= @program.capacity %></td> + </tr> + </tbody> + </table> </div> <div class="col-lg-6"> <%= render 'admin/application/summary/show', about: @l10n, small: true %> @@ -66,6 +87,8 @@ <p><%= Education::Program::Localization.human_attribute_name(@l10n.published ? 'is_published' : 'is_draft') %></p> </div> <%= render 'admin/application/meta_description/show', about: @l10n %> + <%= render 'admin/application/property/text', object: @l10n, property: :presentation %> + <%= render 'admin/application/property/text', object: @l10n, property: :objectives %> </div> </div> </div> diff --git a/config/locales/education/en.yml b/config/locales/education/en.yml index f4ff36c6b..c87ca8ffe 100644 --- a/config/locales/education/en.yml +++ b/config/locales/education/en.yml @@ -119,7 +119,7 @@ en: categories: root_name: Programs publication: Publication - submenu: "You are currently in the program summary. For simplicity, each program is broken down into several pages. These pages can be accessed via the menu at the top of the page, and correspond to the headings on the websites. For greater convenience, this summary page shows the menu hereafter. The content blocks are located in the “Presentation†section." + submenu: "You are currently in the program summary. For simplicity, each program is broken down into several pages. These pages can be accessed via the menu at the top of the page, and correspond to the headings on the websites. For greater convenience, this summary page shows the menu hereafter." teacher: no_teaching: No teaching show_person_html: This page only shows teaching assignments.<br>If you wish to view or modify the person's details, click on the link below. @@ -146,27 +146,15 @@ en: number_of_programs: Number of programs program: parts: - technical: - label: Technical - hint: Publication status and URLs in the websites. - essential: - label: Essential - hint: Page header, summary. - presentation: - label: Presentation - hint: This part shows the blocks you set, so you can build a rich, customized presentation of the program. pedagogy: label: Pedagogy - hint: Teaching and evaluation methods, pedagogical team. - results: - label: Results - hint: What can students do after the program? What did the alumni do? + hint: Teaching and evaluation methods, pedagogical team, job opportunities and results obtained by former students admission: label: Admission - hint: How to register. + hint: How to apply to the program certification: label: Certification - hint: Qualiopi legal certification + hint: Legal certification (Qualiopi) registration_scheme: Registration scheme roles: one: Role diff --git a/config/locales/education/fr.yml b/config/locales/education/fr.yml index 0bd46efba..399db6955 100644 --- a/config/locales/education/fr.yml +++ b/config/locales/education/fr.yml @@ -119,7 +119,7 @@ fr: categories: root_name: Offre de formation publication: Publication - submenu: "Vous êtes actuellement dans le résumé d'une formation. Pour plus de simplicité, chaque formation est décomposée en plusieurs pages. Ces pages sont accessibles via le menu en haut de page, et correspondent aux rubriques dans les sites Web. Pour plus de praticité, cette page de résumé reprend ce menu ci-après. Les blocs de contenu se situent dans la partie “Présentationâ€." + submenu: "Vous êtes actuellement dans le résumé d'une formation. Pour plus de simplicité, chaque formation est décomposée en plusieurs pages. Ces pages sont accessibles via le menu en haut de page, et correspondent aux rubriques dans les sites Web. Pour plus de praticité, cette page de résumé reprend ce menu ci-après." teacher: no_teaching: Aucun enseignement show_person_html: Cette page montre uniquement les missions d'enseignement. <br>Si vous voulez voir ou modifier les informations sur la personne, cliquez sur le lien ci-dessous. @@ -149,27 +149,15 @@ fr: number_of_programs: Nombre de formations program: parts: - technical: - label: Technique - hint: État de publication et URLs dans les sites Web concernés. - essential: - label: Essentiel - hint: Haut de page, résumé de la formation. - presentation: - label: Présentation - hint: Complétée par les blocs, afin de permettre un descriptif libre et riche de la formation. pedagogy: label: Pédagogie - hint: Mode d'enseignement et d'évaluation, et présentation de l'équipe pédagogique. - results: - label: Résultats - hint: Débouchés et résultats obtenus par les anciens élèves. + hint: Mode d'enseignement et d'évaluation, présentation de l'équipe pédagogique, débouchés et résultats obtenus par les anciens élèves admission: label: Admission - hint: Modalités administratives d'accès à la formation. + hint: Modalités administratives d'accès à la formation certification: label: Certification - hint: Certification légale Qualiopi + hint: Certification légale (Qualiopi) registration_scheme: Régime d'inscription roles: one: Rôle diff --git a/config/navigation/admin/education/program_navigation.rb b/config/navigation/admin/education/program_navigation.rb index 65f73173e..3d0ee5f3d 100644 --- a/config/navigation/admin/education/program_navigation.rb +++ b/config/navigation/admin/education/program_navigation.rb @@ -11,15 +11,9 @@ SimpleNavigation::Configuration.run do |navigation| highlights_on: lambda { controller_name == "programs" && action_name == "show" } if can?(:read, @program) - primary.item :subnav_presentation, - t('education.program.parts.presentation.label'), - presentation_admin_education_program_path(id: @program, program_id: nil) primary.item :subnav_pedagogy, t('education.program.parts.pedagogy.label'), pedagogy_admin_education_program_path(id: @program, program_id: nil) - primary.item :subnav_results, - t('education.program.parts.results.label'), - results_admin_education_program_path(id: @program, program_id: nil) primary.item :subnav_admission, t('education.program.parts.admission.label'), admission_admin_education_program_path(id: @program, program_id: nil) diff --git a/config/routes/admin/education.rb b/config/routes/admin/education.rb index 834d9cf4e..74de707d4 100644 --- a/config/routes/admin/education.rb +++ b/config/routes/admin/education.rb @@ -33,17 +33,13 @@ namespace :education do post :reorder end member do - get 'presentation' => 'programs/parts#presentation', as: :presentation - get 'presentation/edit' => 'programs/parts#edit_presentation', as: :edit_presentation - get 'pedagogy' => 'programs/parts#pedagogy', as: :pedagogy - get 'pedagogy/edit' => 'programs/parts#edit_pedagogy', as: :edit_pedagogy - get 'results' => 'programs/parts#results', as: :results - get 'results/edit' => 'programs/parts#edit_results', as: :edit_results - get 'admission' => 'programs/parts#admission', as: :admission - get 'admission/edit' => 'programs/parts#edit_admission', as: :edit_admission - get 'certification' => 'programs/parts#certification', as: :certification - get 'certification/edit' => 'programs/parts#edit_certification', as: :edit_certification - get 'alumni' => 'programs/parts#alumni', as: :alumni + get 'pedagogy' => 'programs/parts#pedagogy', as: :pedagogy + get 'pedagogy/edit' => 'programs/parts#pedagogy_edit', as: :edit_pedagogy + get 'admission' => 'programs/parts#admission', as: :admission + get 'admission/edit' => 'programs/parts#admission_edit', as: :edit_admission + get 'certification' => 'programs/parts#certification', as: :certification + get 'certification/edit' => 'programs/parts#certification_edit', as: :edit_certification + get 'alumni' => 'programs/parts#alumni', as: :alumni get :children get :preview get :static -- GitLab