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

namespaces

parent 076b6fe7
No related branches found
No related tags found
No related merge requests found
class Admin::DashboardController < Admin::ApplicationController
def index
@chapters = [
@namespaces = [
Education,
Research,
Communication,
......
......@@ -84,13 +84,13 @@
<% end %>
<div class="row mt-5 pt-5">
<% @chapters.each do |class_name| %>
<% @namespaces.each do |namespace| %>
<%
path = send "admin_#{class_name.to_s.downcase}_root_path"
description = t "#{class_name.to_s.downcase}.description.text"
path = send "admin_#{namespace.to_s.downcase}_root_path"
description = t "#{namespace.to_s.downcase}.description.text"
%>
<div class="col-lg-3">
<%= osuny_panel class_name.model_name.human, image: "admin/#{class_name.to_s.downcase}.jpg" do %>
<%= osuny_panel namespace.model_name.human, image: "admin/#{namespace.to_s.downcase}.jpg" do %>
<p><%= description.truncate 180 %></p>
<%= link_to t('show'), path, class: 'stretched-link' %>
<% 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