summaryrefslogtreecommitdiff
path: root/app/views/call_routes/_index_core.html.haml
blob: a62a9c4f12412290c4c1831c14372196826edca2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- cache(['call_routes_table', I18n.locale, call_routes.count, call_routes.reorder(:updated_at).last]) do 
  %table.table.table-striped
    %thead
      %tr
        %th
        %th= t('call_routes.index.name')
        %th= t('route_elements.index.pattern')
        %th= t('call_routes.index.endpoint')

    %tbody{ :class => "call_routes", :id => "call_routes_#{routing_table}", :'data-update-url' => sort_call_routes_url}
      - for call_route in call_routes
        - cache(['call_route_single_table_row', I18n.locale, call_route]) do
          = content_tag_for :tr, call_route do
            %td
              %span.handle
                %i.icon-resize-vertical
            %td= call_route.name
            %td
              - if call_route.route_elements.any?
                = call_route.route_elements.first.pattern
                - if call_route.route_elements.count > 1
                  = ', ...'
              - else
                = '-'
            %td 
              - endpoint = call_route.endpoint
              - if endpoint
                = endpoint
              - else
                = call_route.endpoint_type
            =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route}