bookyt_salary 0.10.2 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ module BookytSalary
2
+ module Employee
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ has_many :salary_templates, :foreign_key => :person_id
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,6 @@
1
+ .contextual
2
+ = link_to t_action('new', Salary), select_employee_salaries_path(:salary => {:employee_id => @employee.id}), :class => "icon icon-add"
3
+ %h2= t_model SalaryTemplate
4
+
5
+ - @salary_template = @employee.salary_templates.first
6
+ = render 'salary_templates/form'
@@ -1,7 +1,7 @@
1
1
  = f.inputs t_title(:list, SalaryItem) do
2
2
  %table#salary_items
3
3
  %thead
4
- = render 'salary_items/list_header'
4
+ = render 'salary_items/list_header', :template => f.object
5
5
  %tbody
6
6
  = f.fields_for :salary_items do |salary_item|
7
- = render 'salary_items/form', :salary_item => salary_item
7
+ = render 'salary_items/form', :salary_item => salary_item, :template => f.object
@@ -4,4 +4,4 @@
4
4
  %th{:style => 'padding: 2px; width: 3em'}= t_attr(:times, SalaryItem)
5
5
  %th{:style => 'padding: 2px; width: 3em'}= t_attr(:price, SalaryItem)
6
6
  %th
7
- %th.action_links= link_to t_action(:more), [:new_salary_item, resource.persisted? ? resource : resource.class.name.underscore.pluralize.to_sym], :remote => true, :class => 'icon-add-text'
7
+ %th.action_links= link_to t_action(:more), [:new_salary_item, template.persisted? ? template : template.class.name.underscore.pluralize.to_sym], :remote => true, :class => 'icon-add-text'
@@ -3,8 +3,8 @@ require 'rails'
3
3
 
4
4
  module BookytSalary
5
5
  class Railtie < Rails::Engine
6
- config.autoload_paths << File.expand_path("../lib", __FILE__)
7
-
8
6
  engine_name "bookyt_salary"
7
+
8
+ config.autoload_paths << File.expand_path("../lib", __FILE__)
9
9
  end
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module BookytSalary
2
- VERSION = '0.10.2'
2
+ VERSION = '0.11.0'
3
3
  end
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 10
9
- - 2
10
- version: 0.10.2
8
+ - 11
9
+ - 0
10
+ version: 0.11.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Simon H\xC3\xBCrlimann (CyT)"
@@ -103,10 +103,12 @@ files:
103
103
  - app/controllers/salary_booking_templates_controller.rb
104
104
  - app/controllers/salary_templates_controller.rb
105
105
  - app/helpers/salary_booking_template_helper.rb
106
+ - app/models/bookyt_salary/employee.rb
106
107
  - app/models/salary.rb
107
108
  - app/models/salary_booking_template.rb
108
109
  - app/models/salary_item.rb
109
110
  - app/models/salary_template.rb
111
+ - app/views/employees/_show_salaries.html.haml
110
112
  - app/views/salaries/_form.html.haml
111
113
  - app/views/salaries/_list.html.haml
112
114
  - app/views/salaries/_salary.html.haml