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 5619e739c9f045de7ba42e57cf56530e8d333ff4..ef91a9a86c06a752d7745a3cad0530e5a8dc4f87 100644 --- a/app/views/admin/communication/blocks/templates/contact/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/contact/_edit.html.erb @@ -5,68 +5,55 @@ </div> <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> - </div> - <div class="card-body"> - <%= block_component_edit :name %> - <%= block_component_edit :address %> - <div class="row pure__row--small"> - <div class="col-md-4"> - <%= block_component_edit :zipcode %> - </div> - <div class="col-md-8"> - <%= block_component_edit :city %> - </div> + <%= osuny_panel t('.contacts') do %> + <%= block_component_edit :name %> + <%= block_component_edit :address %> + <div class="row pure__row--small"> + <div class="col-md-4"> + <%= block_component_edit :zipcode %> + </div> + <div class="col-md-8"> + <%= block_component_edit :city %> </div> - <%= block_component_edit :country %> </div> - </div> + <%= block_component_edit :country %> + <% end %> </div> <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="<%= Icon::DELETE %>"></i> - </a> - </div> + <% + action = "<a class=\"#{ button_classes }\" v-on:click=\"data.phone_numbers.push('')\">#{ t('.add') }</a>" + placeholder = t '.phones.placeholder' + %> + <%= osuny_panel t('.phones.label'), action: action do %> + <div v-for="(element, index) in data.phone_numbers"> + <div class="d-flex mb-2"> + <input type="tel" + class="form-control" + placeholder="<%= placeholder %>" + v-model="data.phone_numbers[index]"> + <a class="btn text-danger" v-on:click="data.phone_numbers.splice(index, 1)"> + <i class="<%= Icon::DELETE %>"></i> + </a> </div> </div> - </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="<%= Icon::DELETE %>"></i> - </a> - </div> + <% end %> + <% + action = "<a class=\"#{ button_classes }\" v-on:click=\"data.emails.push('')\">#{ t('.add') }</a>" + placeholder = t '.mails.placeholder' + %> + <%= osuny_panel t('.mails.label'), action: action do %> + <div v-for="(element, index) in data.emails"> + <div class="d-flex mb-2"> + <input type="email" + class="form-control" + placeholder="<%= placeholder %>" + v-model="data.emails[index]"> + <a class="btn text-danger" v-on:click="data.emails.splice(index, 1)"> + <i class="<%= Icon::DELETE %>"></i> + </a> </div> </div> - </div> + <% end %> </div> </div> diff --git a/app/views/admin/communication/websites/authors/_list.html.erb b/app/views/admin/communication/websites/authors/_list.html.erb index 17348cbf0747ea5f56952d000b4a7ca483c08303..1795b918fdb3e6b078dba8fb86de63abb590b3d5 100644 --- a/app/views/admin/communication/websites/authors/_list.html.erb +++ b/app/views/admin/communication/websites/authors/_list.html.erb @@ -5,6 +5,7 @@ <th><%= University::Person.human_attribute_name('last_name') %></th> <th><%= University::Person.human_attribute_name('first_name') %></th> <th><%= t('communication.number_of_posts') %></th> + <th></th> </tr> </thead> <tbody> @@ -13,6 +14,7 @@ <td><%= link_to author.last_name, admin_communication_website_author_path(website_id: @website.id, id: author.id) %></td> <td><%= link_to author.first_name, admin_communication_website_author_path(website_id: @website.id, id: author.id) %></td> <td><%= author.communication_website_posts.count %></td> + <td></td> </tr> <% end %> </tbody> diff --git a/app/views/admin/communication/websites/authors/index.html.erb b/app/views/admin/communication/websites/authors/index.html.erb index d254cda93ffaf2e50012d10dab30bac88d85af22..3f3eb9c903f5624f9d40b50ba38979141105274e 100644 --- a/app/views/admin/communication/websites/authors/index.html.erb +++ b/app/views/admin/communication/websites/authors/index.html.erb @@ -2,15 +2,8 @@ <%= render 'admin/communication/websites/sidebar' do %> <%= render 'filters', current_path: admin_communication_website_authors_path, filters: @filters if @filters.any? %> - - <div class="card"> - <%= render 'admin/communication/websites/authors/list', authors: @authors %> - <% if @authors.total_pages > 1 %> - <div class="card-footer"> - <%= paginate @authors, theme: 'bootstrap-5' %> - </div> - <% end %> - </div> + <%= render 'admin/communication/websites/authors/list', authors: @authors %> + <%= paginate @authors, theme: 'bootstrap-5' %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/layouts/themes/pure/_panel.html.erb b/app/views/admin/layouts/themes/pure/_panel.html.erb index 622f74dd953a269dad2b4628e7d9fa97a0885603..653f5538dfc93d3659e60b8f760caede7e5589d4 100644 --- a/app/views/admin/layouts/themes/pure/_panel.html.erb +++ b/app/views/admin/layouts/themes/pure/_panel.html.erb @@ -1,11 +1,13 @@ <section class="pure__section flex-fill position-relative"> <%= image_tag image, class: 'img-fluid mb-3', loading: :lazy if image %> - <% if action %> - <div class="float-end"><%= raw action %></div> - <% end %> - <% if title %> - <h2><%= title %></h2> - <% end %> + <div class="d-flex"> + <% if title %> + <h2 class="mb-3"><%= title %></h2> + <% end %> + <% if action %> + <div class="ms-5"><%= raw action %></div> + <% end %> + </div> <% if subtitle %> <p><%= subtitle %></p> <% end %>