diff --git a/app/helpers/admin/application_helper.rb b/app/helpers/admin/application_helper.rb index 4bcd24318316ac4a833b36cad683a868a088166c..821138ac9a247bdf3957aecbb80db094c6b3e57c 100644 --- a/app/helpers/admin/application_helper.rb +++ b/app/helpers/admin/application_helper.rb @@ -45,7 +45,7 @@ module Admin::ApplicationHelper aria-controls=\"preview\">#{ t 'preview.button'}</button>" end - def osuny_panel(title: nil, subtitle: nil, action: nil, &block) + def osuny_panel(title = nil, subtitle: nil, action: nil, &block) render layout: "admin/layouts/themes/#{current_admin_theme}/panel", locals: { title: title, diff --git a/app/views/admin/application/a11y/_widget.html.erb b/app/views/admin/application/a11y/_widget.html.erb index 31255334f878a6ef5553dd273898156e374a2b90..22fcc065b4d04c41fbe0baa95758acb3e07b1b58 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>" %> -<%= osuny_panel title: t('accessibility.label'), action: action do %> +<%= osuny_panel 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 0f9b3e18d6927fe1099f211f67518d48e19a7754..9fec944db6df5ae758aa6acd0de3e1ab6c03d885 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 @@ -<%= osuny_panel title: t('featured_image.title') do %> +<%= osuny_panel 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 ab7fb2cde87a42bfabc9f8753551af83c991e402..61168d7d58d899bdf092fd4559f590f5d9c34380 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 @@ -<%= osuny_panel title: t('featured_image.title') do %> +<%= osuny_panel 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 f4f7b9b1a66c427295ee86f84547120860d22304..cc698e0303658fe8bf52f5d0e9f13423d9d7a4fd 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 @@ -<%= osuny_panel title: t('admin.summary') do %> +<%= osuny_panel 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 300c1102ed4a7be82761d18b51a3a50c08da9813..dc73b186085f9a1434760703c2c729ce7ab57f78 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 @@ -<%= osuny_panel title: t('seo') do %> +<%= osuny_panel 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 90fcc123832fa6ed470e84f52c5ad6b5d7c0e5af..82171df479a765f308dd10c6818aae061f70b38d 100644 --- a/app/views/admin/application/summary/_show.html.erb +++ b/app/views/admin/application/summary/_show.html.erb @@ -1,3 +1,3 @@ -<%= osuny_panel title: t('admin.summary') do %> +<%= osuny_panel 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 1a296c913cac76dee7fe481b193cabe7dea93bae..012f773b96d7c8130c3dda13a98fc13e2b0fc5c7 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 %> -<%= osuny_panel title: Communication::Block.model_name.human(count: 2), action: action do %> +<%= osuny_panel 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 9c424c05927c673c266922f553aeb93b01647aa0..ddf7c391408e571aca1314dfa7056bbf8d25f52c 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"> - <%= osuny_panel title: t('content') do %> + <%= osuny_panel 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 45451bb697985723e91d5d26f65d998ba0e8b63e..c32563a36c4c3f1dfd5ff0f216b52ccceb80caec 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' %> -<%= osuny_panel title: t('metadata'), action: action do %> +<%= osuny_panel 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 01a5e69874ea9b4aaf1474cc018712309fca0c15..c53bd9a5876ffb03287a3cad0f0b0b53ff55f285 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"> - <%= osuny_panel title: t('content') do %> + <%= osuny_panel 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"> - <%= osuny_panel title: t('activerecord.attributes.communication/website/post.categories') do %> + <%= osuny_panel 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"> - <%= osuny_panel title: t('metadata') do %> + <%= osuny_panel 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 fdbf1fb9345fc52dfc6c3e5d1947e8ab2d85a253..346aad96228e1b75a2b3ee1a553daa872e9d5544 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 %> - <%= osuny_panel title: Communication::Website::Post.model_name.human(count: 2) do %> + <%= osuny_panel 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 %> - <%= osuny_panel title: Communication::Website::Category.model_name.human(count: 2), action: action do %> + <%= osuny_panel 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"> - <%= osuny_panel title: t('communication.authors', count: 2) do %> + <%= osuny_panel 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 2fba951182c328eba7bbb110f0895166d0c96cc6..60cf061830f16d006f993a8bf153b7ff31f07b60 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> - <%= osuny_panel title: t('metadata') do %> + <%= osuny_panel 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 88ff2eec4b8b9e071d91a1d9d993bcd1e2b3950b..fe28e0e4a8bdaeb31267d2c6d9b9dcf61337d2d2 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) %> -<%= osuny_panel title: t('communication.website.last_pages'), action: action do %> +<%= osuny_panel 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 bd0766ad36aedc9abb3cb4a4aa4a77770a7de883..17ce17ce71837926dd0dea018fdef41aa198f6de 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) %> -<%= osuny_panel title: t('communication.website.last_posts'), action: action do %> +<%= osuny_panel 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 17035cd5cf73df76601a753b786f831aa6feba34..4577103412a7f7fc2084d82b6dcc88c82cd96f2e 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"> - <%= osuny_panel title: t('hello', name: current_user.first_name) do %> + <%= osuny_panel 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"> - <%= osuny_panel title: Delayed::Job.all.length, + <%= osuny_panel 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 %>"> - <%= osuny_panel title: website, + <%= osuny_panel 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 %>"> - <%= osuny_panel title: extranet, + <%= osuny_panel 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 %>"> - <%= osuny_panel title: journal, + <%= osuny_panel 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/schools/_form.html.erb b/app/views/admin/education/schools/_form.html.erb index 2b34f9c9f58753a9aa239209913e3927de5424c4..3ac9696e290e885e54eafb84452684f3e2a65e78 100644 --- a/app/views/admin/education/schools/_form.html.erb +++ b/app/views/admin/education/schools/_form.html.erb @@ -4,7 +4,7 @@ <div class="row"> <div class="col-xxl-6"> - <%= osuny_panel title: t('metadata') do %> + <%= osuny_panel t('metadata') do %> <%= f.input :name %> <%= f.input :phone %> <%= f.input :address %> @@ -25,7 +25,7 @@ <% end %> </div> <div class="col-xxl-6"> - <%= osuny_panel title: Education::Program.model_name.human(count: 2) do %> + <%= osuny_panel Education::Program.model_name.human(count: 2) do %> <%= f.association :programs, as: :check_boxes, collection: collection_tree(current_university.education_programs), diff --git a/app/views/admin/education/schools/roles/_form.html.erb b/app/views/admin/education/schools/roles/_form.html.erb index b03b38d179a400b6a670a59d6121987a284f8447..af5cdc9bbc2578e2c69bd07932d562fbd70f28d3 100644 --- a/app/views/admin/education/schools/roles/_form.html.erb +++ b/app/views/admin/education/schools/roles/_form.html.erb @@ -6,33 +6,28 @@ <div class="row"> <div class="col-md-8"> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= t('admin.infos') %></h5> - </div> - <div class="card-body"> - <%= f.input :description, as: :string %> - </div> - </div> + <%= osuny_panel t('admin.infos') do %> + <%= f.input :description, as: :string %> + <% end %> </div> <div class="col-md-4"> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h5 class="card-title mb-0"><%= University::Person.model_name.human(count: 2) %></h5> - </div> - <div class="card-body"> - <%= link_to_add_association t('add'), f, :involvements, class: "btn btn-primary mb-3", data: { - 'association-insertion-method': 'append', - 'association-insertion-node': '#involvements' - } %> - - <div class="mb-3" id="involvements" data-sortable="inputs"> - <%= f.simple_fields_for :involvements, role.involvements.sort_by(&:position), include_id: false do |involvement_f| %> - <%= render 'admin/education/schools/roles/involvement_fields', f: involvement_f, include_id: true %> - <% end %> - </div> + <% + action = link_to_add_association t('add'), + f, + :involvements, + class: button_classes, + data: { + 'association-insertion-method': 'append', + 'association-insertion-node': '#involvements' + } + %> + <%= osuny_panel University::Person.model_name.human(count: 2), action: action do %> + <div class="pt-2" id="involvements" data-sortable="inputs"> + <%= f.simple_fields_for :involvements, role.involvements.sort_by(&:position), include_id: false do |involvement_f| %> + <%= render 'admin/education/schools/roles/involvement_fields', f: involvement_f, include_id: true %> + <% end %> </div> - </div> + <% end %> </div> </div> diff --git a/app/views/admin/education/schools/roles/_involvement_fields.html.erb b/app/views/admin/education/schools/roles/_involvement_fields.html.erb index 3be0a41aae1b09623603ffbad83a0ac72f461a26..b90a7d1d0f57f1e0a2b60dcec2d5d7f4047ae590 100644 --- a/app/views/admin/education/schools/roles/_involvement_fields.html.erb +++ b/app/views/admin/education/schools/roles/_involvement_fields.html.erb @@ -1,16 +1,14 @@ <% include_id ||= false %> -<div class="card nested-fields mb-2"> - <div class="card-body"> - <div class="row align-items-center"> - <div class="col-1"> - <i class="fa fa-bars handle"></i> - </div> - <div class="col-9"> - <%= f.association :person, collection: @administration_people, label: false, include_blank: :translate, wrapper: false, required: true %> - </div> - <div class="col-2"> - <%= link_to_remove_association '<i class="fas fa-times"></i>'.html_safe, f, class: 'btn btn-sm btn-danger' %> - </div> +<div class="nested-fields mb-2"> + <div class="row pure__row--small align-items-center"> + <div class="col-1"> + <i class="fa fa-bars handle"></i> + </div> + <div class="col-9"> + <%= f.association :person, collection: @administration_people, label: false, include_blank: :translate, wrapper: false, required: true %> + </div> + <div class="col-2"> + <%= link_to_remove_association '<i class="fas fa-times"></i>'.html_safe, f, class: 'btn btn-sm btn-danger' %> </div> </div> <%= f.hidden_field :position, data: { 'sortable-input': '' } %> diff --git a/app/views/admin/education/schools/show.html.erb b/app/views/admin/education/schools/show.html.erb index f3bb83bff24f15598fdc06375f2528d2cf2c6431..0875e4b504c4e44c1ae7cee059fe0bbfcafc50cd 100644 --- a/app/views/admin/education/schools/show.html.erb +++ b/app/views/admin/education/schools/show.html.erb @@ -3,7 +3,7 @@ <div class="row"> <div class="col-xxl-4"> - <%= osuny_panel title: t('metadata') do %> + <%= osuny_panel t('metadata') do %> <%= osuny_label Education::School.human_attribute_name('address') %> <p> <%= @school.address %><br> @@ -17,7 +17,7 @@ <% if @school.programs.any? %> <div class="col-xxl-4"> - <%= osuny_panel title: Education::School.human_attribute_name('programs') do %> + <%= osuny_panel Education::School.human_attribute_name('programs') do %> <ul class="list-unstyled"> <% @school.programs.ordered.each do |program| %> <li><%= link_to_if can?(:read, program), program, [:admin, program] %></li> @@ -31,7 +31,7 @@ <% if @school.websites.any? %> <div class="col-xxl-4"> - <%= osuny_panel title: Education::School.human_attribute_name('websites') do %> + <%= osuny_panel Education::School.human_attribute_name('websites') do %> <ul class="list-unstyled"> <% @school.websites.each do |website| %> <li><%= link_to website, [:admin, website] %></li> diff --git a/app/views/admin/education/schools/show/_roles.html.erb b/app/views/admin/education/schools/show/_roles.html.erb index ee8477df5f6c61c43a978e5da3a4e79aa9aec020..130aae1161fc8d5f5835299303314af63b00f397 100644 --- a/app/views/admin/education/schools/show/_roles.html.erb +++ b/app/views/admin/education/schools/show/_roles.html.erb @@ -4,7 +4,7 @@ action += link_to t('education.schools.manage_roles'), admin_education_school_roles_path(school_id: @school.id), class: button_classes if can?(:update, University::Role) %> -<%= osuny_panel title: Education::School.human_attribute_name('roles'), action: action do %> +<%= osuny_panel Education::School.human_attribute_name('roles'), action: action do %> <% if @roles.any? %> <div class="table-responsive"> <table class="<%= table_classes %>"> diff --git a/app/views/admin/education/teachers/show/_programs.html.erb b/app/views/admin/education/teachers/show/_programs.html.erb index 284eea2a55fc882687b7548b1a4fcf3267d70ba9..4bd47968af89f808bf5726cc66c8a0e84a942524 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 %> - <%= osuny_panel title: Education::Program.model_name.human(count: 2), + <%= osuny_panel 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/organizations/show.html.erb b/app/views/admin/university/organizations/show.html.erb index ffe5bcb1e5cd233fce1bf985509724b4df3285f7..6034ab47d497af7c325d02873f0cb5120e7b237e 100644 --- a/app/views/admin/university/organizations/show.html.erb +++ b/app/views/admin/university/organizations/show.html.erb @@ -3,11 +3,11 @@ <div class="col-md-8"> <%= render 'admin/application/summary/show', about: @organization %> - <%= osuny_panel title: University::Organization.human_attribute_name('text') do %> + <%= osuny_panel University::Organization.human_attribute_name('text') do %> <%= @organization.text.to_s.html_safe %> <% end if strip_tags(@organization.text.to_html).present? %> - <%= osuny_panel title: University::Organization.human_attribute_name('contact') do %> + <%= osuny_panel University::Organization.human_attribute_name('contact') do %> <div class="row pure__row--small"> <% [ :address, @@ -47,7 +47,7 @@ </div> <% end %> - <%= osuny_panel title: University::Organization.human_attribute_name('legal') do %> + <%= osuny_panel University::Organization.human_attribute_name('legal') do %> <div class="row pure__row--small"> <div class="col-xxl-6"> <%= osuny_label University::Organization.human_attribute_name('long_name') %> @@ -68,14 +68,14 @@ </div> <div class="col-md-4"> - <%= osuny_panel title: t('informations') do %> + <%= osuny_panel t('informations') do %> <%= osuny_label University::Organization.human_attribute_name('slug') %> <p><%= @organization.slug %></p> <%= osuny_label University::Organization.human_attribute_name('active') %> <p><%= t @organization.active %></> <% end %> - <%= osuny_panel title: t('university.organization.logo') do %> + <%= osuny_panel t('university.organization.logo') do %> <% if @organization.logo.attached? %> <%= osuny_label University::Organization.human_attribute_name('logo') %> <%= kamifusen_tag @organization.logo, class: 'img-fluid img-fill bg-light img-thumbnail p-5 mb-3' %> diff --git a/app/views/admin/university/people/_form.html.erb b/app/views/admin/university/people/_form.html.erb index 5c9b4e9f959f2f1bd9f51edb358d704f36ce1eef..655df3b1316a5bfc2e2d21f68f0afa06dc5391cf 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"> - <%= osuny_panel title: University::Person.human_attribute_name('essentials') do %> + <%= osuny_panel 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 %> - <%= osuny_panel title: University::Person.human_attribute_name('contacts') do %> + <%= osuny_panel 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 %> - <%= osuny_panel title: University::Person.human_attribute_name('socials') do %> + <%= osuny_panel 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 %> - <%= osuny_panel title: University::Person.human_attribute_name('abilities') do %> + <%= osuny_panel 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"> - <%= osuny_panel title: t('metadata') do %> + <%= osuny_panel 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 %> - <%= osuny_panel title: University::Person.human_attribute_name('picture') do %> + <%= osuny_panel 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 232c4447b912c1a3921127e6f3b8a4d12a41cde7..72b3fd55b91e52081ab536397533917283cf6421 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 %> - <%= osuny_panel title: t('content') do %> + <%= osuny_panel t('content') do %> <div class="row pure__row--small"> <% unless person.gender.blank? %> <div class="col-md-6"> @@ -44,7 +44,7 @@ <% end %> <% end %> - <%= osuny_panel title: University::Person.human_attribute_name('socials') do %> + <%= osuny_panel 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"> - <%= osuny_panel title: t('metadata') do %> + <%= osuny_panel 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 %> - <%= osuny_panel title: t('activerecord.attributes.university/person.picture') do %> + <%= osuny_panel 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 b66620b965be1b91529d9d3bee19f671a4123931..8e6780efbcaf3d637fe2946768bef46eb0afbabb 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 %> - <%= osuny_panel title: t('university.person.administrator_roles'), + <%= osuny_panel t('university.person.administrator_roles'), subtitle: "#{involvements.total_count} #{t('university.person.administrator_roles').downcase}" do %> <div class="table-responsive"> <table class="<%= table_classes %>">