js_tag src: route(:assets, :xhr), suffix: Frontline::ASSETS_SUFFIX

javascript:

var #{crudifier} = new Frontline.CRUD(
  '#{route(:route, controller[:name])}', '#routesFor#{controller[:dom_id]}'
);

ul.nav.nav-pills

li.active
  a href=("#" << navmap[:existing]) data-toggle="tab"
    = controller[:name]
    | &nbsp; Actions
li
  a href=("#" << navmap[:new]) data-toggle="tab" New Actions
li.dropdown
  a.dropdown-toggle data-toggle="dropdown" href="#"
    | Maintenance&nbsp;
    b class="caret"
  ul.dropdown-menu
    li
      - onclick = "fileCrudifier.toggleEditor('%s');" % controller[:file]
      a href="#" onclick=onclick
        i.icon-edit
        | &nbsp;Edit Controller

    - if helper_file =  controller[:helper_file]
      li
        - onclick = "fileCrudifier.toggleEditor('%s'); return false;" % helper_file
        a href="#" onclick=onclick
          i.icon-edit
          | &nbsp;Edit Helpers

    - if controller[:routes].any?
      li.divider
        li
          - onclick = "Frontline.runSpecs('%s', '%s');" % [route(:run_specs), controller[:name]]
          a href="#" onclick=onclick
            i.icon-play
            span  Run Specs

    li.divider
    li
      - confirm = 'You are about to delete an entire Controller! This action can not be undone! Continue?'
      - onclick = "controllerCrudifier.delete('%s', '%s');" % [controller[:name], confirm]
      a.text-error href="#" onclick=onclick
        i.icon-remove
        | &nbsp;Delete

.tab-content

.tab-pane.active id=navmap[:existing]
  div id=("routesFor%s" % controller[:dom_id])
    == render_p(:route, controller: controller[:name])

.tab-pane id=navmap[:new]
  - form_id = 'newRoutesFor%sForm' % controller[:dom_id]
  form.form-inline id=form_id
    .input-append
      input.input-xlarge name="name" type="text" placeholder="Action name(s), space separated"
      - onclick = "%s.create('#%s');" % [crudifier, form_id]
      a.btn type="button" onclick=onclick
        i.icon-play

    hr
    .lead Optional Setups
    .form-horizontal
      .control-group
        label.control-label Engine
        .controls
          select.frontline-selectable name="engine" data-placeholder="inherited"
            option
            - EConstants::VIEW__ENGINE_BY_SYM.each_key do |e|
              option value=e =e
          br
          small.muted selected engine will be added to Gemfile

      .control-group
        label.control-label Format
        .controls
          input name="format" type="text" placeholder="none"
          br
          small
            a href="http://espresso.github.io/Routing.html#format" target="_blank"
              | espresso.github.io/Routing.html#format