diff options
| -rw-r--r-- | Gemfile | 7 | ||||
| -rw-r--r-- | Gemfile.lock | 16 | ||||
| -rw-r--r-- | app/assets/javascripts/route.js.coffee | 15 | ||||
| -rw-r--r-- | app/assets/stylesheets/layout.css.scss | 15 | ||||
| -rw-r--r-- | app/assets/stylesheets/lines.css.scss | 1 | ||||
| -rw-r--r-- | app/views/lines/show.html.erb | 1 | ||||
| -rw-r--r-- | app/views/routes/show.html.erb | 25 | ||||
| -rw-r--r-- | db/schema.rb | 51 |
8 files changed, 83 insertions, 48 deletions
@@ -38,19 +38,20 @@ gem "modernizr-rails", "~> 2.0.6" gem "acts_as_tree", :git => "git://github.com/dryade/acts_as_tree.git" #gem 'ninoxe', :git => 'git://github.com/dryade/ninoxe.git' gem 'ninoxe', :git => 'git://chouette.dryade.priv/ninoxe' #, :path => '~/Projects/Ninoxe' -#gem 'ninoxe', :path => '~/workspace/chouette/ninoxe' gem 'acts_as_list', '0.1.6' #gem 'composite_primary_keys', '~> 5.0.8' gem 'delayed_job_active_record' gem 'apartment',:git => 'git://github.com/dryade/apartment.git' +# some views use coffee script +gem 'coffee-rails', '~> 3.2.1' +gem 'coffee-script-source' + # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~> 3.2.3' - gem 'coffee-rails', '~> 3.2.1' - gem 'coffee-script-source' gem 'uglifier', '>= 1.0.3' gem 'therubyrhino', :platform => :jruby gem 'therubyracer', :platform => :ruby diff --git a/Gemfile.lock b/Gemfile.lock index 94d1f7ffe..dbf4049d3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -185,11 +185,11 @@ GEM jruby-jars (1.6.7.2) jruby-openssl (0.7.7) bouncy-castle-java (>= 1.5.0146.1) - jruby-rack (1.1.6) - jruby-rack-worker (0.3-java) - jruby-rack (>= 1.0.1) - json (1.7.4) - json (1.7.4-java) + jruby-rack (1.1.7) + jruby-rack-worker (0.4-java) + jruby-rack (>= 1.1.1) + json (1.7.3) + json (1.7.3-java) json_pure (1.7.3) launchy (2.1.0) addressable (~> 2.2.6) @@ -197,7 +197,6 @@ GEM addressable (~> 2.2.6) ffi (~> 1.0.9) spoon (~> 0.0.1) - libv8 (3.3.10.4) libwebsocket (0.1.4) addressable listen (0.4.7) @@ -222,7 +221,6 @@ GEM nokogiri (1.5.5) nokogiri (1.5.5-java) orm_adapter (0.4.0) - pg (0.11.0) polyamorous (0.5.0) activerecord (~> 3.0) polyglot (0.3.3) @@ -303,13 +301,10 @@ GEM hike (~> 1.2) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - sqlite3 (1.3.6) squeel (1.0.7) activerecord (~> 3.0) activesupport (~> 3.0) polyamorous (~> 0.5.0) - therubyracer (0.10.2) - libv8 (~> 3.3.10) therubyrhino (1.73.4) thor (0.15.4) tilt (1.3.3) @@ -333,7 +328,6 @@ GEM PLATFORMS java - ruby DEPENDENCIES RedCloth diff --git a/app/assets/javascripts/route.js.coffee b/app/assets/javascripts/route.js.coffee new file mode 100644 index 000000000..a3dd304d3 --- /dev/null +++ b/app/assets/javascripts/route.js.coffee @@ -0,0 +1,15 @@ +jQuery -> + switch_journey_patterns = (event) -> + event.preventDefault() + $('.routes.show .journey_patterns.content').toggle('slow') + $('a.journey_patterns .switcher').toggle() + + $('.routes.show a.journey_patterns').click(switch_journey_patterns) + + switch_stop_points = (event) -> + event.preventDefault() + $('.routes.show .stop_points.content').toggle('slow') + $('a.stop_points .switcher').toggle() + + $('.routes.show a.stop_points').click(switch_stop_points) + diff --git a/app/assets/stylesheets/layout.css.scss b/app/assets/stylesheets/layout.css.scss index dced2ebb6..2c51cd6df 100644 --- a/app/assets/stylesheets/layout.css.scss +++ b/app/assets/stylesheets/layout.css.scss @@ -7,6 +7,21 @@ $text_color: #222; @import "user_interface/layout"; +p.after_map { + clear: both; +} +#header .infos div.title +{ + margin: 20px 0 0 30px; + + h1 { + font-family: "Comic Sans", "Comic Sans MS", cursive; + font-size: 32px; + font-weight: bold; + padding: 0px; + } +} + #sidebar ul { padding: 0 8px; diff --git a/app/assets/stylesheets/lines.css.scss b/app/assets/stylesheets/lines.css.scss index 56a5572e5..cbd39f90b 100644 --- a/app/assets/stylesheets/lines.css.scss +++ b/app/assets/stylesheets/lines.css.scss @@ -63,7 +63,6 @@ .line_color{ color: white; font-weight: bold; padding: 0 5px 0 5px;} - h3.routes { clear: both; } .route { @include div_for_object; diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb index 2f74ab4fa..6da0bf61e 100644 --- a/app/views/lines/show.html.erb +++ b/app/views/lines/show.html.erb @@ -59,6 +59,7 @@ </div> </div> +<p class="after_map" /> <h3 class="routes"><%= t('.itineraries') %></h3> <div class="routes paginated_content"> diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb index e6fbcce3f..9980543c7 100644 --- a/app/views/routes/show.html.erb +++ b/app/views/routes/show.html.erb @@ -64,13 +64,24 @@ </div> -<h3 class="route_stop_points"><%= t('.stop_points') %></h3> -<div class="stop_points paginated_content"> +<p class="after_map" /> + <h3 class="route_stop_points"><%= t('.stop_points') %> + <a class="stop_points"> + <span class="switcher">+</span> + <span class="switcher" style="display: none;">-</span> + </a> + </h3> +<div class="stop_points content" style="display: none;"> <%= render :partial => "stop_points/stop_point", :collection => @stop_points %> </div> -<h3 class="route_journey_patterns"><%= t('.journey_patterns') %></h3> -<div class="journey_patterns"> +<h3 class="route_journey_patterns"><%= t('.journey_patterns') %> + <a class="journey_patterns"> + <span class="switcher">+</span> + <span class="switcher" style="display: none;">-</span> + </a> +</h3> +<div class="journey_patterns content" style="display: none;"> <%= render :partial => "journey_patterns/journey_pattern", :collection => @route.journey_patterns %> </div> @@ -87,12 +98,6 @@ <li> <%= link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], :class => "link" %> </li> - <li> - <%= link_to t(".journey_patterns"), "#journey_patterns", :class => "select_parent" %> - </li> - <li> - <%= link_to t(".stop_points"), "#stop_points", :class => "select_parent" %> - </li> </ul> <% end %> diff --git a/db/schema.rb b/db/schema.rb index 26e881fba..944588d55 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -176,16 +176,14 @@ ActiveRecord::Schema.define(:version => 20120620081755) do t.integer "choice_code" end - add_index "facilities_features", ["facility_id"], :name => "idx_facility_id" - create_table "file_validation_log_messages", :force => true do |t| t.integer "file_validation_id" t.string "key" t.string "arguments", :limit => 1000 t.integer "position" t.string "severity" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end add_index "file_validation_log_messages", ["file_validation_id"], :name => "index_file_validation_log_messages_on_file_validation_id" @@ -195,8 +193,18 @@ ActiveRecord::Schema.define(:version => 20120620081755) do t.string "options", :limit => 2000 t.string "file_name" t.string "file_type" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "geometry_columns", :id => false, :force => true do |t| + t.string "f_table_catalog", :limit => 256, :null => false + t.string "f_table_schema", :limit => 256, :null => false + t.string "f_table_name", :limit => 256, :null => false + t.string "f_geometry_column", :limit => 256, :null => false + t.integer "coord_dimension", :null => false + t.integer "srid", :null => false + t.string "type", :limit => 30, :null => false end create_table "group_of_lines", :force => true do |t| @@ -211,13 +219,10 @@ ActiveRecord::Schema.define(:version => 20120620081755) do add_index "group_of_lines", ["objectid"], :name => "group_of_lines_objectid_key", :unique => true create_table "group_of_lines_lines", :id => false, :force => true do |t| - t.integer "group_of_line_id", :limit => 8, :null => false - t.integer "line_id", :limit => 8, :null => false + t.integer "group_of_line_id", :limit => 8 + t.integer "line_id", :limit => 8 end - add_index "group_of_lines_lines", ["group_of_line_id"], :name => "idx_grli_gr" - add_index "group_of_lines_lines", ["line_id"], :name => "idx_grli_li" - create_table "import_log_messages", :force => true do |t| t.integer "import_id" t.string "key" @@ -259,11 +264,10 @@ ActiveRecord::Schema.define(:version => 20120620081755) do add_index "journey_patterns", ["objectid"], :name => "journey_patterns_objectid_key", :unique => true create_table "journey_patterns_stop_points", :id => false, :force => true do |t| - t.integer "journey_pattern_id", :limit => 8, :null => false - t.integer "stop_point_id", :limit => 8, :null => false + t.integer "journey_pattern_id", :limit => 8 + t.integer "stop_point_id", :limit => 8 end - add_index "journey_patterns_stop_points", ["journey_pattern_id"], :name => "idx_jpsp_jpid" add_index "journey_patterns_stop_points", ["journey_pattern_id"], :name => "index_journey_pattern_id_on_journey_patterns_stop_points" create_table "lines", :force => true do |t| @@ -326,8 +330,8 @@ ActiveRecord::Schema.define(:version => 20120620081755) do t.datetime "updated_at" t.string "prefix" t.string "projection_type" - t.string "bounding_box", :limit => nil t.string "time_zone" + t.string "the_geom" t.string "bounds" end @@ -353,8 +357,13 @@ ActiveRecord::Schema.define(:version => 20120620081755) do t.integer "line_id", :limit => 8 end - add_index "routing_constraints_lines", ["line_id"], :name => "idx_rcli_li" - add_index "routing_constraints_lines", ["stop_area_id"], :name => "idx_rcli_st" + create_table "spatial_ref_sys", :id => false, :force => true do |t| + t.integer "srid", :null => false + t.string "auth_name", :limit => 256 + t.integer "auth_srid" + t.string "srtext", :limit => 2048 + t.string "proj4text", :limit => 2048 + end create_table "stop_areas", :force => true do |t| t.integer "parent_id", :limit => 8 @@ -442,8 +451,8 @@ ActiveRecord::Schema.define(:version => 20120620081755) do add_index "time_tables", ["objectid"], :name => "time_tables_objectid_key", :unique => true create_table "time_tables_vehicle_journeys", :id => false, :force => true do |t| - t.integer "time_table_id", :limit => 8, :null => false - t.integer "vehicle_journey_id", :limit => 8, :null => false + t.integer "time_table_id", :limit => 8 + t.integer "vehicle_journey_id", :limit => 8 end add_index "time_tables_vehicle_journeys", ["time_table_id"], :name => "index_time_tables_vehicle_journeys_on_time_table_id" @@ -477,12 +486,8 @@ ActiveRecord::Schema.define(:version => 20120620081755) do t.time "waiting_time" t.time "elapse_duration" t.time "headway_frequency" - t.integer "position", :limit => 8 - t.boolean "is_departure", :default => false - t.boolean "is_arrival", :default => false end - add_index "vehicle_journey_at_stops", ["stop_point_id"], :name => "index_vehicle_journey_at_stops_on_stop_point_id" add_index "vehicle_journey_at_stops", ["stop_point_id"], :name => "index_vehicle_journey_at_stops_on_stop_pointid" add_index "vehicle_journey_at_stops", ["vehicle_journey_id"], :name => "index_vehicle_journey_at_stops_on_vehicle_journey_id" |
