diff options
| author | Michel Etienne | 2012-03-26 08:48:10 +0200 |
|---|---|---|
| committer | Michel Etienne | 2012-03-26 08:48:10 +0200 |
| commit | 6e6cef1999a4a09244b7d1b8538fcd21911a56d3 (patch) | |
| tree | 5ce263000fabe31d2352653690c67462fb777422 | |
| parent | 5656d29f0df34912ab2cd894147c36dd9f731bec (diff) | |
| download | chouette-core-6e6cef1999a4a09244b7d1b8538fcd21911a56d3.tar.bz2 | |
add fields for stopareas
| -rw-r--r-- | app/views/lines/_form.erb | 14 | ||||
| -rw-r--r-- | app/views/lines/show.html.erb | 20 | ||||
| -rw-r--r-- | app/views/stop_areas/_form.html.erb | 15 | ||||
| -rw-r--r-- | app/views/stop_areas/show.html.erb | 43 | ||||
| -rw-r--r-- | config/locales/stop_areas.yml | 22 |
5 files changed, 80 insertions, 34 deletions
diff --git a/app/views/lines/_form.erb b/app/views/lines/_form.erb index 2329ca75d..60faa8f68 100644 --- a/app/views/lines/_form.erb +++ b/app/views/lines/_form.erb @@ -1,7 +1,14 @@ <!-- <%= @line.errors.inspect %> --> <%= semantic_form_for [@referential, @line] do |form| %> <%= form.inputs do %> + <%= form.input :network, :as => :select, :collection => Chouette::Network.all, :include_blank => false %> + <%= form.input :company, :as => :select, :collection => Chouette::Company.all, :include_blank => false%> <%= form.input :name %> + <%= form.input :published_name %> + <%= form.input :registration_number %> + <%= form.input :number %> + <%= form.input :transport_mode_name, :as => :select, :collection => Chouette::Line.transport_modes, :include_blank => false, :member_label => Proc.new { |mode| t("transport_modes.label.#{mode}") } %> + <%= form.input :comment %> <% if @line.new_record? %> <%= form.input :objectid %> <% else %> @@ -10,13 +17,6 @@ <%= @line.objectid %> </li> <% end %> - <%= form.input :registration_number %> - <%= form.input :network, :as => :select, :collection => Chouette::Network.all, :include_blank => false %> - <%= form.input :company, :as => :select, :collection => Chouette::Company.all, :include_blank => false%> - <%= form.input :published_name %> - <%= form.input :number %> - <%= form.input :transport_mode_name, :as => :select, :collection => Chouette::Line.transport_modes, :include_blank => false, :member_label => Proc.new { |mode| t("transport_modes.label.#{mode}") } %> - <%= form.input :comment %> <% end %> <%= form.buttons do %> diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb index f0c39442a..cd0e6b2ac 100644 --- a/app/views/lines/show.html.erb +++ b/app/views/lines/show.html.erb @@ -5,14 +5,6 @@ <div class="summary"> <p> - <label><%= @line.human_attribute_name("name") %>: </label> - <%= @line.name %> - </p> - <p> - <label><%= @line.human_attribute_name("objectid") %>: </label> - <%= @line.objectid %> - </p> - <p> <label><%= @line.human_attribute_name(:network) %>: </label> <%= link_to @line.network.name, [@referential, @line.network] %> </p> @@ -21,14 +13,18 @@ <%= link_to @line.company.name, [@referential, @line.company] %> </p> <p> - <label><%= @line.human_attribute_name("registration_number") %>: </label> - <%= @line.registration_number %> + <label><%= @line.human_attribute_name("name") %>: </label> + <%= @line.name %> </p> <p> <label><%= @line.human_attribute_name("published_name") %>: </label> <%= @line.publishedname %> </p> <p> + <label><%= @line.human_attribute_name("registration_number") %>: </label> + <%= @line.registration_number %> + </p> + <p> <label><%= @line.human_attribute_name("number") %>: </label> <%= @line.number %> </p> @@ -41,6 +37,10 @@ <%= @line.comment %> </p> <p> + <label><%= @line.human_attribute_name("objectid") %>: </label> + <%= @line.objectid %> + </p> + <p> <label><%= @line.human_attribute_name("creation_time") %>: </label> <%= @line.creation_time %> </p> diff --git a/app/views/stop_areas/_form.html.erb b/app/views/stop_areas/_form.html.erb index 926f4fb55..7008b8292 100644 --- a/app/views/stop_areas/_form.html.erb +++ b/app/views/stop_areas/_form.html.erb @@ -1,6 +1,13 @@ <%= semantic_form_for [@referential, @stop_area] do |form| %> <%= form.inputs do %> <%= form.input :name %> + <%= form.input :comment %> + <%= form.input :nearest_topic_name %> + <%= form.input :street_name %> + <%= form.input :country_code %> + <%= form.input :fare_code %> + <%= form.input :registration_number %> + <%= form.input :type, :as => :select, :collection => Chouette::StopArea.types, :include_blank => false, :member_label => Proc.new { |mode| t("area_types.label.#{mode}") } %> <% if @stop_area.new_record? %> <%= form.input :objectid %> <% else %> @@ -9,9 +16,11 @@ <%= @stop_area.objectid %> </li> <% end %> - <%= form.input :registration_number %> - <%= form.input :type, :as => :select, :collection => Chouette::StopArea.types, :include_blank => false, :member_label => Proc.new { |mode| t("area_types.label.#{mode}") } %> - <%= form.input :comment %> + <p><%= t('stop_areas.show.geographic_data') %></p> + <%= form.input :x %> + <%= form.input :y %> + <%= form.input :longitude %> + <%= form.input :latitude %> <% end %> <%= form.buttons do %> diff --git a/app/views/stop_areas/show.html.erb b/app/views/stop_areas/show.html.erb index 4048db566..d4585b31b 100644 --- a/app/views/stop_areas/show.html.erb +++ b/app/views/stop_areas/show.html.erb @@ -8,8 +8,24 @@ <%= @stop_area.name %> </p> <p> - <label><%= @stop_area.human_attribute_name("objectid") %>: </label> - <%= @stop_area.objectid %> + <label><%= @stop_area.human_attribute_name("comment") %>: </label> + <%= @stop_area.comment %> + </p> + <p> + <label><%= @stop_area.human_attribute_name("nearest_topic_name") %>: </label> + <%= @stop_area.nearest_topic_name %> + </p> + <p> + <label><%= @stop_area.human_attribute_name("street_name") %>: </label> + <%= @stop_area.street_name %> + </p> + <p> + <label><%= @stop_area.human_attribute_name("country_code") %>: </label> + <%= @stop_area.country_code %> + </p> + <p> + <label><%= @stop_area.human_attribute_name("fare_code") %>: </label> + <%= @stop_area.fare_code %> </p> <p> <label><%= @stop_area.human_attribute_name("registration_number") %>: </label> @@ -20,8 +36,8 @@ <%= t("area_types.label.#{@stop_area.type}") %> </p> <p> - <label><%= @stop_area.human_attribute_name("comment") %>: </label> - <%= @stop_area.comment %> + <label><%= @stop_area.human_attribute_name("objectid") %>: </label> + <%= @stop_area.objectid %> </p> <p> <label><%= @stop_area.human_attribute_name("creation_time") %>: </label> @@ -31,6 +47,25 @@ <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> </div> diff --git a/config/locales/stop_areas.yml b/config/locales/stop_areas.yml index cc62fdeb2..ffe9e46c7 100644 --- a/config/locales/stop_areas.yml +++ b/config/locales/stop_areas.yml @@ -14,6 +14,7 @@ en: title: Update stop %{stop_area} show: title: Stop %{stop_area} + geographic_data: Geographic data index: title: Stop areas name_or_country_code: Name or Country code @@ -52,31 +53,32 @@ fr: no_position: Pas de position lines: "Lignes :" actions: - new: Ajouter une zone - edit: Modifier cette zone - destroy: Supprimer cette zone - destroy_confirm: Etes vous sûr de détruire cette zone ? + new: Ajouter un arrêt + edit: Modifier cet arrêt + destroy: Supprimer cet arrêt + destroy_confirm: Etes vous sûr de détruire cet arrêt ? new: - title: Ajouter une zone + title: Ajouter un arrêt edit: - title: "Modifier la zone %{stop_area}" + title: "Modifier l'arrêt %{stop_area}" show: - title: Zone %{stop_area} + title: Arrêt %{stop_area} + geographic_data: Données géographiques index: name_or_country_code: Nom ou Code Postal - title: Zones + title: Arrêts selection: Sélection selection_all: Tous activerecord: models: - stop_area: Zone + stop_area: Arrêt attributes: stop_area: name: Nom registration_number: "Numéro d'enregistrement" published_name: Nom public comment: Commentaire - area_type: "Type de zone" + area_type: "Type d'arrêt" nearest_topic_name: "Point d'intérêt le plus proche" street_name: Nom de la rue country_code: Code INSEE |
