%div.panel.panel-default.app-tile

  .panel-heading
    .row
      .col-sm-10
        %h3.panel-title
          = app.name 
      .col-sm-2
        .pull-right
          = subtle_button(icon_class: 'fa-pencil', href: edit_app_path(app))

  .panel-body
    - app.requirements.each do |req| 
      .row.requirement-row
        .col-sm-10
          %h4
            = req
            = subtle_button(icon_class: 'fa-plus', anchor_class: 'add-expectation',  href: new_expectation_path(requirement_id: req.id), tooltip: 'Add a new expectation')
        .col-sm-2
          .pull-right
            = subtle_button(icon_class: 'fa-pencil', href: edit_requirement_path(req))

      - req.expectations.each do |exp|
        = render partial: 'apps/expectation', locals: {exp: exp}

  // Button to create a new App
  .panel-footer
    - button_class = app.requirements.empty? ? 'primary' : 'default'
    = button(icon_class: 'fa-plus', text: 'New Requirement', button_classes: 'btn-sm btn-'+button_class, href: new_requirement_path(app_id: app.id))


%div.panel.panel-default.app-tile

  .panel-heading
    .row
      .col-sm-10
        %h3.panel-title
          = app.name 
      .col-sm-2
        .pull-right
          = subtle_button(icon_class: 'fa-pencil', href: edit_app_path(app))

  .panel-body
    - app.requirements.each do |req| 
      .row.requirement-row
        .col-sm-10
          %h4
            = req
        .col-sm-2
          .pull-right
            = subtle_button(icon_class: 'fa-pencil', href: edit_requirement_path(req))
      - req.expectations.each do |exp|
        = render partial: 'apps/expectation', locals: {exp: exp}
      %p
        = subtle_button(icon_class: 'fa-plus', anchor_class: 'add-expectation',  href: new_expectation_path(requirement_id: req.id), tooltip: 'Add a new expectation (test)')


  // Button to create a new App
  .panel-footer
    - button_class = app.requirements.empty? ? 'primary' : 'default'
    = button(icon_class: 'fa-plus', text: 'New Requirement', button_classes: 'btn-sm btn-'+button_class, href: new_requirement_path(app_id: app.id))


Move new-expectation button to a new location, below expectation
Move new-expectation button to a new location, below expectation
