Add admin UI for SupplierCategories
This commit is contained in:
parent
7e8c1d041d
commit
708f85a839
10 changed files with 108 additions and 0 deletions
13
app/views/admin/finances/_supplier_categories.html.haml
Normal file
13
app/views/admin/finances/_supplier_categories.html.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= heading_helper SupplierCategory, :name
|
||||
%th
|
||||
%tbody
|
||||
- @supplier_categories.each do |supplier_category|
|
||||
%tr
|
||||
%td= supplier_category.name
|
||||
%td
|
||||
= link_to t('ui.edit'), edit_admin_supplier_category_path(supplier_category), remote: true, class: 'btn btn-mini'
|
||||
= link_to t('ui.delete'), [:admin, supplier_category], :method => :delete, :data => {:confirm => t('ui.confirm_delete', name: supplier_category.name)},
|
||||
remote: true, class: 'btn btn-mini btn-danger'
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
= link_to t('.new_financial_transaction_class'), new_admin_financial_transaction_class_path, remote: true, class: 'btn btn-primary'
|
||||
= link_to t('.new_bank_account'), new_admin_bank_account_path, remote: true, class: 'btn'
|
||||
= link_to t('.new_bank_gateway'), new_admin_bank_gateway_path, remote: true, class: 'btn'
|
||||
= link_to t('.new_supplier_category'), new_admin_supplier_category_path, remote: true, class: 'btn'
|
||||
|
||||
- content_for :sidebar do
|
||||
%p= t('.first_paragraph').html_safe
|
||||
|
|
@ -16,3 +17,6 @@
|
|||
|
||||
%h2= t('.bank_gateways')
|
||||
#bank_gateways_table= render 'bank_gateways'
|
||||
|
||||
%h2= t('.supplier_categories')
|
||||
#supplier_categories_table= render 'supplier_categories'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
$('#supplier_categories_table').html('#{escape_javascript(render("admin/finances/supplier_categories"))}');
|
||||
$('#modalContainer').modal('hide');
|
||||
Loading…
Add table
Add a link
Reference in a new issue