From 6fa13eebebee5c395fa392293b5e3affe1f6f0b2 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Mon, 23 Jan 2023 08:04:07 +0100 Subject: [PATCH] fix --- app/views/admin/application/a11y/_widget.html.erb | 2 +- .../admin/application/featured_image/_edit.html.erb | 2 +- .../admin/application/featured_image/_show.html.erb | 2 +- .../application/meta_description/_form.html.erb | 2 +- .../application/meta_description/_show.html.erb | 2 +- app/views/admin/application/summary/_show.html.erb | 2 +- app/views/admin/communication/blocks/_list.html.erb | 2 +- .../communication/websites/pages/_form.html.erb | 2 +- .../websites/pages/show/_metadata.html.erb | 2 +- .../communication/websites/posts/_form.html.erb | 6 +++--- .../communication/websites/posts/index.html.erb | 6 +++--- .../admin/communication/websites/posts/show.html.erb | 2 +- .../communication/websites/show/_pages.html.erb | 2 +- .../communication/websites/show/_posts.html.erb | 2 +- app/views/admin/dashboard/index.html.erb | 10 +++++----- .../admin/education/teachers/show/_programs.html.erb | 2 +- app/views/admin/university/people/_form.html.erb | 12 ++++++------ .../admin/university/people/_main_infos.html.erb | 8 ++++---- .../admin/university/people/show/_roles.html.erb | 2 +- 19 files changed, 35 insertions(+), 35 deletions(-) diff --git a/app/views/admin/application/a11y/_widget.html.erb b/app/views/admin/application/a11y/_widget.html.erb index a7521a758..31255334f 100644 --- a/app/views/admin/application/a11y/_widget.html.erb +++ b/app/views/admin/application/a11y/_widget.html.erb @@ -2,7 +2,7 @@ color = about.accessible? ? 'text-success' : 'text-danger' action = "<i class=\"fas fa-universal-access fa-2x float-end #{ color}\"></i>" %> -<%= panel title: t('accessibility.label'), action: action do %> +<%= osuny_panel title: t('accessibility.label'), action: action do %> <% if about.accessibility_errors.any? %> <h3 class="h5 text-danger"> <%= t 'accessibility.errors', count: about.accessibility_errors.count %> diff --git a/app/views/admin/application/featured_image/_edit.html.erb b/app/views/admin/application/featured_image/_edit.html.erb index 64957e138..0f9b3e18d 100644 --- a/app/views/admin/application/featured_image/_edit.html.erb +++ b/app/views/admin/application/featured_image/_edit.html.erb @@ -1,4 +1,4 @@ -<%= panel title: t('featured_image.title') do %> +<%= osuny_panel title: t('featured_image.title') do %> <%= f.input :featured_image, as: :single_deletable_file, direct_upload: true, diff --git a/app/views/admin/application/featured_image/_show.html.erb b/app/views/admin/application/featured_image/_show.html.erb index 2b86bdd89..ab7fb2cde 100644 --- a/app/views/admin/application/featured_image/_show.html.erb +++ b/app/views/admin/application/featured_image/_show.html.erb @@ -1,4 +1,4 @@ -<%= panel title: t('featured_image.title') do %> +<%= osuny_panel title: t('featured_image.title') do %> <% image = about.best_featured_image.variable? ? about.best_featured_image.variant(resize: '600') : about.best_featured_image %> <%= image_tag image, class: 'img-fluid mb-2' %> diff --git a/app/views/admin/application/meta_description/_form.html.erb b/app/views/admin/application/meta_description/_form.html.erb index 137f6dff8..f4f7b9b1a 100644 --- a/app/views/admin/application/meta_description/_form.html.erb +++ b/app/views/admin/application/meta_description/_form.html.erb @@ -1,4 +1,4 @@ -<%= panel title: t('admin.summary') do %> +<%= osuny_panel title: t('admin.summary') do %> <%= f.input :meta_description, label: t('admin.meta_description.label'), hint: t('admin.meta_description.hint'), diff --git a/app/views/admin/application/meta_description/_show.html.erb b/app/views/admin/application/meta_description/_show.html.erb index 9a8052df9..300c1102e 100644 --- a/app/views/admin/application/meta_description/_show.html.erb +++ b/app/views/admin/application/meta_description/_show.html.erb @@ -1,4 +1,4 @@ -<%= panel title: t('seo') do %> +<%= osuny_panel title: t('seo') do %> <h3 class="h5"><%= t('admin.meta_description.label') %></h3> <p><%= sanitize about.meta_description %></p> <% end unless about.meta_description.blank? %> diff --git a/app/views/admin/application/summary/_show.html.erb b/app/views/admin/application/summary/_show.html.erb index 5ad53f6a0..90fcc1238 100644 --- a/app/views/admin/application/summary/_show.html.erb +++ b/app/views/admin/application/summary/_show.html.erb @@ -1,3 +1,3 @@ -<%= panel title: t('admin.summary') do %> +<%= osuny_panel title: t('admin.summary') do %> <p class="lead"><%= sanitize about.summary %></p> <% end unless about.summary.blank? %> diff --git a/app/views/admin/communication/blocks/_list.html.erb b/app/views/admin/communication/blocks/_list.html.erb index 43d3ec968..1a296c913 100644 --- a/app/views/admin/communication/blocks/_list.html.erb +++ b/app/views/admin/communication/blocks/_list.html.erb @@ -4,7 +4,7 @@ action += link_to t('add'), new_admin_communication_block_path(about_id: about.id, about_type: about.class.name), class: button_classes if can? :create, Communication::Block %> -<%= panel title: Communication::Block.model_name.human(count: 2), action: action do %> +<%= osuny_panel title: Communication::Block.model_name.human(count: 2), action: action do %> <% if about.blocks.any? %> <div class="table-responsive"> <table class="<%= table_classes %>"> diff --git a/app/views/admin/communication/websites/pages/_form.html.erb b/app/views/admin/communication/websites/pages/_form.html.erb index 4935171c6..9c424c059 100644 --- a/app/views/admin/communication/websites/pages/_form.html.erb +++ b/app/views/admin/communication/websites/pages/_form.html.erb @@ -8,7 +8,7 @@ url = page.new_record? ? admin_communication_website_pages_path <div class="row"> <div class="col-md-8"> - <%= panel title: t('content') do %> + <%= osuny_panel title: t('content') do %> <%= f.input :title %> <%= f.input :breadcrumb_title %> <%= render 'admin/application/summary/form', f: f, about: page %> diff --git a/app/views/admin/communication/websites/pages/show/_metadata.html.erb b/app/views/admin/communication/websites/pages/show/_metadata.html.erb index 33de1e252..45451bb69 100644 --- a/app/views/admin/communication/websites/pages/show/_metadata.html.erb +++ b/app/views/admin/communication/websites/pages/show/_metadata.html.erb @@ -1,7 +1,7 @@ <% action = link_to t('open'), @page.url, target: :_blank, class: 'btn btn-light btn-xs' %> -<%= panel title: t('metadata'), action: action do %> +<%= osuny_panel title: t('metadata'), action: action do %> <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('published') %></h3> <p><%= t @page.published %></p> <% unless @page.slug.blank? %> diff --git a/app/views/admin/communication/websites/posts/_form.html.erb b/app/views/admin/communication/websites/posts/_form.html.erb index d556f65f0..01a5e6987 100644 --- a/app/views/admin/communication/websites/posts/_form.html.erb +++ b/app/views/admin/communication/websites/posts/_form.html.erb @@ -4,7 +4,7 @@ <div class="row"> <div class="col-md-8"> - <%= panel title: t('content') do %> + <%= osuny_panel title: t('content') do %> <%= f.input :title %> <%= render 'admin/application/summary/form', f: f, about: post %> <%= f.input :text, as: :summernote if post.text&.to_plain_text.present? %> @@ -12,7 +12,7 @@ <div class="row pure__row--small"> <% if @website.categories.any? %> <div class="col-md-6"> - <%= panel title: t('activerecord.attributes.communication/website/post.categories') do %> + <%= osuny_panel title: t('activerecord.attributes.communication/website/post.categories') do %> <%= f.association :categories, label_text: false, as: :check_boxes, @@ -26,7 +26,7 @@ </div> </div> <div class="col-md-4"> - <%= panel title: t('metadata') do %> + <%= osuny_panel title: t('metadata') do %> <% if can? :publish, post %> <div class="row pure__row--small"> <div class="col-6"> diff --git a/app/views/admin/communication/websites/posts/index.html.erb b/app/views/admin/communication/websites/posts/index.html.erb index 93c6d7fd5..fdbf1fb93 100644 --- a/app/views/admin/communication/websites/posts/index.html.erb +++ b/app/views/admin/communication/websites/posts/index.html.erb @@ -6,7 +6,7 @@ <% end %> <%= render 'admin/communication/websites/sidebar' do %> - <%= panel title: Communication::Website::Post.model_name.human(count: 2) do %> + <%= osuny_panel title: Communication::Website::Post.model_name.human(count: 2) do %> <%= render 'filters', current_path: admin_communication_website_posts_path, filters: @filters if @filters.any? %> <div data-batch-selectable> <%= form_tag publish_admin_communication_website_posts_path do %> @@ -41,7 +41,7 @@ <% if can?(:create, Communication::Website::Category) || (@root_categories.any? && can?(:edit, @root_categories.first)) %> <div class="col-md-6"> <% action = create_link Communication::Website::Category %> - <%= panel title: Communication::Website::Category.model_name.human(count: 2), action: action do %> + <%= osuny_panel title: Communication::Website::Category.model_name.human(count: 2), action: action do %> <ul class="list-unstyled treeview treeview--sortable js-treeview js-treeview-sortable js-treeview-sortable-container" data-id="" data-sort-url="<%= reorder_admin_communication_website_categories_path %>"> @@ -52,7 +52,7 @@ <% end %> <% if @authors.any? %> <div class="col-md-6"> - <%= panel title: t('communication.authors', count: 2) do %> + <%= osuny_panel title: t('communication.authors', count: 2) do %> <%= render 'admin/communication/websites/authors/list', authors: @authors %> <% if @authors.total_pages > 1 %> <%= paginate @authors, theme: 'bootstrap-5', param_name: :authors_page %> diff --git a/app/views/admin/communication/websites/posts/show.html.erb b/app/views/admin/communication/websites/posts/show.html.erb index 3c945df04..2fba95118 100644 --- a/app/views/admin/communication/websites/posts/show.html.erb +++ b/app/views/admin/communication/websites/posts/show.html.erb @@ -15,7 +15,7 @@ class: 'btn btn-light' %> <% end %> </div> - <%= panel title: t('metadata') do %> + <%= osuny_panel title: t('metadata') do %> <div class="row pure__row--small"> <div class="col-6"> <h3 class="h5"><%= Communication::Website::Post.human_attribute_name('published') %></h3> diff --git a/app/views/admin/communication/websites/show/_pages.html.erb b/app/views/admin/communication/websites/show/_pages.html.erb index db7b021af..88ff2eec4 100644 --- a/app/views/admin/communication/websites/show/_pages.html.erb +++ b/app/views/admin/communication/websites/show/_pages.html.erb @@ -4,6 +4,6 @@ action += link_to t('create'), new_admin_communication_website_page_path(website_id: @website), class: button_classes if can?(:create, Communication::Website::Page) %> -<%= panel title: t('communication.website.last_pages'), action: action do %> +<%= osuny_panel title: t('communication.website.last_pages'), action: action do %> <%= render 'admin/communication/websites/pages/list', pages: @pages %> <% end %> \ No newline at end of file diff --git a/app/views/admin/communication/websites/show/_posts.html.erb b/app/views/admin/communication/websites/show/_posts.html.erb index b4afb4597..bd0766ad3 100644 --- a/app/views/admin/communication/websites/show/_posts.html.erb +++ b/app/views/admin/communication/websites/show/_posts.html.erb @@ -7,7 +7,7 @@ action += link_to t('create'), new_admin_communication_website_post_path(website_id: @website), class: button_classes('ms-1') if can?(:create, Communication::Website::Post) %> -<%= panel title: t('communication.website.last_posts'), action: action do %> +<%= osuny_panel title: t('communication.website.last_posts'), action: action do %> <%= render 'admin/communication/websites/posts/list', posts: @posts, hide_author: true, diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index 0ef2ba438..17035cd5c 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -3,7 +3,7 @@ <div class="row mb-5"> <div class="col-md-6 pb-4"> - <%= panel title: t('hello', name: current_user.first_name) do %> + <%= osuny_panel title: t('hello', name: current_user.first_name) do %> <% if current_admin_theme == 'appstack' %> <p> Osuny a un nouveau thème pour l'administration, "Pure". <br> @@ -27,7 +27,7 @@ <% end %> </div> <div class="col-md-6 pb-4"> - <%= panel title: Delayed::Job.all.length, + <%= osuny_panel title: Delayed::Job.all.length, action: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock align-baseline"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>' do %> <p class="mb-0"><%= t 'admin.pending_tasks.label' %></p> <p class="mb-0 small"><%= t 'admin.pending_tasks.hint' %></p> @@ -41,7 +41,7 @@ <% current_university.communication_websites.each do |website| %> <% next unless can?(:read, website) %> <div class="<%= classes %>"> - <%= panel title: website, + <%= osuny_panel title: website, action: "<i class=\"fas fa-#{ Icon::COMMUNICATION_WEBSITE }\"></i>" do %> <p class="small"><%= website.url %></p> <%= link_to t('show'), [:admin, website], class: button_classes('stretched-link') %> @@ -57,7 +57,7 @@ <% current_university.communication_extranets.each do |extranet| %> <% next unless can?(:read, extranet) %> <div class="<%= classes %>"> - <%= panel title: extranet, + <%= osuny_panel title: extranet, action: "<i class=\"fas fa-#{ Icon::COMMUNICATION_EXTRANET }\"></i>" do %> <p class="small"><%= extranet.url %></p> <%= link_to t('show'), [:admin, extranet], class: button_classes('stretched-link') %> @@ -73,7 +73,7 @@ <% current_university.research_journals.each do |journal| %> <% next unless can?(:read, journal) %> <div class="<%= classes %>"> - <%= panel title: journal, + <%= osuny_panel title: journal, action: "<i class=\"fas fa-#{ Icon::RESEARCH_JOURNAL }\"></i>" do %> <%= link_to t('show'), [:admin, journal], class: button_classes('stretched-link') %> <% end %> diff --git a/app/views/admin/education/teachers/show/_programs.html.erb b/app/views/admin/education/teachers/show/_programs.html.erb index 262cc5099..a777a8467 100644 --- a/app/views/admin/education/teachers/show/_programs.html.erb +++ b/app/views/admin/education/teachers/show/_programs.html.erb @@ -1,6 +1,6 @@ <% param_name ||= :page %> <% if involvements.total_count > 0 %> - <%= panel title: Education::Program.model_name.human(count: 2), + <%= osuny_panel title: Education::Program.model_name.human(count: 2), subtitle: "#{involvements.total_count} #{Education::Program.model_name.human(count: involvements.total_count).downcase}" do %> <div class="table-responsive"> diff --git a/app/views/admin/university/people/_form.html.erb b/app/views/admin/university/people/_form.html.erb index 2b4c8d345..5c9b4e9f9 100644 --- a/app/views/admin/university/people/_form.html.erb +++ b/app/views/admin/university/people/_form.html.erb @@ -4,7 +4,7 @@ <div class="row"> <div class="col-md-8"> - <%= panel title: University::Person.human_attribute_name('essentials') do %> + <%= osuny_panel title: University::Person.human_attribute_name('essentials') do %> <div class="row pure__row--small"> <div class="col-xxl-6"> <%= f.input :first_name %> @@ -28,7 +28,7 @@ data: { 'summernote-config' => 'mini-list' } } %> <% end %> - <%= panel title: University::Person.human_attribute_name('contacts') do %> + <%= osuny_panel title: University::Person.human_attribute_name('contacts') do %> <p><em><%= t("university.person.personal_data_warning") %></em></p> <div class="row pure__row--small"> <div class="col-xxl-6"> @@ -57,7 +57,7 @@ </div> </div> <% end %> - <%= panel title: University::Person.human_attribute_name('socials') do %> + <%= osuny_panel title: University::Person.human_attribute_name('socials') do %> <p><em><%= t("university.person.personal_data_warning") %></em></p> <div class="row pure__row--small"> <div class="col-xxl-6"> @@ -74,7 +74,7 @@ </div> </div> <% end %> - <%= panel title: University::Person.human_attribute_name('abilities') do %> + <%= osuny_panel title: University::Person.human_attribute_name('abilities') do %> <div class="row pure__row--small"> <div class="col-xxl-6"> <%= f.input :is_teacher %> @@ -90,7 +90,7 @@ <% end %> </div> <div class="col-md-4"> - <%= panel title: t('metadata') do %> + <%= osuny_panel title: t('metadata') do %> <%= f.input :slug, as: :string, input_html: person.persisted? ? {} : { @@ -99,7 +99,7 @@ } %> <%= f.association :user, collection: current_university.users.ordered if can?(:manage, User) %> <% end %> - <%= panel title: University::Person.human_attribute_name('picture') do %> + <%= osuny_panel title: University::Person.human_attribute_name('picture') do %> <%= f.input :picture, as: :single_deletable_file, label: false, diff --git a/app/views/admin/university/people/_main_infos.html.erb b/app/views/admin/university/people/_main_infos.html.erb index 2569690dd..232c4447b 100644 --- a/app/views/admin/university/people/_main_infos.html.erb +++ b/app/views/admin/university/people/_main_infos.html.erb @@ -1,7 +1,7 @@ <div class="row"> <div class="col-md-8 col-xl-9"> <%= render 'admin/application/summary/show', about: person %> - <%= panel title: t('content') do %> + <%= osuny_panel title: t('content') do %> <div class="row pure__row--small"> <% unless person.gender.blank? %> <div class="col-md-6"> @@ -44,7 +44,7 @@ <% end %> <% end %> - <%= panel title: University::Person.human_attribute_name('socials') do %> + <%= osuny_panel title: University::Person.human_attribute_name('socials') do %> <% unless person.url.blank? %> <h3 class="h5"><%= University::Person.human_attribute_name('url') %></h3> <p><%= link_to person.url, person.url, target: '_blank' %></p> @@ -66,7 +66,7 @@ <%= render 'admin/communication/blocks/list', about: person %> </div> <div class="col-md-4 col-xl-3"> - <%= panel title: t('metadata') do %> + <%= osuny_panel title: t('metadata') do %> <h3 class="h5"><%= University::Person.human_attribute_name('slug') %></h3> <p><%= person.slug %></p> <% if person.user.present? %> @@ -74,7 +74,7 @@ <p><%= link_to_if can?(:read, person.user), person.user, admin_user_path(person.user) %></p> <% end %> <% end %> - <%= panel title: t('activerecord.attributes.university/person.picture') do %> + <%= osuny_panel title: t('activerecord.attributes.university/person.picture') do %> <% if person.best_picture_inherits_from_user? %> <p> <span class="small text-muted"> diff --git a/app/views/admin/university/people/show/_roles.html.erb b/app/views/admin/university/people/show/_roles.html.erb index b59e6e48c..b66620b96 100644 --- a/app/views/admin/university/people/show/_roles.html.erb +++ b/app/views/admin/university/people/show/_roles.html.erb @@ -1,5 +1,5 @@ <% if involvements.total_count > 0 %> - <%= panel title: t('university.person.administrator_roles'), + <%= osuny_panel title: t('university.person.administrator_roles'), subtitle: "#{involvements.total_count} #{t('university.person.administrator_roles').downcase}" do %> <div class="table-responsive"> <table class="<%= table_classes %>"> -- GitLab