diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index a55cf27..e61ea31 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -97,7 +97,7 @@ class EventsController < ApplicationController @event.update_attribute(:deleted_at, nil) flash[:notice] = "Event restored"[] - EventRestoreLogEntry.create!(:target_id => @event.id, :user => @current_user, :course => @course) + EventRestoreLogEntry.create!(:target_id => @event.id, :user => @current_user, :course => @event.course) respond_to do |format| format.html { redirect_to course_event_url(@event.course, @event) } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b98cc77..60c96c6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -55,7 +55,7 @@ module ApplicationHelper end def spinner(name) - return image_tag "loading.gif", :id => "spinner_#{name}", :style => "display:none" + return image_tag("loading.gif", :id => "spinner_#{name}", :style => "display:none") end def gravatar_url_for(email, size=80) @@ -64,6 +64,6 @@ module ApplicationHelper def action_icon(action_name, description, options = {}, html_options = {}) html_options.merge!({:class => 'icon', :alt => description, :title => description}) - link_to(image_tag("action/#{action_name}.gif"), options, html_options) + link_to(image_tag("action/#{action_name}.gif", :title => description), options, html_options) end end diff --git a/app/models/event.rb b/app/models/event.rb index a1a4daf..fa6d0f2 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -16,6 +16,8 @@ class Event < ActiveRecord::Base acts_as_paranoid generate_validations + belongs_to :course + def Event.to_ical(courses) courses = [courses] unless courses.kind_of?(Array) cal = Icalendar::Calendar.new diff --git a/app/models/log_entry/event_log_entry.rb b/app/models/log_entry/event_log_entry.rb index 68c3630..ef132d1 100644 --- a/app/models/log_entry/event_log_entry.rb +++ b/app/models/log_entry/event_log_entry.rb @@ -26,7 +26,7 @@ class EventDeleteLogEntry < EventLogEntry e = Event.find_with_deleted(target_id) e.update_attribute(:deleted_at, nil) EventRestoreLogEntry.create!(:target_id => e.id, :user_id => current_user.id, - :course => e.course) + :course_id => e.course_id) end end diff --git a/app/views/layouts/base.html.haml b/app/views/layouts/base.html.haml index fe5da45..0bc15a6 100644 --- a/app/views/layouts/base.html.haml +++ b/app/views/layouts/base.html.haml @@ -9,6 +9,12 @@ %link{'href' => "#{App.base_path}/stylesheets/cache/wiki.css", 'rel' => 'Stylesheet', 'type' => %'text/css'} %link#css_color{'href' => "#{App.base_path}/stylesheets/cache/color.#@color.css", 'rel' => 'Stylesheet', 'type' => %'text/css'} + + /[if IE] + %link{:href => "#{App.base_path}/stylesheets/ie/ie.css", :rel => "stylesheet", :type => "text/css"} + + /[if lte IE 6] + %link{:href => "#{App.base_path}/stylesheets/ie/ie6.css", :rel => "stylesheet", :type => "text/css"} %script{:type => 'text/javascript'} == BASE_PATH = "#{App.base_path}"; diff --git a/app/views/stylesheets/color.css.erb b/app/views/stylesheets/color.css.erb index 1b38ea9..1d6eb99 100644 --- a/app/views/stylesheets/color.css.erb +++ b/app/views/stylesheets/color.css.erb @@ -31,3 +31,7 @@ h1, h2, h3, h4, h5, th { .icon img:hover { background-color: <%= color[1] %>; } + +.specialDay { + color: <%= color[1] %>; +} diff --git a/app/views/stylesheets/wiki.css.erb b/app/views/stylesheets/wiki.css.erb index 12b7688..b34f9c5 100644 --- a/app/views/stylesheets/wiki.css.erb +++ b/app/views/stylesheets/wiki.css.erb @@ -57,7 +57,7 @@ ul ul, ol ol { padding: 9px 15px; } -.content code { +.content code, .content pre { background-color: #f4f4f4; } @@ -136,7 +136,7 @@ body { background-position: top; background-repeat: repeat-x; color: #eee; - height: 28px; + height: 50px; margin: 0px -9px; } @@ -156,7 +156,9 @@ body { height: 22px; border-bottom: 3px solid #ddd; margin: 0px -9px; + margin-top: -22px; color: #eee; + background-color: transparent !important; } #header_menu ul { @@ -264,7 +266,6 @@ body { } .calendario { - width: 170px; border-top: 1px solid #eee; margin-top: -1px; padding: 9px 0px; @@ -273,6 +274,7 @@ body { .calendario tr td { font-size: 11px; text-align: center; + width: 25px; } .calendario th { @@ -284,6 +286,14 @@ body { color: #ccc; } +.specialDay { + background-image: url(<%= App.base_path %>/images/bg_day.gif); + cursor: pointer; +} + +.specialDay a, .specialDay a:hover { + border-bottom: 0px solid #ccc; +} .widget_news li, .widget_events li, #shoutbox li, #shoutbox { font-size: 11px; diff --git a/app/views/users/_form_settings.html.haml b/app/views/users/_form_settings.html.haml index e3e3a1a..9565046 100644 --- a/app/views/users/_form_settings.html.haml +++ b/app/views/users/_form_settings.html.haml @@ -40,5 +40,5 @@ %dt %label{:for => 'user_color_pref'} Esquema de cores = render :partial => 'widgets/color', :collection => App.color_schemes - %br.clear + %br.clear diff --git a/app/views/widgets/calendario.html.erb b/app/views/widgets/calendario.html.erb index 6fab461..53073d6 100644 --- a/app/views/widgets/calendario.html.erb +++ b/app/views/widgets/calendario.html.erb @@ -4,16 +4,16 @@