aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/routes/_stop_point_fields.html.slim
blob: 3b51e5e0d4a5073c423899f389780ad917fa2602 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.list-group-item
  div style="display:inline-block;vertical-align:middle;width:75%;"
    - if f.object.stop_area.nil? || f.object.new_record?
        / = f.input :stop_area_id, label: false
        = f.input :stop_area_id, :label => false, as: :search_stop_area, :json => referential_autocomplete_stop_areas_path(@referential, :format => :json)+"?filter=physical", :hint_text => t('search_hint'), :no_result_text => t('no_result_text'),:searching_text => t('searching_term'), :tokenLimit => 1, :input_html => { :class => "new_stop_point stop_area_id", :"data-pre" => Rabl::Renderer.new('autocomplete_stop_areas/index', [f.object.stop_area].compact, :view_path => 'app/views', :format => :json, :scope => self ).render }
      
    - else
      = "#{@route.stop_areas.find(f.object.stop_area_id).name} "
      em.small
        = "#{@route.stop_areas.find(f.object.stop_area_id).zip_code} #{@route.stop_areas.find(f.object.stop_area_id).city_name}"
    
  div.text-right style="display:inline-block;vertical-align:middle;width:25%;"
    .btn-group.btn-group-sm style="padding:0;"
      .btn.btn-default
        span.fa.fa-times
      .btn.btn-primary
        span.fa.fa-arrow-up
      .btn.btn-primary
        span.fa.fa-arrow-down
      .btn.btn-danger
        span.fa.fa-trash
      / = link_to_remove_association f, class: 'btn btn-danger', data: {confirm: 'Are you sure?'} do
      /   span.fa.fa-trash