diff --git a/app/views/admin/communication/extranets/documents/categories/_list.html.erb b/app/views/admin/communication/extranets/documents/categories/_list.html.erb index 3bf6eb7f295abf96a37d0cbc8939d6b808328f75..45650a1d6d713384834a443c7657890c57ebbed3 100644 --- a/app/views/admin/communication/extranets/documents/categories/_list.html.erb +++ b/app/views/admin/communication/extranets/documents/categories/_list.html.erb @@ -3,6 +3,7 @@ <thead> <tr> <th class="ps-0" width="60%"><%= Communication::Extranet::Document::Category.human_attribute_name('name') %></th> + <th><%= Communication::Extranet::Document::Category.human_attribute_name('quantity') %></th> <th></th> </tr> </thead> @@ -10,7 +11,7 @@ <% categories.each do |category| %> <tr> <td class="ps-0"><%= link_to category, admin_communication_extranet_document_category_path(extranet_id: category.extranet.id, id: category.id) %></td> - + <td><%= category.documents.count %></td> <td> <div class="btn-group" role="group"> <%= link_to t('edit'), diff --git a/app/views/admin/communication/extranets/documents/categories/show.html.erb b/app/views/admin/communication/extranets/documents/categories/show.html.erb index 96479dd7bca2a8f93f3b67de054e91e2c25249ea..535fe68ca87b8ef5e1507faf1d2797d040fe013e 100644 --- a/app/views/admin/communication/extranets/documents/categories/show.html.erb +++ b/app/views/admin/communication/extranets/documents/categories/show.html.erb @@ -1,8 +1,10 @@ <% content_for :title, @category %> <%= render 'admin/communication/extranets/sidebar' do %> - <%= render 'admin/communication/extranets/documents/list', documents: @documents %> - <%= paginate @documents, theme: 'bootstrap-5' %> + <%= osuny_panel Communication::Extranet::Document.model_name.human(count: 2) do %> + <%= render 'admin/communication/extranets/documents/list', documents: @documents %> + <%= paginate @documents, theme: 'bootstrap-5' %> + <% end %> <% end %> <% content_for :action_bar_left do %> diff --git a/app/views/admin/communication/extranets/documents/index.html.erb b/app/views/admin/communication/extranets/documents/index.html.erb index 9f92cca16e2086581089c28d1e41141220fd983e..8e93fb2198d4c623f6112c8970a37b41abdf1697 100644 --- a/app/views/admin/communication/extranets/documents/index.html.erb +++ b/app/views/admin/communication/extranets/documents/index.html.erb @@ -1,10 +1,11 @@ <% content_for :title, Communication::Extranet.human_attribute_name(:feature_library) %> <%= render 'admin/communication/extranets/sidebar' do %> - <section class="mb-5"> + <% action = create_link Communication::Extranet::Document %> + <%= osuny_panel Communication::Extranet::Document.model_name.human(count: 2), action: action do %> <%= render 'admin/communication/extranets/documents/list', documents: @documents %> <%= paginate @documents, theme: 'bootstrap-5' %> - </section> + <% end %> <% action = link_to t('create'), new_admin_communication_extranet_document_category_path, class: button_classes %> <%= osuny_panel Communication::Extranet::Document::Category.model_name.human(count: 2), action: action do %> diff --git a/app/views/admin/communication/extranets/documents/kinds/_list.html.erb b/app/views/admin/communication/extranets/documents/kinds/_list.html.erb index 602b8e38b23c23ba48d63f00264cfe4c2e74a03c..b481ebd547a9064cd09ee1c4079ad04db098f826 100644 --- a/app/views/admin/communication/extranets/documents/kinds/_list.html.erb +++ b/app/views/admin/communication/extranets/documents/kinds/_list.html.erb @@ -3,6 +3,7 @@ <thead> <tr> <th class="ps-0" width="60%"><%= Communication::Extranet::Post::Category.human_attribute_name('name') %></th> + <th><%= Communication::Extranet::Document::Kind.human_attribute_name('quantity') %></th> <th></th> </tr> </thead> @@ -10,7 +11,7 @@ <% kinds.each do |kind| %> <tr> <td class="ps-0"><%= link_to kind, admin_communication_extranet_document_kind_path(extranet_id: kind.extranet.id, id: kind.id) %></td> - + <td><%= kind.documents.count %></td> <td> <div class="btn-group" role="group"> <%= link_to t('edit'), diff --git a/app/views/admin/communication/extranets/documents/kinds/show.html.erb b/app/views/admin/communication/extranets/documents/kinds/show.html.erb index 2710035a8ef85b51f65dea9ea464c2a9e9c27a7b..e510fd64acb77bcc591cb4bb1995c1d23afe27a1 100644 --- a/app/views/admin/communication/extranets/documents/kinds/show.html.erb +++ b/app/views/admin/communication/extranets/documents/kinds/show.html.erb @@ -1,8 +1,10 @@ <% content_for :title, @kind %> <%= render 'admin/communication/extranets/sidebar' do %> - <%= render 'admin/communication/extranets/documents/list', documents: @documents %> - <%= paginate @documents, theme: 'bootstrap-5' %> + <%= osuny_panel Communication::Extranet::Document.model_name.human(count: 2) do %> + <%= render 'admin/communication/extranets/documents/list', documents: @documents %> + <%= paginate @documents, theme: 'bootstrap-5' %> + <% end %> <% end %> <% content_for :action_bar_left do %> diff --git a/app/views/admin/communication/extranets/documents/show.html.erb b/app/views/admin/communication/extranets/documents/show.html.erb index 1b7e2da240f7e63e5e79fe31aff96dbab0312350..5a1494f7532a8eba7be06c1dd4f41ef7bb5e7c9f 100644 --- a/app/views/admin/communication/extranets/documents/show.html.erb +++ b/app/views/admin/communication/extranets/documents/show.html.erb @@ -16,11 +16,11 @@ <% end %> </p> <% if @document.category %> - <%= osuny_label Communication::Extranet::Document.human_attribute_name('category') %> + <%= osuny_label Communication::Extranet::Document::Category.model_name.human %> <p><%= link_to @document.category, [:admin, @document.category] %></p> <% end %> <% if @document.kind %> - <%= osuny_label Communication::Extranet::Document.human_attribute_name('kind') %> + <%= osuny_label Communication::Extranet::Document::Kind.model_name.human %> <p><%= link_to @document.kind, [:admin, @document.kind] %></p> <% end %> <% end %> diff --git a/app/views/admin/communication/extranets/posts/categories/_list.html.erb b/app/views/admin/communication/extranets/posts/categories/_list.html.erb index e553d2d004b953398e638b9bd1ff4a7b67a2efa5..e865a434c7b7eff49c79ac3a5b71ed64fe997e4c 100644 --- a/app/views/admin/communication/extranets/posts/categories/_list.html.erb +++ b/app/views/admin/communication/extranets/posts/categories/_list.html.erb @@ -3,6 +3,7 @@ <thead> <tr> <th class="ps-0" width="60%"><%= Communication::Extranet::Post::Category.human_attribute_name('name') %></th> + <th><%= Communication::Extranet::Post::Category.human_attribute_name('quantity') %></th> <th></th> </tr> </thead> @@ -10,7 +11,7 @@ <% categories.each do |category| %> <tr> <td class="ps-0"><%= link_to category, admin_communication_extranet_post_category_path(extranet_id: category.extranet.id, id: category.id) %></td> - + <td><%= category.posts.count %></td> <td> <div class="btn-group" role="group"> <%= link_to t('edit'), diff --git a/app/views/admin/communication/extranets/posts/categories/show.html.erb b/app/views/admin/communication/extranets/posts/categories/show.html.erb index 30f2bd037402f50911dbb153e9453cbcd7dcdfb9..fce1b0250007ca65cc9912fcf298bb55e8d33612 100644 --- a/app/views/admin/communication/extranets/posts/categories/show.html.erb +++ b/app/views/admin/communication/extranets/posts/categories/show.html.erb @@ -1,8 +1,10 @@ <% content_for :title, @category %> <%= render 'admin/communication/extranets/sidebar' do %> - <%= render 'admin/communication/extranets/posts/list', posts: @posts %> - <%= paginate @posts, theme: 'bootstrap-5' %> + <%= osuny_panel Communication::Extranet::Document.model_name.human(count: 2) do %> + <%= render 'admin/communication/extranets/posts/list', posts: @posts %> + <%= paginate @posts, theme: 'bootstrap-5' %> + <% end %> <% end %> <% content_for :action_bar_left do %> diff --git a/app/views/admin/communication/extranets/posts/index.html.erb b/app/views/admin/communication/extranets/posts/index.html.erb index 831db566e252c86810ec325102f5c81317ef42f2..9b081ed3b7d6be7dba00de95acef7694cf1d7b0b 100644 --- a/app/views/admin/communication/extranets/posts/index.html.erb +++ b/app/views/admin/communication/extranets/posts/index.html.erb @@ -1,10 +1,11 @@ <% content_for :title, Communication::Extranet.human_attribute_name(:feature_posts) %> <%= render 'admin/communication/extranets/sidebar' do %> - <section class="mb-5"> + <% action = create_link Communication::Extranet::Post %> + <%= osuny_panel Communication::Extranet::Post.model_name.human(count: 2), action: action do %> <%= render 'admin/communication/extranets/posts/list', posts: @posts %> <%= paginate @posts, theme: 'bootstrap-5' %> - </section> + <% end %> <% action = link_to t('create'), new_admin_communication_extranet_post_category_path, class: button_classes %> <%= osuny_panel Communication::Extranet::Post::Category.model_name.human(count: 2), action: action do %> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 66cb912bd3ecb57c4db5b03fd4a6882e6852d0f0..0cbf12fc4392c22bca31225882cabb6641e7015e 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -15,6 +15,12 @@ en: communication/extranet/document: one: Document other: Documents + communication/extranet/document/category: + one: Category + other: Categories + communication/extranet/document/kind: + one: Kind + other: Kinds communication/extranet/post: one: Post other: Posts @@ -88,6 +94,12 @@ en: name: Name published: Published? published_at: Publication date + communication/extranet/document/category: + name: Name + quantity: Quantity of documents + communication/extranet/document/kind: + name: Name + quantity: Quantity of documents communication/extranet/post: author: Author category: Category @@ -100,6 +112,7 @@ en: title: Title communication/extranet/post/category: name: Name + quantity: Quantity of posts communication/website: about: About about_: Independent website diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index d5129e4f8932bd7902f731506cea13d9effd5ba1..d892c61518966dd8bf38adae76cee1b5cd9408c4 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -15,6 +15,12 @@ fr: communication/extranet/document: one: Document other: Documents + communication/extranet/document/category: + one: Catégorie + other: Catégories + communication/extranet/document/kind: + one: Type + other: Types communication/extranet/post: one: Actualité other: Actualités @@ -88,6 +94,12 @@ fr: name: Nom published: Publié ? published_at: Date de publication + communication/extranet/document/category: + name: Nom + quantity: Quantité de documents + communication/extranet/document/kind: + name: Nom + quantity: Quantité de documents communication/extranet/post: author: Auteur·rice category: Catégorie @@ -100,6 +112,7 @@ fr: title: Titre communication/extranet/post/category: name: Nom + quantity: Quantité d'actualités communication/website: about: Sujet du site about_: Site indépendant