From 8671d2350bfdfdff1a4e1dd88b66351d2fa28d0b Mon Sep 17 00:00:00 2001 From: Alinson Santos Date: Thu, 6 Mar 2008 20:08:01 -0300 Subject: [PATCH] Interface --- app/controllers/courses_controller.rb | 4 +++- app/views/courses/index.html.haml | 2 +- app/views/courses/show.html.haml | 2 +- app/views/stylesheets/wiki.css.erb | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index ebc2420..edc0989 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -19,7 +19,9 @@ class CoursesController < ApplicationController #after_filter :cache_sweep, :only => [ :create, :update, :destroy ] def index - @courses = Course.find(:all, :order => 'period asc, full_name asc') + @courses = Course.find(:all, + :order => 'period asc, full_name asc', + :conditions => (logged_in? and !@current_user.courses.empty? ? [ 'id not in (?)', @current_user.courses] : '')) respond_to do |format| format.html diff --git a/app/views/courses/index.html.haml b/app/views/courses/index.html.haml index f5475d2..ba04bf3 100644 --- a/app/views/courses/index.html.haml +++ b/app/views/courses/index.html.haml @@ -23,7 +23,7 @@ %h3= (course.period == 99 ? "Optativas" : "Semestre #{course.period}") - old_period = course.period - %li + %li{highlight(course.id)} .right = action_icon('add', 'Matricular-se', enroll_course_url(course)) = link_to h(course.full_name), course_url(course) diff --git a/app/views/courses/show.html.haml b/app/views/courses/show.html.haml index fd2f6b4..fc0bda4 100644 --- a/app/views/courses/show.html.haml +++ b/app/views/courses/show.html.haml @@ -17,7 +17,7 @@ %h3 Páginas Wiki %ul.wiki - @course.wiki_pages.each do |wiki| - %li + %li{highlight(wiki.id)} .cmd{:style => 'margin-bottom: -27px; margin-top: -9px;'} =action_icon 'arrow2_n', 'Mover para cima', move_up_course_wiki_url(@course, wiki) unless wiki.first? =action_icon 'arrow2_s', 'Mover para baixo', move_down_course_wiki_url(@course, wiki) unless wiki.last? diff --git a/app/views/stylesheets/wiki.css.erb b/app/views/stylesheets/wiki.css.erb index 4e75bb9..12b7688 100644 --- a/app/views/stylesheets/wiki.css.erb +++ b/app/views/stylesheets/wiki.css.erb @@ -394,7 +394,7 @@ h4.title, h1.title { .box ul { margin-top: 0px; - margin-bottom: 36px; + margin-bottom: 0px; padding-left: 0px; }