afimb/chouette2

View on GitHub
app/views/stop_areas/add_children.html.erb

Summary

Maintainability
Test Coverage
<%= title_tag t('stop_areas.add_children.title', :stop_area => @stop_area.name ) %>

<%= semantic_form_for [@referential, @stop_area] do |form| %>
<div>
  <%= form.inputs do %>
    <%= form.input :children_ids, :as => :search_stop_area, :json => referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?relation=children&target_type=#{@stop_area.area_type}", :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :input_html => { :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/index', @children, :view_path => 'app/views', :format => :json, :scope => self ).render }  %>
  <% end %>

   <%= form.actions do %>
     <%= form.action :submit, :as => :button %>
     <%= form.action :cancel, :as => :link %>
   <% end %>
</div>
<% end %>

<% content_for :sidebar do %>
<ul class="actions">
</ul>
<% end %>