From f2126c9aa67e9267a356d1f430c45815c0048909 Mon Sep 17 00:00:00 2001 From: Mateus Rambo Strey <mars11@inf.ufpr.br> Date: Fri, 13 Nov 2015 10:40:46 -0200 Subject: [PATCH] clean welcome index --- app/controllers/welcome_controller.rb | 10 +--------- app/views/welcome/index.html.erb | 9 --------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index af71f7f5..ff6597b9 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -1,15 +1,7 @@ class WelcomeController < ApplicationController def index - @carousel = [] - @general = [] - mainPage = main_page_repository.all.first - - @carousel = carousel_repository.all - - @general = mainPage["highlights"].take(3).collect do |id| - learning_object_repository.find(id) - end + @carousel = carousel_repository.all || [] @highlights = learning_object_repository.all_by_score_from_offset_to_limit 0, 6 end diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 5eceb4e7..160f1c29 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -27,7 +27,6 @@ <div class="container"> <div class="carousel-caption"> <h1><%= link_to highlight.title, highlight.url, style: 'color: white;' %></h1> - </div> </div> </div> @@ -36,14 +35,6 @@ </div> <% end %> </div> - <div class="row mainpage-highlights"> - <% if @general.present? %> - <ul class="list-unstyled"> - <h2>Destaques</h2> - <%= render @general, orientation: 'horizontal' %> - <% end %> - </ul> - </div> </div> <% if !user_signed_in? %> <div class="registration-banner col-md-3 col-md-offset-1 hidden-xs hidden-sm"> -- GitLab