afimb/chouette2

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

Summary

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

<%= semantic_form_for [@referential, @stop_area] do |form| %>
<div>
  <%= form.inputs do %>
    <%= form.input :parent_id, :as => :search_stop_area, :json => referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?relation=parent&target_type=#{@stop_area.area_type}", :hint_text => t('search_hint'), :no_result_text => t('no_result_text'), :searching_text => t('searching_term'), :tokenLimit => 1, :input_html => { :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/index', [@parent].compact, :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 %>