diff options
| author | Luc Donnet | 2012-05-03 17:56:26 +0200 |
|---|---|---|
| committer | Luc Donnet | 2012-05-03 17:56:26 +0200 |
| commit | 94d50794003daf78040bc865a85f986514bb9f8e (patch) | |
| tree | 77bfca52a527ab8a77a5399339290dfff58c9d01 | |
| parent | c9c7278fa8bf69ce422b228de928bf9450bb3f98 (diff) | |
| download | chouette-core-94d50794003daf78040bc865a85f986514bb9f8e.tar.bz2 | |
Fix generic attribute type in stop area
| -rw-r--r-- | app/views/stop_areas/_form.html.erb | 2 | ||||
| -rw-r--r-- | app/views/stop_areas/_stop_area.html.erb | 2 | ||||
| -rw-r--r-- | app/views/stop_areas/index.html.erb | 2 | ||||
| -rw-r--r-- | app/views/stop_areas/index.kml.erb | 2 | ||||
| -rw-r--r-- | app/views/stop_areas/show.html.erb | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/app/views/stop_areas/_form.html.erb b/app/views/stop_areas/_form.html.erb index 33ced3c1a..fab7c1510 100644 --- a/app/views/stop_areas/_form.html.erb +++ b/app/views/stop_areas/_form.html.erb @@ -7,7 +7,7 @@ <%= 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 { |type| t("area_types.label.#{type}") } %> + <%= form.input :stop_area_type, :as => :select, :collection => Chouette::StopArea.stop_area_types, :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %> <% if @stop_area.new_record? %> <%= form.input :objectid %> <% else %> diff --git a/app/views/stop_areas/_stop_area.html.erb b/app/views/stop_areas/_stop_area.html.erb index cd4f71456..f3f0b96bf 100644 --- a/app/views/stop_areas/_stop_area.html.erb +++ b/app/views/stop_areas/_stop_area.html.erb @@ -1,7 +1,7 @@ <%= div_for(stop_area) do %> <%= link_to([@referential, stop_area], :class => "preview") do %> <div class="area_type"> - <%= image_tag "map/" + stop_area.type + ".png" %> + <%= image_tag "map/" + stop_area.stop_area_type + ".png" %> </div> <% end %> <%= link_to stop_area.name, [@referential, stop_area] %> diff --git a/app/views/stop_areas/index.html.erb b/app/views/stop_areas/index.html.erb index 57617f559..cf7dafac0 100644 --- a/app/views/stop_areas/index.html.erb +++ b/app/views/stop_areas/index.html.erb @@ -31,7 +31,7 @@ <h4><%= t(".area_type") %></h4> <ul class="selection"> -<% Chouette::StopArea.types.each do |area_type| %> +<% Chouette::StopArea.stop_area_types.each do |area_type| %> <li><%= link_with_search (image_tag("map/" + area_type + ".png")+t("area_types.label.#{area_type.to_s}")), "areatype_eq" => area_type.name %></li> <% end %> <li><%= link_with_search (image_tag("map/all.png")+t(".selection_all")), {"areatype_eq" => nil}, :class => "all" %></li> diff --git a/app/views/stop_areas/index.kml.erb b/app/views/stop_areas/index.kml.erb index 0d8e85d2c..69a31db32 100644 --- a/app/views/stop_areas/index.kml.erb +++ b/app/views/stop_areas/index.kml.erb @@ -4,7 +4,7 @@ <% @stop_areas.where("latitude is not null and longitude is not null").each do |stop_area| %> <Placemark id="<%= stop_area.id %>" > <name><%= stop_area.name %></name> - <stop_area_type><%= stop_area.type %></stop_area_type> + <stop_area_type><%= stop_area.stop_area_type %></stop_area_type> <%= stop_area.geometry.kml_representation.html_safe %> </Placemark> <% end %> diff --git a/app/views/stop_areas/show.html.erb b/app/views/stop_areas/show.html.erb index 6912db830..905d0bb43 100644 --- a/app/views/stop_areas/show.html.erb +++ b/app/views/stop_areas/show.html.erb @@ -32,8 +32,8 @@ <%= @stop_area.registration_number %> </p> <p> - <label><%= @stop_area.human_attribute_name("type") %>: </label> - <%= t("area_types.label.#{@stop_area.type}") %> + <label><%= @stop_area.human_attribute_name("stop_area_type") %>: </label> + <%= t("area_types.label.#{@stop_area.stop_area_type}") %> </p> <p> <label><%= t('stop_areas.show.geographic_data') %> </label></p> <% if @stop_area.projectiontype == nil && @stop_area.longlattype == nil %> @@ -100,7 +100,7 @@ <% if @stop_area.parent.present? || @stop_area.children.present? %> <div class="target"> - <%= image_tag "map/" + @stop_area.type + ".png"%><span><%= @stop_area.name %></span> + <%= image_tag "map/" + @stop_area.stop_area_type + ".png"%><span><%= @stop_area.name %></span> </div> <% end %> @@ -110,7 +110,7 @@ <% @stop_area.children.each do |child| %> <div class="child"> <%= link_to([@referential, child]) do %> - <%= image_tag "map/" + child.type + ".png" %><span><%= child.name %></span> + <%= image_tag "map/" + child.stop_area_type + ".png" %><span><%= child.name %></span> <% end %> <%= link_to image_tag("user_interface/ui/remove.png"), referential_stop_area_path(@referential, child), :method => :delete, :confirm => t('stop_areas.actions.destroy_confirm'), :class => "remove" %> </div> |
