aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMichel Etienne2012-10-10 15:26:44 +0200
committerMichel Etienne2012-10-10 15:26:44 +0200
commit1ba3e56d47fd58ab7e57dac97f6f511a3e442509 (patch)
tree50665f967da6f79fdc33151dc66fe5cf6f95fe37 /app
parent9a3e92ca480d99915a71619b737c15177a4cb651 (diff)
parent4f51655e17efe0456019d05921a669f6e5fc76ba (diff)
downloadchouette-core-1ba3e56d47fd58ab7e57dac97f6f511a3e442509.tar.bz2
Merge branch 'master' of chouette.dryade.priv:/srv/git/chouette2
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/calendar.css.scss39
-rw-r--r--app/views/time_tables/show.html.erb8
2 files changed, 30 insertions, 17 deletions
diff --git a/app/assets/stylesheets/calendar.css.scss b/app/assets/stylesheets/calendar.css.scss
index a35fbd665..f9f5fd913 100644
--- a/app/assets/stylesheets/calendar.css.scss
+++ b/app/assets/stylesheets/calendar.css.scss
@@ -59,33 +59,42 @@ thead tr {
border-bottom: 1px solid white;
}
-.otherMonth, .day, .specialDay {
+.otherMonth {
+ color: #999999;
+ background-color: #4f4f5b;
padding: 0.7em;
border-right: 1px solid #111111;
border-bottom: 1px solid #111111;
}
-.otherMonth {
- color: #999999;
- background-color: #4f4f5b;
-}
+.day { background-color: #333333; }
-.day, .specialDay {
+.day, .specialDay, .selected_period, .selected_date, .overlap_date {
+ border-bottom: 1px solid #111111;
+ padding: 0.7em;
+ border-right: 1px solid #111111;
border-bottom: 1px solid #111111;
- background-color: #333333;
-}
-.specialDay {
- background-color: #a8a8a8 !important;
- color: black;
}
-.specialDay a, .specialDay a:visited, .specialDay a:hover {
- color: white;
- text-decoration: none;
+.specialDay { background-color: #a8a8a8 !important; }
+
+.selected_period { background-color: #ffbd2b !important; }
+
+.selected_date { background-color: #8fc861 !important; }
+
+.overlap_date { background-color: #ffbd2b !important; }
+
+.specialDay, .selected_period, .selected_date, .overlap_date {
+ a, a:visited, a:hover {
+ color: white;
+ text-decoration: none;
+ }
}
-.specialDay a:hover {
+
+.specialDay a:hover, selected_period a:hover, selected_date a:hover, overlap_date a:hover {
color: black;
}
+
.weekendDay {
background-color: #787888;
}
diff --git a/app/views/time_tables/show.html.erb b/app/views/time_tables/show.html.erb
index a1b113a5a..45763fad5 100644
--- a/app/views/time_tables/show.html.erb
+++ b/app/views/time_tables/show.html.erb
@@ -72,8 +72,12 @@
<%= cal = ""
(1..12).each do |month|
cal << calendar(:year => @year, :month => month, :first_day_of_week => 1) do |d|
- if @time_table.include_day?(d)
- [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "specialDay"}]
+ if @time_table.include_in_dates?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "selected_date"}]
+ elsif @time_table.include_in_periods?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "selected_period"}]
+ elsif @time_table.include_in_overlap_dates?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "overlap_date"}]
end
end
end