aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Florisson2012-04-25 15:31:06 +0200
committerMarc Florisson2012-04-25 15:31:06 +0200
commit565d56ce1dad47a983a24584406353bab92ceed4 (patch)
tree4c48fc3c7b843d7b0b1752fedd71fa7acd7eb9dd
parentc3f4535302656bd54ad58e05356a5793ef117f46 (diff)
parenta751428e531540273383c3436c0311579d87d1a7 (diff)
downloadchouette-core-565d56ce1dad47a983a24584406353bab92ceed4.tar.bz2
Merge branch 'master' of chouette.dryade.priv:/srv/git/chouette2
-rw-r--r--app/assets/images/icons/A.pngbin0 -> 832 bytes
-rw-r--r--app/assets/images/icons/R.pngbin0 -> 828 bytes
-rw-r--r--app/assets/stylesheets/routes.css.scss66
-rw-r--r--app/controllers/lines_controller.rb2
-rw-r--r--app/views/lines/show.html.erb3
-rw-r--r--app/views/routes/_route.html.erb7
-rw-r--r--app/views/routes/show.html.erb4
7 files changed, 56 insertions, 26 deletions
diff --git a/app/assets/images/icons/A.png b/app/assets/images/icons/A.png
new file mode 100644
index 000000000..3c186dade
--- /dev/null
+++ b/app/assets/images/icons/A.png
Binary files differ
diff --git a/app/assets/images/icons/R.png b/app/assets/images/icons/R.png
new file mode 100644
index 000000000..c55db80b8
--- /dev/null
+++ b/app/assets/images/icons/R.png
Binary files differ
diff --git a/app/assets/stylesheets/routes.css.scss b/app/assets/stylesheets/routes.css.scss
index 8da042a7a..c55a4646d 100644
--- a/app/assets/stylesheets/routes.css.scss
+++ b/app/assets/stylesheets/routes.css.scss
@@ -22,27 +22,22 @@
/* to create multi-column index */
width: 350px;
- float: left;
padding-right: 10px;
- .color {
- width: 64px;
- height: 64px;
+ .wayback {
+ width: 16px;
+ height: 16px;
float: left;
- margin-right: 10px;
- border: 1px solid #999;
-
- a {
- text-decoration: none;
- }
+ margin-right: 10px;
+
+ a{ margin:0px;}
}
-
- .number {
- font-size: 16px;
- text-align: center;
- font-weight: bold;
- padding-top: 21px;
- }
+
+ .name {
+ line-height: 16px;
+ float: left;
+ }
+
}
}
@@ -56,11 +51,44 @@
#workspace.routes.show
{
.route_color{ color: white;
- font-weight: bold;
- padding: 0 5px 0 5px;}
+ font-weight: bold;
+ padding: 0 5px 0 5px;}
.summary p label {
font-weight: bold;
}
+
+ .stop_area:after {
+ @include after_div_for_object;
+ }
+
+ .stop_areas {
+ margin-top: 20px;
+ }
+
+ .stop_areas:after {
+ @include content_to_clear;
+ }
+
+ .stop_area {
+ @include div_for_object;
+ /* to create multi-column index */
+ width: 350px;
+ float: left;
+ padding-right: 10px;
+
+ .area_type {
+ width: 25px;
+ height: 64px;
+ float: left;
+ margin-right: 10px;
+
+
+ a {
+ text-decoration: none;
+ }
+ }
+ }
+
}
diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb
index 9d4ec18ae..42a126169 100644
--- a/app/controllers/lines_controller.rb
+++ b/app/controllers/lines_controller.rb
@@ -8,7 +8,7 @@ class LinesController < ChouetteController
def show
@map = LineMap.new referential, resource
- @routes = @line.routes.paginate(:page => params[:page], :per_page => 10)
+ @routes = @line.routes
show!
end
diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb
index 23c65573f..e5a2d5d7f 100644
--- a/app/views/lines/show.html.erb
+++ b/app/views/lines/show.html.erb
@@ -52,11 +52,10 @@
</div>
<h3 class="routes"><%= t('.itineraries') %></h3>
-<%= will_paginate @routes %>
+
<div class="routes paginated_content">
<%= render :partial => "routes/route", :collection => @routes %>
</div>
-<%= will_paginate @routes %>
<% content_for :sidebar do %>
<ul class="actions">
diff --git a/app/views/routes/_route.html.erb b/app/views/routes/_route.html.erb
index ed9528673..7804ec068 100644
--- a/app/views/routes/_route.html.erb
+++ b/app/views/routes/_route.html.erb
@@ -1,4 +1,9 @@
<%= div_for(route) do %>
- <%= link_to route.name, referential_line_route_path( @referential, @line, route) %>
+ <div class="wayback">
+ <%= link_to image_tag("icons/#{route.wayback}.png"), referential_line_route_path( @referential, @line, route) %>
+ </div>
+ <div class="route">
+ <%= link_to route.name, referential_line_route_path( @referential, @line, route) %>
+ </div>
<% end %>
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index aef155fec..2b48f8829 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -26,8 +26,6 @@
<p>
<label><%= @route.human_attribute_name(:direction_code) %>: </label>
<% if @route.direction_code %>
- <p><%= @route.direction_code.inspect %></p>
- <p><%= @route.direction.inspect %></p>
<%= t("directions.label.#{@route.direction_code}").capitalize %>
<% else %>
<%= t(".undefined") %>
@@ -65,7 +63,7 @@
</div>
-<h3 class="stop_areas"><%= t('.stop_areas') %></h3>
+<h3><%= t('.stop_areas') %></h3>
<%= will_paginate @stop_areas %>
<div class="stop_areas paginated_content">
<%= render :partial => "stop_areas/stop_area", :collection => @stop_areas %>