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

home

parent 658be19a
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ class Extranet::AcademicYearsController < Extranet::ApplicationController
through_association: :academic_years
def index
@academic_years = current_context.about&.academic_years || @academic_years
@academic_years = current_extranet.about&.academic_years || @academic_years
breadcrumb
end
......
......@@ -4,7 +4,7 @@ class Extranet::CohortsController < Extranet::ApplicationController
through_association: :education_cohorts
def index
@cohorts = current_context.about&.cohorts || @cohorts
@cohorts = current_extranet.about&.cohorts || @cohorts
breadcrumb
end
......
class Extranet::HomeController < Extranet::ApplicationController
def index
redirect_to admin_root_path unless current_extranet
@cohorts = current_university.education_cohorts.ordered.limit(2)
@cohorts = current_extranet.about&.cohorts || current_university.education_cohorts
@cohorts = @cohorts.ordered.limit(5)
end
end
......@@ -4,7 +4,7 @@ class Extranet::PersonsController < Extranet::ApplicationController
through_association: :people
def index
@people = current_context.about&.alumni || @people.alumni
@people = current_extranet.about&.alumni || @people.alumni
breadcrumb
end
......
<% content_for :title, current_context %>
<h2><%= Education::Cohort.model_name.human(count: 2) %></h2>
<p><%= link_to 'Voir toutes les promotions', education_cohorts_path %></p>
<%= render 'extranet/cohorts/list', cohorts: @cohorts %>
<div class="row">
<div class="col-md-8">
</div>
<div class="col-md-4">
<h2>Promotions actuelles</h2>
<p><%= link_to 'Voir toutes les promotions', education_cohorts_path %></p>
<% @cohorts.each do |cohort| %>
<%= link_to cohort, cohort %><br>
<% end %>
</div>
</div>
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