diff --git a/app/helpers/admin/application_helper.rb b/app/helpers/admin/application_helper.rb index a35df6e65a1f3e0091e1f11791d5a0f3faa178f1..cde3b0187511206ac396d4e39e9da96863be7768 100644 --- a/app/helpers/admin/application_helper.rb +++ b/app/helpers/admin/application_helper.rb @@ -46,6 +46,7 @@ module Admin::ApplicationHelper end def static_link(path) + return unless current_user.server_admin? raw "<a href=\"#{path}\" class=\"btn btn-light btn-xs\">#{t 'static' }</a>" end diff --git a/app/views/admin/application/_dependencies.html.erb b/app/views/admin/application/_dependencies.html.erb index 740bdeaca2e1626135fba5382008a0bd66e5f96c..c732511f88c2fee0eac6cea7dd281de321081d1e 100644 --- a/app/views/admin/application/_dependencies.html.erb +++ b/app/views/admin/application/_dependencies.html.erb @@ -10,7 +10,8 @@ expanded ||= false aria-expanded="<%= expanded %>" aria-controls="dependencies"></i> </div> - <h2 class="h5 text-muted">Dépendances <small>visible uniquement pour les server admins</small></h2> + <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"> diff --git a/app/views/admin/communication/websites/categories/show.html.erb b/app/views/admin/communication/websites/categories/show.html.erb index 64944461b65a86487b8d536788c667e2ed909fab..dc7cec38208c318ba9ae95e13ad5bac0af38cef8 100644 --- a/app/views/admin/communication/websites/categories/show.html.erb +++ b/app/views/admin/communication/websites/categories/show.html.erb @@ -57,9 +57,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @category %> - <%= link_to t('static'), - static_admin_communication_website_category_path(@category), - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_communication_website_category_path(@category) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/communication/websites/pages/show.html.erb b/app/views/admin/communication/websites/pages/show.html.erb index 1a7957147aea911ddfbf823c0e38d3b23f7cbc9d..4012ee619468d5d6208602881a2817755233cbfb 100644 --- a/app/views/admin/communication/websites/pages/show.html.erb +++ b/app/views/admin/communication/websites/pages/show.html.erb @@ -27,9 +27,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @page if @page.is_regular_page? %> - <%= link_to t('static'), - static_admin_communication_website_page_path(@page), - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_communication_website_page_path(@page) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/communication/websites/posts/show.html.erb b/app/views/admin/communication/websites/posts/show.html.erb index 60cf061830f16d006f993a8bf153b7ff31f07b60..f21baaa1f2417d02336d854b3ce69075fef68ead 100644 --- a/app/views/admin/communication/websites/posts/show.html.erb +++ b/app/views/admin/communication/websites/posts/show.html.erb @@ -53,9 +53,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @post %> - <%= link_to t('static'), - static_admin_communication_website_post_path(@post), - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_communication_website_post_path(@post) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/education/diplomas/show.html.erb b/app/views/admin/education/diplomas/show.html.erb index c4aa20e18ea6788aeefd1d717ecea49aa26441a0..8726c107892fac6ae16e2013fb7488bb8e8f3a9c 100644 --- a/app/views/admin/education/diplomas/show.html.erb +++ b/app/views/admin/education/diplomas/show.html.erb @@ -27,9 +27,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @diploma %> - <%= link_to t('static'), - static_admin_education_diploma_path(@diploma), - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_education_diploma_path(@diploma) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb index 32ce1a79e15d2c010b6c9935726375d26c52058f..9a06e426584fbcaddb09e86e09a1a5ed10256139 100644 --- a/app/views/admin/education/programs/show.html.erb +++ b/app/views/admin/education/programs/show.html.erb @@ -145,9 +145,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @program %> - <%= link_to t('static'), - static_admin_education_program_path(@program), - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_education_program_path(@program) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/research/journals/papers/show.html.erb b/app/views/admin/research/journals/papers/show.html.erb index c6c9c5bee236aa9e446a1eb6824b1171e94b547a..9bb95d1abcbcf9ac0acd7ea9164ba4fc586c35fe 100644 --- a/app/views/admin/research/journals/papers/show.html.erb +++ b/app/views/admin/research/journals/papers/show.html.erb @@ -53,9 +53,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @paper %> - <%= link_to t('static'), - static_admin_research_journal_paper_path(@paper), - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_research_journal_paper_path(@paper) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/research/journals/volumes/show.html.erb b/app/views/admin/research/journals/volumes/show.html.erb index b5c16a3d836326f867b87d1d14f17f64d496b61d..e2852145b862ab64356aa2110b3be41ba3d5d177 100644 --- a/app/views/admin/research/journals/volumes/show.html.erb +++ b/app/views/admin/research/journals/volumes/show.html.erb @@ -63,9 +63,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @volume %> - <%= link_to t('static'), - static_admin_research_journal_volume_path(@volume), - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_research_journal_volume_path(@volume) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/university/organizations/show.html.erb b/app/views/admin/university/organizations/show.html.erb index 6034ab47d497af7c325d02873f0cb5120e7b237e..1359685d1c8b48ae205d22728090529cc75e5d5f 100644 --- a/app/views/admin/university/organizations/show.html.erb +++ b/app/views/admin/university/organizations/show.html.erb @@ -123,10 +123,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @organization %> - <%= link_to t('static'), - static_admin_university_organization_path(@organization), - target: :_blank, - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_university_organization_path(@organization) %> <% end %> <% content_for :action_bar_right do %> diff --git a/app/views/admin/university/people/show.html.erb b/app/views/admin/university/people/show.html.erb index e4b751669c174f402b496d5d5e273a7481bb7264..04860079369f4da22da092075addb163c770f325 100644 --- a/app/views/admin/university/people/show.html.erb +++ b/app/views/admin/university/people/show.html.erb @@ -23,10 +23,7 @@ <% content_for :action_bar_left do %> <%= destroy_link @person %> - <%= link_to t('static'), - static_admin_university_person_path(@person), - target: :_blank, - class: button_classes('btn-light') if current_user.server_admin? %> + <%= static_link static_admin_university_person_path(@person) %> <% end %> <% content_for :action_bar_right do %>