diff --git a/app/views/server/websites/_list.html.erb b/app/views/server/websites/_list.html.erb index cf4be94e04616fde8fe26080b52ff0b5caa4fa6d..b326a28ab5b4aea73c60737fc04d9a0ce4ddb7a4 100644 --- a/app/views/server/websites/_list.html.erb +++ b/app/views/server/websites/_list.html.erb @@ -4,10 +4,7 @@ <tr> <th><%= Communication::Website.human_attribute_name('name') %></th> <th><%= University.model_name.human %></th> - <th><%= t('server_admin.websites.back_office') %></th> <th><%= Communication::Website.human_attribute_name('url') %></th> - <th><%= t('server_admin.websites.git_repo.full') %></th> - <th><%= t('server_admin.websites.update_mode') %></th> <th><%= t('server_admin.websites.git_repo.status') %></th> <th><%= t('server_admin.websites.theme_version') %></th> <th></th> @@ -24,37 +21,35 @@ </td> <td><%= link_to website.university, [:server, website.university] %></td> - <td><%= link_to t('server_admin.websites.admin'), - admin_communication_website_url(website, host: website.university.url), - target: :_blank, - class: 'btn btn-xs btn-light' %></td> - <td><%= link_to Communication::Website.human_attribute_name('url'), - website.url, - target: :_blank, - class: 'btn btn-xs btn-light' if website.url.present? %></td> - <td><%= link_to t('server_admin.websites.git_repo.short'), - website.repository_url, - target: :_blank, - class: 'btn btn-xs btn-light' if website.repository.present? %></td> - <td><%= t("server_admin.websites.autoupdate_theme.#{website.autoupdate_theme?}") %></td> + <td> + <%= link_to t('server_admin.websites.admin'), + admin_communication_website_url(website, host: website.university.url), + target: :_blank, + class: 'action' %> + <%= link_to Communication::Website.human_attribute_name('url'), + website.url, + target: :_blank, + class: 'action' if website.url.present? %></td> + <%= link_to t('server_admin.websites.git_repo.short'), + website.repository_url, + target: :_blank, + class: 'action' if website.repository.present? %></td> <td><%= image_tag website.deployment_status_badge, alt: '' if website.deployment_status_badge.present? %></td> <td class="js-version"> <%= website.theme_version %> + <%= link_to t('server_admin.websites.buttons.theme.sync'), + sync_theme_version_server_website_path(website), + method: :post, + remote: true, + class: "action js-sync-theme-version" if website.theme_updatable? %> </td> <td> - <% if website.url.present? %> - <%= link_to t('server_admin.websites.buttons.theme.sync'), - sync_theme_version_server_website_path(website), - method: :post, - remote: true, - class: "#{button_classes} js-sync-theme-version" if website.theme_updatable? %> - <%= link_to t('server_admin.websites.buttons.theme.update'), - update_theme_server_website_path(website), - method: :post, - remote: true, - class: button_classes if website.github? %> - <% end %> + <%= link_to t('server_admin.websites.buttons.theme.update'), + update_theme_server_website_path(website), + method: :post, + remote: true, + class: button_classes if website.github? && website.url.present? %> </td> </tr> <% end %> diff --git a/config/locales/server_admin/en.yml b/config/locales/server_admin/en.yml index db130e4b1c59f91b41a02a9ab79523be9408d02f..5c9066d7d058afc17682ef70e773346748fbf69e 100644 --- a/config/locales/server_admin/en.yml +++ b/config/locales/server_admin/en.yml @@ -39,7 +39,7 @@ en: back_office: Back office buttons: theme: - sync: Sync version + sync: Sync update: Update theme clean_and_rebuild_all_websites_notice: All themes will be updated. This can take a few minutes. connections_count: "%{count} connexions" diff --git a/config/locales/server_admin/fr.yml b/config/locales/server_admin/fr.yml index 93392d37b171c2648257c15cdca5d17308a10f55..512fc9d0991f312212bf873a641dfd5f84678f71 100644 --- a/config/locales/server_admin/fr.yml +++ b/config/locales/server_admin/fr.yml @@ -39,7 +39,7 @@ fr: back_office: Back office buttons: theme: - sync: Synchroniser la version + sync: Synchroniser update: Mettre à jour le thème clean_and_rebuild_all_websites_notice: Tous les thèmes vont être mis à jour. Cela peut prendre quelques minutes. connections_count: "%{count} connexions"