diff --git a/Gemfile.lock b/Gemfile.lock index 4cb778cacf9877c83c73d854e9c51b05f8897961..ff0e6e62953afed7180b45c6d2139b51f3b465b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -103,7 +103,7 @@ GEM autoprefixer-rails (10.4.13.0) execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.788.0) + aws-partitions (1.790.0) aws-sdk-core (3.178.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -112,7 +112,7 @@ GEM aws-sdk-kms (1.71.0) aws-sdk-core (~> 3, >= 3.177.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.130.0) + aws-sdk-s3 (1.131.0) aws-sdk-core (~> 3, >= 3.177.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) @@ -131,7 +131,7 @@ GEM rails (>= 3.1) breadcrumbs_on_rails (4.1.0) railties (>= 5.0) - bugsnag (6.25.2) + bugsnag (6.26.0) concurrent-ruby (~> 1.0) builder (3.2.4) byebug (11.1.3) diff --git a/app/views/admin/application/i18n/_inline.html.erb b/app/views/admin/application/i18n/_inline.html.erb index 2f6378a7ad390798e833c668ae317f98c61de26e..4c5b3bc773b67690f2b7c07ad3212bf4d40f208d 100644 --- a/app/views/admin/application/i18n/_inline.html.erb +++ b/app/views/admin/application/i18n/_inline.html.erb @@ -1,5 +1,5 @@ <% if about.available_languages.many? %> - <br> <%= t('admin.i18n.in', lang: language_name(about.language.iso_code).downcase) %> + <%= t('admin.i18n.in', lang: language_name(about.language.iso_code).downcase) %> <% route_args = about.is_direct_object? ? [:admin, about.becomes(about.class.base_class)] @@ -12,5 +12,5 @@ [*route_args, lang: language.iso_code] }.compact %> - <br>(<%= t('admin.i18n.switch_to', choices: links.to_sentence).html_safe %>) + (<%= t('admin.i18n.switch_to', choices: links.to_sentence).html_safe %>) <% end %> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/content/_editor.html.erb b/app/views/admin/communication/blocks/content/_editor.html.erb index 8831804f2b863c3c8ba4e905f6869019be42021b..1896a0fa17ed58624106cba9148251892347dff0 100644 --- a/app/views/admin/communication/blocks/content/_editor.html.erb +++ b/app/views/admin/communication/blocks/content/_editor.html.erb @@ -1,27 +1,70 @@ <div class="js-content-editor mb-5" data-sort-blocks-url="<%= reorder_admin_communication_blocks_path(lang: nil, website_id: nil, extranet_id: nil) %>" data-sort-headings-url="<%= reorder_admin_communication_headings_path(lang: nil, website_id: nil, extranet_id: nil) %>"> - <div class=" content-editor__elements - content-editor__elements__root - js-content-editor-sortable-container" - id="content-editor-elements-root"> - <% about.blocks.without_heading.ordered.each do |block| %> - <%= render 'admin/communication/blocks/block', block: block %> - <% end %> - <% about.headings.root.ordered.each do |heading| %> - <%= render 'admin/communication/blocks/headings/heading', heading: heading %> - <% end %> - </div> - <div class="content-editor__actions row mt-5"> - <div class="col-lg-4"> - <%= link_to t('admin.communication.blocks.headings.add'), - new_admin_communication_heading_path(about_id: about.id, about_type: about.class.name), - class: 'py-5 px-2 d-block bg-light text-center border h4' if can? :create, Communication::Block::Heading %> + <ul class="nav nav-tabs justify-content-md-end mt-0 mt-md-n4"> + <li class="nav-item"> + <a class="nav-link active" + id="mode-content-tab" + data-bs-toggle="tab" + data-bs-target="#mode-content" + type="button" + role="tab" + aria-controls="mode-content" + aria-selected="true"> + Écrire le contenu + </a> + </li> + <li class="nav-item"> + <a class="nav-link" + id="mode-structure-tab" + data-bs-toggle="tab" + data-bs-target="#mode-structure" + type="button" + role="tab" + aria-controls="mode-structure" + aria-selected="false"> + Organiser le plan + </a> + </li> + </ul> + <div class="tab-content"> + <div class="tab-pane fade show active" + id="mode-content" + role="tabpanel" + aria-labelledby="mode-content-tab" + tabindex="0"> + <div class=" content-editor__elements + content-editor__elements__root + js-content-editor-sortable-container" + id="content-editor-elements-root" + v-show="mode == 'content'"> + <% about.blocks.without_heading.ordered.each do |block| %> + <%= render 'admin/communication/blocks/block', block: block %> + <% end %> + <% about.headings.root.ordered.each do |heading| %> + <%= render 'admin/communication/blocks/headings/heading', heading: heading %> + <% end %> + </div> + <div class="content-editor__actions row mt-5"> + <div class="col-lg-4"> + <%= link_to t('admin.communication.blocks.headings.add'), + new_admin_communication_heading_path(about_id: about.id, about_type: about.class.name), + class: 'py-5 px-2 d-block bg-light text-center border h4' if can? :create, Communication::Block::Heading %> + </div> + <div class="col-lg-8"> + <%= link_to t('admin.communication.blocks.add'), + new_admin_communication_block_path(about_id: about.id, about_type: about.class.name), + class: 'py-5 px-2 d-block bg-light text-center border h4' if can? :create, Communication::Block %> + </div> + </div> </div> - <div class="col-lg-8"> - <%= link_to t('admin.communication.blocks.add'), - new_admin_communication_block_path(about_id: about.id, about_type: about.class.name), - class: 'py-5 px-2 d-block bg-light text-center border h4' if can? :create, Communication::Block %> + <div class="tab-pane fade" + id="mode-structure" + role="tabpanel" + aria-labelledby="profile-tab" + tabindex="1"> + plan </div> </div> + </div> 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 0f58738714517bb4cf1859b792527c17b1740a9e..11f23bc1deabecc8cac8a5ed0344d8844598d576 100644 --- a/app/views/admin/communication/websites/pages/show/_metadata.html.erb +++ b/app/views/admin/communication/websites/pages/show/_metadata.html.erb @@ -14,27 +14,25 @@ <%= render 'admin/application/i18n/inline', about: @page %> - <% if @page.parent %> - <br> - Dans + <% if @page.parent && !@page.parent.is_home? %> + dans <%= link_to_if can?(:read, @page.parent), @page.parent, admin_communication_website_page_path( website_id: @website.id, id: @page.parent.id - ) %> + ) %>. <% end %> <% if @page.children.any? %> - <br> - <%= Communication::Website::Page.human_attribute_name('children') %> : + avec comme pages enfants : <%= raw @page.children.ordered.map { |child| link_to_if can?(:read, child), child, admin_communication_website_page_path( website_id: @website.id, id: child.id), class: "#{'draft' unless child.published?}" - }.join(', ') %> + }.join(', ') %>. <% end %> <% if @page.full_width %>