aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Etienne2012-04-13 11:49:39 +0200
committerMichel Etienne2012-04-13 11:49:39 +0200
commitd5f7ddafe6648b39bf9dbbe9d2130b850cf9d4be (patch)
tree3ff79993525a0ac4335d33695faf87b6af3ff168
parent72bf7ab2b686c06913bddfccf164102b92d5bd6e (diff)
downloadchouette-core-d5f7ddafe6648b39bf9dbbe9d2130b850cf9d4be.tar.bz2
enhence timetable and stoparea view
-rw-r--r--app/assets/images/icons/checked.pngbin0 -> 1277 bytes
-rw-r--r--app/assets/stylesheets/stop_areas.css.scss7
-rw-r--r--app/assets/stylesheets/time_tables.css.scss14
-rw-r--r--app/views/stop_areas/show.html.erb50
-rw-r--r--app/views/time_tables/_date.erb2
-rw-r--r--app/views/time_tables/_period.erb2
-rw-r--r--app/views/time_tables/show.html.erb122
-rw-r--r--config/database.yml21
-rw-r--r--config/database.yml.ccontrol2
-rw-r--r--config/locales/stop_areas.yml6
-rw-r--r--config/locales/time_tables.yml18
-rw-r--r--doc/functional/boardingposition.pngbin0 -> 3440 bytes
-rw-r--r--doc/functional/commercialstoppoint.pngbin0 -> 3561 bytes
-rw-r--r--doc/functional/quay.pngbin0 -> 3407 bytes
-rw-r--r--doc/functional/stop_areas.textile8
-rw-r--r--doc/functional/stopplace.pngbin0 -> 3809 bytes
16 files changed, 176 insertions, 76 deletions
diff --git a/app/assets/images/icons/checked.png b/app/assets/images/icons/checked.png
new file mode 100644
index 000000000..ab7c378c0
--- /dev/null
+++ b/app/assets/images/icons/checked.png
Binary files differ
diff --git a/app/assets/stylesheets/stop_areas.css.scss b/app/assets/stylesheets/stop_areas.css.scss
index 1f1624dd7..e05f1a98a 100644
--- a/app/assets/stylesheets/stop_areas.css.scss
+++ b/app/assets/stylesheets/stop_areas.css.scss
@@ -113,6 +113,13 @@
}
}
+#workspace.stop_areas.show
+{
+ .geo_data {
+ padding-left:15px;
+ }
+}
+
#workspace .order {
float: right;
diff --git a/app/assets/stylesheets/time_tables.css.scss b/app/assets/stylesheets/time_tables.css.scss
index e6fb6cec3..e0a74d934 100644
--- a/app/assets/stylesheets/time_tables.css.scss
+++ b/app/assets/stylesheets/time_tables.css.scss
@@ -97,6 +97,20 @@
}
}
+#workspace.time_tables.show
+{
+ .day_type {
+ border-style:solid;
+ border-width:1px;
+ }
+ .period {
+ padding-left:50px;
+ }
+ .date {
+ padding-left:50px;
+ }
+}
+
#workspace .order {
float: right;
diff --git a/app/views/stop_areas/show.html.erb b/app/views/stop_areas/show.html.erb
index d4585b31b..27ce46880 100644
--- a/app/views/stop_areas/show.html.erb
+++ b/app/views/stop_areas/show.html.erb
@@ -35,6 +35,39 @@
<label><%= @stop_area.human_attribute_name("type") %>: </label>
<%= t("area_types.label.#{@stop_area.type}") %>
</p>
+ <p><%= t('stop_areas.show.geographic_data') %></p>
+ <% if @stop_area.projectiontype == nil && @stop_area.longlattype == nil %>
+ <span class='geo_data'><%= t('stop_areas.show.no_geographic_data') %></span>
+ <% else %>
+ <% if @stop_area.projectiontype != nil %>
+ <p>
+ <span class='geo_data'><%= @stop_area.human_attribute_name("projectiontype") %>: </span>
+ <%= @stop_area.projectiontype %>
+ </p>
+ <p>
+ <span class='geo_data'><%= @stop_area.human_attribute_name("x") %>: </span>
+ <%= @stop_area.x %>
+ </p>
+ <p>
+ <span class='geo_data'><%= @stop_area.human_attribute_name("y") %>: </span>
+ <%= @stop_area.y %>
+ </p>
+ <% end %>
+ <% if @stop_area.longlattype != nil %>
+ <p>
+ <span class='geo_data'><%= @stop_area.human_attribute_name("longlattype") %>: </span>
+ <%= @stop_area.longlattype %>
+ </p>
+ <p>
+ <span class='geo_data'><%= @stop_area.human_attribute_name("longitude") %>: </span>
+ <%= @stop_area.longitude %>
+ </p>
+ <p>
+ <span class='geo_data'><%= @stop_area.human_attribute_name("latitude") %>: </span>
+ <%= @stop_area.latitude %>
+ </p>
+ <% end %>
+ <% end %>
<p>
<label><%= @stop_area.human_attribute_name("objectid") %>: </label>
<%= @stop_area.objectid %>
@@ -47,23 +80,6 @@
<label><%= @stop_area.human_attribute_name("creator_id") %>: </label>
<%= @stop_area.creator_id %>
</p>
- <p><%= t('stop_areas.show.geographic_data') %></p>
- <p>
- <label><%= @stop_area.human_attribute_name("x") %>: </label>
- <%= @stop_area.x %>
- </p>
- <p>
- <label><%= @stop_area.human_attribute_name("y") %>: </label>
- <%= @stop_area.y %>
- </p>
- <p>
- <label><%= @stop_area.human_attribute_name("longitude") %>: </label>
- <%= @stop_area.longitude %>
- </p>
- <p>
- <label><%= @stop_area.human_attribute_name("latitude") %>: </label>
- <%= @stop_area.latitude %>
- </p>
</div>
diff --git a/app/views/time_tables/_date.erb b/app/views/time_tables/_date.erb
index 4430efd33..7f127ff93 100644
--- a/app/views/time_tables/_date.erb
+++ b/app/views/time_tables/_date.erb
@@ -1,3 +1,3 @@
<%= div_for(date) do %>
- <%= date.date %>
+ <span class='date'><%= date.date %></span>
<% end %>
diff --git a/app/views/time_tables/_period.erb b/app/views/time_tables/_period.erb
index a8be8c73a..8e9dda7b4 100644
--- a/app/views/time_tables/_period.erb
+++ b/app/views/time_tables/_period.erb
@@ -1,3 +1,3 @@
<%= div_for(period) do %>
- <%= period.period_start %> - <%= period.period_end %>
+ <span class='period'><%= period.period_start %> - <%= period.period_end %></span>
<% end %>
diff --git a/app/views/time_tables/show.html.erb b/app/views/time_tables/show.html.erb
index a03c9e570..d556d88e7 100644
--- a/app/views/time_tables/show.html.erb
+++ b/app/views/time_tables/show.html.erb
@@ -11,38 +11,89 @@
<label><%= @time_table.human_attribute_name("version") %>: </label>
<%= @time_table.version %>
</p>
+ <!--
<p>
- <label><%= @time_table.human_attribute_name("objectid") %>: </label>
- <%= @time_table.objectid %>
- </p>
- <p>
- <label><%= @time_table.human_attribute_name("monday") %>: </label>
- <%= @time_table.monday %>
- </p>
- <p>
- <label><%= @time_table.human_attribute_name("tuesday") %>: </label>
- <%= @time_table.tuesday %>
- </p>
- <p>
- <label><%= @time_table.human_attribute_name("wednesday") %>: </label>
- <%= @time_table.wednesday %>
- </p>
- <p>
- <label><%= @time_table.human_attribute_name("thursday") %>: </label>
- <%= @time_table.thursday %>
- </p>
- <p>
- <label><%= @time_table.human_attribute_name("friday") %>: </label>
- <%= @time_table.friday %>
- </p>
- <p>
- <label><%= @time_table.human_attribute_name("saturday") %>: </label>
- <%= @time_table.saturday %>
+ <label><%= @time_table.human_attribute_name("day_types") %>:&nbsp;&nbsp;</label>
+ <% if @time_table.monday %>
+ <%= image_tag "icons/checked.png" %>
+ <% else %>
+ <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+ <% end %>
+ <label><%= @time_table.human_attribute_name("monday") %>&nbsp;&nbsp;</label>
+ <% if @time_table.tuesday %>
+ <%= image_tag "icons/checked.png" %>
+ <% else %>
+ <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+ <% end %>
+ <label><%= @time_table.human_attribute_name("tuesday") %>&nbsp;&nbsp;</label>
+ <% if @time_table.wednesday %>
+ <%= image_tag "icons/checked.png" %>
+ <% else %>
+ <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+ <% end %>
+ <label><%= @time_table.human_attribute_name("wednesday") %>&nbsp;&nbsp;</label>
+ <% if @time_table.thursday %>
+ <%= image_tag "icons/checked.png" %>
+ <% else %>
+ <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+ <% end %>
+ <label><%= @time_table.human_attribute_name("thursday") %>&nbsp;&nbsp;</label>
+ <% if @time_table.friday %>
+ <%= image_tag "icons/checked.png" %>
+ <% else %>
+ <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+ <% end %>
+ <label><%= @time_table.human_attribute_name("friday") %>&nbsp;&nbsp;</label>
+ <% if @time_table.saturday %>
+ <%= image_tag "icons/checked.png" %>
+ <% else %>
+ <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+ <% end %>
+ <label><%= @time_table.human_attribute_name("saturday") %>&nbsp;&nbsp;</label>
+ <% if @time_table.sunday %>
+ <%= image_tag "icons/checked.png" %>
+ <% else %>
+ <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+ <% end %>
+ <label><%= @time_table.human_attribute_name("sunday") %></label>
</p>
+ -->
<p>
- <label><%= @time_table.human_attribute_name("sunday") %>: </label>
- <%= @time_table.sunday %>
+ <label><%= @time_table.human_attribute_name("day_types") %>:&nbsp;&nbsp;</label>
+ <% if @time_table.intdaytypes == 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>
+
</div>
<div>
<p>
@@ -56,7 +107,20 @@
</p>
<%= render :partial => "date", :collection => @time_table.dates %>
</div>
-
+ <div>
+ <p>
+ <label><%= @time_table.human_attribute_name("objectid") %>: </label>
+ <%= @time_table.objectid %>
+ </p>
+ <p>
+ <label><%= @time_table.human_attribute_name("creation_time") %>: </label>
+ <%= @time_table.creation_time %>
+ </p>
+ <p>
+ <label><%= @time_table.human_attribute_name("creator_id") %>: </label>
+ <%= @time_table.creator_id %>
+ </p>
+ </div>
</div>
<% content_for :sidebar do %>
diff --git a/config/database.yml b/config/database.yml
index a3e357d3a..71ad6f9b1 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -1,30 +1,13 @@
-# SQLite version 3.x
-# gem 'activerecord-jdbcsqlite3-adapter'
-#
-# Configure Using Gemfile
-# gem 'activerecord-jdbcsqlite3-adapter'
-#
development:
adapter: jdbcpostgresql
- database: chouette_dev
+ database: chouette2_dev
encoding: utf8
username: chouette
password: chouette
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
test:
adapter: jdbcpostgresql
- database: chouette_test
+ database: chouette2_test
encoding: utf8
username: chouette
password: chouette
-
-production:
- adapter: jdbcpostgresql
- database: chouette2
- encoding: utf8
- host: localhost
- username: chouette
- password: chouette
diff --git a/config/database.yml.ccontrol b/config/database.yml.ccontrol
index e040adce2..71ad6f9b1 100644
--- a/config/database.yml.ccontrol
+++ b/config/database.yml.ccontrol
@@ -1,6 +1,6 @@
development:
adapter: jdbcpostgresql
- database: chouette2_test
+ database: chouette2_dev
encoding: utf8
username: chouette
password: chouette
diff --git a/config/locales/stop_areas.yml b/config/locales/stop_areas.yml
index 9ae7bf744..bc1254ac9 100644
--- a/config/locales/stop_areas.yml
+++ b/config/locales/stop_areas.yml
@@ -15,6 +15,7 @@ en:
show:
title: Stop %{stop_area}
geographic_data: Geographic data
+ no_geographic_data: None
index:
title: Stop areas
name_or_country_code: Name or Country code
@@ -34,8 +35,10 @@ en:
street_name: Street name
country_code: INSEE code
fare_code: Fare code
+ projectiontype: Projection type
x: x-position
y: y-position
+ longlattype: Projection type
longitude: Longitude
latitude: Latitude
objectid: Neptune identifier
@@ -65,6 +68,7 @@ fr:
show:
title: Arrêt %{stop_area}
geographic_data: Données géographiques
+ no_geographic_data: Aucune
index:
name_or_country_code: Nom ou Code Postal
title: Arrêts
@@ -85,8 +89,10 @@ fr:
street_name: Nom de la rue
country_code: Code INSEE
fare_code: Zone tarifaire
+ projectiontype: Projection
x: Position X
y: Position Y
+ longlattype: Projection
longitude: Longitude
latitude: Latitude
object_id: Identifiant Neptune
diff --git a/config/locales/time_tables.yml b/config/locales/time_tables.yml
index f0333e4f0..003d86f2e 100644
--- a/config/locales/time_tables.yml
+++ b/config/locales/time_tables.yml
@@ -24,6 +24,8 @@ en:
time_table:
comment: Comment
version: Version
+ day_types: Day types
+ none: none
monday: Monday
tuesday: Tuesday
wednesday: Wednesday
@@ -37,8 +39,8 @@ en:
creator_id: Created by
dates: Application dates
periods: Application periods
- period_start: From
- period_end: to
+ periodstart: From
+ periodend: to
formtastic:
hints:
time_table:
@@ -59,7 +61,7 @@ fr:
show:
title: Calendrier %{time_table}
index:
- comment: Commentaire
+ comment: Description
title: calendriers
selection: Sélection
selection_all: Tous
@@ -68,8 +70,10 @@ fr:
time_table: Calendrier
attributes:
time_table:
- comment: Commentaire
+ comment: Description
version: Version
+ day_types: "Jours d'application"
+ none: aucun
monday: Lundi
tuesday: Mardi
wednesday: Mercredi
@@ -77,14 +81,14 @@ fr:
friday: Vendredi
saturday: Samedi
sunday: Dimanche
- object_id: Identifiant Neptune
+ objectid: Identifiant Neptune
object_version: Version
creation_time: Créé le
creator_id: Créé par
dates: "Dates d'application"
periods: "Périodes d'application"
- period_start: Du
- period_end: au
+ periodstart: Du
+ periodend: au
formtastic:
hints:
diff --git a/doc/functional/boardingposition.png b/doc/functional/boardingposition.png
new file mode 100644
index 000000000..f3ffe75d9
--- /dev/null
+++ b/doc/functional/boardingposition.png
Binary files differ
diff --git a/doc/functional/commercialstoppoint.png b/doc/functional/commercialstoppoint.png
new file mode 100644
index 000000000..2c87dc31a
--- /dev/null
+++ b/doc/functional/commercialstoppoint.png
Binary files differ
diff --git a/doc/functional/quay.png b/doc/functional/quay.png
new file mode 100644
index 000000000..a2bd8e954
--- /dev/null
+++ b/doc/functional/quay.png
Binary files differ
diff --git a/doc/functional/stop_areas.textile b/doc/functional/stop_areas.textile
index b0e1bfbd2..f527798fe 100644
--- a/doc/functional/stop_areas.textile
+++ b/doc/functional/stop_areas.textile
@@ -20,7 +20,7 @@ Enfin, CHOUETTE vous offre la possibilit&eacute; de regrouper les lieux d'arr&ec
Ainsi on obtient les possibilit&eacute;s de regroupements suivants:
* un arr&ecirc;t physique regroupe plusieurs arr&ecirc;ts itin&eacute;raire.
* un arr&ecirc;t commercial regroupe plusieurs arr&ecirc;ts physiques (quai, embarquement).
-* une p&ocirc;le d'&eacute;change regroupe plusieurs arr&ecirc;ts commerciaux.
+* un p&ocirc;le d'&eacute;change regroupe plusieurs arr&ecirc;ts commerciaux.
Pour ne pas aboutir &agrave; un syst&egrave;me trop complexe, les r&egrave;gles suivantes sont pos&eacute;es:
* un p&ocirc;le d'&eacute;change peut contenir des arr&ecirc;ts commerciaux et/ou des p&ocirc;les d'&eacute;changes (qui ne peuvent pas en contenir d'autres).
@@ -36,6 +36,12 @@ Ainsi dans CHOUETTE:
h3. Attributs
- Type d'arr&ecirc;t := cat&eacute;gorie de l'arr&ecirc;t
+
+* !boardingposition.png! point d'embarquement
+* !quay.png! quai
+* !commercialstoppoint.png! arr&ecirc;t commercial
+* !stopplace.png! p&ocirc;le d'&eacute;change
+
- Nom := nom de l'arr&ecirc;t
- Commentaire := zone de texte libre
- Point d'int&eacute;r&ecirc;t le plus proche := nom du lieu desservi par l'arr&ecirc;t
diff --git a/doc/functional/stopplace.png b/doc/functional/stopplace.png
new file mode 100644
index 000000000..b5058573e
--- /dev/null
+++ b/doc/functional/stopplace.png
Binary files differ