appirits/comable

View on GitHub
backend/app/views/comable/admin/stocks/edit.slim

Summary

Maintainability
Test Coverage
.comable-page
  .comable-main-fixed-top
    .comable-page-heading
      ul.pull-right.list-inline
        li.dropdown
          = link_to '#', class: 'btn btn-default', 'data-toggle' => 'dropdown' do
            i.fa.fa-bars
          ul.dropdown-menu.dropdown-menu-right
            li
              = link_to Comable.t('admin.nav.products.detail'), comable.admin_product_path(@stock.product)
            - if @stock.sku?
              li.divider
              li
                = link_to Comable.t('admin.actions.new'), comable.new_admin_product_stock_path(@stock.product)
        li
          = link_to_save

      h1.page-header
        ol.breadcrumb
          li>
            = link_to Comable.t('admin.nav.stock'), comable.admin_stocks_path
          li.active
            = @stock.name_with_sku

  .comable-page-body
    = render 'form'
    hr
    .panel.panel-danger
      .panel-heading type="button" data-toggle="collapse" data-target="#comable-danger"
        strong
          span.fa.fa-angle-down>
          = Comable.t('admin.actions.destroy')
      #comable-danger.collapse
        .panel-body
          p
            = Comable.t('admin.confirmation_to_remove_stock')
          = link_to Comable.t('admin.actions.destroy'), comable.admin_stock_path(@stock), method: :delete, class: 'btn btn-danger'