aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZakaria BOUZIANE2014-09-30 11:22:21 +0200
committerZakaria BOUZIANE2014-09-30 11:22:21 +0200
commit9e56d34d401d2eba040a76437a1e4199029b3f6c (patch)
tree1bb0e3d2cb9a2cb65843c5db0adba25adb42f10b
parentbeb4b02b54a4fa2a737cb2be521728cd8118cad6 (diff)
parent4faeb448b3e570d69a516dce70c1d098f973892d (diff)
downloadchouette-core-9e56d34d401d2eba040a76437a1e4199029b3f6c.tar.bz2
Merge branch 'sismo' of https://github.com/afimb/chouette2 into sismo
-rw-r--r--Gemfile3
-rw-r--r--Gemfile.lock8
-rw-r--r--app/assets/javascripts/access_points.js.coffee13
-rw-r--r--app/assets/javascripts/journey_pattern.js.coffee7
-rw-r--r--app/assets/javascripts/route.js.coffee24
-rw-r--r--app/assets/javascripts/time_tables.js.coffee28
-rw-r--r--app/assets/stylesheets/application.css.scss.erb4
-rw-r--r--app/assets/stylesheets/main/access_points.css.scss51
-rw-r--r--app/assets/stylesheets/main/api_keys.css.scss19
-rw-r--r--app/assets/stylesheets/main/calendar.css.scss30
-rw-r--r--app/assets/stylesheets/main/companies.css.scss4
-rw-r--r--app/assets/stylesheets/main/compliance_check_tasks.css.scss5
-rw-r--r--app/assets/stylesheets/main/connection_links.css.scss4
-rw-r--r--app/assets/stylesheets/main/exports.css.scss4
-rw-r--r--app/assets/stylesheets/main/group_of_lines.css.scss4
-rw-r--r--app/assets/stylesheets/main/import_tasks.css.scss5
-rw-r--r--app/assets/stylesheets/main/layout.css.scss116
-rw-r--r--app/assets/stylesheets/main/lines.css.scss6
-rw-r--r--app/assets/stylesheets/main/networks.css.scss6
-rw-r--r--app/assets/stylesheets/main/organisations.css.scss18
-rw-r--r--app/assets/stylesheets/main/referentials.css.scss5
-rw-r--r--app/assets/stylesheets/main/routes.css.scss78
-rw-r--r--app/assets/stylesheets/main/rule_parameter_sets.css.scss35
-rw-r--r--app/assets/stylesheets/main/stop_areas.css.scss18
-rw-r--r--app/assets/stylesheets/main/time_tables.css.scss117
-rw-r--r--app/assets/stylesheets/main/vehicle_journeys.css.scss53
-rw-r--r--app/assets/stylesheets/modules/icons.css.scss101
-rw-r--r--app/assets/stylesheets/modules/index_item.css.scss25
-rw-r--r--app/assets/stylesheets/vendor/bootstrap_changes.css.scss28
-rw-r--r--app/assets/stylesheets/vendor/pagination.css.scss7
-rw-r--r--app/controllers/access_links_controller.rb4
-rw-r--r--app/controllers/access_points_controller.rb2
-rw-r--r--app/helpers/breadcrumb_helper.rb17
-rw-r--r--app/helpers/vehicle_journeys_helper.rb7
-rw-r--r--app/inputs/extended_time_picker_input.rb3
-rw-r--r--app/maps/stop_area_map.rb2
-rw-r--r--app/views/access_link_pairs/_access_link_pair.html.erb105
-rw-r--r--app/views/access_links/_form.html.erb2
-rw-r--r--app/views/access_points/_access_point.html.erb47
-rw-r--r--app/views/access_points/show.html.erb44
-rw-r--r--app/views/api_keys/_api_key.html.erb38
-rw-r--r--app/views/connection_links/_connection_link.erb2
-rw-r--r--app/views/connection_links/_form.erb2
-rw-r--r--app/views/connection_links/show.html.erb2
-rw-r--r--app/views/devise/registrations/new.html.erb3
-rw-r--r--app/views/journey_patterns/_journey_pattern.html.erb41
-rw-r--r--app/views/journey_patterns/edit.html.erb13
-rw-r--r--app/views/journey_patterns/show.html.erb2
-rw-r--r--app/views/journey_patterns/show.js.erb4
-rw-r--r--app/views/organisations/show.html.erb10
-rw-r--r--app/views/referentials/_referential.erb46
-rw-r--r--app/views/referentials/show.html.erb9
-rw-r--r--app/views/referentials/show.js.erb40
-rw-r--r--app/views/routes/_route.html.erb2
-rw-r--r--app/views/routes/_stop_points_detail.html.erb10
-rw-r--r--app/views/routes/show.html.erb18
-rw-r--r--app/views/routes/show.js.erb4
-rw-r--r--app/views/shared/_footer.erb16
-rw-r--r--app/views/stop_areas/_stop_area.html.erb2
-rw-r--r--app/views/stop_areas/index.html.erb2
-rw-r--r--app/views/stop_areas/show.html.erb12
-rw-r--r--app/views/time_tables/_cell_info.html.erb14
-rw-r--r--app/views/time_tables/_cell_title.html.erb10
-rw-r--r--app/views/time_tables/_show_time_table.html.erb191
-rw-r--r--app/views/time_tables/_time_table.html.erb16
-rw-r--r--app/views/time_tables/show.html.erb4
-rw-r--r--app/views/users/_user.html.erb22
-rw-r--r--app/views/users/edit.html.erb1
-rw-r--r--app/views/vehicle_journeys/_show_popover.html.erb19
-rw-r--r--app/views/vehicle_journeys/_sidebar.html.erb2
-rw-r--r--app/views/vehicle_journeys/edit.html.erb13
-rw-r--r--app/views/vehicle_journeys/index.html.erb15
-rw-r--r--app/views/vehicle_journeys/new.html.erb13
-rw-r--r--app/views/vehicle_journeys/show.html.erb2
-rw-r--r--config/locales/time_table_combinations.yml7
-rw-r--r--config/locales/time_tables.yml16
-rw-r--r--config/locales/vehicle_journeys.yml4
-rw-r--r--spec/views/vehicle_journeys/edit.html.erb_spec.rb6
-rw-r--r--spec/views/vehicle_journeys/new.html.erb_spec.rb6
79 files changed, 707 insertions, 991 deletions
diff --git a/Gemfile b/Gemfile
index 5d122925b..1222753a8 100644
--- a/Gemfile
+++ b/Gemfile
@@ -51,7 +51,7 @@ gem 'raphael-rails'
# Use twitter bootstrap resources
gem 'rails-assets-bootstrap-sass-official', '~> 3.1.1'
-gem 'font-awesome-sass'
+gem 'font-awesome-sass', '~> 4.2.0'
gem 'will_paginate-bootstrap'
gem 'simple_form'
gem 'rails-assets-tagmanager', '~> 3.0.1.0'
@@ -59,6 +59,7 @@ gem 'rails-assets-typeahead.js', '~> 0.10.5'
gem "breadcrumbs_on_rails"
gem 'bootstrap-timepicker-rails'
gem 'rails-assets-typeahead.js-bootstrap3.less'
+gem 'rails-assets-respond'
# Format Output
gem 'json'
diff --git a/Gemfile.lock b/Gemfile.lock
index f31ac8296..a68a6c154 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -136,7 +136,7 @@ GEM
ffi (1.9.3-java)
ffi-geos (1.0.0)
ffi (>= 1.0.0)
- font-awesome-sass (4.1.0)
+ font-awesome-sass (4.2.0)
sass (~> 3.2)
foreigner (1.6.0)
activerecord (>= 3.0.0)
@@ -244,6 +244,7 @@ GEM
rails-assets-jquery (>= 1.9.0)
rails-assets-bootstrap-sass-official (3.1.1.2)
rails-assets-jquery (2.1.1)
+ rails-assets-respond (1.4.2)
rails-assets-tagmanager (3.0.1)
rails-assets-jquery (>= 1.0.0)
rails-assets-typeahead.js (0.10.5)
@@ -311,7 +312,7 @@ GEM
ruby-graphviz (1.0.9)
ruby-ole (1.2.11.7)
rubyzip (1.1.6)
- sass (3.3.7)
+ sass (3.4.5)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
@@ -394,7 +395,7 @@ DEPENDENCIES
devise_invitable
dr-apartment
factory_girl_rails (= 1.7)
- font-awesome-sass
+ font-awesome-sass (~> 4.2.0)
formtastic
georuby-ext (= 0.0.5)
google-analytics-rails
@@ -417,6 +418,7 @@ DEPENDENCIES
rabl
rails (= 3.2.18)
rails-assets-bootstrap-sass-official (~> 3.1.1)
+ rails-assets-respond
rails-assets-tagmanager (~> 3.0.1.0)
rails-assets-typeahead.js (~> 0.10.5)
rails-assets-typeahead.js-bootstrap3.less
diff --git a/app/assets/javascripts/access_points.js.coffee b/app/assets/javascripts/access_points.js.coffee
index ee5e89def..56ae24d1e 100644
--- a/app/assets/javascripts/access_points.js.coffee
+++ b/app/assets/javascripts/access_points.js.coffee
@@ -29,17 +29,4 @@ jQuery ->
$('input#access_point_projection_xy').change(lon_lat_change)
- # switch visibility of access_links
- switch_generics = (event) ->
- event.preventDefault()
- $('.access_points .generics.content').toggle('slow')
- $('a.generics .switcher').toggle()
- $('.access_points a.generics').click(switch_generics)
-
- switch_details = (event) ->
- event.preventDefault()
- $('.access_points .details.content').toggle('slow')
- $('a.details .switcher').toggle()
-
- $('.access_points a.details').click(switch_details)
diff --git a/app/assets/javascripts/journey_pattern.js.coffee b/app/assets/javascripts/journey_pattern.js.coffee
index 062fc611e..0f203397b 100644
--- a/app/assets/javascripts/journey_pattern.js.coffee
+++ b/app/assets/javascripts/journey_pattern.js.coffee
@@ -3,6 +3,7 @@ jQuery ->
if (event.type == 'mouseenter')
if event.target.id.match(/^stop_point_(\w+)$/)
stopAreaId = $("#"+event.target.id+" a").attr('href').match(/\d+$/)[0]
+ console.log(stopAreaId)
placeMark = selectFeature.layer.getFeatureByFid( stopAreaId)
selectFeature.unselectAll()
selectFeature.select( placeMark)
@@ -11,9 +12,3 @@ jQuery ->
$(document).on("hover", '.journey_patterns.show div.stop_points .stop_point', select_stop_on_map)
- make_ajax_pagination = () ->
- $.get(this.href, null, null, 'script')
- false
-
- $(document).on("click", '.stop_points_detail .pagination a', make_ajax_pagination)
-
diff --git a/app/assets/javascripts/route.js.coffee b/app/assets/javascripts/route.js.coffee
index b679f1893..ea2984d02 100644
--- a/app/assets/javascripts/route.js.coffee
+++ b/app/assets/javascripts/route.js.coffee
@@ -1,22 +1,10 @@
-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_detail').toggle('slow')
- $('a.stop_points .switcher').toggle()
-
- $('.routes.show a.stop_points').click(switch_stop_points)
-
+jQuery ->
select_stop_on_map = (event) ->
if (event.type == 'mouseenter')
if event.target.id.match(/^stop_point_(\w+)$/)
+ console.log(event.target.id)
stopAreaId = $("#"+event.target.id+" a").attr('href').match(/\d+$/)[0]
+ console.log(stopAreaId)
placeMark = selectFeature.layer.getFeatureByFid( stopAreaId)
selectFeature.unselectAll()
selectFeature.select( placeMark)
@@ -24,9 +12,3 @@ jQuery ->
selectFeature.unselectAll()
$(document).on("hover", '.routes.show div.stop_points .stop_point', select_stop_on_map)
-
- make_ajax_pagination = () ->
- $.get(this.href, null, null, 'script')
- false
-
- $(document).on("click", '.routes.show .stop_points_detail .pagination a', make_ajax_pagination)
diff --git a/app/assets/javascripts/time_tables.js.coffee b/app/assets/javascripts/time_tables.js.coffee
index 75889bd3f..ccc4fe0fe 100644
--- a/app/assets/javascripts/time_tables.js.coffee
+++ b/app/assets/javascripts/time_tables.js.coffee
@@ -1,32 +1,4 @@
jQuery ->
-# add trigger to hide/show application dates and periods
- switch_calendars = (event) ->
- event.preventDefault()
- $('.time_tables .calendars.content').toggle('slow')
- $('a.calendars .switcher').toggle()
-
- $('.time_tables').on('click','a.calendars',switch_calendars)
-
- switch_dates = (event) ->
- event.preventDefault()
- $('.time_tables .dates.content').toggle('slow')
- $('a.dates .switcher').toggle()
-
- $('.time_tables').on('click','a.dates',switch_dates)
-
- switch_excluded_dates = (event) ->
- event.preventDefault()
- $('.time_tables .excluded_dates.content').toggle('slow')
- $('a.excluded_dates .switcher').toggle()
-
- $('.time_tables').on('click','a.excluded_dates',switch_excluded_dates)
-
- switch_periods = (event) ->
- event.preventDefault()
- $('.time_tables .periods.content').toggle('slow')
- $('a.periods .switcher').toggle()
-
- $('.time_tables').on('click','a.periods',switch_periods)
# add trigger when creating new date or period entries to activate datepicker
tt_datepickerI18n = (index, element) ->
diff --git a/app/assets/stylesheets/application.css.scss.erb b/app/assets/stylesheets/application.css.scss.erb
index aefe12759..156fc75cb 100644
--- a/app/assets/stylesheets/application.css.scss.erb
+++ b/app/assets/stylesheets/application.css.scss.erb
@@ -11,6 +11,7 @@ $body-bg: #eee;
// Modules and Variables
@import "modules/search";
@import "modules/index_item";
+@import "modules/icons";
// Partials
@import "partials/header";
@@ -18,6 +19,7 @@ $body-bg: #eee;
// Third-party
@import "tagmanager/tagmanager.scss";
+@import "font-awesome-sprockets";
@import "font-awesome";
@import "jquery.ui.all";
@import "morris";
@@ -31,7 +33,7 @@ $body-bg: #eee;
@import "vendor/formtastic_changes";
@import "vendor/pagination";
@import "vendor/map_layers";
-@import "vendor/token-input.css";
+@import "vendor/token-input";
@import "vendor/typeahead";
@import "vendor/bootstrap_changes";
diff --git a/app/assets/stylesheets/main/access_points.css.scss b/app/assets/stylesheets/main/access_points.css.scss
index 7be2cb39b..af6a09ee7 100644
--- a/app/assets/stylesheets/main/access_points.css.scss
+++ b/app/assets/stylesheets/main/access_points.css.scss
@@ -3,26 +3,7 @@
// You can use Sass (SCSS) here: http://sass-lang.com/
#workspace.access_points.index
-{
- .access_point {
- /* to create multi-column index */
- width: 250px;
- float: left;
- padding-right: 10px;
-
- .access_type {
- width: 25px;
- height: 64px;
- float: left;
- margin-right: 10px;
-
-
- a {
- text-decoration: none;
- }
- }
-
- }
+{
}
#workspace.access_points.edit,#workspace.access_points.new,#workspace.access_points.create,#workspace.access_points.update
@@ -51,35 +32,41 @@
}
.access_link_pairs {
+
+ table{
+ border: 0px;
+ border-collapse: separate;
+ border-spacing: 3px;
+ }
.link {
- border: 2px solid black;
+ border: 2px solid black;
}
+
.access_point{
- float: left;
padding: 3px 15px 0px 3px;
height: 25px;
* { vertical-align:middle; }
span { margin-left: 7px; }
img { margin: 0px 5px 0px 5px;}
}
+
.stop_area{
- float: left;
padding: 3px 15px 0px 3px;
height: 25px;
* { vertical-align:middle; }
span { margin-left: 7px; }
img { margin: 0px 5px 0px 5px;}
}
-
- .info {
- font-size: 10px;
- color: #777;
- font-weight: normal;
- padding-top: 0px;
- padding-left: 45px;
- padding-right: 3px;
- padding-bottom: 3px;
+
+ .info {
+ font-size: 10px;
+ color: #777;
+ font-weight: normal;
+ padding-top: 10px;
+ padding-left: 45px;
+ padding-right: 3px;
+ padding-bottom: 3px;
}
}
diff --git a/app/assets/stylesheets/main/api_keys.css.scss b/app/assets/stylesheets/main/api_keys.css.scss
index e78c7bda0..5ac873da7 100644
--- a/app/assets/stylesheets/main/api_keys.css.scss
+++ b/app/assets/stylesheets/main/api_keys.css.scss
@@ -2,24 +2,7 @@
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
-#workspace.referentials.show
+#workspace.api_keys.show
{
-
- .api_keys {
- margin-top: 20px;
- }
-
- .api_key {
-
- /* to create multi-column index */
- width: 350px;
- padding-right: 10px;
-
- .name {
- line-height: 16px;
- float: left;
- }
-
- }
}
diff --git a/app/assets/stylesheets/main/calendar.css.scss b/app/assets/stylesheets/main/calendar.css.scss
index 3d86dbfa1..9d597c544 100644
--- a/app/assets/stylesheets/main/calendar.css.scss
+++ b/app/assets/stylesheets/main/calendar.css.scss
@@ -10,12 +10,15 @@
white: ffffff
*/
-/* TODO */
+$selected_period_color: #ffbd2b;
+$selected_date_color: #8fc861;
+$excluded_date_color: #ff8f85;
+$overlap_date_color: #c082f4;
.year_choice{
font-size: 16px;
font-weight: bold;
- margin: 20px 0 0 0;
+ margin: 10px 0 0 0;
text-align: center;
.year{
@@ -25,8 +28,7 @@
}
-.calendar_helper{
-
+.calendar_helper{
padding: auto;
}
@@ -72,7 +74,7 @@ th.monthName {
background-color: #333333;
}
-.day, .specialDay, .selected_period, .selected_date, .overlap_date {
+.day, .specialDay {
border-bottom: 1px solid #111111;
padding: 0.7em;
border-right: 1px solid #111111;
@@ -81,13 +83,13 @@ th.monthName {
.specialDay { background-color: #a8a8a8 !important; }
-.selected_period { background-color: #ffbd2b !important; }
+.selected_period { background-color: $selected_period_color !important; }
-.selected_date { background-color: #8fc861 !important; }
+.selected_date { background-color: $selected_date_color !important; }
-.excluded_date { background-color: #ff8f85 !important; }
+.excluded_date { background-color: $excluded_date_color !important; }
-.overlap_date { background-color: #c082f4 !important; }
+.overlap_date { background-color: $overlap_date_color !important; }
.specialDay, .selected_period, .selected_date, .overlap_date, .excluded_date {
a, a:visited, a:hover {
@@ -96,9 +98,9 @@ th.monthName {
}
}
-.specialDay a:hover, selected_period a:hover, selected_date a:hover, excluded_date a:hover, overlap_date a:hover {
- color: black;
-}
+.specialDay a:hover, selected_period a:hover, selected_date a:hover, excluded_date a:hover, overlap_date a:hover{
+ color: black;
+ }
.weekendDay {
background-color: #787888;
@@ -106,4 +108,6 @@ th.monthName {
.today {
background-color: white;
color: black;
-} \ No newline at end of file
+}
+
+
diff --git a/app/assets/stylesheets/main/companies.css.scss b/app/assets/stylesheets/main/companies.css.scss
index daf4da488..481b2ee7b 100644
--- a/app/assets/stylesheets/main/companies.css.scss
+++ b/app/assets/stylesheets/main/companies.css.scss
@@ -4,10 +4,6 @@
#workspace.companies.index
{
-
- .companies {
- margin-top: 20px;
- }
}
#workspace.companies.show
diff --git a/app/assets/stylesheets/main/compliance_check_tasks.css.scss b/app/assets/stylesheets/main/compliance_check_tasks.css.scss
index 2f822aef4..663dd6932 100644
--- a/app/assets/stylesheets/main/compliance_check_tasks.css.scss
+++ b/app/assets/stylesheets/main/compliance_check_tasks.css.scss
@@ -10,11 +10,6 @@
#workspace.compliance_check_tasks.index
{
-
- .compliance_check_tasks {
- margin-top: 20px;
- }
-
}
#workspace.compliance_check_tasks.show {
diff --git a/app/assets/stylesheets/main/connection_links.css.scss b/app/assets/stylesheets/main/connection_links.css.scss
index d4672cd31..5e5186ccf 100644
--- a/app/assets/stylesheets/main/connection_links.css.scss
+++ b/app/assets/stylesheets/main/connection_links.css.scss
@@ -4,10 +4,6 @@
#workspace.connection_links.index
{
-
- .connection_links {
- margin-top: 20px;
- }
}
diff --git a/app/assets/stylesheets/main/exports.css.scss b/app/assets/stylesheets/main/exports.css.scss
index beefcb260..6b11e8b7f 100644
--- a/app/assets/stylesheets/main/exports.css.scss
+++ b/app/assets/stylesheets/main/exports.css.scss
@@ -4,10 +4,6 @@
#workspace.exports.index
{
-
- .exports {
- margin-top: 20px;
- }
}
#workspace.exports.show {
diff --git a/app/assets/stylesheets/main/group_of_lines.css.scss b/app/assets/stylesheets/main/group_of_lines.css.scss
index f56f76e44..007a0381f 100644
--- a/app/assets/stylesheets/main/group_of_lines.css.scss
+++ b/app/assets/stylesheets/main/group_of_lines.css.scss
@@ -4,10 +4,6 @@
#workspace.group_of_lines.index
{
-
- .group_of_lines {
- margin-top: 20px;
- }
}
#workspace.group_of_lines.show
diff --git a/app/assets/stylesheets/main/import_tasks.css.scss b/app/assets/stylesheets/main/import_tasks.css.scss
index 4f7a2713a..198f83129 100644
--- a/app/assets/stylesheets/main/import_tasks.css.scss
+++ b/app/assets/stylesheets/main/import_tasks.css.scss
@@ -1,10 +1,5 @@
#workspace.import_tasks.index
{
-
- .import_tasks {
- margin-top: 20px;
- }
-
}
#workspace.import_tasks.show {
diff --git a/app/assets/stylesheets/main/layout.css.scss b/app/assets/stylesheets/main/layout.css.scss
index 4438769b8..f55a7c90f 100644
--- a/app/assets/stylesheets/main/layout.css.scss
+++ b/app/assets/stylesheets/main/layout.css.scss
@@ -112,6 +112,10 @@ ol.breadcrumb{
.actions {
margin-bottom: 20px;
+
+ li{
+ margin-bottom: 5px;
+ }
}
p {
@@ -197,115 +201,3 @@ ol.breadcrumb{
}
}
}
-
-.info {
- font-size: 10px;
- color: #777;
- font-weight: normal;
- line-height: 14px;
- margin-top: 5px;
-
- a {
- display:inline;
- color: #777;
- }
-
- .actions {
- margin-top: 10px;
- a {
- color: #666;
- padding-left: 12px;
- }
-
- a.link {
- background: url(image-path('icons/link-small.png')) no-repeat 0% 50%;
- }
- a.edit {
- background: url(image-path('icons/edit-small.png')) no-repeat 0% 50%;
- }
- a.remove {
- background: url(image-path('icons/remove-small.png')) no-repeat 0% 50%;
- }
- a.download {
- background: url(image-path('download-small.png')) no-repeat 0% 50%;
- }
- }
-}
-
-.actions {
- a {
- padding-left: 20px;
- }
-
- /* Hack with font icon */
- a.vehicle_journeys{
- padding-left: 4px;
- }
-
- /* to use with font awesome icon */
- a.with_fa {
- padding-left: 2px;
- }
-
- a.visit_site{
- background: url(image-path('icons/site.png')) no-repeat;
- }
-
- a.visit_event{
- background: url(image-path('icons/event.png')) no-repeat;
- }
-
- a.visit_page{
- background: url(image-path('icons/page.png')) no-repeat;
- }
-
- a.add {
- background: url(image-path('icons/add.png')) no-repeat;
- }
- a.edit {
- background: url(image-path('icons/edit.png')) no-repeat;
- }
- a.remove {
- background: url(image-path('icons/remove.png')) no-repeat;
- }
- a.export {
- background: url(image-path('icons/export.png')) no-repeat;
- }
- li {
- margin: 10px 0;
- }
-
- a.add_children {
- background: url(image-path('icons/add.png')) no-repeat;
- }
-
- a.add_fields {
- background: url(image-path('icons/add.png')) no-repeat;
- }
-
- a.link {
- background: url(image-path('icons/link.png')) no-repeat;
- }
-
- a.select_parent {
- background: url(image-path('icons/select_parent.png')) no-repeat;
- }
-
- a.select_areas {
- background: url(image-path('icons/select_parent.png')) no-repeat;
- }
-
- a.calculator_edit {
- background: url(image-path('icons/calculator_edit.png')) no-repeat;
- }
- a.import {
- background: url(image-path('icons/import-small.png')) no-repeat;
- }
- a.export {
- background: url(image-path('icons/export-small.png')) no-repeat;
- }
- a.kml {
- background: url(image-path('icons/kml.png')) no-repeat;
- }
-
-}
diff --git a/app/assets/stylesheets/main/lines.css.scss b/app/assets/stylesheets/main/lines.css.scss
index d0c588391..653ca899c 100644
--- a/app/assets/stylesheets/main/lines.css.scss
+++ b/app/assets/stylesheets/main/lines.css.scss
@@ -3,11 +3,7 @@
// You can use Sass (SCSS) here: http://sass-lang.com/
#workspace.lines.index
-{
-
- .lines {
- margin-top: 20px;
- }
+{
}
#workspace.lines.edit, #workspace.lines.new, #workspace.lines.create, #workspace.lines.update
diff --git a/app/assets/stylesheets/main/networks.css.scss b/app/assets/stylesheets/main/networks.css.scss
index 3730d6668..c8533699e 100644
--- a/app/assets/stylesheets/main/networks.css.scss
+++ b/app/assets/stylesheets/main/networks.css.scss
@@ -3,11 +3,7 @@
// You can use Sass (SCSS) here: http://sass-lang.com/
#workspace.networks.index
-{
- .networks {
- margin-top: 20px;
- }
-
+{
}
#workspace.networks.show
diff --git a/app/assets/stylesheets/main/organisations.css.scss b/app/assets/stylesheets/main/organisations.css.scss
index aaecbe30f..b3ef5b5f4 100644
--- a/app/assets/stylesheets/main/organisations.css.scss
+++ b/app/assets/stylesheets/main/organisations.css.scss
@@ -4,23 +4,5 @@
#workspace.organisations.show
{
-
- .users {
- margin-top: 20px;
- }
-
- .user {
-
- /* to create multi-column index */
- width: 350px;
- float: left;
- padding-right: 10px;
- position: relative;
-
- img.preview {
- width: 64px;
- height: 64px;
- }
- }
}
diff --git a/app/assets/stylesheets/main/referentials.css.scss b/app/assets/stylesheets/main/referentials.css.scss
index 8f2fa0bf7..8b6ae4b66 100644
--- a/app/assets/stylesheets/main/referentials.css.scss
+++ b/app/assets/stylesheets/main/referentials.css.scss
@@ -4,11 +4,8 @@
#workspace.referentials.index
{
-
- .referentials {
- margin-top: 20px;
- }
}
+
#workspace.referentials.show
{
.summary p label {
diff --git a/app/assets/stylesheets/main/routes.css.scss b/app/assets/stylesheets/main/routes.css.scss
index 25adce149..2d2d53a7b 100644
--- a/app/assets/stylesheets/main/routes.css.scss
+++ b/app/assets/stylesheets/main/routes.css.scss
@@ -3,12 +3,7 @@
// You can use Sass (SCSS) here: http://sass-lang.com/
#workspace.lines.show
-{
-
- .routes{
- margin-top: 20px;
- }
-
+{
}
#workspace.routes.edit, #workspace.routes.new, #workspace.routes.create, #workspace.routes.update
@@ -41,75 +36,6 @@
}
#workspace.routes.show
-{
- .page_info {
- margin: 10px 0 10px 0;
- }
-
- .route_color{ color: white;
- font-weight: bold;
- padding: 0 5px 0 5px;}
-
- .summary p label {
- font-weight: bold;
- }
-
- .stop_points_detail div.page_info {
- margin-top: 0px;
- }
-
- .stop_points {
- margin-top: 10px;
- }
-
- .route_journey_patterns {
- a {
- cursor: pointer;
- }
- }
-
- .route_stop_points {
- clear: both;
- margin: 0px;
- padding: 0px;
- a {
- cursor: pointer;
- }
- }
-
- .stop_point {
- /* to create multi-column index */
- width: 250px;
- float: left;
- padding-right: 10px;
-
- .position {
- width: 25px;
- height: 20px;
- float: left;
- background-color: #61970B;
- font-weight: bold;
- color: white;
- margin-right: 10px;
- padding-left: 4px;
- }
- }
-
- .journey_patterns {
- margin-top: 10px;
- }
-
- .journey_pattern {
- /* to create multi-column index */
- width: 350px;
- padding-right: 10px;
- height: 80px;
- float: left;
-
- .name {
- line-height: 16px;
- }
-
- }
+{
}
diff --git a/app/assets/stylesheets/main/rule_parameter_sets.css.scss b/app/assets/stylesheets/main/rule_parameter_sets.css.scss
index 682631ce5..7df394190 100644
--- a/app/assets/stylesheets/main/rule_parameter_sets.css.scss
+++ b/app/assets/stylesheets/main/rule_parameter_sets.css.scss
@@ -4,41 +4,6 @@
#workspace.rule_parameter_sets.index
{
- .rule_parameter_sets {
- margin-top: 20px;
- }
-
- .rule_parameter_set {
-
- /* to create multi-column index */
- width: 350px;
- float: left;
- padding-right: 10px;
- position: relative;
-
- .color {
- background-color: white;
- width: 64px;
- height: 64px;
- float: left;
- margin-right: 10px;
- border: 1px solid #999;
-
- a {
- text-decoration: none;
- }
- }
-
- .number {
- font-size: 16px;
- text-align: center;
- font-weight: bold;
- padding-top: 21px;
- }
- .name a {
- display: inline;
- }
- }
}
#workspace.rule_parameter_sets.show, #workspace.compliance_check_tasks.rule_parameter_set
diff --git a/app/assets/stylesheets/main/stop_areas.css.scss b/app/assets/stylesheets/main/stop_areas.css.scss
index bea77654e..a6641bb28 100644
--- a/app/assets/stylesheets/main/stop_areas.css.scss
+++ b/app/assets/stylesheets/main/stop_areas.css.scss
@@ -4,10 +4,6 @@
#workspace.stop_areas.index
{
- .stop_areas {
- margin-top: 20px;
- }
-
#country_codes { display: none; }
}
@@ -105,21 +101,7 @@
height: 25px;
}
}
- .access_point {
-
- .access_type {
- width: 25px;
- height: 64px;
- float: left;
- margin-right: 10px;
-
- a {
- text-decoration: none;
- }
- }
-
- }
}
#workspace.stop_areas.select_parent
diff --git a/app/assets/stylesheets/main/time_tables.css.scss b/app/assets/stylesheets/main/time_tables.css.scss
index df46d3675..6e26b6eb4 100644
--- a/app/assets/stylesheets/main/time_tables.css.scss
+++ b/app/assets/stylesheets/main/time_tables.css.scss
@@ -4,91 +4,78 @@
#workspace.time_tables.index
{
+}
+
+
+#workspace.time_tables.show
+{
+ .modal-body{overflow-y: visible;}
- .time_tables {
+ .summary{
margin-top: 20px;
- }
- #index_item{
-
- span.included_day_type {
- font-weight: bolder;
- color: black;
- }
-
- span.excluded_day_type {
+ p label {
+ font-weight: bold;
}
+ }
- .state-code {
-
- }
-
- .validity_out {
- color: #FC4903 !important;
- }
-
- .validity_out_soon {
- color: orange !important;
- }
+ .legend{
+ margin-top: 20px;
+
+ .title{ font-weight: bold; }
- .validity_regular {
- color: #86B41D !important;
+ .excluded_date, .overlap_date, .selected_date, .selected_period{
+ margin-left: 20px;
+ margin-right: 5px;
}
}
-}
-
-
-#workspace.time_tables.show
-{
- .modal-body{overflow-y: visible;}
-
+
.typeahead.dropdown-menu {
- z-index: 100001;
+ z-index: 100001;
+ }
+
+ .validity_out {
+ color: $brand-danger;
+ }
+
+ .validity_out_soon {
+ color: $brand-warning;
+ }
+
+ .validity_regular {
+ 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;
- }
-
- .summary p label {
- font-weight: bold;
}
- .resume {
- .validity {
- float: left;
- width: 20px;
- height: 20px;
- margin-right: 10px;
- }
- .validity.validity_out {
- background-color: #FC4903;
- }
- .validity.validity_out_soon {
- background-color: orange;
- }
- .validity.validity_regular {
- background-color: #86B41D;
- }
+ .actions {
+ float: right;
}
}
diff --git a/app/assets/stylesheets/main/vehicle_journeys.css.scss b/app/assets/stylesheets/main/vehicle_journeys.css.scss
index ba0de3730..580874df4 100644
--- a/app/assets/stylesheets/main/vehicle_journeys.css.scss
+++ b/app/assets/stylesheets/main/vehicle_journeys.css.scss
@@ -39,20 +39,18 @@
#workspace.vehicle_journeys.index
{
#search{
- .panel-heading .btn{
- margin-left: 20px;
- }
ul.token-input-list{
display: inline-block;
vertical-align: middle;
- margin-left: 20px;
- width: 250px;
+ margin-left: 15px;
}
- .advanced_search_link{
- vertical-align: -webkit-baseline-middle;
- }
+ .advanced_search{ margin-left: 40px; }
+
+ .time_tables_id_eq{ margin-left: 20px; }
+
+ .vehicle_journey_at_stops_departure_time_gt{ margin-left: 20px; }
}
@@ -97,44 +95,6 @@
.summary p label {
font-weight: bold;
}
-
- .time_tables {
- margin-top: 20px;
- }
-
- .time_table {
- span.included_day_type {
- font-weight: bolder;
- color: black;
- }
- span.excluded_day_type {
- }
-
- .state-code {
- width: 25px;
- height: 64px;
- float: left;
- margin-right: 10px;
-
- .validity_out {
- background-color: #FC4903;
- width: 25px;
- height: 25px;
- }
-
- .validity_out_soon {
- background-color: orange;
- width: 25px;
- height: 25px;
- }
-
- .validity_regular {
- background-color: #86B41D;
- width: 25px;
- height: 25px;
- }
- }
- }
}
#workspace.vehicle_journeys.timeless
@@ -151,7 +111,6 @@
span.included_day_type {
font-weight: bolder;
- color: black;
}
span.excluded_day_type {
}
diff --git a/app/assets/stylesheets/modules/icons.css.scss b/app/assets/stylesheets/modules/icons.css.scss
new file mode 100644
index 000000000..3da56d1c9
--- /dev/null
+++ b/app/assets/stylesheets/modules/icons.css.scss
@@ -0,0 +1,101 @@
+a:before {
+ font-family: FontAwesome;
+ display: inline-block;
+ padding-right: 3px;
+ vertical-align: middle;
+}
+
+a.add:before { // fa-plus-circle
+ content: "\f055";
+ color: $brand-success;
+ }
+
+a.edit:before { // fa-pencil
+ content: "\f040";
+ color: $brand-warning;
+ }
+
+a.remove:before { // fa-trash
+ content: "\f1f8";
+ color: $brand-danger;
+ }
+
+a.export:before { // fa-upload
+ content: "\f093";
+ color: $brand-info;
+ }
+
+a.import:before { // fa-download
+ content: "\f019";
+ color: $brand-info;
+ }
+
+a.clone:before { // fa-copy
+ content: "\f0c5";
+ color: $brand-success;
+ }
+
+a.link:before { // fa-external-link
+ content: "\f08e";
+ }
+
+a.select:before {// fa-select
+ content: "\f0a6";
+ color: $brand-warning;
+
+ }
+
+a.calculator:before { // fa-calculator
+ content: "\f1ec";
+ color: $brand-warning;
+ }
+
+a.parent:before { // fa-arrow-up
+ content: "\f062";
+ color: $brand-warning;
+ }
+
+a.children:before { // fa-sitemap
+ content: "\f0e8";
+ color: $brand-warning;
+ }
+
+a.access_link:before { // fa-exchange
+ content: "\f0ec";
+ color: $brand-warning;
+ }
+
+a.merge:before { // fa-link
+ content: "\f0c1";
+ color: $brand-warning;
+ }
+
+a.clock:before { // fa-clock-o
+ content: "\f017";
+ }
+
+/* first-child makes sure to grab the first element inside
+your fa-stack. The top margin shifts the inner icon down */
+.fa-stack-1x { top: .25em; }
+
+.fa-stack {
+ /* sizes whole .fa-stack down to make them the regular sized */
+ font-size: .5em;
+ /* makes sure regular and stacked icons vertically align */
+ vertical-align: -16%;
+}
+
+/* Styles text for doc type. Oswald is a great condensed
+Google Web Font */
+.filetype-text {
+ font-size: .7em;
+ font-weight: 700;
+ font-family: 'Oswald';
+}
+
+a.kml:before {
+ content: "<span class='fa-stack'>
+<span class='fa-stack-1x filetype-text'>KML</span>
+<i class='fa fa-file-o fa-stack-2x'></i>
+</span>";
+} \ No newline at end of file
diff --git a/app/assets/stylesheets/modules/index_item.css.scss b/app/assets/stylesheets/modules/index_item.css.scss
index 896000a12..2404c879a 100644
--- a/app/assets/stylesheets/modules/index_item.css.scss
+++ b/app/assets/stylesheets/modules/index_item.css.scss
@@ -3,6 +3,18 @@
.panel-heading{
@extend .clearfix;
+
+ .validity_out {
+ color: $brand-danger;
+ }
+
+ .validity_out_soon {
+ color: $brand-warning;
+ }
+
+ .validity_regular {
+ color: $brand-success;
+ }
button {
margin-left:3px;
@@ -34,6 +46,19 @@
img{
margin-right: 5px;
}
+
+ i{
+ margin-right: 5px;
+ }
+
+ span.included_day_type {
+ font-weight: bolder;
+ margin-right: 3px;
+ }
+
+ span.excluded_day_type {
+ margin-right: 3px;
+ }
}
diff --git a/app/assets/stylesheets/vendor/bootstrap_changes.css.scss b/app/assets/stylesheets/vendor/bootstrap_changes.css.scss
index 02056b600..597c9897d 100644
--- a/app/assets/stylesheets/vendor/bootstrap_changes.css.scss
+++ b/app/assets/stylesheets/vendor/bootstrap_changes.css.scss
@@ -3,4 +3,32 @@
li{
list-style: inherit !important;
}
+
+ .time_table_info{
+ color: $gray;
+ font-size: 11px;
+ }
+
+ span.included_day_type {
+ color: black;
+ }
+ span.excluded_day_type {
+ }
+
+ span.bounding{
+ font-size: 11px;
+ margin-left: 5px;
+ }
+
+ .validity_out {
+ color: $brand-danger;
+ }
+
+ .validity_out_soon {
+ color: $brand-warning;
+ }
+
+ .validity_regular {
+ color: $brand-success;
+ }
} \ No newline at end of file
diff --git a/app/assets/stylesheets/vendor/pagination.css.scss b/app/assets/stylesheets/vendor/pagination.css.scss
index a2e5904ff..eb994f308 100644
--- a/app/assets/stylesheets/vendor/pagination.css.scss
+++ b/app/assets/stylesheets/vendor/pagination.css.scss
@@ -24,4 +24,11 @@
b {
padding: 0.1em 0.25em;
}
+}
+
+.paginated_content{
+
+ .row{
+ margin-top: 15px;
+ }
} \ No newline at end of file
diff --git a/app/controllers/access_links_controller.rb b/app/controllers/access_links_controller.rb
index 31d183034..b22dd75a8 100644
--- a/app/controllers/access_links_controller.rb
+++ b/app/controllers/access_links_controller.rb
@@ -19,8 +19,8 @@ class AccessLinksController < ChouetteController
@access_point = Chouette::AccessPoint.find(params[:access_point_id])
@access_link = Chouette::AccessLink.find(params[:id])
@stop_area = @access_link.stop_area
- show! do
- build_breadcrumb :show
+ show! do |format|
+ format.html {build_breadcrumb :show}
end
end
diff --git a/app/controllers/access_points_controller.rb b/app/controllers/access_points_controller.rb
index 8e1f4664b..ca8e0b156 100644
--- a/app/controllers/access_points_controller.rb
+++ b/app/controllers/access_points_controller.rb
@@ -30,7 +30,7 @@ class AccessPointsController < ChouetteController
}
end
- build_breadcrumb :show
+ format.html {build_breadcrumb :show}
end
end
diff --git a/app/helpers/breadcrumb_helper.rb b/app/helpers/breadcrumb_helper.rb
index 23cf6a6f2..580847331 100644
--- a/app/helpers/breadcrumb_helper.rb
+++ b/app/helpers/breadcrumb_helper.rb
@@ -40,13 +40,17 @@ module BreadcrumbHelper
rule_parameter_breadcrumb action
when "User"
user_breadcrumb action
+ when "Referential"
+ referential_breadcrumb action
when "Organisation"
organisation_breadcrumb action
+ when "Api::V1::ApiKey"
+ referential_breadcrumb
else
Rails.logger.info "---------"
Rails.logger.info ">>>>>>> "+resource_class.to_s+" unmapped"
Rails.logger.info "---------"
- referential_breadcrumb action
+ organisation_breadcrumb :index
end
end
@@ -153,17 +157,18 @@ module BreadcrumbHelper
def referential_breadcrumb (action = :edit)
organisation_breadcrumb
- add_breadcrumb breadcrumb_label(@referential), referential_path(@referential),:title => breadcrumb_tooltip(@referential) if action == :edit
+ add_breadcrumb breadcrumb_label(@referential), referential_path(@referential),:title => breadcrumb_tooltip(@referential) if action == :edit || action == :show || action == :update
end
- def organisation_breadcrumb (action = :edit)
+ def organisation_breadcrumb (action = :index)
add_breadcrumb I18n.t("breadcrumbs.referentials"), referentials_path
+ add_breadcrumb breadcrumb_label(@organisation), organisation_path,:title => breadcrumb_tooltip(@organisation) unless action == :index
end
def user_breadcrumb (action)
organisation_breadcrumb
add_breadcrumb I18n.t("breadcrumbs.users"), organisation_path unless action == :index
- add_breadcrumb breadcrumb_label(@user), organisation_user_path(@user),:title => breadcrumb_tooltip(@user) unless action == :index
+ add_breadcrumb breadcrumb_label(@user), organisation_user_path(@user),:title => breadcrumb_tooltip(@user) if action == :edit
end
def breadcrumb_label(obj)
@@ -172,8 +177,8 @@ module BreadcrumbHelper
label = obj.class.model_name.human+" "+obj.id.to_s
end
- if label.length > 12
- label[0..8]+"..."
+ if label.length > 20
+ label[0..16]+"..."
else
label
end
diff --git a/app/helpers/vehicle_journeys_helper.rb b/app/helpers/vehicle_journeys_helper.rb
index 1ecfe12b5..2ee8123b5 100644
--- a/app/helpers/vehicle_journeys_helper.rb
+++ b/app/helpers/vehicle_journeys_helper.rb
@@ -8,6 +8,7 @@ module VehicleJourneysHelper
journey_pattern.id
end
end
+
def vehicle_name( vehicle)
if !vehicle.published_journey_name.blank?
vehicle.published_journey_name.first(8)
@@ -19,22 +20,25 @@ module VehicleJourneysHelper
vehicle.id
end
end
+
def missing_time_check( is_present)
return "missing" if (is_present && is_present.departure_time.nil?)
end
+
def vehicle_departure(vehicle)
first_vjas = vehicle.vehicle_journey_at_stops.first
return "" unless first_vjas.departure_time
l(first_vjas.departure_time, :format => :hour).gsub( / /, ' ')
end
+
def vehicle_title( vehicle)
return t('vehicle_journeys.vehicle_journey.title_stopless', :name => vehicle_name( vehicle)) if vehicle.vehicle_journey_at_stops.empty?
first_vjas = vehicle.vehicle_journey_at_stops.first
t('vehicle_journeys.vehicle_journey.title',
- :name => vehicle_name( vehicle),
:stop => first_vjas.stop_point.stop_area.name,
:time => vehicle_departure(vehicle))
end
+
def edit_vehicle_title( vehicle)
return t('vehicle_journeys.edit.title_stopless', :name => vehicle_name( vehicle)) if vehicle.vehicle_journey_at_stops.empty?
first_vjas = vehicle.vehicle_journey_at_stops.first
@@ -43,5 +47,6 @@ module VehicleJourneysHelper
:stop => first_vjas.stop_point.stop_area.name,
:time => vehicle_departure(vehicle))
end
+
end
diff --git a/app/inputs/extended_time_picker_input.rb b/app/inputs/extended_time_picker_input.rb
index 46b5bbdb4..2298c0185 100644
--- a/app/inputs/extended_time_picker_input.rb
+++ b/app/inputs/extended_time_picker_input.rb
@@ -3,9 +3,10 @@ class ExtendedTimePickerInput < Formtastic::Inputs::TimePickerInput
def value
return options[:input_html][:value] if options[:input_html] && options[:input_html].key?(:value)
val = object.send(method)
+ puts val.to_s
return "00:00:00" if val.is_a?(Date)
return val.strftime("%H:%M:%S") if val.is_a?(Time)
- return val if val.nil?
+ return "00:00:00" if val.nil?
val.to_s
end
diff --git a/app/maps/stop_area_map.rb b/app/maps/stop_area_map.rb
index 5e876374b..6762a4ee4 100644
--- a/app/maps/stop_area_map.rb
+++ b/app/maps/stop_area_map.rb
@@ -40,7 +40,7 @@ EOF
page << <<EOF
var createAddressStyleMap = function() {
- var defProp = {strokeColor: "black", strokeOpacity: 1, strokeWidth: 2, fillColor: "#86b41d", fillOpacity: 1};
+ var defProp = {strokeColor: "black", strokeOpacity: 1, strokeWidth: 2, fillColor: "#428bca", fillOpacity: 1};
var defStyle = OpenLayers.Util.applyDefaults(defProp, OpenLayers.Feature.Vector.style["default"]);
return new OpenLayers.StyleMap({'default': defStyle, });
};
diff --git a/app/views/access_link_pairs/_access_link_pair.html.erb b/app/views/access_link_pairs/_access_link_pair.html.erb
index 588b276b9..3e0d8a4fe 100644
--- a/app/views/access_link_pairs/_access_link_pair.html.erb
+++ b/app/views/access_link_pairs/_access_link_pair.html.erb
@@ -1,57 +1,56 @@
-<%= div_for(access_link_pair) do %>
- <tr>
- <td class="link">
- <div class="access_point">
- <%= link_to([@referential, @stop_area, access_link_pair.access_point]) do %>
+<tr>
+ <td>
+ <div class="link">
+ <div class="access_point">
+ <%= link_to([@referential, @stop_area, access_link_pair.access_point]) do %>
<%= image_tag "map/access_" + access_link_pair.access_point.access_point_type + ".png" %><span><%= access_link_pair.access_point.name %></span>
- <% end %>
+ <% end %>
+ </div>
+ <div class="info">
+ <%= t("access_types.label.#{access_link_pair.access_point.access_point_type}") %>
+ </div>
</div>
- <br/><br/>
- <div class="info">
- <%= t("access_types.label.#{access_link_pair.access_point.access_point_type}") %>
- </div>
- </td>
- <td>
- <% if access_link_pair.out_valid? %>
- <% if access_link_pair.out_exists? %>
- <%= link_to(referential_access_point_access_link_path(@referential, access_link_pair.access_point,:access_link => {:stop_area_id => access_link_pair.stop_area.id, :link_orientation_type => 'stop_area_to_access_point'})) do %>
- <%= image_tag "icons/green_left_arrow.png" %>
- <% end %>
- <% else %>
- <%= link_to(new_referential_access_point_access_link_path(@referential, access_link_pair.access_point, :access_link => {:stop_area_id => access_link_pair.stop_area.id, :link_orientation_type => 'stop_area_to_access_point'})) do %>
- <%= image_tag "icons/gray_left_arrow.png" %>
- <% end %>
- <% end %>
- <% else %>
- <%= image_tag "icons/disabled_left_arrow.png" %>
- <% end %>
- </td>
- <td>
- <% if access_link_pair.in_valid? %>
- <% if access_link_pair.in_exists? %>
- <%= link_to(referential_access_point_access_link_path(@referential, access_link_pair.access_point, access_link_pair.from_access_point)) do %>
- <%= image_tag "icons/green_right_arrow.png" %>
- <% end %>
- <% else %>
- <%= link_to(new_referential_access_point_access_link_path(@referential, access_link_pair.access_point, :access_link => {:stop_area_id => access_link_pair.stop_area.id, :link_orientation_type => 'access_point_to_stop_area'})) do %>
- <%= image_tag "icons/gray_right_arrow.png" %>
- <% end %>
- <% end %>
- <% else %>
- <%= image_tag "icons/disabled_right_arrow.png" %>
- <% end %>
- </td>
- <td class="link">
- <div class="stop_area">
- <%= link_to([@referential, access_link_pair.stop_area]) do %>
+ </td>
+ <td>
+ <% if access_link_pair.out_valid? %>
+ <% if access_link_pair.out_exists? %>
+ <%= link_to(referential_access_point_access_link_path(@referential, access_link_pair.access_point,:access_link => {:stop_area_id => access_link_pair.stop_area.id, :link_orientation_type => 'stop_area_to_access_point'})) do %>
+ <%= image_tag "icons/green_left_arrow.png" %>
+ <% end %>
+ <% else %>
+ <%= link_to(new_referential_access_point_access_link_path(@referential, access_link_pair.access_point, :access_link => {:stop_area_id => access_link_pair.stop_area.id, :link_orientation_type => 'stop_area_to_access_point'})) do %>
+ <%= image_tag "icons/gray_left_arrow.png" %>
+ <% end %>
+ <% end %>
+ <% else %>
+ <%= image_tag "icons/disabled_left_arrow.png" %>
+ <% end %>
+ </td>
+ <td>
+ <% if access_link_pair.in_valid? %>
+ <% if access_link_pair.in_exists? %>
+ <%= link_to(referential_access_point_access_link_path(@referential, access_link_pair.access_point, access_link_pair.from_access_point)) do %>
+ <%= image_tag "icons/green_right_arrow.png" %>
+ <% end %>
+ <% else %>
+ <%= link_to(new_referential_access_point_access_link_path(@referential, access_link_pair.access_point, :access_link => {:stop_area_id => access_link_pair.stop_area.id, :link_orientation_type => 'access_point_to_stop_area'})) do %>
+ <%= image_tag "icons/gray_right_arrow.png" %>
+ <% end %>
+ <% end %>
+ <% else %>
+ <%= image_tag "icons/disabled_right_arrow.png" %>
+ <% end %>
+ </td>
+ <td>
+ <div class="link">
+ <div class="stop_area">
+ <%= link_to([@referential, access_link_pair.stop_area]) do %>
<%= image_tag "map/" + access_link_pair.stop_area.stop_area_type + ".png" %><span><%= access_link_pair.stop_area.name %></span>
- <% end %>
+ <% end %>
+ </div>
+ <div class="info">
+ <%= t("area_types.label.#{access_link_pair.stop_area.stop_area_type}") %>
+ </div>
</div>
- <br/><br/>
- <div class="info">
- <%= t("area_types.label.#{access_link_pair.stop_area.stop_area_type}") %>
- </div>
- </td>
- </tr>
- <tr><td colspan=4>&nbsp;</td></tr>
-<% end %>
+ </td>
+</tr>
diff --git a/app/views/access_links/_form.html.erb b/app/views/access_links/_form.html.erb
index b0138c1bd..2ce44542f 100644
--- a/app/views/access_links/_form.html.erb
+++ b/app/views/access_links/_form.html.erb
@@ -15,7 +15,7 @@
<%= form.input :default_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :label => @access_link.human_attribute_name("default_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
<%= form.input :frequent_traveller_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :include_seconds => true, :label => @access_link.human_attribute_name("frequent_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
<%= form.input :occasional_traveller_duration, :as => :extended_time_picker, :size => 8, :include_seconds => true, :label => @access_link.human_attribute_name("occasional_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
- <%= form.input :mobility_restricted_traveller_duration, :as => :extended_time_picker, :include_seconds => true, :label => @access_link.human_attribute_name("mobility_restricted_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
+ <%= form.input :mobility_restricted_traveller_duration, :as => :extended_time_picker,:size => 8, :include_seconds => true, :label => @access_link.human_attribute_name("mobility_restricted_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
<% end %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/access_points/_access_point.html.erb b/app/views/access_points/_access_point.html.erb
index 2890cc124..020d9bd58 100644
--- a/app/views/access_points/_access_point.html.erb
+++ b/app/views/access_points/_access_point.html.erb
@@ -1,20 +1,29 @@
-<%= div_for(access_point) do %>
- <%= link_to([@referential, @stop_area, access_point], :class => "preview") do %>
- <div class="access_point_type">
- <%= image_tag "map/access_" + access_point.access_point_type + ".png" %>
- </div>
- <% end %>
- <%= link_to access_point.name, [@referential, @stop_area, access_point] %>
- <div class="info">
- <p>
- <% unless access_point.geometry %>
- <span class="warning"><%= t('.no_position') %></span> -
- <% end %>
- </p>
- <p><%= t("access_types.label.#{access_point.access_point_type}") %></p>
- <div class="actions">
- <%= link_to t("actions.edit"), edit_referential_stop_area_access_point_path(@referential, @stop_area, access_point), :class => "edit" %> |
- <%= link_to t("actions.destroy"), referential_stop_area_access_point_path(@referential, @stop_area, access_point), :method => :delete, :data => {:confirm => t('access_points.actions.destroy_confirm')}, :class => "remove" %>
- </div>
+<div id="index_item" class="panel panel-default access_point">
+ <div class="panel-heading">
+ <div class="panel-title clearfix">
+ <span class="pull-right">
+ <%= link_to edit_referential_stop_area_access_point_path(@referential, @stop_area, access_point), :class => "btn btn-default btn-sm" do %>
+ <span class="fa fa-pencil"></span>
+ <% end %>
+ <%= link_to referential_stop_area_access_point_path(@referential, @stop_area, access_point), :method => :delete, :data => {:confirm => t('access_points.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <span class="fa fa-trash-o"></span>
+ <% end %>
+ </span>
+ <h5>
+ <%= link_to([@referential, @stop_area, access_point], :class => "preview", :title => "#{Chouette::StopArea.model_name.human.capitalize} #{access_point.name}") do %>
+ <span class="name">
+ <%= image_tag "map/access_" + access_point.access_point_type + ".png" %> <%= truncate(access_point.name, :length => 20) %>
+ </span>
+ <% end %>
+ </h5>
+ </div>
</div>
-<% end %>
+ <div class="panel-body">
+ <% unless access_point.geometry %>
+ <p>
+ <span class="warning"><%= t('.no_position') %></span> -
+ </p>
+ <% end %>
+ <p><%= t("access_types.label.#{access_point.access_point_type}") %></p>
+ </div>
+</div>
diff --git a/app/views/access_points/show.html.erb b/app/views/access_points/show.html.erb
index 925d73ee7..9f5e600e6 100644
--- a/app/views/access_points/show.html.erb
+++ b/app/views/access_points/show.html.erb
@@ -85,45 +85,23 @@
</p>
<% end %>
<% end %>
- </div>
-
+ </div>
</div>
-
-<p class="after_map" />
-<div>
- <h3 class="access_point_generics">
- <a class="generics"><%= t('.generic_access_links') %>
- <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
- <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
- </a>
-
- </h3>
- <div class="generics content">
+<div>
+ <h3 class="access_point_generics"><%= t('.generic_access_links') %></h3>
<div class="access_link_pairs">
- <table>
- <%= render :partial => "access_link_pairs/access_link_pair", :collection => access_links_pairs(@generic_access_links) %>
- </table>
- </div>
-
+ <table>
+ <%= render :partial => "access_link_pairs/access_link_pair", :collection => access_links_pairs(@generic_access_links) %>
+ </table>
</div>
- <h3 class="access_point_details">
- <a class="details"><%= t('.detail_access_links') %>
- <%= image_tag("icons/plus.png" , :class => "switcher") %>
- <%= image_tag("icons/minus.png" , :class => "switcher", :style => "display: none;" ) %>
- </a>
-
- </h3>
- <div class="details content" style="display: none;">
-
+ <h3 class="access_point_details"><%= t('.detail_access_links') %></h3>
<div class="access_link_pairs">
- <table>
- <%= render :partial => "access_link_pairs/access_link_pair", :collection => access_links_pairs(@detail_access_links) %>
- </table>
- </div>
-
- </div>
+ <table>
+ <%= render :partial => "access_link_pairs/access_link_pair", :collection => access_links_pairs(@detail_access_links) %>
+ </table>
+ </div>
</div>
diff --git a/app/views/api_keys/_api_key.html.erb b/app/views/api_keys/_api_key.html.erb
index 6492af3b0..c81953311 100644
--- a/app/views/api_keys/_api_key.html.erb
+++ b/app/views/api_keys/_api_key.html.erb
@@ -1,12 +1,30 @@
-<%= div_for(api_key) do %>
- <%= api_key.token %>
- <div class="info">
- <%= api_key.class.human_attribute_name('name') %> <%= api_key.name %> -
- <%= api_key.class.human_attribute_name('updated_at') %> <%= l(api_key.updated_at) %>
- <div class="actions">
- <%= link_to t("actions.edit"), edit_referential_api_key_path(@referential, api_key), :class => "edit" %> |
- <%= link_to t("actions.destroy"), referential_api_key_path(@referential, api_key), :method => :delete, :data => {:confirm => t('api_keys.actions.destroy_confirm')}, :class => "remove" %>
- </div>
+<div id="index_item" class="panel panel-default api_key">
+ <div class="panel-heading">
+ <div class="panel-title clearfix">
+ <span class="pull-right">
+ <%= link_to edit_referential_api_key_path(@referential, api_key), :class => "btn btn-default btn-sm" do %>
+ <span class="fa fa-pencil"></span>
+ <% end %>
+ <%= link_to referential_api_key_path(@referential, api_key), :method => :delete, :data => {:confirm => t('api_keys.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <span class="fa fa-trash-o"></span>
+ <% end %>
+ </span>
+ <h5>
+ <%= link_to([@referential, api_key], :class => "preview", :title => "#{Chouette::StopArea.model_name.human.capitalize} #{api_key.name}") do %>
+ <span class="name">
+ <%= truncate(api_key.name, :length => 20) %>
+ </span>
+ <% end %>
+ </h5>
+ </div>
</div>
-<% end %>
+ <div class="panel-body">
+ <p>
+ <%= api_key.class.human_attribute_name('token') %> <%= truncate(api_key.token, :length => 20) %>
+ </p>
+ <p>
+ <%= api_key.class.human_attribute_name('updated_at') %> <%= l(api_key.updated_at) %>
+ </p>
+ </div>
+</div>
diff --git a/app/views/connection_links/_connection_link.erb b/app/views/connection_links/_connection_link.erb
index 5f7b12ec5..7996eb0f3 100644
--- a/app/views/connection_links/_connection_link.erb
+++ b/app/views/connection_links/_connection_link.erb
@@ -5,7 +5,7 @@
<%= link_to edit_referential_connection_link_path(@referential, connection_link), :class => "btn btn-default btn-sm" do %>
<span class="fa fa-pencil"></span>
<% end %>
- <%= link_to referential_connection_link_path(@referential, connection_link), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <%= link_to referential_connection_link_path(@referential, connection_link), :method => :delete, :data => {:confirm => t('connection_links.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
<span class="fa fa-trash-o"></span>
<% end %>
</span>
diff --git a/app/views/connection_links/_form.erb b/app/views/connection_links/_form.erb
index fdc6ce018..54ac7088e 100644
--- a/app/views/connection_links/_form.erb
+++ b/app/views/connection_links/_form.erb
@@ -15,7 +15,7 @@
<%= form.input :default_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :label => @connection_link.human_attribute_name("default_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
<%= form.input :frequent_traveller_duration, :as => :extended_time_picker, :size => 8, :step => :seconds, :include_seconds => true, :label => @connection_link.human_attribute_name("frequent_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
<%= form.input :occasional_traveller_duration, :as => :extended_time_picker, :size => 8, :include_seconds => true, :label => @connection_link.human_attribute_name("occasional_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
- <%= form.input :mobility_restricted_traveller_duration, :as => :extended_time_picker, :include_seconds => true, :label => @connection_link.human_attribute_name("mobility_restricted_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
+ <%= form.input :mobility_restricted_traveller_duration, :as => :extended_time_picker,:size => 8, :include_seconds => true, :label => @connection_link.human_attribute_name("mobility_restricted_traveller_duration"), :input_html => { :class => "form-control input-sm timepicker_seconds", :step => 1}, :wrapper_html => { :class => "input-append bootstrap-timepicker" } %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/connection_links/show.html.erb b/app/views/connection_links/show.html.erb
index f9689bf55..58649d245 100644
--- a/app/views/connection_links/show.html.erb
+++ b/app/views/connection_links/show.html.erb
@@ -79,7 +79,7 @@
<li><%= link_to t('connection_links.actions.new'), new_referential_connection_link_path(@referential), :class => "add" %></li>
<li><%= link_to t('connection_links.actions.edit'), edit_referential_connection_link_path(@referential, @connection_link), :class => "edit" %></li>
<li><%= link_to t('connection_links.actions.destroy'), referential_connection_link_path(@referential, @connection_link), :method => :delete, :data => {:confirm => t('connection_links.actions.destroy_confirm')}, :class => "remove" %></li>
- <li><%= link_to t('connection_links.actions.select_areas'), select_areas_referential_connection_link_path(@referential, @connection_link), :class => "select_areas" %></li>
+ <li><%= link_to t('connection_links.actions.select_areas'), select_areas_referential_connection_link_path(@referential, @connection_link), :class => "select" %></li>
<br>
</ul>
<%= creation_tag(@connection_link) %>
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index f699ae6f9..d18db9402 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -2,6 +2,9 @@
<%= semantic_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |form| %>
<%= form.inputs do %>
+ <% if resource.respond_to?( :name) %>
+ <%= form.input :name %>
+ <% end %>
<%= form.input :email %>
<%= form.input :password, :as => :password %>
<%= form.input :password_confirmation, :as => :password %>
diff --git a/app/views/journey_patterns/_journey_pattern.html.erb b/app/views/journey_patterns/_journey_pattern.html.erb
index 821d3ef47..1bc34b2e4 100644
--- a/app/views/journey_patterns/_journey_pattern.html.erb
+++ b/app/views/journey_patterns/_journey_pattern.html.erb
@@ -1,16 +1,29 @@
-<%= div_for(journey_pattern) do %>
- <%= link_to journey_name(journey_pattern), [@referential, @line, @route, journey_pattern] %>
- <div class="info">
+<div id="index_item" class="panel panel-default journey_pattern">
+ <div class="panel-heading">
+ <div class="panel-title clearfix">
+ <span class="pull-right">
+ <%= link_to referential_line_route_journey_pattern_path(@referential, @line, @route, journey_pattern), :method => :delete, :data => {:confirm => t('journey_patterns.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <span class="fa fa-trash-o"></span>
+ <% end %>
+ </span>
+ <h5>
+ <%= link_to([@referential, @line, @route, journey_pattern], :class => "preview", :title => "#{Chouette::JourneyPattern.model_name.human.capitalize} #{journey_pattern.name}") do %>
+ <span class="name">
+ <%= truncate(journey_pattern.name, :length => 20) %>
+ </span>
+ <% end %>
+ </h5>
+ </div>
+ </div>
+ <div class="panel-body">
<% unless journey_pattern.stop_points.empty? %>
- <%= t('.from_to', :departure => journey_pattern.stop_points.first.stop_area.name, :arrival => journey_pattern.stop_points.last.stop_area.name) %>
- <% end %><br>
- <%= t('.stop_count', :count => journey_pattern.stop_points.count, :route_count => @route.stop_points.count) %> | <%= t('.vehicle_journeys_count', :count => journey_pattern.vehicle_journeys.count) %>
- <div class="actions">
- <%= link_to t("actions.destroy"), referential_line_route_journey_pattern_path(@referential, @line, @route, journey_pattern), :method => :delete, :data => {:confirm => t('journey_patterns.actions.destroy_confirm')}, :class => "remove" %>
- <% if journey_pattern.vehicle_journeys.count > 0 %>
- | <i class="fa fa-clock-o"></i><%= link_to t('journey_patterns.journey_pattern.vehicle_journey_at_stops'), referential_line_route_vehicle_journeys_path(@referential, @line, @route, :q => {:journey_pattern_id_eq => journey_pattern.id}), :class => "with_fa" %>
- <% end %>
- </div>
+ <p><%= t('.from_to', :departure => journey_pattern.stop_points.first.stop_area.name, :arrival => journey_pattern.stop_points.last.stop_area.name) %></p>
+ <% end %>
+ <p><%= t('.stop_count', :count => journey_pattern.stop_points.count, :route_count => @route.stop_points.count) %> | <%= t('.vehicle_journeys_count', :count => journey_pattern.vehicle_journeys.count) %></p>
+ <% if journey_pattern.vehicle_journeys.count > 0 %>
+ <p>
+ <i class="fa fa-clock-o"></i><%= link_to t('journey_patterns.journey_pattern.vehicle_journey_at_stops'), referential_line_route_vehicle_journeys_path(@referential, @line, @route, :q => {:journey_pattern_id_eq => journey_pattern.id}), :class => "with_fa" %>
+ </p>
+ <% end %>
</div>
-<% end %>
-
+</div>
diff --git a/app/views/journey_patterns/edit.html.erb b/app/views/journey_patterns/edit.html.erb
index 33adb6d7d..33fac2a6c 100644
--- a/app/views/journey_patterns/edit.html.erb
+++ b/app/views/journey_patterns/edit.html.erb
@@ -1,17 +1,4 @@
<%= title_tag t('journey_patterns.edit.title', :journey_pattern => @journey_pattern.name ) %>
-<div class="journey_pattern">
- <div class="summary">
- <p>
- <label><%= @route.human_attribute_name(:line) %>: </label>
- <%= link_to line_formatted_name( @line), [@referential, @line] %>
- </p>
- <p>
- <label><%= Chouette::Route.model_name.human %>: </label>
- <%= link_to @route.name, [@referential, @line, @route] %>
- </p>
- <div>
-<div>
-
<%= render "form" %>
diff --git a/app/views/journey_patterns/show.html.erb b/app/views/journey_patterns/show.html.erb
index 4ac057161..dc9e852fa 100644
--- a/app/views/journey_patterns/show.html.erb
+++ b/app/views/journey_patterns/show.html.erb
@@ -35,7 +35,7 @@
<li><%= link_to t('journey_patterns.actions.new'), new_referential_line_route_journey_pattern_path(@referential, @line, @route), :class => "add" %></li>
<li><%= link_to t('journey_patterns.actions.edit'), edit_referential_line_route_journey_pattern_path(@referential, @line, @route, @journey_pattern), :class => "edit" %></li>
<li><%= link_to t('journey_patterns.actions.destroy'), referential_line_route_journey_pattern_path(@referential, @line, @route, @journey_pattern), :method => :delete, :data => {:confirm => t('journey_patterns.actions.destroy_confirm')}, :class => "remove" %></li>
- <li><i class="fa fa-clock-o fa-fw"></i><%= link_to t('journey_patterns.journey_pattern.vehicle_journey_at_stops'), referential_line_route_vehicle_journeys_path(@referential, @line, @route, :q => {:journey_pattern_id_eq => @journey_pattern.id}), :class => "with_fa" %></li>
+ <li><%= link_to t('journey_patterns.journey_pattern.vehicle_journey_at_stops'), referential_line_route_vehicle_journeys_path(@referential, @line, @route, :q => {:journey_pattern_id_eq => @journey_pattern.id}), :class => "clock" %></li>
</ul>
<%= creation_tag(@journey_pattern) %>
<% end %>
diff --git a/app/views/journey_patterns/show.js.erb b/app/views/journey_patterns/show.js.erb
deleted file mode 100644
index aedb0fb9e..000000000
--- a/app/views/journey_patterns/show.js.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-$(function (){
- $(".stop_points_detail").html("<%= escape_javascript(render(:partial => "stop_points_detail")) %>");
-});
-
diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb
index 263933bc1..c67eeb271 100644
--- a/app/views/organisations/show.html.erb
+++ b/app/views/organisations/show.html.erb
@@ -5,14 +5,8 @@
</p>
</div>
-<div class="users">
- <% @organisation.users.each do |user| %>
- <%= div_for user do %>
- <%= user_gravatar_image_tag user %>
- <%= link_to user.name, organisation_user_path(user) %>
- <div class="info"><%= user.email %></div>
- <% end %>
- <% end %>
+<div class="users paginated_content">
+ <%= paginated_content(@organisation.users, "users/user") %>
</div>
<% content_for :sidebar do %>
diff --git a/app/views/referentials/_referential.erb b/app/views/referentials/_referential.erb
index 3bc6fd0dc..1f985bc65 100644
--- a/app/views/referentials/_referential.erb
+++ b/app/views/referentials/_referential.erb
@@ -1,14 +1,36 @@
-<%= div_for(referential) do %>
- <%= link_to referential.name, referential %>
- <div class="info">
- <%= referential.human_attribute_name('lines') %>: <span class="lines_count"></span> -
- <%= referential.human_attribute_name('networks') %>: <span class="networks_count"></span> -
- <%= referential.human_attribute_name('vehicle_journeys') %>: <span class="vehicle_journeys_count"></span> -
- <%= referential.human_attribute_name('time_tables') %>: <span class="time_tables_count"></span>
- <div class="actions">
- <%= link_to t("actions.edit"), edit_referential_path(referential), :class => "edit" %> |
- <%= link_to t("actions.destroy"), referential_path(referential), :method => :delete, :data => {:confirm => t('referentials.actions.destroy_confirm')}, :class => "remove" %>
- </div>
+<div id="index_item" class="panel panel-default referential">
+ <div class="panel-heading">
+ <div class="panel-title clearfix">
+ <span class="pull-right">
+ <%= link_to edit_referential_path(referential), :class => "btn btn-default btn-sm" do %>
+ <span class="fa fa-pencil"></span>
+ <% end %>
+ <%= link_to referential_path(referential), :method => :delete, :data => {:confirm => t('referentials.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <span class="fa fa-trash-o"></span>
+ <% end %>
+ </span>
+ <h5>
+ <%= link_to([@referential, referential], :class => "preview", :title => "#{Referential.model_name.human.capitalize} #{referential.name}") do %>
+ <span class="name">
+ <%= truncate(referential.name, :length => 20) %>
+ </span>
+ <% end %>
+ </h5>
+ </div>
</div>
+ <div id="referential_<%= referential.id %>" class="panel-body">
+ <p>
+ <%= referential.human_attribute_name('lines') %>: <span class="lines_count"></span>
+ </p>
+ <p>
+ <%= referential.human_attribute_name('networks') %>: <span class="networks_count"></span>
+ </p>
+ <p>
+ <%= referential.human_attribute_name('vehicle_journeys') %>: <span class="vehicle_journeys_count"></span>
+ </p>
+ <p>
+ <%= referential.human_attribute_name('time_tables') %>: <span class="time_tables_count"></span>
+ </p>
+ </div>
+</div>
<%= javascript_include_tag referential_path(referential,:format => :js) %>
-<% end %>
diff --git a/app/views/referentials/show.html.erb b/app/views/referentials/show.html.erb
index 5286f7ee7..d8e209c7f 100644
--- a/app/views/referentials/show.html.erb
+++ b/app/views/referentials/show.html.erb
@@ -42,11 +42,12 @@
</tr>
</table>
- <h3 class="api_keys"><%= t('.api_keys') %></h3>
-
- <div class="api_keys">
- <%= render :partial => "api_keys/api_key", :collection => @referential.api_keys %>
+ <% if @referential.api_keys.present? %>
+ <h3 class="api_keys"><%= t('.api_keys') %></h3>
+ <div class="api_keys paginated_content">
+ <%= paginated_content(@referential.api_keys, "api_keys/api_key") %>
</div>
+ <% end %>
</div>
<% content_for :sidebar do %>
diff --git a/app/views/referentials/show.js.erb b/app/views/referentials/show.js.erb
index d44962b14..05b623b93 100644
--- a/app/views/referentials/show.js.erb
+++ b/app/views/referentials/show.js.erb
@@ -1,25 +1,25 @@
-$(document).ready(function() {
+$(function (){
+ var ref, update_infos, update_referential_details, _i, _len, _ref, _results;
- jQuery(function() {
-var ref, update_infos, update_referential_details, _i, _len, _ref, _results;
-update_infos = function(json) {
-var info, update_info;
-info = $('#referential_' + json.referential_id + ' .info');
-update_info = function(key, value) {
-if (key.match(/_count$/)) {
-return $(info.find('.' + key)[0]).text(value);
-}
-};
-return $.each(json, update_info);
-};
-update_referential_details = function() {
-return $.getJSON("<%= referential_path(@referential, :format => :json) %>", update_infos);
-};
+ update_infos = function(json) {
+ var info, update_info;
+ info = $('#referential_' + json.referential_id);
+ console.log(info)
+ update_info = function(key, value) {
+ if (key.match(/_count$/)) {
+ return $(info.find('.' + key)[0]).text(value);
+ }
+ };
+ return $.each(json, update_info);
+ };
+
+ update_referential_details = function() {
+ return $.getJSON("<%= referential_path(@referential, :format => :json) %>", update_infos);
+ };
-_results = [];
-_results.push(update_referential_details());
+ _results = [];
+ _results.push(update_referential_details());
-return _results;
-});
+ return _results;
});
diff --git a/app/views/routes/_route.html.erb b/app/views/routes/_route.html.erb
index 5a9e1f2a5..0fee47cd1 100644
--- a/app/views/routes/_route.html.erb
+++ b/app/views/routes/_route.html.erb
@@ -5,7 +5,7 @@
<%= link_to edit_referential_line_route_path(@referential, @line, route), :class => "btn btn-default btn-sm" do %>
<span class="fa fa-pencil"></span>
<% end %>
- <%= link_to referential_line_route_path(@referential, @line, route), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <%= link_to referential_line_route_path(@referential, @line, route), :method => :delete, :data => {:confirm => t('routes.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
<span class="fa fa-trash-o"></span>
<% end %>
</span>
diff --git a/app/views/routes/_stop_points_detail.html.erb b/app/views/routes/_stop_points_detail.html.erb
deleted file mode 100644
index 6c9e4afae..000000000
--- a/app/views/routes/_stop_points_detail.html.erb
+++ /dev/null
@@ -1,10 +0,0 @@
- <div class="page_info">
- <span class="search"> <%= t("will_paginate.page_entries_info.list") %></span> <%= page_entries_info @stop_points %>
- </div>
- <div class="stop_points paginated_content">
- <%= render :partial => "stop_points/stop_point", :collection => @stop_points %>
- </div>
- <div class="pagination">
- <%= will_paginate @stop_points, :container => false %>
- </div>
-
diff --git a/app/views/routes/show.html.erb b/app/views/routes/show.html.erb
index 22ef7fff8..fe1a9c956 100644
--- a/app/views/routes/show.html.erb
+++ b/app/views/routes/show.html.erb
@@ -61,7 +61,9 @@
</div>
<div id="stop_points" class="panel-collapse collapse">
<div class="panel-body">
- <%= render :partial => "stop_points_detail" %>
+ <div class="stop_points paginated_content">
+ <%= paginated_content( @stop_points, "stop_points/stop_point") %>
+ </div>
</div>
</div>
</div>
@@ -78,7 +80,9 @@
</div>
<div id="journey_patterns" class="panel-collapse collapse">
<div class="panel-body">
- <%= render :partial => "journey_patterns/journey_pattern", :collection => @route.journey_patterns %>
+ <div class="journey_patterns paginated_content">
+ <%= paginated_content( @route.journey_patterns, "journey_patterns/journey_pattern") %>
+ </div>
</div>
</div>
</div>
@@ -91,14 +95,14 @@
<li><%= link_to t('routes.actions.destroy'), referential_line_route_path(@referential, @line, @route), :method => :delete, :data => {:confirm => t('routes.actions.destroy_confirm')}, :class => "remove" %></li>
<% if @route.stop_points.size >= 2 %>
<li><%= link_to t('journey_patterns.actions.new'), new_referential_line_route_journey_pattern_path(@referential, @line, @route), :class => "add" %></li>
-<% end %>
- <li><%= link_to t('vehicle_journey_imports.new.title'), new_referential_line_route_vehicle_journey_import_path( @referential, @line, @route ), :class => "import" %></li>
- <li><%= link_to image_tag("icons/file_csv.png") + t('vehicle_journey_exports.new.title'), referential_line_route_vehicle_journey_exports_path(@referential, @line, @route, :format => :zip), :class => "with_fa" %></li>
+ <% end %>
<% if @route.journey_patterns.size > 0 %>
<li>
- <i class="fa fa-clock-o fa-fw"></i><%= link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], :class => "with_fa" %>
+ <%= link_to t('vehicle_journeys.actions.index'), [@referential, @line, @route, :vehicle_journeys], :class => "clock" %>
</li>
-<% end %>
+ <% end %>
+ <li><%= link_to t('vehicle_journey_imports.new.title'), new_referential_line_route_vehicle_journey_import_path( @referential, @line, @route ), :class => "import" %></li>
+ <li><%= link_to t('vehicle_journey_exports.new.title'), referential_line_route_vehicle_journey_exports_path(@referential, @line, @route, :format => :zip), :class => "export" %></li>
</ul>
<%= creation_tag(@route) %>
diff --git a/app/views/routes/show.js.erb b/app/views/routes/show.js.erb
deleted file mode 100644
index aedb0fb9e..000000000
--- a/app/views/routes/show.js.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-$(function (){
- $(".stop_points_detail").html("<%= escape_javascript(render(:partial => "stop_points_detail")) %>");
-});
-
diff --git a/app/views/shared/_footer.erb b/app/views/shared/_footer.erb
index 3ad00df77..9b21219a0 100644
--- a/app/views/shared/_footer.erb
+++ b/app/views/shared/_footer.erb
@@ -6,9 +6,9 @@
<div class="col-md-3">
<ul>
<li><h4><%= t("layouts.footer.product.title") %></h4></li>
- <li><%= link_to t("layouts.footer.product.licence"), "http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html" %></li>
- <li><%= link_to t("layouts.footer.product.source_code"), "https://github.com/afimb/chouette2" %></li>
- <li><%= link_to t("layouts.footer.product.user_group"), "http://www.chouette.mobi/les-utilisateurs/club-utilisateur-des-outils-chouette-et-irys/" %></li>
+ <li><%= link_to t("layouts.footer.product.licence"), "http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.html", :target => "_blank" %></li>
+ <li><%= link_to t("layouts.footer.product.source_code"), "https://github.com/afimb/chouette2", :target => "_blank" %></li>
+ <li><%= link_to t("layouts.footer.product.user_group"), "http://www.chouette.mobi/les-utilisateurs/club-utilisateur-des-outils-chouette-et-irys/", :target => "_blank" %></li>
</ul>
</div>
<div class="col-md-3">
@@ -18,10 +18,10 @@
<% if ChouetteIhm::Application.config.company_contact.include?("@") %>
<%= mail_to "#{ChouetteIhm::Application.config.company_contact}", t("layouts.footer.contact.mail") %>
<% else %>
- <%= link_to t("layouts.footer.contact.mail"), "#{ChouetteIhm::Application.config.company_contact}" %>
+ <%= link_to t("layouts.footer.contact.mail"), "#{ChouetteIhm::Application.config.company_contact}", :target => "_blank" %>
<% end %>
</li>
- <li><%= link_to t("layouts.footer.support.help"), "/help" %></li>
+ <li><%= link_to t("layouts.footer.support.help"), help_path, :target => "chouette_help" %></li>
</ul>
</div>
<div class="col-md-3">
@@ -31,11 +31,11 @@
<% if ChouetteIhm::Application.config.company_contact.include?("@") %>
<%= mail_to "#{ChouetteIhm::Application.config.company_contact}", t("layouts.footer.contact.mail") %>
<% else %>
- <%= link_to t("layouts.footer.contact.mail"), "#{ChouetteIhm::Application.config.company_contact}" %>
+ <%= link_to t("layouts.footer.contact.mail"), "#{ChouetteIhm::Application.config.company_contact}", :target => "_blank" %>
<% end %>
</li>
- <li><%= link_to t("layouts.footer.contact.newsletter"),"http://www.chouette.mobi/les-utilisateurs/etre-informe/" %></li>
- <li><%= link_to t("layouts.footer.contact.forum"), "http://forum.chouette.mobi/" %></li>
+ <li><%= link_to t("layouts.footer.contact.newsletter"),"http://www.chouette.mobi/les-utilisateurs/etre-informe/", :target => "_blank" %></li>
+ <li><%= link_to t("layouts.footer.contact.forum"), "http://forum.chouette.mobi/", :target => "_blank" %></li>
</ul>
</div>
</div>
diff --git a/app/views/stop_areas/_stop_area.html.erb b/app/views/stop_areas/_stop_area.html.erb
index 2ae61b42d..6f3a22fa7 100644
--- a/app/views/stop_areas/_stop_area.html.erb
+++ b/app/views/stop_areas/_stop_area.html.erb
@@ -5,7 +5,7 @@
<%= link_to edit_referential_stop_area_path(@referential, stop_area), :class => "btn btn-default btn-sm" do %>
<span class="fa fa-pencil"></span>
<% end %>
- <%= link_to referential_stop_area_path(@referential, stop_area), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <%= link_to referential_stop_area_path(@referential, stop_area), :method => :delete, :data => {:confirm => t('stop_areas.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
<span class="fa fa-trash-o"></span>
<% end %>
</span>
diff --git a/app/views/stop_areas/index.html.erb b/app/views/stop_areas/index.html.erb
index 915e4523a..93406dc81 100644
--- a/app/views/stop_areas/index.html.erb
+++ b/app/views/stop_areas/index.html.erb
@@ -32,7 +32,7 @@
<% content_for :sidebar do %>
<ul class="actions">
<li><%= link_to t('stop_areas.actions.new'), new_referential_stop_area_path(@referential), :class => "add" %></li>
- <li><%= link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@referential), :method => :put, :class => "calculator_edit" %></li>
+ <li><%= link_to t('stop_areas.actions.default_geometry'), default_geometry_referential_stop_areas_path(@referential), :method => :put, :class => "calculator" %></li>
</ul>
<% end %>
diff --git a/app/views/stop_areas/show.html.erb b/app/views/stop_areas/show.html.erb
index 3cef99be8..3a6d88207 100644
--- a/app/views/stop_areas/show.html.erb
+++ b/app/views/stop_areas/show.html.erb
@@ -127,13 +127,13 @@
<tr><td>
<h4><%= t(".stop_managment") %></h4>
<ul class="actions">
- <li><font color="#D98F3B"><i class="fa fa-arrow-up fa-fw"></i></font><%= link_to t('stop_areas.actions.select_parent'), select_parent_referential_stop_area_path(@referential, @stop_area), :class => "with_fa" %></li>
+ <li><%= link_to t('stop_areas.actions.select_parent'), select_parent_referential_stop_area_path(@referential, @stop_area), :class => "parent" %></li>
<% if @stop_area.parent == nil %>
- <li><font color="green"><i class="fa fa-files-o fa-fw"></i></font><%= link_to t('stop_areas.actions.clone_as_parent'), new_referential_stop_area_stop_area_copy_path(@referential, @stop_area, :hierarchy => "parent"), :class => "with_fa" %></li>
+ <li><%= link_to t('stop_areas.actions.clone_as_parent'), new_referential_stop_area_stop_area_copy_path(@referential, @stop_area, :hierarchy => "parent"), :class => "clone" %></li>
<% end %>
<% if manage_children %>
- <li><font color="#D98F3B"><i class="fa fa-sitemap fa-fw"></i></font><%= link_to t('stop_areas.actions.add_children'), add_children_referential_stop_area_path(@referential, @stop_area), :class => "with_fa" %></li>
- <li><font color="green"><i class="fa fa-files-o fa-fw"></i></font><%= link_to t('stop_areas.actions.clone_as_child'), new_referential_stop_area_stop_area_copy_path(@referential, @stop_area, :hierarchy => "child"), :class => "with_fa" %></li>
+ <li></i></font><%= link_to t('stop_areas.actions.add_children'), add_children_referential_stop_area_path(@referential, @stop_area), :class => "children" %></li>
+ <li><%= link_to t('stop_areas.actions.clone_as_child'), new_referential_stop_area_stop_area_copy_path(@referential, @stop_area, :hierarchy => "child"), :class => "clone" %></li>
<% end %>
</ul>
</td></tr>
@@ -142,8 +142,8 @@
<tr><td>
<h4><%= t(".access_managment") %></h4>
<ul class="actions">
- <li><font color="green"><i class="fa fa-caret-square-o-right fa-fw"></i></font><%= link_to t('access_points.actions.new'), new_referential_stop_area_access_point_path(@referential,@stop_area), :class => "with_fa" %></li>
- <li><font color="#D98F3B"><i class="fa fa-arrows-alt fa-fw"></i></font><%= link_to t('stop_areas.actions.manage_access_links'), access_links_referential_stop_area_path(@referential,@stop_area), :class => "with_fa" %></li>
+ <li><%= link_to t('access_points.actions.new'), new_referential_stop_area_access_point_path(@referential,@stop_area), :class => "add" %></li>
+ <li><%= link_to t('stop_areas.actions.manage_access_links'), access_links_referential_stop_area_path(@referential,@stop_area), :class => "access_link" %></li>
</ul>
</td></tr>
<% end %>
diff --git a/app/views/time_tables/_cell_info.html.erb b/app/views/time_tables/_cell_info.html.erb
deleted file mode 100644
index 6ca63ba77..000000000
--- a/app/views/time_tables/_cell_info.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
- <%= time_tables_shortest_info(time_table) %>
- <% unless time_table.periods.empty? %>
- <div>
- <% %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).first(2) %>
- </span>
- <% end %>
- </div>
- <% end %>
- <% unless time_table.tags.empty? %>
- <div><%= tag_list_shortened(time_table) %></div>
- <% end %>
-
diff --git a/app/views/time_tables/_cell_title.html.erb b/app/views/time_tables/_cell_title.html.erb
deleted file mode 100644
index 22ada09eb..000000000
--- a/app/views/time_tables/_cell_title.html.erb
+++ /dev/null
@@ -1,10 +0,0 @@
- <%= link_to([@referential, time_table]) do %>
- <div class="state-code" >
- <div class="<%= time_table_state_code(time_table) %>" >
- </div>
- </div>
- <% end %>
- <div class="name">
- <%= link_to truncate(time_table.comment, :length => 30), [@referential, time_table], :title => "#{Chouette::TimeTable.model_name.human.capitalize} #{time_table.comment}"%>
- </div>
-
diff --git a/app/views/time_tables/_show_time_table.html.erb b/app/views/time_tables/_show_time_table.html.erb
index 71fe973c9..e0842d754 100644
--- a/app/views/time_tables/_show_time_table.html.erb
+++ b/app/views/time_tables/_show_time_table.html.erb
@@ -1,126 +1,93 @@
<div class="time_table_show" id="time_table_show">
-
- <div class="resume">
- <div class="validity <%= time_table_state_code(@time_table) %>"></div>
+ <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)) %>
+ <%= t(".resume", :start_date => l(@time_table.bounding_dates.min), :end_date => l(@time_table.bounding_dates.max)) %>
<% end %>
</label>
- </div>
- <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 %>
- <% end %>
- </p>
-
- <h3 class="time_table_calendars">
- <a class="calendars"><%= @time_table.human_attribute_name("calendars") %>
- <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
- <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
- </a>
-
- </h3>
- <div class="calendars content">
- <div class="year_choice">
- <span class="previous"> <%= link_to("<", referential_time_table_path(@referential, @time_table, :year => (@year - 1)) ) %> </span>
- <span class="year"> <%= "#{@year}" %> </span>
- <span class="next"> <%= link_to(">", referential_time_table_path(@referential, @time_table, :year => (@year + 1)) ) %> </span>
+ </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>
+ </ul>
+ <div id="my-tab-content" class="tab-content">
+ <div class="tab-pane active" id="time_tables">
+ <div class="well legend">
+ <span class="title"><%= t(".legend") %></span>
+ <span class="label excluded_date">X</span><%= t(".excluded_date") %>
+ <span class="label overlap_date">X</span><%= t(".overlap_date") %>
+ <span class="label selected_date">X</span><%= t(".selected_date") %>
+ <span class="label selected_period">X</span><%= t(".selected_period") %>
+ </div>
+ <div id="calendars">
+ <div class="year_choice">
+ <span class="previous"> <%= link_to("<", referential_time_table_path(@referential, @time_table, :year => (@year - 1)) ) %> </span>
+ <span class="year"> <%= "#{@year}" %> </span>
+ <span class="next"> <%= link_to(">", referential_time_table_path(@referential, @time_table, :year => (@year + 1)) ) %> </span>
+ </div>
+ <div class="calendar_helper">
+ <%= cal = ""
+ (1..12).each do |month|
+ cal << calendar(:year => @year, :month => month, :first_day_of_week => 1) do |d|
+ if @time_table.excluded_date?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "day excluded_date"}]
+ elsif @time_table.include_in_overlap_dates?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "day overlaped_date"}]
+ elsif @time_table.include_in_dates?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "day selected_date"}]
+ elsif @time_table.include_in_periods?(d)
+ [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "day selected_period"}]
+ end
+ end
+ end
+ cal.html_safe
+ %>
+ </div>
+ </div>
</div>
- <div class="calendar_helper">
- <%= cal = ""
- (1..12).each do |month|
- cal << calendar(:year => @year, :month => month, :first_day_of_week => 1) do |d|
- if @time_table.excluded_date?(d)
- [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "excluded_date"}]
- elsif @time_table.include_in_overlap_dates?(d)
- [link_to(d.mday, edit_referential_time_table_path(@referential, @time_table) ), {:class => "overlap_date"}]
- elsif @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"}]
- end
- end
- end
- cal.html_safe
- %>
- </div>
- </div>
-
+ <div class="tab-pane" id="time_tables_datas">
+ <div class="summary">
+ <p>
+ <label><%= @time_table.human_attribute_name("version") %>: </label>
+ <%= @time_table.version %>
+ </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 %>
+ <% %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>
+
+ </div>
- </div>
- <h3 class="time_table_periods">
- <a class="periods"><%= @time_table.human_attribute_name("periods") %>
- <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
- <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
- </a>
-
- </h3>
- <div class="periods content">
- <%= render "time_tables/periods" %>
- </div>
+ <h3 class="time_table_periods"><%= @time_table.human_attribute_name("periods") %></h3>
+ <div class="periods content">
+ <%= render "time_tables/periods" %>
+ </div>
- <h3 class="time_table_dates">
- <a class="dates"><%= @time_table.human_attribute_name("dates") %>
- <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
- <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
- </a>
- </h3>
+ <h3 class="time_table_dates"><%= @time_table.human_attribute_name("dates") %></h3>
+ <div class="dates content">
+ <%= render "time_tables/dates" %>
+ </div>
- <div class="dates content">
- <%= render "time_tables/dates" %>
- </div>
-
- <h3 class="time_table_dates">
- <a class="excluded_dates"><%= @time_table.human_attribute_name("excluded_dates") %>
- <%= image_tag("icons/plus.png" , :class => "switcher", :style => "display: none;") %>
- <%= image_tag("icons/minus.png" , :class => "switcher" ) %>
- </a>
- </h3>
-
- <div class="excluded_dates content">
- <%= render "time_tables/excluded_dates" %>
+ <h3 class="time_table_dates"><%= @time_table.human_attribute_name("excluded_dates") %></h3>
+ <div class="excluded_dates content">
+ <%= render "time_tables/excluded_dates" %>
+ </div>
+ </div>
</div>
</div>
diff --git a/app/views/time_tables/_time_table.html.erb b/app/views/time_tables/_time_table.html.erb
index e9d02fa38..1eeb42541 100644
--- a/app/views/time_tables/_time_table.html.erb
+++ b/app/views/time_tables/_time_table.html.erb
@@ -5,7 +5,7 @@
<%= link_to edit_referential_time_table_path(@referential, time_table), :class => "btn btn-default btn-sm" do %>
<span class="fa fa-pencil"></span>
<% end %>
- <%= link_to referential_time_table_path(@referential, time_table), :method => :delete, :data => {:confirm => t('companies.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <%= link_to referential_time_table_path(@referential, time_table), :method => :delete, :data => {:confirm => t('time_tables.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
<span class="fa fa-trash-o"></span>
<% end %>
</span>
@@ -20,6 +20,18 @@
</div>
</div>
<div class="panel-body">
- <%= render "cell_info", time_table: time_table %>
+ <%= time_tables_shortest_info(time_table) %>
+ <% unless time_table.periods.empty? %>
+ <div>
+ <% %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).first(2) %>
+ </span>
+ <% end %>
+ </div>
+ <% end %>
+ <% unless time_table.tags.empty? %>
+ <div><%= tag_list_shortened(time_table) %></div>
+ <% end %>
</div>
</div>
diff --git a/app/views/time_tables/show.html.erb b/app/views/time_tables/show.html.erb
index 7e9a5aa62..6b2233a55 100644
--- a/app/views/time_tables/show.html.erb
+++ b/app/views/time_tables/show.html.erb
@@ -11,8 +11,8 @@
<li><%= link_to t('time_tables.actions.new'), new_referential_time_table_path(@referential), :class => "add" %></li>
<li><%= link_to t('time_tables.actions.edit'), edit_referential_time_table_path(@referential, @time_table), :class => "edit" %></li>
<li><%= link_to t('time_tables.actions.destroy'), referential_time_table_path(@referential, @time_table), :method => :delete, :data => {:confirm => t('time_tables.actions.destroy_confirm')}, :class => "remove" %></li>
- <li><font color="green"><i class="fa fa-files-o fa-fw"></i></font><%= link_to t('time_tables.actions.duplicate'), duplicate_referential_time_table_path(@referential, @time_table), :class => "with_fa" %></li>
- <li><font color="#D98F3B"><i class="fa fa-cogs fa-fw"></i></font><%= link_to t('time_tables.actions.combine'), new_referential_time_table_time_table_combination_path(@referential, @time_table), {:remote => true, 'data-toggle' => "modal", 'data-target' => '#modal_combine', :class => "with_fa"} %></li>
+ <li><%= link_to t('time_tables.actions.duplicate'), duplicate_referential_time_table_path(@referential, @time_table), :class => "clone" %></li>
+ <li><%= link_to t('time_tables.actions.combine'), new_referential_time_table_time_table_combination_path(@referential, @time_table), {:remote => true, 'data-toggle' => "modal", 'data-target' => '#modal_combine', :class => "merge"} %></li>
</ul>
diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb
new file mode 100644
index 000000000..3f70e8479
--- /dev/null
+++ b/app/views/users/_user.html.erb
@@ -0,0 +1,22 @@
+<div id="index_item" class="panel panel-default user">
+ <div class="panel-heading">
+ <div class="panel-title clearfix">
+ <span class="pull-right">
+ <%= link_to edit_organisation_user_path( user), :class => "btn btn-default btn-sm" do %>
+ <span class="fa fa-pencil"></span>
+ <% end %>
+ <%= link_to organisation_user_path(user), :method => :delete, :data => {:confirm => t('users.actions.destroy_confirm')}, :class => "btn btn-danger btn-sm" do %>
+ <span class="fa fa-trash-o"></span>
+ <% end %>
+ </span>
+ <h5>
+ <%= link_to( organisation_user_path(user), :class => "preview", :title => "#{User.model_name.human.capitalize} #{user.email}") do %>
+ <%= user_gravatar_image_tag(user, 20) %>
+ <span class="name">
+ <%= truncate(user.email, :length => 20) %>
+ </span>
+ <% end %>
+ </h5>
+ </div>
+ </div>
+</div>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index 38a9ff78b..89d01b648 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -1,4 +1,3 @@
<%= title_tag t('.title', :user => @user.email) %>
-<p>iouoiu</p>
<%= render "form" %>
diff --git a/app/views/vehicle_journeys/_show_popover.html.erb b/app/views/vehicle_journeys/_show_popover.html.erb
index 828f2900e..5f6fe51ea 100644
--- a/app/views/vehicle_journeys/_show_popover.html.erb
+++ b/app/views/vehicle_journeys/_show_popover.html.erb
@@ -4,8 +4,23 @@
<p>
<%= vehicle_journey.time_tables.size %> <%= Chouette::TimeTable.model_name.human.pluralize %> <small><%= time_tables_shortest_info( vehicle_journey ) %></small> :
<ul>
- <% vehicle_journey.time_tables.limit(10).each do |time_table| %>
- <li><%= link_to time_table.comment + " " + time_table_bounding( time_table), [@referential, time_table] %></li>
+ <% vehicle_journey.time_tables.limit(4).each do |time_table| %>
+ <li>
+ <%= link_to [@referential, time_table] do %>
+ <span class="state-code <%= time_table_state_code(time_table) %>"><i class="fa fa-certificate"></i></span> <%= time_table.comment %>
+ <% end %>
+ <% if time_table.tag_list.present? %>
+ <br>
+ <span class="time_table_info"><%= truncate(time_table.tag_list.to_s, :length => 35) %></span>
+ <% end %>
+ <br>
+ <% %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_info">
+ <%= time_table.human_attribute_name(day_type).first(2) %>
+ </span>
+ <% end %>
+ <span class="bounding"><%= time_table_bounding( time_table) %></span>
+ </li>
<% end %>
</ul>
</p>
diff --git a/app/views/vehicle_journeys/_sidebar.html.erb b/app/views/vehicle_journeys/_sidebar.html.erb
index 80f70d574..8d6f310d3 100644
--- a/app/views/vehicle_journeys/_sidebar.html.erb
+++ b/app/views/vehicle_journeys/_sidebar.html.erb
@@ -1,6 +1,6 @@
<ul class="actions">
<li><%= link_to t('vehicle_journeys.actions.new'), new_referential_line_route_vehicle_journey_path(@referential, @line, @route), :class => "add" %></li>
<li><%= link_to t('vehicle_journey_imports.new.title'), new_referential_line_route_vehicle_journey_import_path( @referential, @line, @route ), :class => "import" %></li>
- <li><%= link_to image_tag("icons/file_csv.png") + t('vehicle_journey_exports.new.title'), referential_line_route_vehicle_journey_exports_path(@referential, @line, @route, :format => :zip), :class => "with_fa" %></li>
+ <li><%= link_to t('vehicle_journey_exports.new.title'), referential_line_route_vehicle_journey_exports_path(@referential, @line, @route, :format => :zip), :class => "export" %></li>
</ul>
diff --git a/app/views/vehicle_journeys/edit.html.erb b/app/views/vehicle_journeys/edit.html.erb
index dba18248e..51653a34a 100644
--- a/app/views/vehicle_journeys/edit.html.erb
+++ b/app/views/vehicle_journeys/edit.html.erb
@@ -1,17 +1,4 @@
<%= title_tag edit_vehicle_title(@vehicle_journey) %>
-<div class="vehicle_journey">
- <div class="summary">
- <p>
- <label><%= @route.human_attribute_name(:line) %>: </label>
- <%= link_to line_formatted_name( @line), [@referential, @line] %>
- </p>
- <p>
- <label><%= @vehicle_journey.human_attribute_name(:route) %>: </label>
- <%= link_to @route.name, [@referential, @line, @route] %>
- </p>
- </div>
-</div>
-
<%= render "form" %>
diff --git a/app/views/vehicle_journeys/index.html.erb b/app/views/vehicle_journeys/index.html.erb
index 69fd302fa..990f028e9 100644
--- a/app/views/vehicle_journeys/index.html.erb
+++ b/app/views/vehicle_journeys/index.html.erb
@@ -3,19 +3,14 @@
<%= search_form_for @q, :url => referential_line_route_vehicle_journeys_path(@referential,@line,@route), remote: true, :html => {:method => :get, class: "form-inline", :id => "search", role: "form"} do |f| %>
<div class="panel panel-default">
<div class="panel-heading">
- <div class="input-group col-md-9">
- <%= f.label :journey_pattern_id_eq, "Missions" %>
- <%= f.text_field :journey_pattern_id_eq %>
-
- <div class="input-group-btn">
- <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
- </div>
- </div><!-- /input-group -->
- <a data-toggle="collapse" data-parent="#search" href="#advanced_search">
+ <%= f.label :journey_pattern_id_eq, "Missions" %>
+ <%= f.text_field(:journey_pattern_id_eq, :class => "form-control") %>
+ <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
+ <a data-toggle="collapse" data-parent="#search" href="#advanced_search" class="advanced_search">
<i class="fa fa-plus"></i> <%= "#{t('.advanced_search')}" %>
</a>
</div>
-
+
<div id="advanced_search" class="panel-collapse collapse">
<div class="panel-body">
<div>
diff --git a/app/views/vehicle_journeys/new.html.erb b/app/views/vehicle_journeys/new.html.erb
index db344438e..a32e9cc31 100644
--- a/app/views/vehicle_journeys/new.html.erb
+++ b/app/views/vehicle_journeys/new.html.erb
@@ -1,17 +1,4 @@
<%= title_tag t('vehicle_journeys.new.title') %>
-<div class="vehicle_journey">
- <div class="summary">
- <p>
- <label><%= @route.human_attribute_name(:line) %>: </label>
- <%= link_to line_formatted_name( @line), [@referential, @line] %>
- </p>
- <p>
- <label><%= @vehicle_journey.human_attribute_name(:route) %>: </label>
- <%= link_to @route.name, [@referential, @line, @route] %>
- </p>
- <div>
-<div>
-
<%= render "form" %>
diff --git a/app/views/vehicle_journeys/show.html.erb b/app/views/vehicle_journeys/show.html.erb
index f964fc4ea..e90a74aa8 100644
--- a/app/views/vehicle_journeys/show.html.erb
+++ b/app/views/vehicle_journeys/show.html.erb
@@ -94,7 +94,7 @@
<h3><%= t('.time_tables') %></h3>
<div class="time_tables paginated_content">
- <%= paginated_content @vehicle_journey.time_tables, "time_table" %>
+ <%= paginated_content @vehicle_journey.time_tables, "time_tables/time_table" %>
</div>
diff --git a/config/locales/time_table_combinations.yml b/config/locales/time_table_combinations.yml
index ff15f33e2..a544b0115 100644
--- a/config/locales/time_table_combinations.yml
+++ b/config/locales/time_table_combinations.yml
@@ -6,10 +6,12 @@ en:
union: "merge"
intersection: "intersect"
disjunction: "disjoin"
+ combine_form:
+ time_tables: "Time table to combine with"
activemodel:
attributes:
time_table_combination:
- combined_id: "Time table to combine with"
+ combined_id: "Time table id"
operation: "operation"
fr:
time_table_combinations:
@@ -19,10 +21,11 @@ fr:
union: "ajouter les dates"
intersection: "conserver les dates communes"
disjunction: "soustraire les dates"
+ combine_form:
+ time_tables: "Calendrier à combiner"
activemodel:
attributes:
time_table_combination:
- combined_name: "Calendrier à combiner"
combined_id: "Id Calendrier"
operation: "opération"
diff --git a/config/locales/time_tables.yml b/config/locales/time_tables.yml
index 0cd04dff5..85b990716 100644
--- a/config/locales/time_tables.yml
+++ b/config/locales/time_tables.yml
@@ -12,6 +12,7 @@ en:
edit: "Edit this timetable"
destroy: "Remove this timetable"
duplicate: "Duplicate this timetable"
+ combine: "Combine with another timetable"
destroy_confirm: "Are you sure you want destroy this timetable ?"
destroy_date_confirm: "Are you sure you want destroy this date ?"
destroy_period_confirm: "Are you sure you want destroy this period ?"
@@ -34,7 +35,12 @@ en:
combine: "Apply"
show_time_table:
resume: "From %{start_date} to %{end_date}"
- resume_empty: "Empty timetable"
+ resume_empty: "Empty timetable"
+ legend: "Legend : "
+ excluded_date: "Excluded date"
+ overlap_date: "Overlap date"
+ selected_date: "Date directly included"
+ selected_period: "Date included in period"
index:
title: "Timetables"
comment: "Search by name"
@@ -121,6 +127,11 @@ fr:
show_time_table:
resume: "Validité comprise du %{start_date} au %{end_date}"
resume_empty: "Calendrier vide"
+ legend: "Légende : "
+ excluded_date: "Date exclue"
+ overlap_date: "Date en doublon"
+ selected_date: "Date inclue directement"
+ selected_period: "Date inclue par période"
index:
comment: "Recherche par nom"
tag_search: "Tags : vacances,jour fériés"
@@ -155,7 +166,8 @@ fr:
object_version: "Version"
creation_time: "Créé le"
creator_id: "Créé par"
- calendars: "Présentation calendaire"
+ calendars: "Calendrier"
+ calendar_details: "Données du calendrier"
dates: "Dates particulières"
date: "Le"
excluded_dates: "Dates exclues"
diff --git a/config/locales/vehicle_journeys.yml b/config/locales/vehicle_journeys.yml
index ff490966b..05eb1c4cb 100644
--- a/config/locales/vehicle_journeys.yml
+++ b/config/locales/vehicle_journeys.yml
@@ -4,7 +4,7 @@ en:
line_routes: "Line's routes"
vehicle_journey:
title_stopless: "Vehicle journey %{name}"
- title: "Vehicle journey %{name} leaving from %{stop} at %{time}"
+ title: "Vehicle journey leaving from %{stop} at %{time}"
actions:
index: "Vehicle time's board"
new: "Add a new vehicle journey"
@@ -105,7 +105,7 @@ fr:
line_routes: "Séquences d'arrêts de la ligne"
vehicle_journey:
title_stopless: "Course %{name}"
- title: "Course %{name} partant de %{stop} à %{time}"
+ title: "Course partant de %{stop} à %{time}"
actions:
index: "Horaires des courses"
new: "Ajouter une course"
diff --git a/spec/views/vehicle_journeys/edit.html.erb_spec.rb b/spec/views/vehicle_journeys/edit.html.erb_spec.rb
index a3eb871e2..c7db87706 100644
--- a/spec/views/vehicle_journeys/edit.html.erb_spec.rb
+++ b/spec/views/vehicle_journeys/edit.html.erb_spec.rb
@@ -11,12 +11,6 @@ describe "/vehicle_journeys/edit" do
render
view.should render_template(:partial => "_form")
end
- context "summary part" do
- it "should render route name" do
- render
- rendered.should have_selector( ".summary a", :text => route.name)
- end
- end
end
diff --git a/spec/views/vehicle_journeys/new.html.erb_spec.rb b/spec/views/vehicle_journeys/new.html.erb_spec.rb
index 495b667bd..bc0d68c2d 100644
--- a/spec/views/vehicle_journeys/new.html.erb_spec.rb
+++ b/spec/views/vehicle_journeys/new.html.erb_spec.rb
@@ -11,12 +11,6 @@ describe "/vehicle_journeys/new" do
render
view.should render_template(:partial => "_form")
end
- context "summary part" do
- it "should render route name" do
- render
- rendered.should have_selector( ".summary a", :text => route.name)
- end
- end
end