aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Florisson2012-06-29 11:29:21 +0200
committerMarc Florisson2012-06-29 11:29:21 +0200
commit52ae766c25023b1c69be88f124bc475f8bbd4ccd (patch)
tree2dd5c0e27f4fb9ff5390c8fbbdc3030ca751a8c0
parentb4a1a0726bd854fc15d5046f4db270e4f1d3fe28 (diff)
downloadchouette-core-52ae766c25023b1c69be88f124bc475f8bbd4ccd.tar.bz2
fix Refs #86
-rw-r--r--app/assets/stylesheets/stop_areas.css.scss4
-rw-r--r--app/views/companies/_form.erb9
-rw-r--r--app/views/connection_links/_form.erb9
-rw-r--r--app/views/journey_patterns/_form.html.erb9
-rw-r--r--app/views/lines/_form.erb9
-rw-r--r--app/views/networks/_form.erb9
-rw-r--r--app/views/stop_areas/_form.html.erb31
-rw-r--r--app/views/time_tables/_form.erb12
8 files changed, 21 insertions, 71 deletions
diff --git a/app/assets/stylesheets/stop_areas.css.scss b/app/assets/stylesheets/stop_areas.css.scss
index 3a5e70916..ad1339494 100644
--- a/app/assets/stylesheets/stop_areas.css.scss
+++ b/app/assets/stylesheets/stop_areas.css.scss
@@ -39,6 +39,10 @@
}
}
+#workspace.stop_areas.edit {
+ legend { padding-bottom: 20px; }
+}
+
#workspace.stop_areas.show
{
.geo_data {
diff --git a/app/views/companies/_form.erb b/app/views/companies/_form.erb
index d7274cbd9..108843ed6 100644
--- a/app/views/companies/_form.erb
+++ b/app/views/companies/_form.erb
@@ -9,14 +9,7 @@
<%= form.input :fax, :as => :phone %>
<%= form.input :email, :as => :email %>
<%= form.input :registration_number %>
- <% if @company.new_record? %>
- <%= form.input :objectid %>
- <% else %>
- <li>
- <label><%= @company.human_attribute_name("objectid") %>: </label>
- <%= @company.objectid %>
- </li>
- <% end %>
+ <%= form.input :objectid, :input_html => { :disabled => !@company.new_record? } %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/connection_links/_form.erb b/app/views/connection_links/_form.erb
index 50abadce7..a937f7197 100644
--- a/app/views/connection_links/_form.erb
+++ b/app/views/connection_links/_form.erb
@@ -13,14 +13,7 @@
<%= form.input :stairs_availability,:as => :boolean %>
<%= form.input :lift_availability,:as => :boolean %>
- <% if @connection_link.new_record? %>
- <%= form.input :objectid %>
- <% else %>
- <li>
- <label><%= @connection_link.human_attribute_name("objectid") %>: </label>
- <%= @connection_link.objectid %>
- </li>
- <% end %>
+ <%= form.input :objectid, :input_html => { :disabled => !@connection_link.new_record? } %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/journey_patterns/_form.html.erb b/app/views/journey_patterns/_form.html.erb
index 850998830..ed68bb4c8 100644
--- a/app/views/journey_patterns/_form.html.erb
+++ b/app/views/journey_patterns/_form.html.erb
@@ -5,14 +5,7 @@
<%= form.input :registration_number %>
<%= form.input :comment %>
<%= form.input :stop_point_ids, :as => :check_boxes, :collection => @route.stop_points.map { |s| [s.stop_area.name, s.id.to_s]}, :input_html => (@journey_pattern.new_record? ? { :checked => 'checked' }:{}) %>
- <% if @journey_pattern.new_record? %>
- <%= form.input :objectid %>
- <% else %>
- <li>
- <label><%= @journey_pattern.human_attribute_name("objectid") %>: </label>
- <%= @journey_pattern.objectid %>
- </li>
- <% end %>
+ <%= form.input :objectid, :input_html => { :disabled => !@journey_pattern.new_record? } %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/lines/_form.erb b/app/views/lines/_form.erb
index 400c68b7c..76b5b520b 100644
--- a/app/views/lines/_form.erb
+++ b/app/views/lines/_form.erb
@@ -9,14 +9,7 @@
<%= form.input :number %>
<%= form.input :transport_mode, :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 %>
- <li>
- <label><%= @line.human_attribute_name("objectid") %>: </label>
- <%= @line.objectid %>
- </li>
- <% end %>
+ <%= form.input :objectid, :input_html => { :disabled => !@line.new_record? } %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/networks/_form.erb b/app/views/networks/_form.erb
index cf1764136..90a7e43bc 100644
--- a/app/views/networks/_form.erb
+++ b/app/views/networks/_form.erb
@@ -7,14 +7,7 @@
<%= form.input :description %>
<%= form.input :source_name %>
<%= form.input :source_identifier %>
- <% if @network.new_record? %>
- <%= form.input :objectid %>
- <% else %>
- <li>
- <label><%= @network.human_attribute_name("objectid") %>: </label>
- <%= @network.objectid %>
- </li>
- <% end %>
+ <%= form.input :objectid, :input_html => { :disabled => !@network.new_record? } %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/stop_areas/_form.html.erb b/app/views/stop_areas/_form.html.erb
index c4d4c5797..ec9f2f1f0 100644
--- a/app/views/stop_areas/_form.html.erb
+++ b/app/views/stop_areas/_form.html.erb
@@ -1,30 +1,21 @@
<%= semantic_form_for [@referential, @stop_area] do |form| %>
<%= form.inputs do %>
<%= form.input :name %>
- <%= form.input :comment %>
- <%= form.input :nearest_topic_name %>
+ <%= form.input :stop_area_type, :as => :select, :input_html => { :disabled => !@stop_area.new_record? },
+ :collection => Chouette::StopArea.stop_area_types, :include_blank => false, :member_label => Proc.new { |stop_area_type| t("area_types.label.#{stop_area_type}") } %>
+ <%= form.input :registration_number %>
<%= form.input :street_name %>
<%= form.input :country_code %>
<%= form.input :fare_code %>
- <%= form.input :registration_number %>
- <% if @stop_area.new_record? %>
- <%= 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}") } %>
- <%= form.input :objectid %>
- <% else %>
- <li>
- <label><%= @stop_area.human_attribute_name("stop_area_type") %></label>
- <%= t("area_types.label.#{@stop_area.stop_area_type}") %>
- </li>
- <li>
- <label><%= @stop_area.human_attribute_name("objectid") %></label>
- <%= @stop_area.objectid %>
- </li>
+ <%= form.input :nearest_topic_name %>
+ <%= form.input :comment %>
+ <%= form.input :objectid, :input_html => { :disabled => !@stop_area.new_record? } %>
+ <%= form.inputs :name => t('stop_areas.show.geographic_data') do %>
+ <%= form.input :x %>
+ <%= form.input :y %>
+ <%= form.input :longitude %>
+ <%= form.input :latitude %>
<% end %>
- <p><%= t('stop_areas.show.geographic_data') %></p>
- <%= form.input :x %>
- <%= form.input :y %>
- <%= form.input :longitude %>
- <%= form.input :latitude %>
<% end %>
<%= form.actions do %>
diff --git a/app/views/time_tables/_form.erb b/app/views/time_tables/_form.erb
index f72e081da..362d89935 100644
--- a/app/views/time_tables/_form.erb
+++ b/app/views/time_tables/_form.erb
@@ -13,17 +13,7 @@
<%= form.input :saturday, :as => :boolean %>
<%= form.input :sunday, :as => :boolean %>
<% end %>
- <%= form.inputs do %>
- <% if @time_table.new_record? %>
- <%= form.input :objectid %>
- <% else %>
- <li>
- <label><%= @time_table.human_attribute_name("objectid") %>: </label>
- <%= @time_table.objectid %>
- </li>
- <% end %>
- <% end %>
- <p/>
+ <%= form.input :objectid, :input_html => { :disabled => !@time_table.new_record? } %>
<%= form.actions do %>
<%= form.action :submit, :as => :button %>
<%= form.action :cancel, :as => :link %>