diff --git a/app/assets/stylesheets/admin/appstack.sass b/app/assets/stylesheets/admin/appstack.sass index c73c3015d3aad8392ea78193c7849a3363a30272..554b284ec97e97c13991d1943dadac93ba992b2d 100644 --- a/app/assets/stylesheets/admin/appstack.sass +++ b/app/assets/stylesheets/admin/appstack.sass @@ -16,3 +16,7 @@ main.content table.table-striped tbody background: white + +.card-footer + .pagination + margin-bottom: 0 diff --git a/app/views/admin/application/_top.html.erb b/app/views/admin/application/_top.html.erb index 350116fb11e1f73519638a76179d56c437128884..ba7522d1b8f3afbbe9d1ad4995893498decf032b 100644 --- a/app/views/admin/application/_top.html.erb +++ b/app/views/admin/application/_top.html.erb @@ -18,7 +18,7 @@ <li> <a class="nav-link nav-link--last js-user-button" href="#"> <% if current_user.picture.attached? && current_user.picture.variable? %> - <%= image_tag current_user.picture.variant(resize: '40x40'), class: 'avatar img-fluid rounded-circle' %> + <%= image_tag current_user.picture.variant(resize: '80x80'), class: 'avatar img-fluid rounded-circle' %> <% else %> <%= image_tag 'avatar.jpg', class: 'avatar img-fluid rounded-circle' %> <% end %> diff --git a/app/views/admin/communication/websites/import.html.erb b/app/views/admin/communication/websites/import.html.erb index d57d6a4e4f1a0c4dcd168fbf68eb6bcb025f8f79..cddec88ecf33be69e5af4546610320d4b362209a 100644 --- a/app/views/admin/communication/websites/import.html.erb +++ b/app/views/admin/communication/websites/import.html.erb @@ -6,46 +6,64 @@ class: button_classes %> <% end %> -<h2><%= @imported_posts.count %> posts</h2> -<table class="<%= table_classes %>"> - <thead> - <tr> - <th><%= Communication::Website::Imported::Post.human_attribute_name('title') %></th> - <th><%= Communication::Website::Imported::Post.human_attribute_name('original') %></th> - <th></th> - </tr> - </thead> - <tbody> - <% @imported_posts.each do |post| %> +<div class="card"> + <div class="card-header"> + <h2><%= @imported_posts.count %> posts</h2> + </div> + <table class="<%= table_classes %>"> + <thead> <tr> - <td><%= link_to post, admin_communication_website_post_path(website_id: post.post.website.id, id: post.post.id) %></td> - <td class="small"><%= link_to post.path, post.url, target: :_blank %></td> - <td> - <%= link_to t('show'), - admin_communication_website_post_path(website_id: post.post.website.id, id: post.post.id), - class: button_classes %> - </td> + <th><%= Communication::Website::Imported::Post.human_attribute_name('title') %></th> + <th><%= Communication::Website::Imported::Post.human_attribute_name('original') %></th> + <th class="text-end" width="150">Generated post</th> </tr> - <% end %> - </tbody> -</table> -<%= paginate @imported_posts, param_name: :posts_page, theme: 'bootstrap-5' %> + </thead> + <tbody> + <% @imported_posts.each do |post| %> + <tr> + <td><%= post %></td> + <td class="small"><%= link_to post.path, post.url, target: :_blank %></td> + <td class="text-end"> + <%= link_to t('show'), + admin_communication_website_post_path(website_id: post.post.website.id, id: post.post.id), + class: button_classes %> + </td> + </tr> + <% end %> + </tbody> + </table> + <div class="card-footer"> + <%= paginate @imported_posts, param_name: :posts_page, theme: 'bootstrap-5' %> + </div> +</div> -<h2 class="mt-5"><%= @imported_pages.count %> pages</h2> -<table class="<%= table_classes %>"> - <thead> - <tr> - <th class="ps-0"><%= Communication::Website::Imported::Page.human_attribute_name('title') %></th> - <th><%= Communication::Website::Imported::Page.human_attribute_name('original') %></th> - </tr> - </thead> - <tbody> - <% @imported_pages.each do |page| %> +<div class="card mt-5"> + <div class="card-header"> + <h2><%= @imported_pages.count %> pages</h2> + </div> + <table class="<%= table_classes %>"> + <thead> <tr> - <td><%= link_to page, admin_communication_website_page_path(website_id: page.page.website.id, id: page.page.id) %></td> - <td class="small"><%= link_to page.path, page.url, target: :_blank %></td> + <th><%= Communication::Website::Imported::Page.human_attribute_name('title') %></th> + <th><%= Communication::Website::Imported::Page.human_attribute_name('original') %></th> + <th class="text-end" width="150">Generated page</th> </tr> - <% end %> - </tbody> -</table> -<%= paginate @imported_pages, param_name: :pages_page, theme: 'bootstrap-5' %> + </thead> + <tbody> + <% @imported_pages.each do |page| %> + <tr> + <td><%= page %></td> + <td class="small"><%= link_to page.path, page.url, target: :_blank %></td> + <td class="text-end"> + <%= link_to t('show'), + admin_communication_website_page_path(website_id: page.page.website.id, id: page.page.id), + class: button_classes %> + </td> + </tr> + <% end %> + </tbody> + </table> + <div class="card-footer"> + <%= paginate @imported_pages, param_name: :pages_page, theme: 'bootstrap-5' %> + </div> +</div> diff --git a/app/views/server/universities/show.html.erb b/app/views/server/universities/show.html.erb index 011851f3fffff1c002eea6b827e68690234fc991..a60e4ddcbfe2f3b9af3972a0e6240c91a78bea50 100644 --- a/app/views/server/universities/show.html.erb +++ b/app/views/server/universities/show.html.erb @@ -1,42 +1,41 @@ <% content_for :title, @university %> <div class="row"> - <div class="col-md-9"> - <p> - <%= link_to @university.url, @university.url, target: :_blank %> - </p> - - <p> - <strong><%= University.human_attribute_name('address') %>:</strong> - <%= @university.address %> - </p> - - <p> - <strong><%= University.human_attribute_name('zipcode') %>:</strong> - <%= @university.zipcode %> - </p> - - <p> - <strong><%= University.human_attribute_name('city') %>:</strong> - <%= @university.city %> - </p> - - <p> - <strong><%= University.human_attribute_name('country') %>:</strong> - <%= @university.country %> - </p> - - <p> - <strong><%= University.human_attribute_name('private') %>:</strong> - <%= @university.private %> - </p> + <div class="col-md-5"> + <div class="card"> + <div class="card-header"> + <h2 class="card-title">Infos</h2> + </div> + <table class="table"> + <tr> + <td>URL</td> + <td class="text-end"><%= link_to @university.url, @university.url, target: :_blank %></td> + </tr> + <% ['address', 'zipcode', 'city', 'country'].each do |variable| %> + <tr> + <td><%= University.human_attribute_name(variable) %></td> + <td class="text-end"><%= @university.send variable %></td> + </tr> + <% end %> + <tr> + <td><%= University.human_attribute_name('private') %></td> + <td class="text-end"><%= @university.private %></td> + </tr> + </table> + </div> </div> <div class="col-md-3"> - <%= kamifusen_tag @university.logo, class: 'img-fluid' %> + <div class="card"> + <div class="card-header"> + <h2 class="card-title">Logo</h2> + </div> + <div class="card-body"> + <%= kamifusen_tag @university.logo, class: 'img-fluid p-5' %> + </div> + </div> </div> </div> - <% content_for :action_bar_right do %> <%= link_to t('edit'), edit_server_university_path(@university), class: button_classes %> <% end %>