bookyt_salary 0.17.0 → 0.17.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ class SalariesController < InvoicesController
5
5
 
6
6
  # Filter/Search
7
7
  # =============
8
- has_scope :by_state, :default => nil
8
+ has_scope :invoice_state, :default => nil
9
9
  has_scope :by_value_period, :using => [:from, :to], :default => proc { |c| c.session[:has_scope] }
10
10
  has_scope :by_employee_id
11
11
 
@@ -9,6 +9,7 @@
9
9
  .span6= f.input :duration_to, :as => :date_field
10
10
  .row-fluid
11
11
  .span12= f.input :text, :input_html => {:rows => 4}
12
+ .row-fluid
12
13
  .span12= f.input :remarks, :input_html => {:rows => 4}
13
14
 
14
15
  = render 'line_items/list_form', :f => f, :invoice => resource
@@ -1,11 +1,4 @@
1
- - unless @salary_sidebar
2
- - @salary_sidebar = true
3
-
4
- - content_for :sidebar do
5
- .sub-tabs
6
- %h3 Filter
7
- %ul.pager
8
- %li= link_to t('bookyt.all'), url_for(params.merge(:by_state => 'all', :overdue => nil))
9
- - for state in Salary::STATES
10
- %li= link_to t(state, :scope => 'invoice.state'), url_for(params.merge(:by_state => state, :overdue => nil))
11
- %li= link_to t(:overdue, :scope => 'invoice.state'), url_for(params.merge(:by_state => nil, :overdue => true))
1
+ - filter_name = :invoice_state
2
+ - params[filter_name] ||= 'all'
3
+ - content_for :sidebar do
4
+ = boot_nav_filter(filter_name, ['all'] + Salary::STATES)
@@ -2,8 +2,10 @@
2
2
 
3
3
  = simple_form_for @salary, :url => new_salary_path, :method => :get do |f|
4
4
  .row-fluid
5
- .span6= f.input :employee, :as => :combobox
5
+ .span12
6
+ =f.association :employee, :as => :combobox
6
7
  .row-fluid
7
- .span6= f.input :duration_from, :as => :date_field
8
+ .span12
9
+ = f.input :duration_from, :as => :date_field
8
10
 
9
11
  = f.button :submit
@@ -8,13 +8,13 @@
8
8
  - credit_accounts = bookings.select('credit_account_id').group('credit_account_id').map{|account| account.credit_account}
9
9
  - debit_accounts = bookings.select('debit_account_id').group('debit_account_id').map{|account| account.debit_account}
10
10
  - accounts = (credit_accounts + debit_accounts).uniq
11
-
12
- %ul.tabs
13
- %li.active= link_to t_model, '#tab-main'
14
- - accounts.each do |account|
15
- %li= link_to account.to_s, "#tab-account-#{account.id}"
11
+ .tabbable
12
+ %ul.nav.nav-tabs
13
+ %li.active= link_to t_model, '#tab-main', {:data => {:toggle => 'tab'}}
14
+ - accounts.each do |account|
15
+ %li= link_to account.to_s, "#tab-account-#{account.id}", {:data => {:toggle => 'tab'}}
16
16
 
17
17
  .tab-content
18
- #tab-main.active= render "form"
18
+ #tab-main.tab-pane.active= render "form"
19
19
  - accounts.each do |account|
20
20
  %div.tab-pane{:id => "tab-account-#{account.id}"}= render 'direct_bookings/show', :reference => resource, :direct_account => account
@@ -3,8 +3,8 @@
3
3
  .span6= f.input :title, :input_html => {"data-autofocus" => true}
4
4
  .span6= f.input :code
5
5
  .row-fluid
6
- .span6= f.input :credit_account, :as => :combobox, :collection => accounts_as_collection
7
- .span6= f.input :debit_account, :as => :combobox, :collection => accounts_as_collection
6
+ .span6= f.association :credit_account, :as => :combobox, :collection => accounts_as_collection
7
+ .span6= f.association :debit_account, :as => :combobox, :collection => accounts_as_collection
8
8
  .row-fluid
9
9
  .span6= f.input :amount
10
10
  .span6= f.input :amount_relates_to, :collection => amount_relates_to_collection
@@ -15,6 +15,6 @@
15
15
  .span12= f.input :include_in_saldo_list
16
16
 
17
17
  .row-fluid
18
- .span6= f.input :salary_declaration_code
18
+ .span12= f.input :salary_declaration_code
19
19
 
20
20
  = f.button :submit
@@ -1,7 +1,7 @@
1
1
  = simple_form_for @salary_template do |f|
2
2
  .row-fluid
3
3
  .span6= f.input :title, :input_html => {"data-autofocus" => true}
4
- .span6= f.input :person, :as => :combobox, :collection => Employee.all
4
+ .span6= f.association :person, :as => :combobox, :collection => Employee.all
5
5
  .row-fluid
6
6
  .span12= f.input :remarks, :input_html => {:rows => 2}
7
7
 
@@ -1,3 +1,3 @@
1
1
  module BookytSalary
2
- VERSION = '0.17.0'
2
+ VERSION = '0.17.2'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookyt_salary
3
3
  version: !ruby/object:Gem::Version
4
- hash: 91
4
+ hash: 95
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 17
9
- - 0
10
- version: 0.17.0
9
+ - 2
10
+ version: 0.17.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Simon H\xC3\xBCrlimann (CyT)"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-03 00:00:00 Z
18
+ date: 2012-04-04 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails