Fixed finance module to work with bootstrap design.

This commit is contained in:
benni 2012-11-10 16:44:05 +01:00
parent 16de9124fe
commit 0236fb5a60
55 changed files with 440 additions and 486 deletions

View file

@ -1,30 +1,20 @@
%p
Gefunden:
= @ordergroups.size
%p
%table{:style => "width:100%"}
%tr
%td
= pagination_links_remote @ordergroups, :update => :ordergroups, :params => {:sort => params[:sort]}
%td{:style => "text-align:right"}
- if @ordergroups.size > 20
= items_per_page
%table.list
- if Ordergroup.count > 20
= items_per_page
= pagination_links_remote @ordergroups
%table.table.table-striped
%thead
%tr
%th= sort_link_helper "Name", "name", :per_page => @per_page
%th Kontakt
%th= sort_link_helper "Kontostand", "account_balance", :per_page => @per_page
%th.numeric= sort_link_helper "Kontostand", "account_balance", :per_page => @per_page
%th
%tbody
- for ordergroup in @ordergroups
%tr{:class => cycle('even','odd', :name => 'ordergroups')}
%tr
%td= ordergroup.name
%td= ordergroup.contact
%td{:class => "currency", :style => "width:5em"}= number_to_currency(ordergroup.account_balance)
%td{:class => "actions"}
= link_to image_tag("euro_new.png", :size => "16x16", :alt => "Neue Transaktion", :border => "0"),
new_finance_ordergroup_transaction_path(ordergroup), :title => "Neue Transaktion"
= link_to image_tag("b_browse.png", :size => "16x16", :border => "0", :alt => 'Kontoauszug'),
finance_ordergroup_transactions_path(ordergroup), :title => "Kontoauszug"
%td.numeric= number_to_currency(ordergroup.account_balance)
%td
= link_to "Neue Transaktion", new_finance_ordergroup_transaction_path(ordergroup), class: 'btn btn-mini'
= link_to "Kontoauszug", finance_ordergroup_transactions_path(ordergroup), class: 'btn btn-mini'

View file

@ -1,20 +1,15 @@
- title "Konten verwalten"
%p
%i
Um mehrer Transaktionen auf einmal anzulegen folge bitte diesem
= link_to "Link", finance_new_transaction_collection_path
.left_column{:style=>"width:50em"}
.box_title
%h2 Bestellgruppen
.column_content
#group_filter
= form_tag finance_ordergroups_path, :method => :get, :style=>"display:inline;", :id => 'ordergroup_search',
:remote => true, 'data-submit-onchange' => true do
%label{:for => 'article_name'} Suche nach Name:
= text_field_tag :query, params[:query], :size => 10
#ordergroups
= render :partial => "ordergroups"
%br/
- if @current_user.role_admin?
= link_to "Neue Bestellgruppe anlegen", new_admin_ordergroup_path
- content_for :sidebar do
.well.well-small
Hier kannst du mehrere Transaktionen gleichzeitig anlegen:
= link_to "Neue Überweisungen eingeben", finance_new_transaction_collection_path, class: 'btn btn-primary'
.well.well-small
= form_tag finance_ordergroups_path, :method => :get, :remote => true,
'data-submit-onchange' => true, class: 'form-search' do
= text_field_tag :query, params[:query], class: 'input-medium search-query',
placeholder: 'Suchen ...'
#ordergroupsTable
= render :partial => "ordergroups"

View file

@ -1 +1 @@
$('#ordergroups').html('#{escape_javascript(render("ordergroups"))}');
$('#ordergroupsTable').html('#{escape_javascript(render("ordergroups"))}');