From 0825669e74db78222971582cd871b3b1b54035b5 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Wed, 27 Oct 2021 09:35:11 +0200 Subject: [PATCH] wip --- app/models/research/journal/article.rb | 2 +- .../website/pages/_list.html.erb | 4 -- .../communication/websites/show.html.erb | 69 +++++++++++-------- db/schema.rb | 2 +- 4 files changed, 41 insertions(+), 36 deletions(-) diff --git a/app/models/research/journal/article.rb b/app/models/research/journal/article.rb index b389b460a..6dbbde909 100644 --- a/app/models/research/journal/article.rb +++ b/app/models/research/journal/article.rb @@ -11,7 +11,7 @@ # text :text # title :string # created_at :datetime not null -# updated_at :datetime not null +# updated_at :date not null # research_journal_id :uuid not null # research_journal_volume_id :uuid # university_id :uuid not null diff --git a/app/views/admin/communication/website/pages/_list.html.erb b/app/views/admin/communication/website/pages/_list.html.erb index 310b52c54..066342f1b 100644 --- a/app/views/admin/communication/website/pages/_list.html.erb +++ b/app/views/admin/communication/website/pages/_list.html.erb @@ -2,8 +2,6 @@ <thead> <tr> <th><%= Communication::Website::Page.human_attribute_name('title') %></th> - <th><%= Communication::Website::Page.human_attribute_name('path') %></th> - <th><%= Communication::Website::Page.human_attribute_name('parent') %></th> <th width="150"></th> </tr> </thead> @@ -11,8 +9,6 @@ <% pages.each do |page| %> <tr> <td><%= link_to page, admin_communication_website_page_path(website_id: page.website.id, id: page.id) %></td> - <td><%= page.path %></td> - <td><%= link_to page.parent, admin_communication_website_page_path(website_id: page.website.id, id: page.parent.id) if page.parent %></td> <td class="text-end"> <div class="btn-group" role="group"> <%= link_to t('edit'), diff --git a/app/views/admin/communication/websites/show.html.erb b/app/views/admin/communication/websites/show.html.erb index 8f372b3bc..950960f1f 100644 --- a/app/views/admin/communication/websites/show.html.erb +++ b/app/views/admin/communication/websites/show.html.erb @@ -31,42 +31,51 @@ <%= render 'admin/communication/website/posts/list', posts: @website.posts.recent %> </div> -<div class="card mt-5"> - <div class="card-header"> - <div class="float-end"> - <%= link_to t('create'), - new_admin_communication_website_page_path(website_id: @website), - class: button_classes %> +<div class="row"> + <div class="col-md-7"> + <div class="card mt-5"> + <div class="card-header"> + <div class="float-end"> + <%= link_to t('create'), + new_admin_communication_website_page_path(website_id: @website), + class: button_classes %> + </div> + <h2 class="card-title"> + <%= link_to admin_communication_website_pages_path(website_id: @website) do %> + <%= t('communication.website.last_pages') %> + <small> + - + <%= t('communication.website.see_all', number: @website.pages.count) %> + </small> + <% end %> + </h2> + </div> + <%= render 'admin/communication/website/pages/list', pages: @website.pages.recent %> </div> - <h2 class="card-title"> - <%= link_to admin_communication_website_pages_path(website_id: @website) do %> - <%= t('communication.website.last_pages') %> - <small> - - - <%= t('communication.website.see_all', number: @website.pages.count) %> - </small> - <% end %> - </h2> </div> - <%= render 'admin/communication/website/pages/list', pages: @website.pages.recent %> -</div> - -<div class="card mt-5"> - <div class="card-header"> - <div class="float-end"> - <%= link_to t('create'), - new_admin_communication_website_category_path(website_id: @website), - class: button_classes %> + <div class="col-md-5"> + <div class="card mt-5"> + <div class="card-header"> + <div class="float-end"> + <%= link_to t('create'), + new_admin_communication_website_category_path(website_id: @website), + class: button_classes %> + </div> + <h2 class="card-title"> + <%= link_to admin_communication_website_categories_path(website_id: @website) do %> + <%= Communication::Website::Category.model_name.human(count: 2) %> + <small> + - + <%= t('communication.website.see_all', number: @website.categories.count) %> + </small> + <% end %> + </h2> + </div> + <%= render 'admin/communication/website/categories/list', categories: @website.categories.ordered %> </div> - <h2 class="card-title"> - <%= Communication::Website::Category.model_name.human(count: 2) %> - <%= "(#{@website.categories.count})" %> - </h2> </div> - <%= render 'admin/communication/website/categories/list', categories: @website.categories.ordered %> </div> - <% content_for :action_bar_right do %> <% if @website.imported? %> <%= link_to t('communication.website.imported.show'), diff --git a/db/schema.rb b/db/schema.rb index 3b75d9b9f..2fa016e40 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -287,7 +287,7 @@ ActiveRecord::Schema.define(version: 2021_10_26_142142) do t.uuid "research_journal_id", null: false t.uuid "research_journal_volume_id" t.datetime "created_at", precision: 6, null: false - t.datetime "updated_at", precision: 6, null: false + t.date "updated_at", null: false t.uuid "updated_by_id" t.text "abstract" t.text "references" -- GitLab