aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLuc Donnet2014-09-26 09:58:33 +0200
committerLuc Donnet2014-09-26 09:58:33 +0200
commit96219f339ee29a65f56068e58dda4c0e1f9bd9d3 (patch)
tree2d253b99540ad48a940bcdc2e8d39c004453882f /app
parent02de921c483663daf86ea3aa3beca333dcb0cd48 (diff)
downloadchouette-core-96219f339ee29a65f56068e58dda4c0e1f9bd9d3.tar.bz2
Update colors for time_table and use same look and feel for day type
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/main/time_tables.css.scss54
-rw-r--r--app/views/time_tables/_show_time_table.html.erb64
2 files changed, 52 insertions, 66 deletions
diff --git a/app/assets/stylesheets/main/time_tables.css.scss b/app/assets/stylesheets/main/time_tables.css.scss
index e0535fcc8..a2bd5a968 100644
--- a/app/assets/stylesheets/main/time_tables.css.scss
+++ b/app/assets/stylesheets/main/time_tables.css.scss
@@ -13,22 +13,23 @@
span.included_day_type {
font-weight: bolder;
- color: black;
+ margin-right: 3px;
}
span.excluded_day_type {
+ margin-right: 3px;
}
.validity_out {
- color: #FC4903 !important;
+ color: $brand-danger;
}
.validity_out_soon {
- color: orange !important;
+ color: $brand-warning;
}
.validity_regular {
- color: #86B41D !important;
+ color: $brand-success;
}
}
}
@@ -45,42 +46,51 @@
.typeahead.dropdown-menu {
z-index: 100001;
}
-
+
.validity_out {
- color: #FC4903 !important;
+ color: $brand-danger;
}
.validity_out_soon {
- color: orange !important;
+ color: $brand-warning;
}
.validity_regular {
- color: #86B41D !important;
+ color: $brand-success;
+ }
+
+ span.included_day_type {
+ font-weight: bolder;
+ margin-right: 3px;
}
- .day_type {
- border-style:solid;
- border-width:1px;
- }
- .period {
+ span.excluded_day_type {
+ margin-right: 3px;
+ }
+
+ .period {
padding-left:50px;
padding-right:450px;
- }
- .date {
+ }
+
+ .date {
padding-left:50px;
- }
- .odd {
+ }
+
+ .odd {
padding-left:50px;
padding-right:450px;
- }
- .even {
+ }
+
+ .even {
padding-left:50px;
padding-right:450px;
- }
- .actions {
- float: right;
}
+ .actions {
+ float: right;
+ }
+
.summary p label {
font-weight: bold;
}
diff --git a/app/views/time_tables/_show_time_table.html.erb b/app/views/time_tables/_show_time_table.html.erb
index 35fefce75..d2366f64e 100644
--- a/app/views/time_tables/_show_time_table.html.erb
+++ b/app/views/time_tables/_show_time_table.html.erb
@@ -1,5 +1,18 @@
<div class="time_table_show" id="time_table_show">
-
+ <p>
+ <span class="state-code <%= time_table_state_code(@time_table) %>"><i class="fa fa-certificate"></i></span>
+ <label>
+ <% if @time_table.bounding_dates.empty? %>
+ <%= t(".resume_empty") %>
+ <% else %>
+ <%= t(".resume", :start_date => l(@time_table.bounding_dates.min), :end_date => l(@time_table.bounding_dates.max)) %>
+ <% end %>
+ </label>
+ </p>
+ <p>
+ <label><%= @time_table.human_attribute_name("tag_list") %>: </label>
+ <%= @time_table.tag_list %>
+ </p>
<ul id="tabs" class="nav nav-tabs" data-tabs="tabs">
<li class="active"><a href="#time_tables" data-toggle="tab"><%= @time_table.human_attribute_name("calendars") %></a></li>
<li><a href="#time_tables_datas" data-toggle="tab"><%= @time_table.human_attribute_name("calendar_details") %></a></li>
@@ -33,58 +46,21 @@
</div>
</div>
<div class="tab-pane" id="time_tables_datas">
- <div class="summary">
- <p>
- <span class="state-code <%= time_table_state_code(@time_table) %>"><i class="fa fa-certificate"></i></span>
- <label>
- <% if @time_table.bounding_dates.empty? %>
- <%= t(".resume_empty") %>
- <% else %>
- <%= t(".resume", :start_date => l(@time_table.bounding_dates.min),
- :end_date => l(@time_table.bounding_dates.max)) %>
- <% end %>
- </label>
- </p>
+ <div class="summary">
<p>
<label><%= @time_table.human_attribute_name("version") %>: </label>
<%= @time_table.version %>
</p>
<p>
- <label><%= @time_table.human_attribute_name("tag_list") %>: </label>
- <%= @time_table.tag_list %>
- </p>
- <p>
<label><%= @time_table.human_attribute_name("day_types") %>:&nbsp;&nbsp;</label>
<% if @time_table.int_day_types & 508 == 0 %>
<label><%= @time_table.human_attribute_name("none") %></label>
<% else %>
- <% if @time_table.monday %>
- <span class='day_type'>&nbsp;<%= @time_table.human_attribute_name("monday") %>&nbsp;</span>
- <% end %>
-
- <% if @time_table.tuesday %>
- <span class='day_type'>&nbsp;<%= @time_table.human_attribute_name("tuesday") %>&nbsp;</span>
- <% end %>
-
- <% if @time_table.wednesday %>
- <span class='day_type'>&nbsp;<%= @time_table.human_attribute_name("wednesday") %>&nbsp;</span>
- <% end %>
-
- <% if @time_table.thursday %>
- <span class='day_type'>&nbsp;<%= @time_table.human_attribute_name("thursday") %>&nbsp;</span>
- <% end %>
-
- <% if @time_table.friday %>
- <span class='day_type'>&nbsp;<%= @time_table.human_attribute_name("friday") %>&nbsp;</span>
- <% end %>
-
- <% if @time_table.saturday %>
- <span class='day_type'>&nbsp;<%= @time_table.human_attribute_name("saturday") %>&nbsp;</span>
- <% end %>
-
- <% if @time_table.sunday %>
- <span class='day_type'>&nbsp;<%= @time_table.human_attribute_name("sunday") %>&nbsp;</span>
- <% end %>
+ <% %w(monday tuesday wednesday thursday friday saturday sunday).each do |day_type| %>
+ <span class="<%= @time_table.send( day_type) ? "included_day_type" : "excluded_day_type" %>">
+ <%= @time_table.human_attribute_name(day_type) %>
+ </span>
+ <% end %>
<% end %>
</p>