Skip to content
Snippets Groups Projects
Commit 73d39b94 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

better table [skip ci]

parent 4ec37279
No related branches found
No related tags found
No related merge requests found
......@@ -3,18 +3,18 @@
<thead>
<tr>
<th><%= Communication::Website.human_attribute_name('name') %></th>
<th><%= Communication::Website.human_attribute_name('about') %></th>
<th><%= Communication::Website.human_attribute_name('url') %></th>
<th><%= Communication::Website.human_attribute_name('admin') %></th>
<th><%= University.model_name.human %></th>
<th><%= Communication::Website.human_attribute_name('created_at') %></th>
<th><%= Communication::Website.human_attribute_name('theme_version') %></th>
<th></th>
</tr>
</thead>
<tbody>
<% websites.ordered.each do |website| %>
<tr id="website-<%= website.id %>">
<td><%= link_to website.name, admin_communication_website_url(website, host: website.university.url), target: :_blank %></td>
<td><%= I18n.t("activerecord.attributes.communication/website.about_#{website.about_type}") %></td>
<td><%= website.name %></td>
<td><%= link_to 'Admin', admin_communication_website_url(website, host: website.university.url), target: :_blank %></td>
<td>
<%= link_to website.url, website.url, target: :_blank if website.url.present? %>
<% if website.in_production %>
......@@ -22,11 +22,24 @@
<% end %>
</td>
<td><%= link_to website.university, [:server, website.university] %></td>
<td><%= l website.created_at.to_date %></td>
<td>
<span class="js-version"><%= link_to website.theme_version, website.theme_version_url, target: :_blank if website.theme_version_url.present? %></span><br>
<%= link_to t('server_admin.websites.buttons.theme.sync'), sync_theme_version_server_website_path(website), method: :post, remote: true, class: button_classes if website.url.present? %>
<%= link_to t('server_admin.websites.buttons.theme.update'), update_theme_server_website_path(website), method: :post, remote: true, class: button_classes if website.url.present? && website.github? %>
<span class="js-version">
<%= link_to website.theme_version,
website.theme_version_url,
target: :_blank if website.theme_version_url.present? %>
</span>
</td>
<td>
<%= link_to t('server_admin.websites.buttons.theme.sync'),
sync_theme_version_server_website_path(website),
method: :post,
remote: true,
class: button_classes if website.url.present? %>
<%= link_to t('server_admin.websites.buttons.theme.update'),
update_theme_server_website_path(website),
method: :post,
remote: true,
class: button_classes if website.url.present? && website.github? %>
</td>
</tr>
<% end %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment