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

better server

parent b2278782
No related branches found
No related tags found
No related merge requests found
class Server::DashboardController < Server::ApplicationController
def index
@parts = [
{
title: "#{University.count} #{University.model_name.human(count: 2).downcase}",
path: server_universities_path
},
{
title: "#{Communication::Website.count} #{Communication::Website.model_name.human(count: 2).downcase}",
path: server_websites_path
}
]
breadcrumb
end
end
<% content_for :title, t('hello', name: current_user.first_name) %>
<div class="row">
<% @parts.each do |part| %>
<div class="col-md-6 d-flex">
<div class="card flex-fill">
<div class="card-body">
<h4 class="mb-4"><%= part[:title] %></h4>
<%= link_to 'Voir la liste',
part[:path],
class: 'btn btn-sm btn-primary stretched-link' %>
</div>
</div>
</div>
<% end %>
</div>
......@@ -13,7 +13,7 @@
<% websites.ordered.each do |website| %>
<tr>
<td>
<%= link_to website.name, edit_server_website_path(website) %>
<%= link_to website.name, admin_communication_website_path(website, host: website.university.url), target: :_blank %>
</td>
<td>
<%= link_to website.url, website.url, target: :_blank if website.url.present? %>
......
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