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

site list

parent 0490f70c
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,10 @@ module Communication::Website::WithGitRepository
@git_repository ||= Git::Repository.new self
end
def repository_url
"https://github.com/#{repository}"
end
# Synchronisation optimale d'objet indirect
def sync_indirect_object_with_git(indirect_object)
return unless git_repository.valid?
......
......@@ -3,9 +3,11 @@
<thead>
<tr>
<th><%= Communication::Website.human_attribute_name('name') %></th>
<th><%= University.model_name.human %></th>
<th><%= Communication::Website.human_attribute_name('url') %></th>
<th><%= Communication::Website.human_attribute_name('admin') %></th>
<th><%= Communication::Website.human_attribute_name('repository') %></th>
<th><%= Communication::Website.human_attribute_name('status') %></th>
<th><%= University.model_name.human %></th>
<th><%= Communication::Website.human_attribute_name('theme_version') %></th>
<th></th>
</tr>
......@@ -19,15 +21,26 @@
<span class="badge bg-success">Prod</span>
<% end %>
</td>
<td><%= link_to website.university, [:server, website.university] %></td>
<td>
<%= link_to 'Site',
website.url,
target: :_blank,
class: 'btn btn-xs btn-light' if website.url.present? %>
</td>
<td>
<%= link_to website.url, website.url, target: :_blank if website.url.present? %>
<%= link_to 'Admin',
admin_communication_website_url(website, host: website.university.url),
target: :_blank,
class: 'btn btn-xs btn-light' %>
</td>
<td>
<%= link_to 'Repository',
website.repository_url,
target: :_blank,
class: 'btn btn-xs btn-light' if website.repository.present? %>
</td>
<td><%= image_tag website.deployment_status_badge, alt: '' if website.deployment_status_badge.present? %></td>
<td><%= link_to website.university, [:server, website.university] %></td>
<td>
<span class="js-version">
<%= link_to website.theme_version,
......
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