diff --git a/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.eot b/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.eot new file mode 100755 index 0000000000000000000000000000000000000000..390803abc2fcda8b7d27550389b58e818f1fecb1 Binary files /dev/null and b/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.eot differ diff --git a/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.ttf b/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.ttf new file mode 100755 index 0000000000000000000000000000000000000000..4d6459646cb14e45c699a8a92308879fd9416ffd Binary files /dev/null and b/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.ttf differ diff --git a/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.woff b/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.woff new file mode 100755 index 0000000000000000000000000000000000000000..0ddef095ff7f63abe723ac24456cfdb9f6cfb887 Binary files /dev/null and b/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.woff differ diff --git a/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.woff2 b/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.woff2 new file mode 100755 index 0000000000000000000000000000000000000000..2d57f6eab291dbdd173c083093c1e1e42317c0a0 Binary files /dev/null and b/app/assets/fonts/Basier-Square/basiersquare-semibold-webfont.woff2 differ diff --git a/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.eot b/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.eot new file mode 100755 index 0000000000000000000000000000000000000000..4f95be87f157d51e37c05678b9b68a2896722f1e Binary files /dev/null and b/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.eot differ diff --git a/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.ttf b/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.ttf new file mode 100755 index 0000000000000000000000000000000000000000..42f12fee34130024708354b4d7de57f7a28db63c Binary files /dev/null and b/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.ttf differ diff --git a/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.woff b/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.woff new file mode 100755 index 0000000000000000000000000000000000000000..825002aa04c58a72191f89c56ce15e7b9e19ac8b Binary files /dev/null and b/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.woff differ diff --git a/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.woff2 b/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.woff2 new file mode 100755 index 0000000000000000000000000000000000000000..5a9b153f89ccb984d000b08d1f648d6bfac588a5 Binary files /dev/null and b/app/assets/fonts/Basier-Square/basiersquare-semibolditalic-webfont.woff2 differ diff --git a/app/assets/javascripts/admin/pure.js b/app/assets/javascripts/admin/pure.js index aa96e4785e2122a1d5a8f8f4f5c96192ec2041f6..ce84c279a86652825ff124a99876d8cf2f5339c1 100644 --- a/app/assets/javascripts/admin/pure.js +++ b/app/assets/javascripts/admin/pure.js @@ -6,6 +6,7 @@ //= require simple_form_bs5_file_input //= require cropperjs/dist/cropper //= require jquery-cropper/dist/jquery-cropper +// TODO remove appstack js //= require appstack/app //= require gdpr/cookie_consent //= require sortablejs/Sortable diff --git a/app/assets/stylesheets/admin/appstack/style.sass b/app/assets/stylesheets/admin/appstack/style.sass index 1dc6a960393144b77ff31327402e27e1b859989c..21d18f7cc2e805e9e3bf2b221f10aa411643189c 100644 --- a/app/assets/stylesheets/admin/appstack/style.sass +++ b/app/assets/stylesheets/admin/appstack/style.sass @@ -48,7 +48,8 @@ main.content h1 margin-bottom: 30px - +p + color: black .sidebar-nav .fas min-width: 20px @@ -113,4 +114,28 @@ h1 padding-bottom: 6px .pure__separation - display: none \ No newline at end of file + display: none + +// Menu item +.kind--selected + * + color: white + +// Bloc datatable +.fake-table + border: 1px solid $border-color + display: table + margin-bottom: 10px + .tr + border-bottom: 1px solid $border-color + .td + min-width: 120px + padding: 10px !important + &:not(:first-child) + border-left: 1px solid $border-color + .tbody + .tr + &:nth-child(even) + background: $table-striped-bg + &:hover + background: $table-hover-bg \ No newline at end of file diff --git a/app/assets/stylesheets/admin/commons/batch-selectable.sass b/app/assets/stylesheets/admin/commons/batch-selectable.sass new file mode 100644 index 0000000000000000000000000000000000000000..d6668a68fdae941bb3f13d8a13bd4a48f065c4b5 --- /dev/null +++ b/app/assets/stylesheets/admin/commons/batch-selectable.sass @@ -0,0 +1,7 @@ +[data-batch-selectable] + [data-batch-selectable-role] + opacity: 0.1 + transition: opacity 0.25s ease + &:hover + [data-batch-selectable-role] + opacity: 1 \ No newline at end of file diff --git a/app/assets/stylesheets/admin/commons/filters.sass b/app/assets/stylesheets/admin/commons/filters.sass new file mode 100644 index 0000000000000000000000000000000000000000..2b94774f13aaa6b9d462d87285c60feb49b586cd --- /dev/null +++ b/app/assets/stylesheets/admin/commons/filters.sass @@ -0,0 +1,10 @@ +.filters + position: relative + &__button + min-width: 100px + position: absolute + right: 0 + top: 0 + &__content + padding-bottom: 30px + padding-right: 200px diff --git a/app/assets/stylesheets/admin/commons/table.sass b/app/assets/stylesheets/admin/commons/table.sass new file mode 100644 index 0000000000000000000000000000000000000000..a9f375aa740f6ac52276f8138bd2d55d9fb276b4 --- /dev/null +++ b/app/assets/stylesheets/admin/commons/table.sass @@ -0,0 +1,8 @@ +.table + th:first-of-type, + td:first-of-type + padding-left: 0 + &--with-actions + td:last-of-type + padding-right: 0 + text-align: right \ No newline at end of file diff --git a/app/assets/stylesheets/admin/pure.sass b/app/assets/stylesheets/admin/pure.sass index b7fbeb0d0b706bc0130c63de3045c10b4941ef11..7352c10568d9972e971e1ea4f206cdb43cd5f8a0 100644 --- a/app/assets/stylesheets/admin/pure.sass +++ b/app/assets/stylesheets/admin/pure.sass @@ -13,3 +13,5 @@ @import '../commons/*' @import 'commons/*' @import 'pure/style' +@import 'pure/buttons' +@import 'pure/navigation' diff --git a/app/assets/stylesheets/admin/pure/buttons.sass b/app/assets/stylesheets/admin/pure/buttons.sass new file mode 100644 index 0000000000000000000000000000000000000000..150d278fc5e908c73b0326109b6d82cf2bf5c415 --- /dev/null +++ b/app/assets/stylesheets/admin/pure/buttons.sass @@ -0,0 +1,7 @@ +.btn-xs + font-size: 14px + padding: 2px 7px + +.btn-light + background: $color-background + border-color: $color-border diff --git a/app/assets/stylesheets/admin/pure/fonts.sass b/app/assets/stylesheets/admin/pure/fonts.sass index 001a9d14141e30dda057c97e7e284c9dbf26f9b2..d5d812a345cafcd7126b8713aca29774f9b611c8 100644 --- a/app/assets/stylesheets/admin/pure/fonts.sass +++ b/app/assets/stylesheets/admin/pure/fonts.sass @@ -17,11 +17,11 @@ font-family: 'Basier Square' font-style: normal font-weight: 700 - src: asset-url("Basier-Square/basiersquare-bold-webfont.woff2") format("woff2"), url("Basier-Square/basiersquare-bold-webfont.woff") format("woff") + src: asset-url("Basier-Square/basiersquare-semibold-webfont.woff2") format("woff2"), url("Basier-Square/basiersquare-semibold-webfont.woff") format("woff") @font-face font-display: swap font-family: 'Basier Square' font-style: italic font-weight: 700 - src: asset-url("Basier-Square/basiersquare-bolditalic-webfont.woff2") format("woff2"), url("Basier-Square/basiersquare-bolditalic-webfont.woff") format("woff") + src: asset-url("Basier-Square/basiersquare-semibolditalic-webfont.woff2") format("woff2"), url("Basier-Square/basiersquare-semibolditalic-webfont.woff") format("woff") diff --git a/app/assets/stylesheets/admin/pure/navigation.sass b/app/assets/stylesheets/admin/pure/navigation.sass new file mode 100644 index 0000000000000000000000000000000000000000..02cd813268f12a9346ea734208ae563dd1efdd8a --- /dev/null +++ b/app/assets/stylesheets/admin/pure/navigation.sass @@ -0,0 +1,42 @@ +.navbar + left: 0 + padding-top: $spacing2 + position: absolute + right: 0 + .bi + font-size: 26px + vertical-align: middle + .navbar-brand + img + width: 100px + .btn-open + margin-right: -14px +#menu + background: black + bottom: 0 + color: white + left: 0 + overflow-y: scroll + padding-bottom: 30px + position: fixed + right: 0 + top: 0 + z-index: 1000 + .avatar + width: 80px + .menu-content + margin-top: 150px + position: relative + ul + list-style-type: none + padding: 0 + li + padding: 5px 0 + span + opacity: 0.2 + a + color: white + text-decoration-color: rgba(255, 255, 255, 0.2) + text-decoration-line: underline + &:hover + text-decoration-color: rgba(255, 255, 255, 1) diff --git a/app/assets/stylesheets/admin/pure/style.sass b/app/assets/stylesheets/admin/pure/style.sass index a5b981a046dbb371f9aa788cc53db4df64b57489..3f242ffed1efc26af5f3c234226246794474eba3 100644 --- a/app/assets/stylesheets/admin/pure/style.sass +++ b/app/assets/stylesheets/admin/pure/style.sass @@ -15,54 +15,22 @@ border-width: 10px margin-bottom: $spacing3 -.navbar - position: absolute - left: 0 - right: 0 - padding-top: $spacing2 - .bi - font-size: 26px - vertical-align: middle - .navbar-brand - img - width: 100px - .btn-open - margin-right: -14px -#menu - position: fixed - top: 0 - left: 0 - right: 0 - bottom: 0 - background: black - color: white - overflow-y: scroll - z-index: 1000 - padding-bottom: 30px - .avatar - width: 80px - .menu-content - position: relative - margin-top: 150px - ul - list-style-type: none - padding: 0 - li - padding: 5px 0 - span - opacity: 0.2 - a - color: white - text-decoration: underline - text-decoration-color: #FFFFFF66 - &:hover - text-decoration-color: #FFFFFFFF +.dashboard-index + .pure__section + .float-end + // No icon in cards + display: none + +.draggable-item + margin-bottom: $spacing1 .hero padding-top: 150px padding-bottom: 30px background-color: $color-background-alt margin-bottom: 30px + @media (min-height: 800px) + padding-top: 250px main min-height: 70vh @@ -125,16 +93,8 @@ a color: $color-accent font-weight: bold -.btn-xs - font-size: 14px - padding: 2px 7px - -.btn-light - background: $color-background - border-color: $color-border - .commands - background: $color-background-alt + background: $color-commands position: sticky bottom: 0 left: 0 @@ -155,30 +115,20 @@ a &__description font-size: px2rem(14) -.filters - position: absolute - top: 0 - right: 0 - margin-top: 0 !important - -#collapseFilters - padding-top: 0 !important - + br - display: none - .sdfi-deletable-file__preview margin-top: 10px -#collapseFilters - padding-top: 50px - .table input[type=checkbox] margin-right: 10px th color: $color-text-alt + font-size: $form-label-font-size font-weight: normal +.handle + margin-right: $spacing0 + footer min-height: 300px a diff --git a/app/assets/stylesheets/admin/pure/variables.sass b/app/assets/stylesheets/admin/pure/variables.sass index 5fc44d4938c9cbcc059b02a3a82acb35bdd25c31..bcd959e9ea98b566114aeabdef909d7929e94cca 100644 --- a/app/assets/stylesheets/admin/pure/variables.sass +++ b/app/assets/stylesheets/admin/pure/variables.sass @@ -6,6 +6,8 @@ $color-border: rgba(0, 0, 0, 0.1) $color-background-alt: #F2F2F2 $color-background: #FFFFFF +$color-commands: #222222 + $color-valid: #BEDABE // Spacing diff --git a/app/assets/stylesheets/commons/_block.sass b/app/assets/stylesheets/commons/_block.sass index a76ade84fea284a34a7928b7a122a6277b1338b1..29e55c9ea10976aebe3ee455c823843621152f3d 100644 --- a/app/assets/stylesheets/commons/_block.sass +++ b/app/assets/stylesheets/commons/_block.sass @@ -6,25 +6,21 @@ display: none .fake-table - display: table border-collapse: collapse caption-side: bottom - border: 1px solid $border-color + display: table .thead, .tbody display: table-row-group + .tr + .td + padding-bottom: 5px + padding-right: 5px .tr display: table-row - border-bottom: 1px solid $border-color .td display: table-cell min-width: 120px - &:not(:first-child) - border-left: 1px solid $border-color .thead white-space: nowrap - .tbody - .tr - &:nth-child(even) - background: $table-striped-bg - &:hover - background: $table-hover-bg + .btn-danger + margin-left: 5px diff --git a/app/helpers/admin/application_helper.rb b/app/helpers/admin/application_helper.rb index cde3b0187511206ac396d4e39e9da96863be7768..c1d8e91089d5e35534e3fe3b9c258157544eca2b 100644 --- a/app/helpers/admin/application_helper.rb +++ b/app/helpers/admin/application_helper.rb @@ -65,6 +65,11 @@ module Admin::ApplicationHelper raw "<label class=\"form-label\">#{title}</label>" end + def if_appstack(string) + return '' if current_admin_theme != 'appstack' + " #{string}" + end + def duplicate_link(object) return unless can?(:update, object) link_to t('admin.duplicate'), @@ -86,8 +91,14 @@ module Admin::ApplicationHelper classes end - def table_classes - 'table table-hover' + def table_classes(with_actions: true) + classes = 'table' + classes += ' table--with-actions' if with_actions + classes + end + + def table_actions_cell + 'text-end pe-0' end def submit(form) diff --git a/app/views/admin/administration/qualiopi/evaluations/_list.html.erb b/app/views/admin/administration/qualiopi/evaluations/_list.html.erb index 4a1a84b7826c88e413665b46bd6695ebce23b214..1d15f6796c7018ef9b52e8a7739ca05f3ec01cf6 100644 --- a/app/views/admin/administration/qualiopi/evaluations/_list.html.erb +++ b/app/views/admin/administration/qualiopi/evaluations/_list.html.erb @@ -1,5 +1,5 @@ <div class="table-responsive"> - <table class="<%= table_classes %> mt-5"> + <table class="<%= table_classes(with_actions: false) %> mt-5"> <thead> <tr> <th><%= Education::Program.model_name.human %></th> diff --git a/app/views/admin/administration/qualiopi/indicators/index.html.erb b/app/views/admin/administration/qualiopi/indicators/index.html.erb index 372ca77509d841363a420c9c344c3f55899637c6..c0a5e8bcace3562dec2b61c5332c7fd85cf93a37 100644 --- a/app/views/admin/administration/qualiopi/indicators/index.html.erb +++ b/app/views/admin/administration/qualiopi/indicators/index.html.erb @@ -16,7 +16,7 @@ <td><%= indicator.criterion %></td> <td><%= indicator.number %></td> <td><%= link_to indicator, [:admin, indicator] %></td> - <td class="text-end"> + <td> <%= edit_link indicator %> <%= destroy_link indicator %> </td> diff --git a/app/views/admin/application/_dependencies.html.erb b/app/views/admin/application/_dependencies.html.erb index c732511f88c2fee0eac6cea7dd281de321081d1e..b9aa06804d5bd5bd433980ac994ea4777059d4d9 100644 --- a/app/views/admin/application/_dependencies.html.erb +++ b/app/views/admin/application/_dependencies.html.erb @@ -2,57 +2,54 @@ expanded ||= false %> <% if current_user.server_admin? %> -<section class="mt-5"> - <div class="float-end"> - <i class="fas fa-arrow-down text-muted" - data-bs-toggle="collapse" - data-bs-target="#dependencies" - aria-expanded="<%= expanded %>" - aria-controls="dependencies"></i> - </div> - <p class="text-muted mb-0">Dépendances</p> - <p class="small text-muted">Visible uniquement pour les server admins</p> - <div class="card-body collapse <%= 'show' if expanded %>" id="dependencies"> - <h2 class="h5">git_dependencies</h2> - <div class="table-responsive"> - <table class="<%= table_classes %>"> - <thead> - <tr> - <th>Id</th> - <th>Class</th> - <th>Name</th> - </tr> - </thead> - <tbody> - <% git_dependencies.each do |dependency| %> - <tr> - <td><%= dependency.id %></td> - <td><%= dependency.class %></td> - <td><%= dependency.to_s %></td> - </tr> - <% end %> - </tbody> - </table> - </div> +<i class="fas fa-gear text-muted" + data-bs-toggle="collapse" + data-bs-target="#dependencies" + aria-expanded="<%= expanded %>" + aria-controls="dependencies"></i> +<div id="dependencies" class="collapse"> + <%= osuny_panel 'Dependencies', subtitle: 'Only for server admins' do %> + <h2 class="h5">git_dependencies</h2> + <div class="table-responsive"> + <table class="<%= table_classes %>"> + <thead> + <tr> + <th>Id</th> + <th>Class</th> + <th>Name</th> + </tr> + </thead> + <tbody> + <% git_dependencies.each do |dependency| %> + <tr> + <td><%= dependency.id %></td> + <td><%= dependency.class %></td> + <td><%= dependency.to_s %></td> + </tr> + <% end %> + </tbody> + </table> + </div> - <h2 class="h5 mt-5">active_storage_blobs</h2> - <div class="table-responsive"> - <table class="<%= table_classes %>"> - <thead> - <tr> - <th>Id</th> - <th>Filename</th> - </tr> - </thead> - <tbody> - <% active_storage_blobs.each do |blob| %> - <tr> - <td><%= blob.id %></td> - <td><%= blob.filename %></td> - </tr> - <% end %> - </tbody> - </table> - </div> -</section> + <h2 class="h5 mt-5">active_storage_blobs</h2> + <div class="table-responsive"> + <table class="<%= table_classes %>"> + <thead> + <tr> + <th>Id</th> + <th>Filename</th> + </tr> + </thead> + <tbody> + <% active_storage_blobs.each do |blob| %> + <tr> + <td><%= blob.id %></td> + <td><%= blob.filename %></td> + </tr> + <% end %> + </tbody> + </table> + </div> + <% end %> +</div> <% end %> diff --git a/app/views/admin/application/_filters.html.erb b/app/views/admin/application/_filters.html.erb index 9e03627f76e8139581be0b54798c4f250ddf3344..5378f14976bac2f134b718abb4d9ac259dd67477 100644 --- a/app/views/admin/application/_filters.html.erb +++ b/app/views/admin/application/_filters.html.erb @@ -4,9 +4,9 @@ should_be_open = false filters.each { |filter| should_be_open = true if params.has_key?(filter[:scope_name]) } %> -<% if collapsable %> - <div class="text-end filters mt-n5"> - <a class="btn btn-outline-secondary btn-sm" +<div class="filters"> + <% if collapsable %> + <a class="btn btn-outline-secondary btn-sm filters__button" data-bs-toggle="collapse" href="#collapseFilters" role="button" @@ -15,18 +15,16 @@ filters.each { |filter| should_be_open = true if params.has_key?(filter[:scope_n <i class="fas fa-filter"></i> <%= t('filters.buttons.expand') %> </a> - </div> -<% end %> -<div class="mt-4 mb-n3 collapse <%= (!collapsable || should_be_open) ? 'show' : '' %>" id="collapseFilters"> - <%= form_tag current_path, method: :get, class: 'do-not-unlock' do |f| %> - <div class="row"> + <% end %> + <div class="collapse filters__content <%= (!collapsable || should_be_open) ? 'show' : '' %>" id="collapseFilters"> + <%= form_tag current_path, method: :get, class: 'do-not-unlock' do |f| %> <% filters.each do |filter| %> - <div class="col-md-4"> + <div class="filters__content__filter"> <% if filter[:scope_name] == :for_search_term %> <%= text_field_tag filter[:scope_name], params[filter[:scope_name]], placeholder: filter[:label], - class: 'form-control mb-3 filter' %> + class: 'form-control mb-2 filter' %> <% else %> <% if filter[:tree] %> <% choices = collection_tree(filter[:choices]).map { |elmt| [elmt[:label].html_safe, elmt[:id]] } %> @@ -37,16 +35,12 @@ filters.each { |filter| should_be_open = true if params.has_key?(filter[:scope_n <%= select_tag field_name, options_for_select(choices, params[filter[:scope_name]]), include_blank: filter[:label], - class: 'form-select mb-3 filter' %> + class: 'form-select mb-2 filter' %> <% end %> </div> <% end %> - <div class="col-md-4"> - <%= submit_tag t('filters.buttons.submit'), class: 'btn btn-primary btn-submit' %> - <%= link_to t('reset'), current_path, class: 'btn btn-secondary' %> - </div> - </div> - <% end %> -</div> - -<br> + <%= submit_tag t('filters.buttons.submit'), class: 'btn btn-primary btn-submit' %> + <%= link_to t('reset'), current_path, class: 'btn btn-secondary' %> + <% end %> + </div> +</div> \ No newline at end of file diff --git a/app/views/admin/communication/blocks/_list.html.erb b/app/views/admin/communication/blocks/_list.html.erb index 012f773b96d7c8130c3dda13a98fc13e2b0fc5c7..aa96b020f1ef35bfd748ec6110a33c51568107f2 100644 --- a/app/views/admin/communication/blocks/_list.html.erb +++ b/app/views/admin/communication/blocks/_list.html.erb @@ -23,7 +23,7 @@ action += link_to t('add'), height: "100px", alt: '', style:"max-height: 75px" %> </td> <td><%= render 'admin/application/a11y/status', about: block %></td> - <td class="text-end pe-0"> + <td> <div class="btn-group"> <%= duplicate_link block %> <%= edit_link block %> diff --git a/app/views/admin/communication/blocks/components/file/_edit.html.erb b/app/views/admin/communication/blocks/components/file/_edit.html.erb index 9b5ddb9c6e59ecba5945637e57f53e7c155106c1..ad296973efa93cf54e6be4fd95c6ecc343d09035 100644 --- a/app/views/admin/communication/blocks/components/file/_edit.html.erb +++ b/app/views/admin/communication/blocks/components/file/_edit.html.erb @@ -17,7 +17,7 @@ remove = t 'admin.communication.blocks.components.file.input.remove' </div> <div v-if="<%= model %>.<%= property %>.id"> <p><b>{{ element.file.filename }}</b></p> - <a class="btn btn-sm btn-danger" + <a class="btn btn-sm text-danger" v-on:click="<%= model %>.<%= property %>={}"> <i class="fas fa-times"></i> <%= remove %> diff --git a/app/views/admin/communication/blocks/components/image/_edit.html.erb b/app/views/admin/communication/blocks/components/image/_edit.html.erb index 2517ab791b6fab11e93a23d363be214c8f772b37..7a48179ec35d0ce7db0351289734be1fdcb09943 100644 --- a/app/views/admin/communication/blocks/components/image/_edit.html.erb +++ b/app/views/admin/communication/blocks/components/image/_edit.html.erb @@ -17,7 +17,7 @@ remove = t 'admin.communication.blocks.components.image.input.remove' <div v-if="<%= model %>.<%= property %>.id"> <img :src="getImageUrl(<%= model %>.<%= property %>)" class="img-fluid mb-3" /> </div> - <a class="btn btn-sm btn-danger" + <a class="btn btn-sm text-danger" v-on:click="<%= model %>.<%= property %>={}" v-if="<%= model %>.<%= property %>.id"> <i class="fas fa-times"></i> diff --git a/app/views/admin/communication/blocks/edit.html.erb b/app/views/admin/communication/blocks/edit.html.erb index e537888e3063a5b7e4515bbdfe133783668f4b68..d57c344baacdba41e8e45f2cabe0122919169d07 100644 --- a/app/views/admin/communication/blocks/edit.html.erb +++ b/app/views/admin/communication/blocks/edit.html.erb @@ -1,4 +1,7 @@ <% content_for :title, @block %> +<% content_for :title_right do %> + <%= t "enums.communication.block.template_kind.#{@block.template_kind}" %> +<% end %> <div id="app" v-cloak> <div class="spinner-border text-primary" role="status"> <span class="sr-only"><%= t 'loading' %></span> diff --git a/app/views/admin/communication/blocks/templates/call_to_action/_edit.html.erb b/app/views/admin/communication/blocks/templates/call_to_action/_edit.html.erb index 8536cd91acfdbdded821b40802678761ed59b405..ba5e9f19bba7a030b0b957c60759615011020c57 100644 --- a/app/views/admin/communication/blocks/templates/call_to_action/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/call_to_action/_edit.html.erb @@ -21,35 +21,33 @@ </div> <h3 class="h4"><%= t '.buttons' %></h3> -<draggable :list="data.elements" handle=".dragHandle" class="list-group"> - <div v-for="(element, index) in data.elements" class="list-group-item"> - <div class="d-flex"> - <div> - <a class="btn ps-0 pt-0 dragHandle"> - <i class="fa fa-bars handle"></i> - </a> - </div> - <div class="flex-fill"> - <div class="row mb-n3"> - <div class="col-lg-3"> - <%= block_component_edit :title, template: @element %> - </div> - <div class="col-lg-4"> - <%= block_component_edit :url, template: @element %> - </div> - <div class="col-lg-4"> - <label class="form-label d-none d-xl-block"> </label> - <%= block_component_edit :target_blank, template: @element %> - </div> - <div class="col-lg-1"> - <a class="btn btn-sm btn-danger float-end" - v-on:click="data.elements.splice(data.elements.indexOf(element), 1)"> - <i class="fas fa-times"></i> - </a> - </div> +<draggable :list="data.elements" handle=".dragHandle" class="<%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="d-flex draggable-item <%= if_appstack 'list-group-item' %>"> + <div> + <a class="btn ps-0 pt-0 dragHandle"> + <i class="fa fa-bars handle"></i> + </a> + </div> + <div class="flex-fill"> + <div class="row pure__row--small mb-n3"> + <div class="col-lg-4"> + <%= block_component_edit :title, template: @element %> + </div> + <div class="col-lg-4"> + <%= block_component_edit :url, template: @element %> + </div> + <div class="col-lg-4"> + <label class="form-label d-none d-xl-block"> </label> + <%= block_component_edit :target_blank, template: @element %> </div> </div> </div> + <div class="text-end"> + <a class="btn btn-sm text-danger" + v-on:click="data.elements.splice(data.elements.indexOf(element), 1)"> + <i class="fas fa-times"></i> + </a> + </div> </div> </draggable> <div class="mt-3"> diff --git a/app/views/admin/communication/blocks/templates/chapter/_edit.html.erb b/app/views/admin/communication/blocks/templates/chapter/_edit.html.erb index bd17197b00a13b5aba56ee63ecca98b15017d087..23e543361997318a4b97cc6b7082913542870039 100644 --- a/app/views/admin/communication/blocks/templates/chapter/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/chapter/_edit.html.erb @@ -6,9 +6,7 @@ <%= block_component_edit :notes %> </div> <div class="col-xxl-4"> - <label class="form-label"> - <%= t "admin.communication.blocks.templates.chapter.edit.image.label" %> - </label> + <h2 class="h4"><%= t("admin.communication.blocks.templates.chapter.edit.image.label") %></h2> <%= block_component_edit :image %> <%= block_component_edit :alt, label: t('admin.communication.blocks.components.image.alt.label'), diff --git a/app/views/admin/communication/blocks/templates/contact/_edit.html.erb b/app/views/admin/communication/blocks/templates/contact/_edit.html.erb index 4b5d8277cc6f4bafc9c1290c8c0dad86a63d27ea..78408b9bf45f58ed50d11651e127a5591013c287 100644 --- a/app/views/admin/communication/blocks/templates/contact/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/contact/_edit.html.erb @@ -3,8 +3,8 @@ <%= block_component_edit :description %> </div> </div> -<div class="row mb-4"> - <div class="col-md-6 col-xl-4"> +<div class="row pure__row--small mb-4"> + <div class="col-xl-6"> <div class="card"> <div class="card-header d-flex"> <h3 class="h4"><%= t '.contacts' %></h3> @@ -12,7 +12,7 @@ <div class="card-body"> <%= block_component_edit :name %> <%= block_component_edit :address %> - <div class="row"> + <div class="row pure__row--small"> <div class="col-md-4"> <%= block_component_edit :zipcode %> </div> @@ -24,52 +24,46 @@ </div> </div> </div> - <div class="col-md-6 col-xl-8"> - <div class="row"> - <div class="col-xl-6"> - <div class="card"> - <div class="card-header d-flex"> - <h3 class="h4 pt-1 flex-fill"><%= t '.phones.label' %></h3> - <a class="btn bn-sm btn-primary" v-on:click="data.phone_numbers.push('')"> - <%= t('.add') %> + <div class="col-xl-6"> + <div class="card"> + <div class="card-header d-flex"> + <h3 class="h4 pt-1 flex-fill"><%= t '.phones.label' %></h3> + <a class="btn bn-sm btn-primary" v-on:click="data.phone_numbers.push('')"> + <%= t('.add') %> + </a> + </div> + <div class="card-body mb-n2"> + <div v-for="(element, index) in data.phone_numbers"> + <div class="d-flex mb-2"> + <input type="tel" + class="form-control" + placeholder="<%= t '.phones.placeholder' %>" + v-model="data.phone_numbers[index]"> + <a class="btn text-danger" v-on:click="data.phone_numbers.splice(index, 1)"> + <i class="fas fa-times"></i> </a> </div> - <div class="card-body mb-n2"> - <div v-for="(element, index) in data.phone_numbers"> - <div class="d-flex mb-2"> - <input type="tel" - class="form-control" - placeholder="<%= t '.phones.placeholder' %>" - v-model="data.phone_numbers[index]"> - <a class="btn text-danger" v-on:click="data.phone_numbers.splice(index, 1)"> - <i class="fas fa-times"></i> - </a> - </div> - </div> - </div> </div> </div> - <div class="col-xl-6"> - <div class="card"> - <div class="card-header d-flex"> - <h3 class="h4 flex-fill"><%= t '.mails.label' %></h3> - <a class="btn bn-sm btn-primary" v-on:click="data.emails.push('')"> - <%= t('.add') %> + </div> + <div class="card"> + <div class="card-header d-flex"> + <h3 class="h4 flex-fill"><%= t '.mails.label' %></h3> + <a class="btn bn-sm btn-primary" v-on:click="data.emails.push('')"> + <%= t('.add') %> + </a> + </div> + <div class="card-body mb-n2"> + <div v-for="(element, index) in data.emails"> + <div class="d-flex mb-2"> + <input type="email" + class="form-control" + placeholder="<%= t '.mails.placeholder' %>" + v-model="data.emails[index]"> + <a class="btn text-danger" v-on:click="data.emails.splice(index, 1)"> + <i class="fas fa-times"></i> </a> </div> - <div class="card-body mb-n2"> - <div v-for="(element, index) in data.emails"> - <div class="d-flex mb-2"> - <input type="email" - class="form-control" - placeholder="<%= t '.mails.placeholder' %>" - v-model="data.emails[index]"> - <a class="btn text-danger" v-on:click="data.emails.splice(index, 1)"> - <i class="fas fa-times"></i> - </a> - </div> - </div> - </div> </div> </div> </div> @@ -78,33 +72,31 @@ <h3 class="h4"><%= t '.slots' %></h3> <%= block_component_add_element t('.add_slot') %> -<draggable :list="data.elements" handle=".dragHandle" class="list-group"> - <div v-for="(element, index) in data.elements" class="list-group-item"> - <div class="d-flex"> - <div> - <a class="btn ps-0 pt-0 dragHandle"> - <i class="fa fa-bars handle"></i> - </a> - </div> - <div class="flex-fill"> - <div class="row mb-n3"> - <div class="col-xl-4"> - <%= block_component_edit :title, template: @element %> - </div> - <div class="col-xl-4 col-md-6"> - <%= block_component_edit :time_slot_morning, template: @element %> - </div> - <div class="col-xl-4 col-md-6"> - <%= block_component_edit :time_slot_afternoon, template: @element %> - </div> +<draggable :list="data.elements" handle=".dragHandle" class="<%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="d-flex draggable-item <%= if_appstack 'list-group-item' %>"> + <div> + <a class="btn ps-0 pt-0 dragHandle"> + <i class="fa fa-bars handle"></i> + </a> + </div> + <div class="flex-fill"> + <div class="row pure__row--small mb-n3"> + <div class="col-xl-4"> + <%= block_component_edit :title, template: @element %> + </div> + <div class="col-xl-4 col-md-6"> + <%= block_component_edit :time_slot_morning, template: @element %> + </div> + <div class="col-xl-4 col-md-6"> + <%= block_component_edit :time_slot_afternoon, template: @element %> </div> </div> - <div> - <a class="btn text-danger position-absolute top-0 end-0" - v-on:click="data.elements.splice(index, 1)"> - <i class="fas fa-times"></i> - </a> - </div> + </div> + <div> + <a class="btn text-danger position-absolute top-0 end-0" + v-on:click="data.elements.splice(index, 1)"> + <i class="fas fa-times"></i> + </a> </div> </div> </draggable> diff --git a/app/views/admin/communication/blocks/templates/datatable/_edit.html.erb b/app/views/admin/communication/blocks/templates/datatable/_edit.html.erb index 546c3eaa3fb8f86e7253fd23949ec2bfd4a35d14..3656e86ffbeedd89b234d51454e802c17deee1fc 100644 --- a/app/views/admin/communication/blocks/templates/datatable/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/datatable/_edit.html.erb @@ -9,7 +9,7 @@ </div> <div class="table-responsive mb-5"> - <div class="fake-table table"> + <div class="fake-table"> <div class="thead"> <div class="tr"> <div class="td" v-for="(column, index) in data.columns"> @@ -17,21 +17,17 @@ <input type="text" class="form-control" v-model="data.columns[index]"> - <a class="btn btn-danger ms-2" + <a class="btn text-danger" v-on:click="data.columns.splice(index, 1); data.elements.forEach(row => row.cells.splice(index, 1));"> <i class="fas fa-times"></i> </a> </div> </div> - <div class="td text-end"> - <a class="btn btn-primary me-2" + <div class="td"> + <a class="btn btn-primary mt-n1" v-on:click="data.columns.push('')"> <i class="fas fa-plus"></i> colonne </a> - <a class="btn btn-primary" - v-on:click="data.elements.push({cells: []})"> - <i class="fas fa-plus"></i> ligne - </a> </div> </div> </div> @@ -44,12 +40,11 @@ </div> <div class="td" class="text-end"> <div class="d-flex"> - <a class="btn btn-danger" + <a class="btn text-danger" v-on:click="data.elements.splice(index, 1)"> <i class="fas fa-times"></i> </a> - - <a class="btn ms-auto dragHandle"> + <a class="btn dragHandle"> <i class="fa fa-bars handle"></i> </a> </div> @@ -57,6 +52,10 @@ </div> </draggable> </div> + <a class="btn btn-primary" + v-on:click="data.elements.push({cells: []})"> + <i class="fas fa-plus"></i> ligne + </a> </div> <div class="row"> diff --git a/app/views/admin/communication/blocks/templates/definitions/_edit.html.erb b/app/views/admin/communication/blocks/templates/definitions/_edit.html.erb index acf892a73e2e6eea8ea5c2fd740d94d23b04d0ad..209859a3f6ffdfeea38d99fd5d555c0fb0dd18ce 100644 --- a/app/views/admin/communication/blocks/templates/definitions/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/definitions/_edit.html.erb @@ -4,37 +4,30 @@ </div> </div> -<%= block_component_add_element t('.add_definition') %> - -<draggable :list="data.elements" handle=".dragHandle"> - <div v-for="(element, index) in data.elements"> - <div class="card"> - <div class="card-body"> - <div class="d-flex"> - <div> - <a class="btn ps-0 pt-0 dragHandle"> - <i class="fa fa-bars handle"></i> - </a> - </div> - <div class="flex-fill"> - <div class="row mb-n3"> - <div class="col-lg-5"> - <%= block_component_edit :title, template: @element %> - </div> - <div class="col-lg-7"> - <%= block_component_edit :description, template: @element %> - </div> - </div> - </div> - <div> - <a class="btn btn-sm btn-danger ms-3" - v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" - title="<%= t '.remove_definition' %>"> - <i class="fas fa-times"></i> - </a> - </div> +<draggable :list="data.elements" handle=".dragHandle" class="mb-3 <%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="d-flex draggable-item <%= if_appstack 'list-group-item' %>"> + <div> + <a class="btn ps-0 pt-0 dragHandle"> + <i class="fa fa-bars handle"></i> + </a> + </div> + <div class="flex-fill"> + <div class="row pure__row--small mb-n3"> + <div class="col-lg-5"> + <%= block_component_edit :title, template: @element %> + </div> + <div class="col-lg-7"> + <%= block_component_edit :description, template: @element %> </div> </div> </div> + <div> + <a class="btn btn-sm text-danger ms-3" + v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" + title="<%= t '.remove_definition' %>"> + <i class="fas fa-times"></i> + </a> + </div> </div> </draggable> +<%= block_component_add_element t('.add_definition') %> diff --git a/app/views/admin/communication/blocks/templates/files/_edit.html.erb b/app/views/admin/communication/blocks/templates/files/_edit.html.erb index dd7c974b6f0273f86a2a06b7b664548a65164673..918d8db735d04eb8caacb4d4053bfad6f081dee3 100644 --- a/app/views/admin/communication/blocks/templates/files/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/files/_edit.html.erb @@ -14,7 +14,7 @@ <i class="fa fa-bars handle"></i> </a> <div class="float-end"> - <a class="btn btn-sm btn-danger" + <a class="btn btn-sm text-danger" v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" title="<%= t '.remove_file' %>"> <i class="fas fa-times"></i> diff --git a/app/views/admin/communication/blocks/templates/gallery/_edit.html.erb b/app/views/admin/communication/blocks/templates/gallery/_edit.html.erb index f3a67262ffd83aa59d8686fd05757949e19c7497..20a8b508ac8c1e5cd25a10cbb5b7c57036977616 100644 --- a/app/views/admin/communication/blocks/templates/gallery/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/gallery/_edit.html.erb @@ -6,64 +6,55 @@ <%= block_component_edit :layout %> -<div v-show="data.elements.length > 1"> - <hr class="my-5"> - - <p>Déplacer les images ci-dessous pour les mettre dans l'ordre souhaité</p> - - <draggable :list="data.elements" class="row pure__row--small"> - <div v-for="(element, index) in data.elements" class="col-xxl-1 col-lg-2 col-4"> - <div class="card"> - <div class="card-header p-1 text-center"> - <i class="fas fa-arrows-alt"></i> - </div> - <div v-if="element.image.id"> - <img :src="getImageUrl(element.image)" class="img-fluid" /> - </div> +<p>Déplacer les images ci-dessous pour les mettre dans l'ordre souhaité</p> +<draggable :list="data.elements" class="row pure__row--small"> + <div v-for="(element, index) in data.elements" class="col-xxl-1 col-lg-2 col-4"> + <div class="card"> + <div class="card-header p-1 text-center"> + <i class="fas fa-arrows-alt"></i> + </div> + <div v-if="element.image.id"> + <img :src="getImageUrl(element.image)" class="img-fluid" /> </div> </div> - </draggable> -</div> + </div> +</draggable> <hr class="my-5"> <p>Envoyer les images et saisir les textes ci-dessous</p> -<div v-for="(element, index) in data.elements"> - <div class="card"> - <div class="card-body"> - <div class="float-end"> - <a class="btn btn-sm btn-danger" - v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" - title="<%= t '.remove_image' %>"> - <i class="fas fa-times"></i> - </a> +<div v-for="(element, index) in data.elements" class="mb-5"> + <%= osuny_panel 'Image' do %> + <div class="text-end"> + <a class="btn btn-sm text-danger mt-n4" + v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" + title="<%= t 'admin.communication.blocks.templates.gallery.edit.remove_image' %>"> + <i class="fas fa-times"></i> + </a> + </div> + <div class="row pure__row--small"> + <div class="col-lg-6"> + <%= block_component_edit :image, + template: @element, + label: t('admin.communication.blocks.components.image.input.label'), + placeholder: t('admin.communication.blocks.components.image.input.placeholder') %> </div> - <div class="flex-fill"> - <div class="row mb-n3"> - <div class="col-lg-6"> - <%= block_component_edit :image, - template: @element, - label: t('admin.communication.blocks.components.image.input.label'), - placeholder: t('admin.communication.blocks.components.image.input.placeholder') %> - </div> - <div class="col-lg-6"> - <%= block_component_edit :alt, - template: @element, - label: t('admin.communication.blocks.components.image.alt.label'), - placeholder: t('admin.communication.blocks.components.image.alt.placeholder') %> - <%= block_component_edit :credit, - template: @element, - label: t('admin.communication.blocks.components.image.credit.label'), - placeholder: t('admin.communication.blocks.components.image.credit.placeholder'), - summernote_config: 'link' %> - <%= block_component_edit :text, - template: @element %> - </div> - </div> + <div class="col-lg-6"> + <%= block_component_edit :alt, + template: @element, + label: t('admin.communication.blocks.components.image.alt.label'), + placeholder: t('admin.communication.blocks.components.image.alt.placeholder') %> + <%= block_component_edit :credit, + template: @element, + label: t('admin.communication.blocks.components.image.credit.label'), + placeholder: t('admin.communication.blocks.components.image.credit.placeholder'), + summernote_config: 'link' %> + <%= block_component_edit :text, + template: @element %> </div> </div> - </div> + <% end %> </div> <%= block_component_add_element t('.add_image') %> diff --git a/app/views/admin/communication/blocks/templates/key_figures/_edit.html.erb b/app/views/admin/communication/blocks/templates/key_figures/_edit.html.erb index d3326874eea26998e8bccb4ec468c811d0855a12..492cf2199e757e9970d327264bfc10d1778037fd 100644 --- a/app/views/admin/communication/blocks/templates/key_figures/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/key_figures/_edit.html.erb @@ -6,38 +6,32 @@ <%= block_component_add_element t('.add_key') %> -<draggable :list="data.elements" handle=".dragHandle"> - <div v-for="(element, index) in data.elements"> - <div class="card"> - <div class="card-body"> - <div class="d-flex"> - <div> - <a class="btn ps-0 pt-0 dragHandle"> - <i class="fa fa-bars handle"></i> - </a> - </div> - <div class="flex-fill"> - <div class="row mb-n3"> - <div class="col-lg-2"> - <%= block_component_edit :number, template: @element %> - </div> - <div class="col-lg-3"> - <%= block_component_edit :unit, template: @element %> - </div> - <div class="col-lg-7"> - <%= block_component_edit :description, template: @element, rows: 1 %> - </div> - </div> - </div> - <div> - <a class="btn btn-sm btn-danger ms-3" - v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" - title="<%= t '.remove_key' %>"> - <i class="fas fa-times"></i> - </a> - </div> +<draggable :list="data.elements" handle=".dragHandle" class="<%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="d-flex draggable-item <%= if_appstack 'list-group-item' %>"> + <div> + <a class="btn ps-0 dragHandle"> + <i class="fa fa-bars handle"></i> + </a> + </div> + <div class="flex-fill"> + <div class="row pure__row--small mb-n3"> + <div class="col-lg-2"> + <%= block_component_edit :number, template: @element %> + </div> + <div class="col-lg-3"> + <%= block_component_edit :unit, template: @element %> + </div> + <div class="col-lg-7"> + <%= block_component_edit :description, template: @element, rows: 1 %> </div> </div> </div> + <div> + <a class="btn btn-sm text-danger ms-3" + v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" + title="<%= t '.remove_key' %>"> + <i class="fas fa-times"></i> + </a> + </div> </div> </draggable> diff --git a/app/views/admin/communication/blocks/templates/organization_chart/_edit.html.erb b/app/views/admin/communication/blocks/templates/organization_chart/_edit.html.erb index 5997f3dcebf51be5f0ad6bcfbb8a735cca8b06b7..e4ef15e319252aca51f10bb64abb1768588452bc 100644 --- a/app/views/admin/communication/blocks/templates/organization_chart/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/organization_chart/_edit.html.erb @@ -10,8 +10,9 @@ </div> </div> -<draggable :list="data.elements" class="list-group mb-3" handle=".dragHandle"> - <div v-for="(element, index) in data.elements" class="list-group-item"> +<%= osuny_label University::Person.model_name.human(count: 2) %> +<draggable :list="data.elements" class="mb-3<%= if_appstack 'list-group' %>" handle=".dragHandle"> + <div v-for="(element, index) in data.elements" class="<%= if_appstack 'list-group-item' %> draggable-item"> <div class="d-flex"> <div> <a class="btn ps-0 pt-0 dragHandle" title="<%= t '.drag_title' %>"> @@ -19,7 +20,7 @@ </a> </div> <div class="flex-fill"> - <div class="row mb-n3"> + <div class="row pure__row--small mb-n3"> <div class="col-md-6"> <%= block_component_edit :id, template: @element, label: '' %> </div> @@ -29,7 +30,7 @@ </div> </div> <div> - <a class="btn btn-sm btn-danger ms-3" + <a class="btn btn-sm text-danger" v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" title="<%= t '.delete_title' %>"> <i class="fas fa-times"></i> diff --git a/app/views/admin/communication/blocks/templates/pages/_edit.html.erb b/app/views/admin/communication/blocks/templates/pages/_edit.html.erb index 115ca7b2936d2fd00a0a329c671781bcf016fd00..5f305eb00677543b3134351492e0020f11ed1835 100644 --- a/app/views/admin/communication/blocks/templates/pages/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/pages/_edit.html.erb @@ -16,8 +16,8 @@ <div class="mb-4" v-if="data.mode == 'selection'"> <h2 class="h3"><%= t '.selection.title' %></h2> <%= block_component_add_element t('.selection.add') %> - <draggable :list="data.elements" handle=".dragHandle" class="list-group"> - <div v-for="(element, index) in data.elements" class="list-group-item"> + <draggable :list="data.elements" handle=".dragHandle" class="<%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="draggable-item <%= if_appstack 'list-group-item' %>"> <div class="d-flex mb-n3"> <div> <a class="btn ps-0 pt-0 dragHandle" title="Drag and drop"> @@ -28,7 +28,7 @@ <%= block_component_edit :id, template: @element %> </div> <div> - <a class="btn btn-sm btn-danger ms-3" + <a class="btn btn-sm text-danger ms-3" v-on:click="data.elements.splice(data.elements.indexOf(page), 1)" title="Supprimer"> <i class="fas fa-times"></i> diff --git a/app/views/admin/communication/blocks/templates/partners/_edit.html.erb b/app/views/admin/communication/blocks/templates/partners/_edit.html.erb index 8decbfa3caaddeebce784f87c7586e08808659a4..f6385d0273d0c831f4c31bc6b76c11211427a998 100644 --- a/app/views/admin/communication/blocks/templates/partners/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/partners/_edit.html.erb @@ -8,8 +8,8 @@ <%= block_component_edit :alphabetical %> </div> </div> -<draggable :list="data.elements" class="list-group mb-3" handle=".partnerHandle"> - <div v-for="(element, index) in data.elements" class="list-group-item"> +<draggable :list="data.elements" class="mb-3 <%= if_appstack 'list-group' %>" handle=".partnerHandle"> + <div v-for="(element, index) in data.elements" class="draggable-item <%= if_appstack 'list-group-item' %>"> <div class="d-flex mb-n3"> <div> <a class="btn ps-0 pt-0 partnerHandle"> @@ -18,7 +18,7 @@ </div> <div class="flex-fill"> <%= block_component_edit :id, template: @element, label: '' %> - <div class="row" v-if="!element.id"> + <div class="row pure__row--small mt-n2" v-if="!element.id"> <div class="col-xl-4 col-md-6"> <%= block_component_edit :name, template: @element %> </div> @@ -31,7 +31,7 @@ </div> </div> <div> - <a class="btn btn-sm btn-danger ms-3" + <a class="btn btn-sm text-danger ms-3" v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" title="<%= t '.remove_partner' %>"> <i class="fas fa-times"></i> diff --git a/app/views/admin/communication/blocks/templates/posts/_edit.html.erb b/app/views/admin/communication/blocks/templates/posts/_edit.html.erb index bfaa46d91ff1aeb8ace74b158f4df59f9d011fdc..471f3108d4188179f02696eb3d67593ad8823049 100644 --- a/app/views/admin/communication/blocks/templates/posts/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/posts/_edit.html.erb @@ -15,21 +15,19 @@ </div> <div v-if="data.mode === 'selection'"> <%= block_component_add_element t('.add_post') %> - <draggable :list="data.elements" handle=".dragHandle" class="list-group"> - <div v-for="(element, index) in data.elements" class="list-group-item"> - <div class="d-flex"> - <a class="btn ps-0 dragHandle" title="Drag and drop"> - <i class="fa fa-bars handle"></i> - </a> - <div class="flex-fill"> - <%= block_component_edit :id, template: @element %> - </div> - <a class="btn btn-danger ms-3" - v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" - title="Delete"> - <i class="fas fa-times"></i> - </a> + <draggable :list="data.elements" handle=".dragHandle" class="<%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="d-flex draggable-item <%= if_appstack 'list-group-item' %>"> + <a class="btn ps-0 dragHandle" title="Drag and drop"> + <i class="fa fa-bars handle"></i> + </a> + <div class="flex-fill"> + <%= block_component_edit :id, template: @element %> </div> + <a class="btn text-danger ms-3" + v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" + title="Delete"> + <i class="fas fa-times"></i> + </a> </div> </draggable> </div> diff --git a/app/views/admin/communication/blocks/templates/programs/_edit.html.erb b/app/views/admin/communication/blocks/templates/programs/_edit.html.erb index 16b83310392d5b0cff88581abfbd659faa7456df..a5103398fe0553988fc0e12f918c1a6ffb596e8e 100644 --- a/app/views/admin/communication/blocks/templates/programs/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/programs/_edit.html.erb @@ -1,30 +1,21 @@ <% pages = collection_tree(@block.university.programs) %> - -<div class="row pure__row--small"> - <div class="col-lg-6"> - <div class="mb-4"> - <%= block_component_add_element t('.add') %> - <draggable :list="data.elements" handle=".dragHandle" class="list-group"> - <div v-for="(element, index) in data.elements" class="list-group-item"> - <div class="d-flex mb-n3"> - <div> - <a class="btn ps-0 pt-0 dragHandle" title="Drag and drop"> - <i class="fa fa-bars handle"></i> - </a> - </div> - <div class="flex-fill"> - <%= block_component_edit :id, template: @element, label: false %> - </div> - <div> - <a class="btn btn-sm btn-danger ms-3" - v-on:click="data.elements.splice(data.elements.indexOf(page), 1)" - title="Supprimer"> - <i class="fas fa-times"></i> - </a> - </div> - </div> - </div> - </draggable> +<draggable :list="data.elements" handle=".dragHandle" class="mb-3 <%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="d-flex draggable-item <%= if_appstack 'list-group-item' %>"> + <div> + <a class="btn ps-0 pt-0 dragHandle" title="Drag and drop"> + <i class="fa fa-bars handle"></i> + </a> + </div> + <div class="flex-fill mb-n3"> + <%= block_component_edit :id, template: @element, label: false %> + </div> + <div> + <a class="btn btn-sm text-danger ms-3" + v-on:click="data.elements.splice(data.elements.indexOf(page), 1)" + title="Supprimer"> + <i class="fas fa-times"></i> + </a> </div> </div> -</div> +</draggable> +<%= block_component_add_element t('.add') %> diff --git a/app/views/admin/communication/blocks/templates/testimonials/_edit.html.erb b/app/views/admin/communication/blocks/templates/testimonials/_edit.html.erb index c31511b79de89dc7b42349cd1518639dcafc31d7..4452539c9fd4cd9883ff55deee3028fd229868f4 100644 --- a/app/views/admin/communication/blocks/templates/testimonials/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/testimonials/_edit.html.erb @@ -1,15 +1,15 @@ <%= block_component_add_element t('.add_testimonial') %> -<draggable :list="data.elements" handle=".dragHandle" class="row pure__row--small"> - <div v-for="(element, index) in data.elements" class="list-group-item"> - <div class="d-flex"> +<draggable :list="data.elements" handle=".dragHandle" class="row pure__row--small <%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="<%= if_appstack 'list-group-item' %>"> + <div class="d-flex mb-5"> <div> <a class="btn ps-0 pt-0 dragHandle"> <i class="fa fa-bars handle"></i> </a> </div> <div class="flex-fill"> - <div class="row mb-n3"> + <div class="row pure__row--small mb-n3"> <div class="col-lg-4"> <%= block_component_edit :text, template: @element %> </div> @@ -23,7 +23,7 @@ </div> </div> <div> - <a class="btn btn-sm btn-danger ms-3" + <a class="btn btn-sm text-danger ms-3" v-on:click="data.elements.splice(data.elements.indexOf(testimonial), 1)" title="<%= t '.remove_testimonial' %>"> <i class="fas fa-times"></i> diff --git a/app/views/admin/communication/blocks/templates/timeline/_edit.html.erb b/app/views/admin/communication/blocks/templates/timeline/_edit.html.erb index 5d3951c2f2ffa95cfb029c03173d7298ed47f93e..c5bbe37d4fe44b18a21db4f7c65cf86d106ea27e 100644 --- a/app/views/admin/communication/blocks/templates/timeline/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/timeline/_edit.html.erb @@ -1,31 +1,29 @@ <%= block_component_edit :layout %> <%= block_component_add_element t('.add_event') %> -<draggable :list="data.elements" handle=".dragHandle" class="list-group"> - <div v-for="(element, index) in data.elements" class="list-group-item"> - <div class="d-flex"> - <div> - <a class="btn ps-0 pt-0 dragHandle"> - <i class="fa fa-bars handle"></i> - </a> - </div> - <div class="flex-fill"> - <div class="row mb-n3"> - <div class="col-lg-5"> - <%= block_component_edit :title, template: @element %> - </div> - <div class="col-lg-7"> - <%= block_component_edit :text, template: @element %> - </div> +<draggable :list="data.elements" handle=".dragHandle" class="<%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="d-flex draggable-item <%= if_appstack 'list-group-item' %>"> + <div> + <a class="btn ps-0 pt-0 dragHandle"> + <i class="fa fa-bars handle"></i> + </a> + </div> + <div class="flex-fill"> + <div class="row pure__row--small mb-n3"> + <div class="col-lg-5"> + <%= block_component_edit :title, template: @element %> + </div> + <div class="col-lg-7"> + <%= block_component_edit :text, template: @element %> </div> </div> - <div> - <a class="btn btn-sm btn-danger ms-3" - v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" - title="<%= t '.remove_event' %>"> - <i class="fas fa-times"></i> - </a> - </div> + </div> + <div> + <a class="btn btn-sm text-danger ms-3" + v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" + title="<%= t '.remove_event' %>"> + <i class="fas fa-times"></i> + </a> </div> </div> </draggable> \ No newline at end of file diff --git a/app/views/admin/communication/websites/_sidebar.html.erb b/app/views/admin/communication/websites/_sidebar.html.erb index 2c170bb7653e10cc31c9d3345220424ffc906ff3..cc2b8e98a722c5d6a351d747b796da84a79726da 100644 --- a/app/views/admin/communication/websites/_sidebar.html.erb +++ b/app/views/admin/communication/websites/_sidebar.html.erb @@ -52,7 +52,7 @@ </div> </div> </div> - <div class="col-lg-9 col-xl-10"> + <div class="col-lg-9 col-xl-10 offset-xxl-1 col-xxl-9"> <%= yield %> </div> </div> diff --git a/app/views/admin/communication/websites/categories/show.html.erb b/app/views/admin/communication/websites/categories/show.html.erb index dc7cec38208c318ba9ae95e13ad5bac0af38cef8..7d5181b619c323e53cd263915497d161f1a4ee02 100644 --- a/app/views/admin/communication/websites/categories/show.html.erb +++ b/app/views/admin/communication/websites/categories/show.html.erb @@ -7,51 +7,42 @@ <%= render 'admin/communication/blocks/list', about: @category %> </div> <div class="col-md-4"> - <div class="card flex-fill w-100"> - <div class="card-header"> - <h2 class="card-title mb-0 h5"><%= t('metadata') %></h2> - </div> - <div class="card-body"> - <h3 class="h5"><%= Communication::Website::Category.human_attribute_name('slug') %></h3> - <p><%= @category.slug %></p> - <% if @category.parent %> - <h3 class="h5"><%= Communication::Website::Category.human_attribute_name('parent') %></h3> - <p><%= link_to_if can?(:read, @category.parent), - @category.parent, - admin_communication_website_category_path( - website_id: @website.id, - id: @category.parent.id - ) %></p> - <% end %> - <% if @category.children.any? %> - <h3 class="h5"><%= Communication::Website::Category.human_attribute_name('children') %></h3> - <ul class="list-unstyled mb-0"> - <% @category.children.each do |child| %> - <li><%= link_to_if can?(:read, child), - child, - admin_communication_website_category_path( - website_id: @website.id, - id: child.id - ) %></li> - <% end %> - </ul> - <% end %> - </div> - </div> + <%= osuny_panel t('metadata') do %> + <h3 class="h5"><%= Communication::Website::Category.human_attribute_name('slug') %></h3> + <p><%= @category.slug %></p> + <% if @category.parent %> + <h3 class="h5"><%= Communication::Website::Category.human_attribute_name('parent') %></h3> + <p><%= link_to_if can?(:read, @category.parent), + @category.parent, + admin_communication_website_category_path( + website_id: @website.id, + id: @category.parent.id + ) %></p> + <% end %> + <% if @category.children.any? %> + <h3 class="h5"><%= Communication::Website::Category.human_attribute_name('children') %></h3> + <ul class="list-unstyled mb-0"> + <% @category.children.each do |child| %> + <li><%= link_to_if can?(:read, child), + child, + admin_communication_website_category_path( + website_id: @website.id, + id: child.id + ) %></li> + <% end %> + </ul> + <% end %> + <% end %> <%= render 'admin/application/featured_image/show', about: @category %> <%= render 'admin/application/meta_description/show', about: @category %> </div> </div> <% if @posts.total_count > 0 %> - <div class="card"> - <div class="card-header"> - <h5><%= "#{Communication::Website::Post.model_name.human(count: 2)} (#{@posts.total_count})" %></h5> - </div> + <%= osuny_panel Communication::Website::Post.model_name.human(count: 2), + subtitle: "#{@posts.total_count} #{Communication::Website::Post.model_name.human(count: @posts.total_count).downcase }" do %> <%= render 'admin/communication/websites/posts/list', posts: @posts, hide_category: true %> - <div class="card-footer"> - <%= paginate @posts, theme: 'bootstrap-5' %> - </div> - </div> + <%= paginate @posts, theme: 'bootstrap-5' %> + <% end %> <% end %> <% end %> diff --git a/app/views/admin/communication/websites/menus/_form.html.erb b/app/views/admin/communication/websites/menus/_form.html.erb index c6f81f77858e24cdc91e36b519181624c12db619..f15d5e60ddfeed643318842eb85683896d0055d6 100644 --- a/app/views/admin/communication/websites/menus/_form.html.erb +++ b/app/views/admin/communication/websites/menus/_form.html.erb @@ -4,11 +4,9 @@ <div class="row"> <div class="col-md-8"> - <h2 class="h3"><%= t('content') %></h2> <%= f.input :title %> </div> <div class="col-md-4"> - <h2 class="h3"><%= t('metadata') %></h2> <%= f.input :identifier, input_html: menu.persisted? ? {} : { class: 'js-slug-input', diff --git a/app/views/admin/communication/websites/menus/_list.html.erb b/app/views/admin/communication/websites/menus/_list.html.erb index 28058373ffd712d6b5cdabdbca9ea1ab71133d27..1e162483b622a0f77858a3b6f99ed7dba2f335a8 100644 --- a/app/views/admin/communication/websites/menus/_list.html.erb +++ b/app/views/admin/communication/websites/menus/_list.html.erb @@ -12,7 +12,7 @@ <tr> <td><%= link_to menu, admin_communication_website_menu_path(website_id: menu.website.id, id: menu.id) %></td> <td><%= menu.items.count %></td> - <td class="text-end"> + <td> <div class="btn-group" role="group"> <%= link_to t('edit'), edit_admin_communication_website_menu_path(website_id: menu.website.id, id: menu.id), diff --git a/app/views/admin/communication/websites/menus/items/_form.html.erb b/app/views/admin/communication/websites/menus/items/_form.html.erb index fd977e794c0002efccc44992949e1f295bc0d0ad..4926ef4362e310e928104a2fefa246d7836c177c 100644 --- a/app/views/admin/communication/websites/menus/items/_form.html.erb +++ b/app/views/admin/communication/websites/menus/items/_form.html.erb @@ -4,76 +4,72 @@ <%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %> <%= f.input :parent_id, as: :hidden, wrapper: false %> - <h2 class="h3"><%= t('content') %></h2> - <div class="card-body"> - <div class="row pure__row--small"> - <div class="col-lg-6"> - <%= f.input :title %> - </div> - <div class="col-lg-6"> - <div data-kind-if="url"> - <%= f.input :url, as: :string %> - </div> - <div class="<%= 'd-none' unless item.has_about? %> js-about-fields"> - <% - if item.has_about? - if item.kind_page? - about_collection = collection_tree @website.pages - elsif item.kind_diploma? - about_collection = collection @website.education_diplomas - elsif item.kind_program? - about_collection = collection_tree @website.education_programs - elsif item.kind_category? - about_collection = collection_tree @website.categories - elsif item.kind_post? - about_collection = collection @website.posts - elsif item.kind_volume? - about_collection = collection @website.research_volumes - elsif item.kind_paper? - about_collection = collection @website.research_papers - end - else - about_collection = [] - end - %> - <%= f.association :about, - collection: about_collection, - label_method: ->(p) { sanitize p[:label] }, - value_method: ->(p) { p[:id] }, - input_html: { class: 'js-about-id' } %> - <%= f.input :about_type, as: :hidden, input_html: { class: 'js-about-type' } %> + <%= f.input :kind, + as: :hidden, + input_html: { + data: { + url: kind_switch_admin_communication_website_menu_items_path + } + } %> + <div> + <label class="form-label required"> + <%= Communication::Website::Menu::Item.human_attribute_name('kind') %> + <abbr title="required">*</abbr> + </label> + <div class="row pure__row--small"> + <% @website.menu_item_kinds.keys.each do |kind| %> + <div class="col-6 col-lg-4 col-xl-3 col-xxl-2"> + <div class="card kind" data-kind="<%= kind %>"> + <div class="card-body"> + <h3 class="h5"> + <%= t "enums.communication.website.menu.item.kind.#{kind}" %> + </h3> + <p class="text-end mb-0"> + <i class="<%= Communication::Website::Menu::Item.icon_for(kind) %>"></i><br> + </p> + <a class="stretched-link"></a> + </div> </div> </div> + <% end %> + </div> + </div> + <div class="row pure__row--small"> + <div class="col-lg-6"> + <%= f.input :title %> + </div> + <div class="col-lg-6"> + <div data-kind-if="url"> + <%= f.input :url, as: :string %> </div> - <%= f.input :kind, - as: :hidden, - input_html: { - data: { - url: kind_switch_admin_communication_website_menu_items_path - } - } %> - <div> - <label class="form-label required"> - <%= Communication::Website::Menu::Item.human_attribute_name('kind') %> - <abbr title="required">*</abbr> - </label> - <div class="row pure__row--small"> - <% @website.menu_item_kinds.keys.each do |kind| %> - <div class="col-6 col-lg-4 col-xl-3 col-xxl-2"> - <div class="card kind" data-kind="<%= kind %>"> - <div class="card-body"> - <h3 class="h5"> - <%= t "enums.communication.website.menu.item.kind.#{kind}" %> - </h3> - <p class="text-end mb-0"> - <i class="<%= Communication::Website::Menu::Item.icon_for(kind) %>"></i><br> - </p> - <a class="stretched-link"></a> - </div> - </div> - </div> - <% end %> - </div> + <div class="<%= 'd-none' unless item.has_about? %> js-about-fields"> + <% + if item.has_about? + if item.kind_page? + about_collection = collection_tree @website.pages + elsif item.kind_diploma? + about_collection = collection @website.education_diplomas + elsif item.kind_program? + about_collection = collection_tree @website.education_programs + elsif item.kind_category? + about_collection = collection_tree @website.categories + elsif item.kind_post? + about_collection = collection @website.posts + elsif item.kind_volume? + about_collection = collection @website.research_volumes + elsif item.kind_paper? + about_collection = collection @website.research_papers + end + else + about_collection = [] + end + %> + <%= f.association :about, + collection: about_collection, + label_method: ->(p) { sanitize p[:label] }, + value_method: ->(p) { p[:id] }, + input_html: { class: 'js-about-id' } %> + <%= f.input :about_type, as: :hidden, input_html: { class: 'js-about-type' } %> </div> </div> </div> diff --git a/app/views/admin/communication/websites/menus/show.html.erb b/app/views/admin/communication/websites/menus/show.html.erb index b504928cbfa47a88a83b140d43af5eadd79a271c..0ac9ed5b1f63d9202130f675512eeb83abb03972 100644 --- a/app/views/admin/communication/websites/menus/show.html.erb +++ b/app/views/admin/communication/websites/menus/show.html.erb @@ -12,10 +12,10 @@ class: button_classes if can?(:create, Communication::Website::Menu::Item) %> </div> <div class="col-md-4"> - <h2 class="h3"><%= t('metadata') %></h2> - <h3 class="h5"><%= Communication::Website::Menu.human_attribute_name('identifier') %></h3> - <p><%= @menu.identifier %></p> - </div> + <%= osuny_panel t('metadata') do %> + <%= osuny_label Communication::Website::Menu.human_attribute_name('identifier') %> + <p><%= @menu.identifier %></p> + <% end %> </div> <% end %> diff --git a/app/views/admin/communication/websites/pages/_form.html.erb b/app/views/admin/communication/websites/pages/_form.html.erb index ddf7c391408e571aca1314dfa7056bbf8d25f52c..c9b287d2e7343350379e648cacb320c9b1d73ff1 100644 --- a/app/views/admin/communication/websites/pages/_form.html.erb +++ b/app/views/admin/communication/websites/pages/_form.html.erb @@ -19,8 +19,7 @@ url = page.new_record? ? admin_communication_website_pages_path </div> <div class="col-md-4"> <% unless page.is_home? %> - <section class="mb-5"> - <h2 class="h3"><%= t('metadata') %></h2> + <%= osuny_panel t('metadata') do %> <%= f.input :published if page.draftable? %> <%= f.input :slug, as: :string, @@ -41,7 +40,7 @@ url = page.new_record? ? admin_communication_website_pages_path value_method: ->(p) { p[:id] } unless page.is_home? %> <%= f.input :bodyclass if can?(:edit, @website) %> <%= f.input :full_width if page.editable_width? %> - </section> + <% end %> <% else %> <% if @website.languages.many? %> <div class="card flex-fill w-100"> diff --git a/app/views/admin/communication/websites/pages/show.html.erb b/app/views/admin/communication/websites/pages/show.html.erb index 4012ee619468d5d6208602881a2817755233cbfb..86cc6372c5d1fb195e60abcec5cd3cd49045e7b4 100644 --- a/app/views/admin/communication/websites/pages/show.html.erb +++ b/app/views/admin/communication/websites/pages/show.html.erb @@ -4,12 +4,6 @@ <div class="row"> <div class="col-md-8"> - <% if @page.is_special_page? %> - <p> - <%= t('admin.communication.website.pages.is_special_page') %> - <b><%= t("communication.website.pages.defaults.#{@page.type_key}.title") %></b> - </p> - <% end %> <%= render 'admin/application/summary/show', about: @page %> <%= render 'admin/communication/blocks/list', about: @page %> <%= render 'admin/application/dependencies', 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 f197216a5ec32b0bb41386914a68e58508167ca7..58222d6e909323110ac9f14ef062a30e60c374da 100644 --- a/app/views/admin/communication/websites/pages/show/_metadata.html.erb +++ b/app/views/admin/communication/websites/pages/show/_metadata.html.erb @@ -2,17 +2,21 @@ action = link_to t('open'), @page.url, target: :_blank, class: 'btn btn-light btn-xs' %> <%= osuny_panel t('metadata'), action: action do %> - <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('published') %></h3> + <%= osuny_label Communication::Website::Page.human_attribute_name('published') %> <p><%= t @page.published %></p> + <% if @page.is_special_page? %> + <%= osuny_label Communication::Website::Page.human_attribute_name('special_page') %> + <p><%= t("communication.website.pages.defaults.#{@page.type_key}.title") %></p> + <% end %> <% unless @page.slug.blank? %> - <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('slug') %></h3> + <%= osuny_label Communication::Website::Page.human_attribute_name('slug') %> <p><%= @page.slug %></p> <% end %> - <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('path') %></h3> + <%= osuny_label Communication::Website::Page.human_attribute_name('path') %> <p><%= @page.path %></p> <% if @page.parent %> - <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('parent') %></h3> + <%= osuny_label Communication::Website::Page.human_attribute_name('parent') %> <p><%= link_to_if can?(:read, @page.parent), @page.parent, admin_communication_website_page_path( @@ -23,7 +27,7 @@ action = link_to t('open'), @page.url, target: :_blank, class: 'btn btn-light bt <% end %> <% if can?(:edit, @website) && @page.best_bodyclass %> - <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('bodyclass') %></h3> + <%= osuny_label Communication::Website::Page.human_attribute_name('bodyclass') %> <p> <%= @page.best_bodyclass %> <% if @page.bodyclass.blank? %> @@ -35,13 +39,11 @@ action = link_to t('open'), @page.url, target: :_blank, class: 'btn btn-light bt </p> <% end %> - <% if @page.editable_width? %> - <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('full_width') %></h3> - <p><%= t @page.full_width %></p> - <% end %> + <%= osuny_label Communication::Website::Page.human_attribute_name('full_width') %> + <p><%= t @page.full_width %></p> <% if @page.children.any? %> - <h3 class="h5"><%= Communication::Website::Page.human_attribute_name('children') %></h3> + <%= osuny_label Communication::Website::Page.human_attribute_name('children') %> <ul class="list-unstyled mb-0"> <% @page.children.ordered.each do |child| %> <li> diff --git a/app/views/admin/communication/websites/posts/_list.html.erb b/app/views/admin/communication/websites/posts/_list.html.erb index 7a37bed6ebdb76ef124ba88b3c56044d78a76172..5a570b97cd875cc3a56eda25ba778ae625e01e26 100644 --- a/app/views/admin/communication/websites/posts/_list.html.erb +++ b/app/views/admin/communication/websites/posts/_list.html.erb @@ -31,8 +31,8 @@ <td class="ps-0"><%= link_to post, admin_communication_website_post_path(website_id: post.website.id, id: post.id), class: "#{'draft' unless post.published?}" %></td> - <td><%= image_tag post.featured_image.representation(resize: 'x100'), - height: 50 if post.featured_image.attached? && post.featured_image.representable? %></td> + <td class="p-0"><%= image_tag post.featured_image.representation(resize: 'x100'), + height: 50 if post.featured_image.attached? && post.featured_image.representable? %></td> <td> <p class="small mb-0"> <%= l post.published_at, format: :date_with_explicit_month if post.published_at %> @@ -53,7 +53,7 @@ <span class="badge bg-success"><%= Communication::Website::Post.human_attribute_name('pinned') %></span> <% end %> </td> - <td class="text-end"> + <td> <div class="btn-group" role="group"> <%= link_to t('edit'), edit_admin_communication_website_post_path(website_id: post.website.id, id: post.id), diff --git a/app/views/admin/communication/websites/posts/index.html.erb b/app/views/admin/communication/websites/posts/index.html.erb index 346aad96228e1b75a2b3ee1a553daa872e9d5544..121bd4a01c1e99be71a9634fec90a94dbcee8d57 100644 --- a/app/views/admin/communication/websites/posts/index.html.erb +++ b/app/views/admin/communication/websites/posts/index.html.erb @@ -6,37 +6,31 @@ <% end %> <%= render 'admin/communication/websites/sidebar' 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 %> - <%= render 'admin/communication/websites/posts/list', posts: @posts, selectable: true %> - <div> - <% if @posts.total_pages > 1 %> - <div class="float-end mb-3"> - <%= paginate @posts, theme: 'bootstrap-5' %> + <%= render 'filters', current_path: admin_communication_website_posts_path, filters: @filters %> + <div data-batch-selectable class="mb-5"> + <%= form_tag publish_admin_communication_website_posts_path do %> + <%= render 'admin/communication/websites/posts/list', posts: @posts, selectable: true %> + <%= paginate @posts, theme: 'bootstrap-5' %> + <div> + <div data-batch-selectable-role="actions-container"> + <div class="d-flex align-items-center"> + <div class="col-auto me-3"> + <%= t('batch_selectable.title') %> </div> - <% end %> - <div data-batch-selectable-role="actions-container"> - <div class="d-flex align-items-center"> - <div class="col-auto me-3"> - <%= t('batch_selectable.title') %> - </div> - <div class="col-auto me-3"> - <select name="published" class="form-select"> - <option value="false"><%= t('communication.website.posts.unpublished') %></option> - <option value="true"><%= t('communication.website.posts.published') %></option> - </select> - </div> - <div class="col-auto me-3"> - <%= submit_tag t("save"), class: "btn btn-primary" %> - </div> + <div class="col-auto me-3"> + <select name="published" class="form-select"> + <option value="false"><%= t('communication.website.posts.unpublished') %></option> + <option value="true"><%= t('communication.website.posts.published') %></option> + </select> + </div> + <div class="col-auto me-3"> + <%= submit_tag t("save"), class: "btn btn-primary" %> </div> </div> </div> - <% end %> - </div> - <% end %> + </div> + <% end %> + </div> <div class="row"> <% if can?(:create, Communication::Website::Category) || (@root_categories.any? && can?(:edit, @root_categories.first)) %> <div class="col-md-6"> diff --git a/app/views/admin/dashboard/index.html.erb b/app/views/admin/dashboard/index.html.erb index 75b8f71708b81ead46eab95b8572a8e2819ba7dd..ccf96fe7257548ea536c91cd57d4849e12631d1b 100644 --- a/app/views/admin/dashboard/index.html.erb +++ b/app/views/admin/dashboard/index.html.erb @@ -17,13 +17,13 @@ Osuny a un nouveau thème pour l'administration, "Pure". <br> Voulez-vous l'essayer ? </p> - <%= link_to 'Changer de thème', admin_set_theme_path(theme: 'pure'), method: :put, class: button_classes %> + <%= link_to 'Changer de thème', admin_set_theme_path(theme: 'pure'), method: :put %> <% else %> <p> Vous utilisez le thème "Pure" pour l'administration. <br> Voulez-vous revenir au thème "Appstack" ? </p> - <%= link_to 'Changer de thème', admin_set_theme_path(theme: 'appstack'), method: :put, class: button_classes %> + <%= link_to 'Changer de thème', admin_set_theme_path(theme: 'appstack'), method: :put %> <% end %> <% end %> </div> diff --git a/app/views/admin/layouts/themes/appstack/_panel.html.erb b/app/views/admin/layouts/themes/appstack/_panel.html.erb index 7fd6e84c2cc23698790e06dfde368ba6b10843b8..f472e7f66163ccf612ed4315aa00b58cbf640e02 100644 --- a/app/views/admin/layouts/themes/appstack/_panel.html.erb +++ b/app/views/admin/layouts/themes/appstack/_panel.html.erb @@ -1,11 +1,14 @@ <div class="card flex-fill"> <% if title %> - <div class="card-header"> - <% if action %> - <div class="float-end"><%= raw action %></div> - <% end %> - <h2 class="card-title mb-0"><%= title %></h2> - </div> + <div class="card-header mb-n4"> + <% if action %> + <div class="float-end"><%= raw action %></div> + <% end %> + <h2 class="card-title mb-0"><%= title %></h2> + <% if subtitle %> + <p class="text-muted"><%= subtitle %></p> + <% end %> + </div> <% end %> <div class="card-body"> <%= yield %> diff --git a/app/views/admin/research/theses/show.html.erb b/app/views/admin/research/theses/show.html.erb index 9ed9ecdedc67e48982d7c7f341fc09858b6a2faa..52ae8eb490b6171c8d0aa369ed54832cdb8d9824 100644 --- a/app/views/admin/research/theses/show.html.erb +++ b/app/views/admin/research/theses/show.html.erb @@ -4,7 +4,7 @@ <div class="col-xl-6"> <%= simple_format @thesis.abstract %> </div> - <div class="col-xl-6"> + <div class="offset-xl-1 col-xl-5"> <% if @thesis.started_at %> <%= osuny_label Research::Thesis.human_attribute_name('started_at') %> <p><%= l @thesis.started_at %></p> diff --git a/app/views/admin/university/people/_list.html.erb b/app/views/admin/university/people/_list.html.erb index 6ea19c82215d9022a484d6381f7b35641a8ef743..2d1dc713de2e66a20a70b206b792a835e0f0f1a3 100644 --- a/app/views/admin/university/people/_list.html.erb +++ b/app/views/admin/university/people/_list.html.erb @@ -25,7 +25,7 @@ <%= kamifusen_tag person.best_picture, width: 40 if person.best_picture.attached? %> </td> - <td class="text-end"> + <td> <div class="btn-group" role="group"> <%= link_to t('edit'), edit_admin_university_person_path(person), diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 5f8baf67812083cfaefefc03f7c923cea6879632..e970a60ca8d6a23cd1cd0ab56f2e3e419148674f 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -427,7 +427,7 @@ fr: partners: description: Une liste d'organisations, avec leur logo, leur site et leur nom. edit: - add_partner: Ajouter un partenaire + add_partner: Ajouter une organisation alphabetical: label: Ordre alphabétique description: