Refactored finance/ordergroups|transactions module.
This commit is contained in:
parent
fc1d130113
commit
ea6348bc5c
38 changed files with 967 additions and 443 deletions
1
Gemfile
1
Gemfile
|
@ -7,6 +7,7 @@ gem 'mysql'
|
|||
gem "fastercsv"
|
||||
gem "prawn", '<=0.6.3'
|
||||
gem 'haml'
|
||||
gem 'sass'
|
||||
gem "will_paginate", "~> 3.0.pre2"
|
||||
gem 'jquery-rails'
|
||||
gem 'client_side_validations'
|
||||
|
|
|
@ -102,6 +102,7 @@ GEM
|
|||
thor (~> 0.14.4)
|
||||
rake (0.8.7)
|
||||
responders (0.6.4)
|
||||
sass (3.1.1)
|
||||
simple_form (1.3.1)
|
||||
thor (0.14.6)
|
||||
treetop (1.4.9)
|
||||
|
@ -128,5 +129,6 @@ DEPENDENCIES
|
|||
prawn (<= 0.6.3)
|
||||
rails (= 3.0.7)
|
||||
rails3_acts_as_paranoid
|
||||
sass
|
||||
simple_form
|
||||
will_paginate (~> 3.0.pre2)
|
||||
|
|
67
app/controllers/finance/financial_transactions_controller.rb
Normal file
67
app/controllers/finance/financial_transactions_controller.rb
Normal file
|
@ -0,0 +1,67 @@
|
|||
class Finance::FinancialTransactionsController < ApplicationController
|
||||
before_filter :authenticate_finance
|
||||
before_filter :find_ordergroup, :except => [:new_collection, :create_collection]
|
||||
inherit_resources
|
||||
# belongs_to :ordergroup
|
||||
|
||||
def index
|
||||
if params['sort']
|
||||
sort = case params['sort']
|
||||
when "date" then "created_on"
|
||||
when "note" then "note"
|
||||
when "amount" then "amount"
|
||||
when "date_reverse" then "created_on DESC"
|
||||
when "note_reverse" then "note DESC"
|
||||
when "amount_reverse" then "amount DESC"
|
||||
end
|
||||
else
|
||||
sort = "created_on DESC"
|
||||
end
|
||||
|
||||
@financial_transactions = @ordergroup.financial_transactions.order(sort)
|
||||
@financial_transactions = @financial_transactions.where(:note.matches => "%#{params[:query]}%") unless params[:query].nil?
|
||||
|
||||
@financial_transactions = @financial_transactions.paginate :page => params[:page], :per_page => 10
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { render :layout => false }
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@financial_transaction = @ordergroup.financial_transactions.build
|
||||
end
|
||||
|
||||
def create
|
||||
@financial_transaction = FinancialTransaction.new(params[:financial_transaction])
|
||||
@financial_transaction.user = current_user
|
||||
@financial_transaction.add_transaction!
|
||||
redirect_to finance_ordergroup_transactions_url(@ordergroup), :notice => "Die Transaktion wurde gespeichert."
|
||||
rescue
|
||||
render :action => :new
|
||||
end
|
||||
|
||||
def new_collection
|
||||
end
|
||||
|
||||
def create_collection
|
||||
raise "Notiz wird benötigt!" if params[:note].blank?
|
||||
params[:financial_transactions].each do |trans|
|
||||
# ignore empty amount fields ...
|
||||
unless trans[:amount].blank?
|
||||
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction!(trans[:amount], params[:note], @current_user)
|
||||
end
|
||||
end
|
||||
redirect_to finance_ordergroups_url, :notice => "Alle Transaktionen wurden gespeichert."
|
||||
rescue => error
|
||||
redirect_to :action => 'new_collection', :alert => "Ein Fehler ist aufgetreten: " + error.to_s
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def find_ordergroup
|
||||
@ordergroup = Ordergroup.find(params[:ordergroup_id])
|
||||
end
|
||||
|
||||
end
|
31
app/controllers/finance/ordergroups_controller.rb
Normal file
31
app/controllers/finance/ordergroups_controller.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
class Finance::OrdergroupsController < ApplicationController
|
||||
before_filter :authenticate_finance
|
||||
|
||||
def index
|
||||
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)
|
||||
@per_page = params[:per_page].to_i
|
||||
else
|
||||
@per_page = 20
|
||||
end
|
||||
if params["sort"]
|
||||
sort = case params["sort"]
|
||||
when "name" then "name"
|
||||
when "account_balance" then "account_balance"
|
||||
when "name_reverse" then "name DESC"
|
||||
when "account_balance_reverse" then "account_balance DESC"
|
||||
end
|
||||
else
|
||||
sort = "name"
|
||||
end
|
||||
|
||||
@ordergroups = Ordergroup.order(sort)
|
||||
@ordergroups = @ordergroups.where(:name.matches => "%#{params[:query]}%") unless params[:query].nil?
|
||||
|
||||
@ordergroups = @ordergroups.paginate :page => params[:page], :per_page => @per_page
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { render :layout => false }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,103 +0,0 @@
|
|||
class Finance::TransactionsController < ApplicationController
|
||||
before_filter :authenticate_finance
|
||||
|
||||
def index
|
||||
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)
|
||||
@per_page = params[:per_page].to_i
|
||||
else
|
||||
@per_page = 20
|
||||
end
|
||||
if params["sort"]
|
||||
sort = case params["sort"]
|
||||
when "name" then "name"
|
||||
when "account_balance" then "account_balance"
|
||||
when "name_reverse" then "name DESC"
|
||||
when "account_balance_reverse" then "account_balance DESC"
|
||||
end
|
||||
else
|
||||
sort = "name"
|
||||
end
|
||||
|
||||
conditions = "name LIKE '%#{params[:query]}%'" unless params[:query].nil?
|
||||
|
||||
@total = Ordergroup.without_deleted.count(:conditions => conditions)
|
||||
@groups = Ordergroup.without_deleted.paginate :conditions => conditions,
|
||||
:page => params[:page], :per_page => @per_page, :order => sort
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { render :partial => "ordergroups" }
|
||||
end
|
||||
end
|
||||
|
||||
def list
|
||||
@group = Ordergroup.find(params[:id])
|
||||
|
||||
if params['sort']
|
||||
sort = case params['sort']
|
||||
when "date" then "created_on"
|
||||
when "note" then "note"
|
||||
when "amount" then "amount"
|
||||
when "date_reverse" then "created_on DESC"
|
||||
when "note_reverse" then "note DESC"
|
||||
when "amount_reverse" then "amount DESC"
|
||||
end
|
||||
else
|
||||
sort = "created_on DESC"
|
||||
end
|
||||
|
||||
conditions = ["note LIKE ?", "%#{params[:query]}%"] unless params[:query].nil?
|
||||
|
||||
@total = @group.financial_transactions.count(:conditions => conditions)
|
||||
@financial_transactions = @group.financial_transactions.paginate(
|
||||
:page => params[:page],
|
||||
:per_page => 10,
|
||||
:conditions => conditions,
|
||||
:order => sort)
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js { render :partial => "list" }
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@group = Ordergroup.find(params[:id])
|
||||
@financial_transaction = @group.financial_transactions.build
|
||||
end
|
||||
|
||||
def create
|
||||
@group = Ordergroup.find(params[:financial_transaction][:ordergroup_id])
|
||||
amount = params[:financial_transaction][:amount]
|
||||
note = params[:financial_transaction][:note]
|
||||
begin
|
||||
@group.add_financial_transaction(amount, note, @current_user)
|
||||
flash[:notice] = 'Transaktion erfolgreich angelegt.'
|
||||
redirect_to :action => 'list', :id => @group
|
||||
rescue => e
|
||||
@financial_transaction = FinancialTransaction.new(params[:financial_transaction])
|
||||
flash.now[:error] = 'Transaktion konnte nicht angelegt werden!' + ' (' + e.message + ')'
|
||||
render :action => 'new'
|
||||
end
|
||||
end
|
||||
|
||||
def new_collection
|
||||
end
|
||||
|
||||
def create_collection
|
||||
note = params[:note]
|
||||
raise "Notiz wird benötigt!" if note.blank?
|
||||
params[:financial_transactions].each do |trans|
|
||||
# ignore empty amount fields ...
|
||||
unless trans[:amount].blank?
|
||||
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction trans[:amount], note, @current_user
|
||||
end
|
||||
end
|
||||
flash[:notice] = "Alle Transaktionen wurden gespeichert."
|
||||
redirect_to :action => 'index'
|
||||
rescue => error
|
||||
flash[:error] = "Ein Fehler ist aufgetreten: " + error.to_s
|
||||
redirect_to :action => 'new_collection'
|
||||
end
|
||||
|
||||
end
|
2
app/helpers/finance/ordergroups_helper.rb
Normal file
2
app/helpers/finance/ordergroups_helper.rb
Normal file
|
@ -0,0 +1,2 @@
|
|||
module Finance::OrdergroupsHelper
|
||||
end
|
|
@ -4,14 +4,15 @@ class FinancialTransaction < ActiveRecord::Base
|
|||
belongs_to :ordergroup
|
||||
belongs_to :user
|
||||
|
||||
validates_presence_of :note, :user_id, :ordergroup_id
|
||||
validates_presence_of :amount, :note, :user_id, :ordergroup_id
|
||||
validates_numericality_of :amount
|
||||
|
||||
# Custom attribute setter that accepts decimal numbers using localized decimal separator.
|
||||
def amount=(amount)
|
||||
self[:amount] = String.delocalized_decimal(amount)
|
||||
end
|
||||
localize_input_of :amount
|
||||
|
||||
# Use this save method instead of simple save and after callback
|
||||
def add_transaction!
|
||||
ordergroup.add_financial_transaction! amount, note, user
|
||||
end
|
||||
end
|
||||
|
||||
# == Schema Information
|
||||
|
|
|
@ -178,7 +178,7 @@ class Order < ActiveRecord::Base
|
|||
transaction do # Start updating account balances
|
||||
for group_order in gos
|
||||
price = group_order.price * -1 # decrease! account balance
|
||||
group_order.ordergroup.add_financial_transaction(price, transaction_note, user)
|
||||
group_order.ordergroup.add_financial_transaction!(price, transaction_note, user)
|
||||
end
|
||||
|
||||
if stockit? # Decreases the quantity of stock_articles
|
||||
|
|
|
@ -38,11 +38,11 @@ class Ordergroup < Group
|
|||
|
||||
# Creates a new FinancialTransaction for this Ordergroup and updates the account_balance accordingly.
|
||||
# Throws an exception if it fails.
|
||||
def add_financial_transaction(amount, note, user)
|
||||
def add_financial_transaction!(amount, note, user)
|
||||
transaction do
|
||||
trans = FinancialTransaction.new(:ordergroup => self, :amount => amount, :note => note, :user => user)
|
||||
trans.save!
|
||||
self.account_balance += trans.amount
|
||||
self.account_balance = financial_transactions.sum('amount')
|
||||
self.account_updated = trans.created_on
|
||||
save!
|
||||
notify_negative_balance(trans)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
%h2 letzte Überweisungen
|
||||
.column_content
|
||||
%p
|
||||
= link_to "Bestellgruppen", :controller => 'finance/transactions'
|
||||
= link_to "Bestellgruppen", :controller => 'financial_transactions'
|
||||
%table.list
|
||||
%thead
|
||||
%tr
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
%tr.transaction
|
||||
%td
|
||||
= select_tag 'financial_transactions[][ordergroup_id]',
|
||||
options_for_select(Ordergroup.order(:name).all.map { |g| [ g.name, g.id ] })
|
||||
%td= text_field_tag 'financial_transactions[][amount]'
|
||||
%td= link_to icon(:delete), "#", :title => "Gruppe enfernen", 'data-remove-transaction' => true
|
|
@ -0,0 +1,26 @@
|
|||
- if @total == 0
|
||||
%p Keine gefunden
|
||||
- else
|
||||
%p
|
||||
Anzahl gefundener Transaktionen:
|
||||
%b= @total
|
||||
%p
|
||||
= pagination_links_remote @financial_transactions, :update => 'transactions', |
|
||||
:params => {:sort => params[:sort], :query => params['query']} |
|
||||
%table
|
||||
%thead
|
||||
%tr
|
||||
<td #{sort_td_class_helper "date"}>
|
||||
\#{sort_link_helper "Datum", "date"}
|
||||
%td Wer
|
||||
<td #{sort_td_class_helper "note"}>
|
||||
\#{sort_link_helper "Notiz", "note"}
|
||||
<td #{sort_td_class_helper "amount"}>
|
||||
\#{sort_link_helper "Betrag", "amount"}
|
||||
%tbody
|
||||
- @financial_transactions.each do |t|
|
||||
%tr{:class => cycle("even","odd")}
|
||||
%td= format_time(t.created_on)
|
||||
%td= h t.user.nil? ? '??' : t.user.nick
|
||||
%td= h t.note
|
||||
%td.currency{:style => "color:#{t.amount < 0 ? 'red' : 'black'}; width:5em"}= number_to_currency(t.amount)
|
18
app/views/finance/financial_transactions/index.html.haml
Normal file
18
app/views/finance/financial_transactions/index.html.haml
Normal file
|
@ -0,0 +1,18 @@
|
|||
- title "Kontoauszug für #{@ordergroup.name}"
|
||||
%p
|
||||
%b
|
||||
Kontostand: #{number_to_currency(@ordergroup.account_balance)}
|
||||
%span{:style => "color:grey"}
|
||||
(zuletzt aktualisiert vor #{distance_of_time_in_words(Time.now, @ordergroup.account_updated)})
|
||||
.left_column{:style => "width:100%"}
|
||||
.box_title
|
||||
%h2 Überweisungen
|
||||
.column_content
|
||||
= form_tag finance_ordergroup_transactions_path(@ordergroup), :method => :get, :style=>"display:inline;", :id => 'ordergroup_search',
|
||||
:remote => true, 'data-submit-onchange' => true do
|
||||
%label{:for => 'article_name'} Suche in Notiz:
|
||||
= text_field_tag :query, params[:query], :size => 10
|
||||
#transactions
|
||||
= render :partial => "transactions"
|
||||
%p= link_to 'Neue Transaktion', new_finance_ordergroup_transaction_path(@ordergroup)
|
||||
= link_to 'Gruppenübersicht', finance_ordergroups_path
|
1
app/views/finance/financial_transactions/index.js.erb
Normal file
1
app/views/finance/financial_transactions/index.js.erb
Normal file
|
@ -0,0 +1 @@
|
|||
$('#transactions').html('<%= escape_javascript(render("transactions")) %>');
|
9
app/views/finance/financial_transactions/new.html.haml
Normal file
9
app/views/finance/financial_transactions/new.html.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
- title "Neue Transaktion"
|
||||
|
||||
= simple_form_for @financial_transaction, :url => finance_ordergroup_transactions_path(@ordergroup),
|
||||
:validate => true do |f|
|
||||
= f.association :ordergroup
|
||||
= f.input :amount
|
||||
= f.input :note, :as => :text
|
||||
= f.submit
|
||||
= link_to "oder abbrechen", finance_ordergroup_transactions_path(@ordergroup)
|
|
@ -0,0 +1,34 @@
|
|||
- title "Mehrer Konten aktualisieren"
|
||||
|
||||
- content_for :head do
|
||||
:javascript
|
||||
var ordergroup = "#{escape_javascript(render('ordergroup'))}"
|
||||
|
||||
$(function() {
|
||||
$('a[data-remove-transaction]').live('click', function() {
|
||||
$(this).parents('tr').remove();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a[data-add-transaction]').click(function() {
|
||||
$('#ordergroups').append(ordergroup);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
- form_tag finance_create_transaction_collection_path do
|
||||
%p
|
||||
%b Notiz
|
||||
= text_field_tag :note
|
||||
%p
|
||||
%table#ordergroups{:style => "width:20em"}
|
||||
%tr
|
||||
%th Bestellgruppe
|
||||
%th Betrag
|
||||
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
||||
|
||||
%p
|
||||
= link_to "Neue Bestellgruppe hinzufügen", '#', 'data-add-transaction' => true
|
||||
%p
|
||||
= submit_tag "Transaktionen speichern"
|
||||
= link_to "oder abbrechen", finance_ordergroups_path
|
30
app/views/finance/ordergroups/_ordergroups.html.haml
Normal file
30
app/views/finance/ordergroups/_ordergroups.html.haml
Normal file
|
@ -0,0 +1,30 @@
|
|||
%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
|
||||
%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
|
||||
%tbody
|
||||
- for ordergroup in @ordergroups
|
||||
%tr{:class => cycle('even','odd', :name => 'ordergroups')}
|
||||
%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"
|
||||
|
20
app/views/finance/ordergroups/index.html.haml
Normal file
20
app/views/finance/ordergroups/index.html.haml
Normal file
|
@ -0,0 +1,20 @@
|
|||
- 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
|
1
app/views/finance/ordergroups/index.js.erb
Normal file
1
app/views/finance/ordergroups/index.js.erb
Normal file
|
@ -0,0 +1 @@
|
|||
$('#ordergroups').html('<%= escape_javascript(render("ordergroups")) %>');
|
|
@ -1,42 +0,0 @@
|
|||
<% if @total == 0 %>
|
||||
|
||||
<p>Keine gefunden</p>
|
||||
|
||||
<% else %>
|
||||
|
||||
<p>Anzahl gefundener Transaktionen: <b><%= @total %></b></p>
|
||||
|
||||
<p>
|
||||
<%= pagination_links_remote @financial_transactions, :update => 'transactions',
|
||||
:params => {:sort => params[:sort], :query => params['query']}%>
|
||||
</p>
|
||||
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td <%= sort_td_class_helper "date" %>>
|
||||
<%= sort_link_helper "Datum", "date" %>
|
||||
</td>
|
||||
<td>Wer</td>
|
||||
<td <%= sort_td_class_helper "note" %>>
|
||||
<%= sort_link_helper "Notiz", "note" %>
|
||||
</td>
|
||||
<td <%= sort_td_class_helper "amount" %>>
|
||||
<%= sort_link_helper "Betrag", "amount" %>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @financial_transactions.each do |t| %>
|
||||
<tr class="<%= cycle("even","odd") %>">
|
||||
<td><%= format_time(t.created_on) %></td>
|
||||
<td><%=h t.user.nil? ? '??' : t.user.nick %></td>
|
||||
<td><%=h t.note %></td>
|
||||
<td style="color:<%= t.amount < 0 ? 'red' : 'black' %>; width:5em" class="currency"><%= number_to_currency(t.amount) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% end %>
|
|
@ -1,6 +0,0 @@
|
|||
%tr.transaction
|
||||
%td
|
||||
%select{:name => 'financial_transactions[][ordergroup_id]'}
|
||||
= options_for_select Ordergroup.without_deleted.all(:order => 'name').collect { |g| [ g.name, g.id ] }
|
||||
%td= text_field_tag 'financial_transactions[][amount]'
|
||||
%td= link_to_function icon(:delete), "$(this).up('.transaction').remove()", {:title => "Gruppe enfernen"}
|
|
@ -1,28 +0,0 @@
|
|||
%p
|
||||
Gefunden:
|
||||
= @total
|
||||
%p
|
||||
%table{:style => "width:100%"}
|
||||
%tr
|
||||
%td
|
||||
= pagination_links_remote @groups, :update => :ordergroups, :params => {:sort => params[:sort]}
|
||||
%td{:style => "text-align:right"}
|
||||
- if @total > 20
|
||||
= items_per_page :update => :ordergroups
|
||||
%table.list
|
||||
%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
|
||||
%tbody
|
||||
- for group in @groups
|
||||
%tr{:class => cycle('even','odd', :name => 'groups')}
|
||||
%td= group.name
|
||||
%td= group.contact
|
||||
%td{:class => "currency", :style => "width:5em"}= number_to_currency(group.account_balance)
|
||||
%td{:class => "actions"}
|
||||
= link_to image_tag("euro_new.png", :size => "16x16", :alt => "Neue Transaktion", :border => "0"), {:action => 'new', :id => group}, {:title => "Neue Transaktion"}
|
||||
= link_to image_tag("b_browse.png", :size => "16x16", :border => "0", :alt => 'Kontoauszug'), {:action => 'list', :id => group}, {:title => "Kontoauszug"}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
- title "Konten verwalten"
|
||||
%p
|
||||
%i
|
||||
Um mehrer Transaktionen auf einmal anzulegen folge bitte diesem
|
||||
= link_to _("Link"), :action => 'new_collection'
|
||||
|
||||
.left_column{:style=>"width:50em"}
|
||||
.box_title
|
||||
%h2 Bestellgruppen
|
||||
.column_content
|
||||
#group_filter
|
||||
%form{:name=>"sform", :action=>"", :style=>"display:inline;"}
|
||||
Suchen im Namen:
|
||||
= text_field_tag("query", params['query'], :size => 10 )
|
||||
|
||||
= observe_field 'query', :frequency => 2, |
|
||||
:before => "Element.show('loader')", |
|
||||
:success => "Element.hide('loader')", |
|
||||
:url => {:action => 'index'}, |
|
||||
:with => 'query', |
|
||||
:update => 'ordergroups', |
|
||||
:method => :get |
|
||||
#ordergroups
|
||||
= render :partial => "ordergroups"
|
||||
%br/
|
||||
- if @current_user.role_admin?
|
||||
= link_to "Neue Bestellgruppe anlegen", new_admin_ordergroup_path
|
|
@ -1,26 +0,0 @@
|
|||
<% title "Kontoauszug für #{@group.name}" %>
|
||||
|
||||
<p>
|
||||
<b>Kontostand: <%= number_to_currency(@group.account_balance) -%></b>
|
||||
<span style="color:grey">(zuletzt aktualisiert vor <%= distance_of_time_in_words(Time.now, @group.account_updated) -%>)</span>
|
||||
</p>
|
||||
<div class="left_column" style="width:100%">
|
||||
<div class="box_title"><h2>Überweisungen</h2></div>
|
||||
<div class="column_content">
|
||||
<form name="sform" action="" style="display:inline;">
|
||||
<label for="financial_transaction_note">in Notizen suchen: </label>
|
||||
<%= text_field_tag("query", params['query'], :size => 10 ) %>
|
||||
</form>
|
||||
<%= observe_field 'query', :frequency => 2,
|
||||
:before => "Element.show('loader')",
|
||||
:success => "Element.hide('loader')",
|
||||
:url => {:action => 'list'},
|
||||
:with => 'query',
|
||||
:update => 'transactions' %>
|
||||
<div id="transactions">
|
||||
<%= render :partial => "list" %>
|
||||
</div>
|
||||
<p><%= link_to 'Neue Transaktion', :action => 'new', :id => @group %></p>
|
||||
</div>
|
||||
<%= link_to 'Gruppenübersicht', :action => 'index' %>
|
||||
</div>
|
|
@ -1,21 +0,0 @@
|
|||
- title "Neue Transaktion"
|
||||
|
||||
.edit_form{ :style => "width:30em" }
|
||||
- form_for @financial_transaction, :url => {:action => 'create'} do |f|
|
||||
= f.error_messages
|
||||
= f.hidden_field :ordergroup_id
|
||||
%p
|
||||
Bestellgruppe:
|
||||
%b=h @group.name
|
||||
%p
|
||||
Betrag
|
||||
%br/
|
||||
= f.text_field :amount, :size => 10
|
||||
%p
|
||||
Notiz
|
||||
%br/
|
||||
= f.text_area :note, :cols => 40, :rows => 5
|
||||
%p
|
||||
= submit_tag "Speichern"
|
||||
|
|
||||
= link_to "Abbrechen", :controller => 'transactions'
|
|
@ -1,20 +0,0 @@
|
|||
- title "Mehrer Konten aktualisieren"
|
||||
|
||||
- form_tag :action => "create_collection" do
|
||||
%p
|
||||
%b Notiz
|
||||
= text_field_tag "note"
|
||||
%p
|
||||
%table#Ordergroups{:style => "width:20em"}
|
||||
%tr
|
||||
%th Bestellgruppe
|
||||
%th Betrag
|
||||
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
||||
|
||||
%p
|
||||
= link_to_function "Neue Bestellgruppe hinzufügen" do |page|
|
||||
- page.insert_html :bottom, :Ordergroups, :partial => 'ordergroup'
|
||||
%p
|
||||
= submit_tag "Transaktionen speichern"
|
||||
|
|
||||
= link_to "Abbrechen", :controller => 'finance/transactions'
|
|
@ -32,7 +32,7 @@
|
|||
%li
|
||||
Finanzbereich
|
||||
%ul
|
||||
%li= link_to "Konten aktualisieren", new_collection_finance_transactions_path
|
||||
%li= link_to "Konten aktualisieren", finance_new_transaction_collection_path
|
||||
%li= link_to "Bestellungen abrechnen", finance_root_path
|
||||
|
||||
// Administration
|
||||
|
|
|
@ -43,10 +43,10 @@
|
|||
]
|
||||
},
|
||||
{ :name => "Finanzen", :url => finance_root_path,
|
||||
:active => ["finance/invoices", "finance/transactions", "finance/balancing"],
|
||||
:active => ["finance/"],
|
||||
:access_denied? => (!u.role_finance?),
|
||||
:subnav => [
|
||||
{ :name => "Konten verwalten", :url => finance_transactions_path },
|
||||
{ :name => "Konten verwalten", :url => finance_ordergroups_path },
|
||||
{ :name => "Bestellungen abrechnen", :url => finance_balancing_path },
|
||||
{ :name => "Rechnungen", :url => finance_invoices_path }
|
||||
]
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
- content = wikified_body @page.body, @page.title
|
||||
- toc = generate_toc @page.body
|
||||
|
||||
- unless toc.blank?
|
||||
#wikitoc
|
||||
%h2
|
||||
%h2
|
||||
Inhaltsverzeichnis
|
||||
%span= link_to_function "[verstecken]", "Element.toggle('wikitoc-content')"
|
||||
#wikitoc-content= toc
|
||||
#wiki_content= content
|
||||
= content
|
|
@ -10,9 +10,6 @@
|
|||
%span.wikiSeparator >
|
||||
= @page.title
|
||||
|
||||
%h1
|
||||
= @page.title
|
||||
|
||||
#sidebar
|
||||
#sidebar-links
|
||||
= link_to "Bearbeiten", edit_page_path(@page)
|
||||
|
@ -38,7 +35,10 @@
|
|||
- for page in @page.children
|
||||
%li= link_to_wikipage(page)
|
||||
|
||||
= render :partial => 'body'
|
||||
#wiki_content
|
||||
%h1
|
||||
= @page.title
|
||||
= render :partial => 'body'
|
||||
|
||||
%hr.clear/
|
||||
%p
|
||||
|
|
|
@ -163,6 +163,7 @@ de:
|
|||
stock_article: Lagerartikel
|
||||
delivery: Lieferung
|
||||
stock_taking: Inventur
|
||||
financial_transaction: Kontotransaktion
|
||||
attributes:
|
||||
article:
|
||||
price: Nettopreis
|
||||
|
@ -215,6 +216,8 @@ de:
|
|||
email: 'E-Mail'
|
||||
note: 'Notiz'
|
||||
date: 'Datum'
|
||||
ordergroup: 'Bestellgruppe'
|
||||
amount: 'Betrag'
|
||||
workgroup:
|
||||
weekly_task: 'Monatlichen Job definieren?'
|
||||
weekday: 'Wochentag'
|
||||
|
|
|
@ -115,12 +115,12 @@ Foodsoft::Application.routes.draw do
|
|||
|
||||
resources :invoices
|
||||
|
||||
resources :transactions do
|
||||
collection do
|
||||
get :new_collection
|
||||
post :create_collection
|
||||
end
|
||||
resources :ordergroups, :only => [:index] do
|
||||
resources :financial_transactions, :as => :transactions
|
||||
end
|
||||
|
||||
get 'transactions/new_collection' => 'financial_transactions#new_collection', :as => 'new_transaction_collection'
|
||||
post 'transactions/create_collection' => 'financial_transactions#create_collection', :as => 'create_transaction_collection'
|
||||
end
|
||||
|
||||
########### Administration
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* General rules ... */
|
||||
body {
|
||||
background-color: #fff;
|
||||
background-color: white;
|
||||
color: black;
|
||||
margin: 0;
|
||||
padding: 1% 0 0 0;
|
||||
|
@ -12,7 +12,7 @@ body {
|
|||
position: fixed;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
background: #FFF;
|
||||
background: white;
|
||||
padding: 10px;
|
||||
color: black;
|
||||
border-width: 2px;
|
||||
|
@ -40,7 +40,7 @@ h1 {
|
|||
|
||||
h2 {
|
||||
font-size: 1.4em;
|
||||
margin-top: .5em; }
|
||||
margin-top: 0.5em; }
|
||||
|
||||
h3 {
|
||||
font-size: 1em;
|
||||
|
@ -53,18 +53,18 @@ abbr, acronym {
|
|||
cursor: help; }
|
||||
|
||||
input, textarea, select {
|
||||
border: 1px solid #D7D7D7;
|
||||
border: 1px solid #d7d7d7;
|
||||
font-family: verdana, arial, helvetica, sans-serif;
|
||||
font-size: 0.9em;
|
||||
padding-left: .2em;
|
||||
padding-right: .2em; }
|
||||
padding-left: 0.2em;
|
||||
padding-right: 0.2em; }
|
||||
|
||||
input:focus, textarea:focus, select:focus {
|
||||
border-color: #000; }
|
||||
border-color: black; }
|
||||
|
||||
input[type="button"], input[type="submit"], input[type="reset"] {
|
||||
background: #EEEEEE none repeat scroll 0%;
|
||||
border: 1px outset #CCCCCC;
|
||||
background: #eeeeee none repeat scroll 0%;
|
||||
border: 1px outset #cccccc;
|
||||
color: #222222;
|
||||
padding: 0.1em 0.5em;
|
||||
font-size: 1em;
|
||||
|
@ -75,18 +75,12 @@ select {
|
|||
max-width: 15em; }
|
||||
|
||||
option {
|
||||
border-top: 1px solid #D7D7D7;
|
||||
margin: .2em 0; }
|
||||
border-top: 1px solid #d7d7d7;
|
||||
margin: 0.2em 0; }
|
||||
|
||||
span.click-me {
|
||||
cursor: pointer; }
|
||||
|
||||
.left {
|
||||
float: left; }
|
||||
|
||||
.right {
|
||||
float: right; }
|
||||
|
||||
.clear {
|
||||
clear: both; }
|
||||
|
||||
|
@ -94,9 +88,6 @@ span.click-me {
|
|||
color: grey;
|
||||
font-size: 0.9em; }
|
||||
|
||||
.hidden {
|
||||
display: none; }
|
||||
|
||||
#login {
|
||||
margin: auto;
|
||||
width: 27em;
|
||||
|
@ -104,8 +95,8 @@ span.click-me {
|
|||
|
||||
#login #meta {
|
||||
margin-top: 2em;
|
||||
padding-top: .3em;
|
||||
border-top: 1px dotted #ED0606;
|
||||
padding-top: 0.3em;
|
||||
border-top: 1px dotted #ed0606;
|
||||
color: #2e2e2e; }
|
||||
|
||||
#header {
|
||||
|
@ -129,7 +120,7 @@ span.click-me {
|
|||
text-decoration: none; }
|
||||
#logo a span {
|
||||
color: #ed0606;
|
||||
background: #FFF;
|
||||
background: white;
|
||||
padding-right: 0.1em;
|
||||
font-weight: bold;
|
||||
border-top-width: 2px;
|
||||
|
@ -153,7 +144,7 @@ span.click-me {
|
|||
color: #ed0606; }
|
||||
|
||||
#main {
|
||||
background: #FFF;
|
||||
background: white;
|
||||
padding: 0;
|
||||
margin: 0 15px 0 15px; }
|
||||
|
||||
|
@ -163,14 +154,14 @@ span.click-me {
|
|||
float: right;
|
||||
padding: 2.6em 1em;
|
||||
margin: 3em 0 0 0;
|
||||
border-left: 1px dotted #ED0606;
|
||||
border-left: 1px dotted #ed0606;
|
||||
font-size: 1.2em; }
|
||||
#infobar h3 {
|
||||
color: #ED0606; }
|
||||
color: #ed0606; }
|
||||
#infobar ul {
|
||||
list-style: none; }
|
||||
#infobar li {
|
||||
margin: .3em 0 0 -3em; }
|
||||
margin: 0.3em 0 0 -3em; }
|
||||
|
||||
.menu, #start_nav {
|
||||
border: 2px solid #e3e3e3;
|
||||
|
@ -183,7 +174,7 @@ span.click-me {
|
|||
padding: 0; }
|
||||
.menu ul li, #start_nav ul li {
|
||||
border-bottom: 1px solid #dedede;
|
||||
color: #666;
|
||||
color: #666666;
|
||||
margin: 0.8em 0 0 0;
|
||||
font-weight: bold; }
|
||||
.menu ul li a:link, .menu ul li a:visited, #start_nav ul li a:link, #start_nav ul li a:visited {
|
||||
|
@ -213,14 +204,14 @@ span.click-me {
|
|||
right: 1px; }
|
||||
|
||||
#content {
|
||||
padding: .5em 0 2.5em 0;
|
||||
padding: 0.5em 0 2.5em 0;
|
||||
margin: 0;
|
||||
background: #FFF;
|
||||
background: white;
|
||||
font-size: 1.3em;
|
||||
width: 100%;
|
||||
float: left; }
|
||||
|
||||
/* *********************************** tables */
|
||||
/*********************************** tables */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
text-align: left;
|
||||
|
@ -233,35 +224,29 @@ table {
|
|||
table th {
|
||||
color: black; }
|
||||
table tr.odd, table tr.even {
|
||||
border-top: 1px solid #DDDDDD; }
|
||||
border-top: 1px solid #dddddd; }
|
||||
table tr.odd, table tr.odd input {
|
||||
background-color: #F6F6F6; }
|
||||
background-color: #f6f6f6; }
|
||||
table tr.even {
|
||||
background-color: #FBFBFB; }
|
||||
background-color: #fbfbfb; }
|
||||
table tr.unavailable, table tr.unavailable a {
|
||||
color: grey; }
|
||||
table tr.unavailable a:hover {
|
||||
color: #ED0606; }
|
||||
color: #ed0606; }
|
||||
table tr.just_updated {
|
||||
color: #008000; }
|
||||
color: green; }
|
||||
table tr.selected, table tr.active {
|
||||
background-color: #ffffc2; }
|
||||
table tr.click-me, table td.click-me {
|
||||
table tr.click-me {
|
||||
cursor: pointer; }
|
||||
table tr.ignored {
|
||||
color: grey; }
|
||||
table tr.success {
|
||||
color: green; }
|
||||
table tr.failed {
|
||||
color: red; }
|
||||
|
||||
table.list tr {
|
||||
border: 1px solid #e3e3e3; }
|
||||
table.list tbody tr:hover {
|
||||
background-color: #EEEEDD; }
|
||||
background-color: #eeeedd; }
|
||||
|
||||
table tfoot tr {
|
||||
background-color: #fff; }
|
||||
background-color: white; }
|
||||
table tfoot tr td {
|
||||
padding-top: 0.8em; }
|
||||
|
||||
|
@ -272,16 +257,16 @@ tr.edit_inline {
|
|||
|
||||
div.legend, div.legend table th {
|
||||
color: grey;
|
||||
font-size: .8em;
|
||||
font-size: 0.8em;
|
||||
background: none; }
|
||||
|
||||
form table {
|
||||
border: none; }
|
||||
|
||||
table.ordered_articles {
|
||||
background-color: #fff; }
|
||||
background-color: white; }
|
||||
table.ordered_articles tbody tr:hover {
|
||||
background-color: #EEEEDD; }
|
||||
background-color: #eeeedd; }
|
||||
table.ordered_articles a {
|
||||
display: block; }
|
||||
table.ordered_articles tr.results:hover {
|
||||
|
@ -315,7 +300,7 @@ div.edit_form {
|
|||
top: 5em;
|
||||
left: 10em;
|
||||
width: 55em;
|
||||
background: #FBFBFB;
|
||||
background: #fbfbfb;
|
||||
padding: 3em;
|
||||
padding-top: 1em;
|
||||
border-width: 3px;
|
||||
|
@ -347,7 +332,7 @@ div.box_title {
|
|||
background: #78b74e;
|
||||
padding: 5px 10px; }
|
||||
div.box_title h2, div.box_title h2 a {
|
||||
color: #FFF;
|
||||
color: white;
|
||||
margin: 0; }
|
||||
div.box_title h2 {
|
||||
font-size: 1.3em; }
|
||||
|
@ -382,7 +367,7 @@ span.used, span.unused {
|
|||
font-weight: bold; }
|
||||
|
||||
span.used {
|
||||
color: #008000; }
|
||||
color: green; }
|
||||
|
||||
span.unused {
|
||||
color: #ed0606; }
|
||||
|
@ -393,91 +378,41 @@ span.total {
|
|||
table#order {
|
||||
text-align: center; }
|
||||
table#order input {
|
||||
font-size: 0.9em;
|
||||
font-weight: bolder;
|
||||
background-color: #78B74E;
|
||||
color: #fff;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
padding: 0; }
|
||||
font-size: 80%; }
|
||||
table#order th#col_required, table#order th#col_tolerance {
|
||||
width: 140px; }
|
||||
width: 145px; }
|
||||
table#order th#col_packages, table#order th#col_left_units {
|
||||
width: 50px; }
|
||||
table#order td.quantity, table#order td.tolerance {
|
||||
text-align: right; }
|
||||
table#order td#col_left_units {
|
||||
color: #ed0606; }
|
||||
table#order td {
|
||||
padding: 0.6em; }
|
||||
table#order td.name {
|
||||
table#order td.name, table#order tr.note td {
|
||||
text-align: left;
|
||||
padding-left: 10px; }
|
||||
table#order tfoot tr {
|
||||
background-color: #e4eed6; }
|
||||
table#order tfoot td {
|
||||
padding-right: 10px; }
|
||||
|
||||
#order-footer, .article-info {
|
||||
text-align: left;
|
||||
z-index: 1;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
background-color: #E4EED6;
|
||||
border-top: 2px solid #78B74E; }
|
||||
#order-footer #total-sum, .article-info #total-sum {
|
||||
width: 22em;
|
||||
margin: .5em 2em 0 0;
|
||||
float: right; }
|
||||
#order-footer #total-sum #order-button, .article-info #total-sum #order-button {
|
||||
margin: .5em 0; }
|
||||
#order-footer #total-sum #order-button input, .article-info #total-sum #order-button input {
|
||||
background-color: #78B74E;
|
||||
color: #fff;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px; }
|
||||
#order-footer #total-sum #order-button input:disabled, .article-info #total-sum #order-button input:disabled {
|
||||
background-color: red; }
|
||||
|
||||
#order-footer {
|
||||
width: 100%;
|
||||
right: 0;
|
||||
left: 0; }
|
||||
|
||||
.article-info {
|
||||
z-index: 2;
|
||||
width: 45em;
|
||||
height: 8em;
|
||||
border: none;
|
||||
left: 30px; }
|
||||
.article-info h3 {
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
margin-bottom: 5px;
|
||||
width: 100%; }
|
||||
.article-info .right {
|
||||
width: 35%; }
|
||||
.article-info .left {
|
||||
width: 60%; }
|
||||
|
||||
tr.order-article .article-info {
|
||||
display: none; }
|
||||
|
||||
tr.order-article:hover .article-info {
|
||||
display: block; }
|
||||
table#order tr.note {
|
||||
background-color: #fbfbfb;
|
||||
font-size: 0.9em;
|
||||
border-bottom: 1px solid #dddddd; }
|
||||
table#order tr.note td {
|
||||
padding-left: 20px; }
|
||||
|
||||
#newComment {
|
||||
margin: 1em; }
|
||||
|
||||
.comment {
|
||||
border-bottom: 1px dotted black;
|
||||
padding: .5em 0 1em .5em; }
|
||||
padding: 0.5em 0 1em 0.5em; }
|
||||
.comment .timestamp {
|
||||
font-size: 0.8em;
|
||||
color: grey; }
|
||||
|
||||
#editOrderNav a {
|
||||
color: #fff;
|
||||
color: white;
|
||||
font-weight: bold; }
|
||||
#editOrderNav ul {
|
||||
margin: 0;
|
||||
|
@ -511,35 +446,34 @@ ul.autocomplete .informal {
|
|||
.stats-bar {
|
||||
height: 20px;
|
||||
min-width: 10px;
|
||||
border: 1px solid #DDDDDD;
|
||||
background-color: #fff;
|
||||
border: 1px solid #dddddd;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
margin: 0 10px 10px 0; }
|
||||
|
||||
#wiki_content {
|
||||
border-style: none;
|
||||
color: black;
|
||||
line-height: 1.5em; }
|
||||
|
||||
.wiki_show, .wiki_version, .wiki_new, .wiki_edit, .wiki_all {
|
||||
margin-top: 30px;
|
||||
padding: 10px; }
|
||||
.wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 {
|
||||
padding-left: 0;
|
||||
padding-top: 10px;
|
||||
border-bottom-style: solid; }
|
||||
.wiki_show .column_content, .wiki_version .column_content, .wiki_new .column_content, .wiki_edit .column_content, .wiki_all .column_content {
|
||||
margin-bottom: 0; }
|
||||
|
||||
#wiki_content {
|
||||
border: 1px solid grey;
|
||||
margin-right: 300px;
|
||||
padding: 10px;
|
||||
color: black;
|
||||
line-height: 1.5em;
|
||||
min-height: 400px; }
|
||||
#wiki_content span.editsection {
|
||||
display: none; }
|
||||
#wiki_content h1 {
|
||||
padding-left: 0;
|
||||
padding-top: 10px;
|
||||
border: none;
|
||||
margin-bottom: 10px; }
|
||||
#wiki_content h2, #wiki_content h3, #wiki_content h4, #wiki_content h5, #wiki_content h6 {
|
||||
background: transparent none repeat scroll 0 0;
|
||||
border-bottom: 1px solid #AAAAAA;
|
||||
padding-bottom: 0,17em;
|
||||
padding-top: 0,5em;
|
||||
border-bottom: 1px solid #aaaaaa;
|
||||
padding-bottom: 0, 17em;
|
||||
padding-top: 0, 5em;
|
||||
font-weight: normal;
|
||||
font-size: 150%;
|
||||
color: black; }
|
||||
|
@ -559,6 +493,8 @@ ul.autocomplete .informal {
|
|||
margin: 0.3em 0 0 3.2em;
|
||||
padding: 0;
|
||||
list-style-image: none; }
|
||||
#wiki_content li {
|
||||
margin-bottom: 0.1em; }
|
||||
|
||||
a.new_wiki_link {
|
||||
color: grey; }
|
||||
|
@ -581,10 +517,10 @@ a.new_wiki_link {
|
|||
color: grey; }
|
||||
|
||||
#breadcrump {
|
||||
font-size: 0.8em;
|
||||
margin-bottom: 3px;
|
||||
font-size: 0.5em;
|
||||
margin-bottom: 5px;
|
||||
height: 1em;
|
||||
color: #ED0606; }
|
||||
color: #ed0606; }
|
||||
#breadcrump a {
|
||||
color: #ed0606;
|
||||
text-decoration: none; }
|
||||
|
@ -593,8 +529,7 @@ a.new_wiki_link {
|
|||
|
||||
#sidebar {
|
||||
float: right;
|
||||
width: 290px;
|
||||
margin-top: -60px; }
|
||||
width: 290px; }
|
||||
#sidebar #sidebar-links {
|
||||
margin-bottom: 18px;
|
||||
text-align: right; }
|
||||
|
|
|
@ -516,25 +516,24 @@ ul.autocomplete .informal {
|
|||
text-align: center;
|
||||
margin: 0 10px 10px 0; }
|
||||
|
||||
#wiki_content {
|
||||
border-style: none;
|
||||
color: black;
|
||||
line-height: 1.5em; }
|
||||
|
||||
.wiki_show, .wiki_version, .wiki_new, .wiki_edit, .wiki_all {
|
||||
margin-top: 30px;
|
||||
padding: 10px; }
|
||||
.wiki_show h1, .wiki_version h1, .wiki_new h1, .wiki_edit h1, .wiki_all h1 {
|
||||
padding-left: 0;
|
||||
padding-top: 10px;
|
||||
border-bottom-style: solid; }
|
||||
.wiki_show .column_content, .wiki_version .column_content, .wiki_new .column_content, .wiki_edit .column_content, .wiki_all .column_content {
|
||||
margin-bottom: 0; }
|
||||
|
||||
#wiki_content {
|
||||
border: 1px solid grey;
|
||||
margin-right: 300px;
|
||||
padding: 10px;
|
||||
color: black;
|
||||
line-height: 1.5em;
|
||||
min-height: 400px; }
|
||||
#wiki_content span.editsection {
|
||||
display: none; }
|
||||
#wiki_content h1 {
|
||||
padding-left: 0;
|
||||
padding-top: 10px;
|
||||
border: none;
|
||||
margin-bottom: 10px; }
|
||||
#wiki_content h2, #wiki_content h3, #wiki_content h4, #wiki_content h5, #wiki_content h6 {
|
||||
background: transparent none repeat scroll 0 0;
|
||||
border-bottom: 1px solid #AAAAAA;
|
||||
|
@ -593,8 +592,7 @@ a.new_wiki_link {
|
|||
|
||||
#sidebar {
|
||||
float: right;
|
||||
width: 290px;
|
||||
margin-top: -60px; }
|
||||
width: 290px; }
|
||||
#sidebar #sidebar-links {
|
||||
margin-bottom: 18px;
|
||||
text-align: right; }
|
||||
|
|
599
public/stylesheets/sass/main.sass
Normal file
599
public/stylesheets/sass/main.sass
Normal file
|
@ -0,0 +1,599 @@
|
|||
// colors which are used in the foodsoft
|
||||
$main_red: #ED0606
|
||||
$hover_yellow: #ffff72
|
||||
$boxContent: #e4eed6
|
||||
$lightGrey: #efefef
|
||||
$darkGreen: #78b74e
|
||||
$lightGreen: #e4eed6
|
||||
|
||||
/* General rules ... */
|
||||
body
|
||||
:background-color #fff
|
||||
:color black
|
||||
:margin 0
|
||||
:padding 1% 0 0 0
|
||||
:min-width 990px
|
||||
:font-size 62.5%
|
||||
:font-family verdana, arial, sans-serif
|
||||
|
||||
#loader
|
||||
:position fixed
|
||||
:top 1px
|
||||
:right 1px
|
||||
:background #FFF
|
||||
:padding 10px
|
||||
:color black
|
||||
:border
|
||||
:width 2px
|
||||
:style solid
|
||||
:color $main_red
|
||||
|
||||
a, a:visited
|
||||
:text-decoration underline
|
||||
:color black
|
||||
|
||||
a:hover
|
||||
:color $main_red
|
||||
|
||||
h1, h2
|
||||
:color $main_red
|
||||
|
||||
h1
|
||||
:font-size 2.2em
|
||||
:line-height 0.8em
|
||||
:padding 1em 0 5px 5%
|
||||
:margin 0 0 1em 0
|
||||
:border-bottom
|
||||
:width 1px
|
||||
:style dotted
|
||||
:color $main_red
|
||||
|
||||
h2
|
||||
:font-size 1.4em
|
||||
:margin-top .5em
|
||||
|
||||
h3
|
||||
:font-size 1em
|
||||
:margin-top 1.5em
|
||||
|
||||
input
|
||||
:color #2e2e2e
|
||||
|
||||
abbr, acronym
|
||||
:cursor help
|
||||
|
||||
input, textarea, select
|
||||
border: 1px solid #D7D7D7
|
||||
font-family: verdana, arial, helvetica, sans-serif
|
||||
font-size: 0.9em
|
||||
padding-left: .2em
|
||||
padding-right: .2em
|
||||
|
||||
input:focus, textarea:focus, select:focus
|
||||
border-color: #000
|
||||
|
||||
input[type="button"], input[type="submit"], input[type="reset"]
|
||||
background: #EEEEEE none repeat scroll 0%
|
||||
border: 1px outset #CCCCCC
|
||||
color: #222222
|
||||
padding: 0.1em 0.5em
|
||||
font-size: 1em
|
||||
font-weight: bold
|
||||
min-width: 34px
|
||||
|
||||
select
|
||||
max-width: 15em
|
||||
|
||||
option
|
||||
border-top: 1px solid #D7D7D7
|
||||
margin: .2em 0
|
||||
|
||||
span.click-me
|
||||
cursor: pointer
|
||||
|
||||
.clear
|
||||
clear: both
|
||||
|
||||
.description
|
||||
color: grey
|
||||
font-size: 0.9em
|
||||
|
||||
// ********************************* loginpage
|
||||
#login
|
||||
:margin auto
|
||||
:width 27em
|
||||
:font-size 1.2em
|
||||
|
||||
#login #meta
|
||||
:margin-top 2em
|
||||
:padding-top .3em
|
||||
:border-top 1px dotted #ED0606
|
||||
:color #2e2e2e
|
||||
|
||||
|
||||
// ******************************** - Logo - head
|
||||
#header
|
||||
:margin 0
|
||||
:padding 0
|
||||
|
||||
|
||||
#logo
|
||||
:background $main_red
|
||||
:height 1.1em
|
||||
:width 8em
|
||||
:padding 0 20px
|
||||
:text-align left
|
||||
:line-height 54px
|
||||
:font-size 54px
|
||||
:overflow hidden
|
||||
:letter-spacing -3px
|
||||
:margin 0
|
||||
a, a:hover
|
||||
:color white
|
||||
:background-color $main_red
|
||||
:text-decoration none
|
||||
a span
|
||||
:color $main_red
|
||||
:background #FFF
|
||||
:padding-right 0.1em
|
||||
:font-weight bold
|
||||
:border-top
|
||||
:width 2px
|
||||
:style dotted
|
||||
:color $main_red
|
||||
|
||||
#logininfo
|
||||
:position absolute
|
||||
:top 3px
|
||||
:right 10px
|
||||
:font-size 1em
|
||||
ul
|
||||
:list-style none
|
||||
li
|
||||
:margin 0 0 0 5px
|
||||
:float left
|
||||
a
|
||||
:color #737272
|
||||
:font-weight bold
|
||||
a:hover
|
||||
:color $main_red
|
||||
|
||||
// ************************************* box structure
|
||||
#main
|
||||
:background #FFF
|
||||
:padding 0
|
||||
:margin 0 15px 0 15px
|
||||
|
||||
// ************************************* infobar
|
||||
#infobar
|
||||
:width 10%
|
||||
:min-width 5em
|
||||
:float right
|
||||
:padding 2.6em 1em
|
||||
:margin 3em 0 0 0
|
||||
:border-left 1px dotted #ED0606
|
||||
:font-size 1.2em
|
||||
h3
|
||||
:color #ED0606
|
||||
ul
|
||||
:list-style none
|
||||
li
|
||||
:margin .3em 0 0 -3em
|
||||
|
||||
// ************************************ embedded menu
|
||||
.menu, #start_nav
|
||||
:border 2px solid #e3e3e3
|
||||
:background #f5f5f5
|
||||
:padding 0 10px 0px 5px
|
||||
:float left
|
||||
|
||||
ul
|
||||
:list-style-type none
|
||||
:margin 0 0 0.2em 0
|
||||
:padding 0
|
||||
|
||||
li
|
||||
:border-bottom 1px solid #dedede
|
||||
:color #666
|
||||
:margin 0.8em 0 0 0
|
||||
:font-weight bold
|
||||
a:link, a:visited
|
||||
:display block
|
||||
:padding 0.25em 1em
|
||||
:text-decoration none
|
||||
:width 12em
|
||||
a:hover, a:focus
|
||||
:background-color #e3e3e3
|
||||
|
||||
ul
|
||||
:margin 0
|
||||
:padding 0
|
||||
li
|
||||
:border-top 1px solid #dedede
|
||||
:border-bottom none
|
||||
:margin 0
|
||||
:font-weight normal
|
||||
a:link, a:visited
|
||||
:width 11.5em
|
||||
:padding 0 1em 0.1em 1.5em
|
||||
:font-weight normal
|
||||
:text-decoration none
|
||||
.menu
|
||||
:position absolute
|
||||
:top 100px
|
||||
:right 1px
|
||||
|
||||
// ************************************** content
|
||||
#content
|
||||
:padding .5em 0 2.5em 0
|
||||
:margin 0
|
||||
:background #FFF
|
||||
:font-size 1.3em
|
||||
:width 100%
|
||||
:float left
|
||||
|
||||
|
||||
/************************************ tables
|
||||
table
|
||||
:border-collapse collapse
|
||||
// border2px solid #e3e3e3
|
||||
:text-align left
|
||||
:width 100%
|
||||
:margin 0
|
||||
|
||||
thead th, tbody td, th, td
|
||||
:padding 0.3em
|
||||
|
||||
thead tr
|
||||
:background-color #efefef
|
||||
th
|
||||
:color black
|
||||
tr.odd, tr.even
|
||||
:border-top 1px solid #DDDDDD
|
||||
tr.odd, tr.odd input
|
||||
:background-color #F6F6F6
|
||||
tr.even
|
||||
:background-color #FBFBFB
|
||||
tr.unavailable, tr.unavailable a
|
||||
:color grey
|
||||
tr.unavailable a:hover
|
||||
:color #ED0606
|
||||
tr.just_updated
|
||||
:color #008000
|
||||
tr.selected, tr.active
|
||||
:background-color #ffffc2
|
||||
tr.click-me
|
||||
:cursor pointer
|
||||
|
||||
table.list
|
||||
//:border 2px solid #78b74e
|
||||
tr
|
||||
:border 1px solid #e3e3e3
|
||||
tbody tr:hover
|
||||
:background-color #EEEEDD
|
||||
|
||||
table tfoot tr
|
||||
:background-color #fff
|
||||
td
|
||||
:padding-top 0.8em
|
||||
|
||||
tr.edit_inline
|
||||
:background-color $hover_yellow
|
||||
td, span
|
||||
:padding 0.5em 0.2em
|
||||
|
||||
div.legend, div.legend table th
|
||||
:color grey
|
||||
:font-size .8em
|
||||
:background none
|
||||
|
||||
form table
|
||||
:border none
|
||||
|
||||
table.ordered_articles
|
||||
:background-color #fff
|
||||
tbody tr:hover
|
||||
:background-color #EEEEDD
|
||||
a
|
||||
:display block
|
||||
tr.results:hover
|
||||
:background-color none
|
||||
table
|
||||
tfoot
|
||||
:font-weight bold
|
||||
|
||||
td.currency, td.actions
|
||||
:text-align right
|
||||
:padding-right 0.5em
|
||||
td.closed
|
||||
background: url(/images/arrow_right_red.png) no-repeat center left
|
||||
a
|
||||
display: block
|
||||
text-decoration: none
|
||||
padding-left: 20px
|
||||
td.open
|
||||
background: url(/images/arrow_down_red.png) no-repeat center left
|
||||
|
||||
// ************************************* for edit formulars */
|
||||
div.edit_form
|
||||
:border 2px solid #e3e3e3
|
||||
:background #f5f5f5
|
||||
:padding 0 0.8em 0.8em 0.8em
|
||||
:margin 5px 0
|
||||
:color black
|
||||
|
||||
#edit_article, #edit_box, #ajax_box
|
||||
:position fixed
|
||||
:top 5em
|
||||
:left 10em
|
||||
:width 55em
|
||||
:background #FBFBFB
|
||||
:padding 3em
|
||||
:padding-top 1em
|
||||
:border
|
||||
:width 3px
|
||||
:style solid
|
||||
:color $main_red
|
||||
|
||||
// ***************************************** other boxes */
|
||||
|
||||
// *********boxes in columns ****/
|
||||
div.box
|
||||
:border-left 2px solid #78b74e
|
||||
:padding-left 5px
|
||||
|
||||
div.single_column
|
||||
:width 100%
|
||||
|
||||
div.left_column
|
||||
:width 40%
|
||||
:float left
|
||||
|
||||
div.middle_column
|
||||
:width 40%
|
||||
:margin-left 10px
|
||||
:float left
|
||||
|
||||
div.right_column
|
||||
:margin-bottom 3em
|
||||
:width 55%
|
||||
:float right
|
||||
|
||||
// *********** content of boxes ******/
|
||||
|
||||
div.box_title
|
||||
:background #78b74e
|
||||
:padding 5px 10px
|
||||
|
||||
h2, h2 a
|
||||
:color #FFF
|
||||
:margin 0
|
||||
h2
|
||||
:font-size 1.3em
|
||||
|
||||
div.column_content
|
||||
:background $boxContent
|
||||
:color black
|
||||
:padding 10px
|
||||
margin-bottom: 2em
|
||||
h2
|
||||
:color black
|
||||
:font-size 1.3em
|
||||
:margin 1em 0 0 0
|
||||
#links
|
||||
:float right
|
||||
|
||||
// for special pages
|
||||
// index-page
|
||||
|
||||
|
||||
|
||||
|
||||
// * article show
|
||||
tr.current_price
|
||||
:background #cdee9e
|
||||
|
||||
|
||||
// **** maybe later for the very little spinner
|
||||
li.check div.spinner
|
||||
:display block
|
||||
:height 5px
|
||||
:width 21px
|
||||
:background-image url(/images/dots-white.gif)
|
||||
:line-height 16px
|
||||
:float left
|
||||
:margin-right 5px
|
||||
:background-position center center
|
||||
:background-repeat no-repeat
|
||||
|
||||
|
||||
// ************************************* the order page */
|
||||
span.used, span.unused
|
||||
:font-weight bold
|
||||
span.used
|
||||
:color #008000
|
||||
span.unused
|
||||
:color #ed0606
|
||||
span.total
|
||||
:font-size 80%
|
||||
table#order
|
||||
:text-align center
|
||||
input
|
||||
:font-size 80%
|
||||
th#col_required, th#col_tolerance
|
||||
:width 145px
|
||||
th#col_packages, th#col_left_units
|
||||
:width 50px
|
||||
td#col_left_units
|
||||
:color #ed0606
|
||||
td
|
||||
:padding 0.6em
|
||||
td.name, tr.note td
|
||||
:text-align left
|
||||
:padding-left 10px
|
||||
tfoot
|
||||
tr
|
||||
:background-color $lightGreen
|
||||
td
|
||||
:padding-right 10px
|
||||
tr.note
|
||||
:background-color #FBFBFB
|
||||
:font-size 0.9em
|
||||
:border-bottom 1px solid #DDDDDD
|
||||
td
|
||||
:padding-left 20px
|
||||
|
||||
// ********* Comments
|
||||
#newComment
|
||||
:margin 1em
|
||||
.comment
|
||||
:border-bottom 1px dotted black
|
||||
:padding .5em 0 1em .5em
|
||||
.timestamp
|
||||
:font-size 0.8em
|
||||
:color grey
|
||||
|
||||
// *************** Clearing Order Page ..
|
||||
#editOrderNav
|
||||
a
|
||||
:color #fff
|
||||
:font-weight bold
|
||||
ul
|
||||
:margin 0
|
||||
:padding 0
|
||||
li
|
||||
:display inline
|
||||
:list-style none
|
||||
:margin-right 1em
|
||||
|
||||
// *************** Tasks ...
|
||||
.accepted
|
||||
color: green
|
||||
font-weight: bold
|
||||
.done, .done a, .done .accepted
|
||||
color: grey
|
||||
font-weight: normal
|
||||
|
||||
// ************** auto_complete
|
||||
ul.autocomplete
|
||||
.nick, .informal
|
||||
margin: auto
|
||||
.nick
|
||||
font-weight: bold
|
||||
.informal
|
||||
color: grey
|
||||
margin-left: 1em
|
||||
|
||||
// ******* to navigate easy to the next element, e.g. next order
|
||||
#element_navigation
|
||||
position: relative
|
||||
top: -1em
|
||||
left: 5%
|
||||
|
||||
// group stats
|
||||
.stats-bar
|
||||
height: 20px
|
||||
min-width: 10px
|
||||
border: 1px solid #DDDDDD
|
||||
background-color: #fff
|
||||
text-align: center
|
||||
margin: 0 10px 10px 0
|
||||
|
||||
// *** wiki
|
||||
.wiki_show, .wiki_version, .wiki_new, .wiki_edit, .wiki_all
|
||||
margin-top: 30px
|
||||
padding: 10px
|
||||
.column_content
|
||||
|
||||
#wiki_content
|
||||
border: 1px solid grey
|
||||
margin-right: 300px
|
||||
padding: 10px
|
||||
color: black
|
||||
line-height: 1.5em
|
||||
min-height: 400px
|
||||
span.editsection
|
||||
display: none
|
||||
h1
|
||||
padding-left: 0
|
||||
padding-top: 10px
|
||||
border: none
|
||||
margin-bottom: 10px
|
||||
h2, h3, h4, h5, h6
|
||||
background: transparent none repeat scroll 0 0
|
||||
border-bottom: 1px solid #AAAAAA
|
||||
padding-bottom: 0,17em
|
||||
padding-top: 0,5em
|
||||
font-weight: normal
|
||||
font-size: 150%
|
||||
color: black
|
||||
h3, h4, h5, h6
|
||||
border-bottom: medium none
|
||||
font-weight: bold
|
||||
h3
|
||||
font-size: 132%
|
||||
h4
|
||||
font-size: 116%
|
||||
ul
|
||||
line-height: 1.5em
|
||||
margin: 0.3em 0 0 1.5em
|
||||
padding: 0
|
||||
ol
|
||||
line-height: 1.5em
|
||||
margin: 0.3em 0 0 3.2em
|
||||
padding: 0
|
||||
list-style-image: none
|
||||
li
|
||||
margin-bottom: 0.1em
|
||||
|
||||
a.new_wiki_link
|
||||
color: grey
|
||||
#preview
|
||||
border: 1px dotted grey
|
||||
padding: 0 1em
|
||||
#wikitoc
|
||||
padding: 5px
|
||||
margin-bottom: 2em
|
||||
width: 25em
|
||||
border: 1px solid grey
|
||||
background-color: $lightGrey
|
||||
h2
|
||||
font-size: 1em
|
||||
color: black
|
||||
span a
|
||||
font-size: 0.5em
|
||||
color: grey
|
||||
|
||||
#breadcrump
|
||||
font-size: 0.5em
|
||||
margin-bottom: 5px
|
||||
height: 1em
|
||||
color: #ED0606
|
||||
a
|
||||
:color $main_red
|
||||
:text-decoration none
|
||||
a:hover
|
||||
:text-decoration underline
|
||||
#sidebar
|
||||
float: right
|
||||
width: 290px
|
||||
#sidebar-links
|
||||
margin-bottom: 18px
|
||||
text-align: right
|
||||
#subpages
|
||||
border: 1px solid #78b74e
|
||||
margin-top: 10px
|
||||
padding: 0 0 0 0
|
||||
#versions
|
||||
margin-top: 10px
|
||||
border: 1px solid #78b74e
|
||||
|
||||
#wiki-syntax-help
|
||||
float: right
|
||||
table
|
||||
border-color: #78b74e
|
||||
|
||||
.wiki_version
|
||||
#sidebar
|
||||
margin-top: -23px
|
||||
border: 1px solid #78b74e
|
|
@ -0,0 +1,8 @@
|
|||
require 'test_helper'
|
||||
|
||||
class Finance::FinancialTransactionsControllerTest < ActionController::TestCase
|
||||
# Replace this with your real tests.
|
||||
test "the truth" do
|
||||
assert true
|
||||
end
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class Finance::TransactionsControllerTest < ActionController::TestCase
|
||||
class Finance::OrdergroupsControllerTest < ActionController::TestCase
|
||||
# Replace this with your real tests.
|
||||
test "the truth" do
|
||||
assert true
|
4
test/unit/helpers/finance/ordergroups_helper_test.rb
Normal file
4
test/unit/helpers/finance/ordergroups_helper_test.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
require 'test_helper'
|
||||
|
||||
class Finance::OrdergroupsHelperTest < ActionView::TestCase
|
||||
end
|
Loading…
Reference in a new issue