Sha256: ecad59d6899f4a0fd92198ec67a03cec47e3f398cead4607b6c4325ec7f62917

Contents?: true

Size: 845 Bytes

Versions: 25

Compression:

Stored size: 845 Bytes

Contents

- tab = local_assigns[:tab]
#new_ticket_tabs
  %ul.nav.nav-tabs.nav-append-content
    - @ticket_types.keys.each do |type|
      %li
        %a{class: "#{type.underscore}-tab", 
          href: "##{type.underscore}-tab", 
            "data-toggle" => "tab"}
          = type.humanize

  .tab-content
    - @ticket_types.keys.each do |type|
      .tab-pane{id: "#{type.underscore}-tab"}
        = render "#{type.underscore}_form", ticket: @ticket_types[type]

- if tab.present?
  :javascript
    $(function() {
      $('#new_ticket_tabs a.#{tab}-tab').tab('show');
    });
- else
  :coffeescript
    $ ->
      $('#new_ticket_tabs a:first').tab('show')
:coffeescript
  $ ->
    $('#new_ticket_tabs a[data-toggle="tab"]').on 'shown.bs.tab', (event) ->
      $tab = $($(event.target).attr("href"))
      $tab.find("input[type=text]:first").focus()

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
tawork-0.0.50 app/views/tickets/_form.html.haml
tawork-0.0.49 app/views/tickets/_form.html.haml
tawork-0.0.48 app/views/tickets/_form.html.haml
tawork-0.0.47 app/views/tickets/_form.html.haml
tawork-0.0.46 app/views/tickets/_form.html.haml
tawork-0.0.45 app/views/tickets/_form.html.haml
tawork-0.0.44 app/views/tickets/_form.html.haml
tawork-0.0.43 app/views/tickets/_form.html.haml
tawork-0.0.42 app/views/tickets/_form.html.haml
tawork-0.0.41 app/views/tickets/_form.html.haml
tawork-0.0.40 app/views/tickets/_form.html.haml
tawork-0.0.39 app/views/tickets/_form.html.haml
tawork-0.0.38 app/views/tickets/_form.html.haml
tawork-0.0.37 app/views/tickets/_form.html.haml
tawork-0.0.36 app/views/tickets/_form.html.haml
tawork-0.0.35 app/views/tickets/_form.html.haml
tawork-0.0.34 app/views/tickets/_form.html.haml
tawork-0.0.33 app/views/tickets/_form.html.haml
tawork-0.0.31 app/views/tickets/_form.html.haml
tawork-0.0.30 app/views/tickets/_form.html.haml