bookyt_salary 0.9.1 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,6 @@
1
1
  class SalaryItem < ActiveRecord::Base
2
2
  belongs_to :salary_template
3
3
  belongs_to :salary_booking_template
4
+
5
+ default_scope order(:position)
4
6
  end
@@ -1,4 +1,5 @@
1
1
  %tr.salary_item.nested-form-item
2
+ %td= salary_item.text_field :position, :required => true, :style => 'width: 3em', :autocomplete => "off"
2
3
  %td= salary_item.select :salary_booking_template_id, SalaryBookingTemplate.all.map{|template| [template.title, template.id]}, :required => true, :style => 'width: 30em'
3
4
  %td= salary_item.text_field :times, :required => true, :style => 'width: 3em', :autocomplete => "off"
4
5
  %td= salary_item.text_field :price, :required => true, :style => 'width: 5em', :autocomplete => "off"
@@ -1,4 +1,5 @@
1
1
  %tr
2
+ %th{:style => 'padding: 2px; width: 3em'}= t_attr(:position, SalaryItem)
2
3
  %th{:style => 'padding: 2px'}= t_attr(:salary_booking_template, SalaryItem)
3
4
  %th{:style => 'padding: 2px; width: 3em'}= t_attr(:times, SalaryItem)
4
5
  %th{:style => 'padding: 2px; width: 3em'}= t_attr(:price, SalaryItem)
@@ -0,0 +1,6 @@
1
+ class AddPositionToSalaryItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :salary_items, :position, :integer
4
+ add_index :salary_items, :position
5
+ end
6
+ end
@@ -1,3 +1,3 @@
1
1
  module BookytSalary
2
- VERSION = '0.9.1'
2
+ VERSION = '0.10.0'
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: 57
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 9
9
- - 1
10
- version: 0.9.1
8
+ - 10
9
+ - 0
10
+ version: 0.10.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Simon H\xC3\xBCrlimann (CyT)"
@@ -141,6 +141,7 @@ files:
141
141
  - db/migrate/20120117120044_rename_salary_booking_template_habtm_table.rb
142
142
  - db/migrate/20120117122025_add_title_and_remarks_to_salary_templates.rb
143
143
  - db/migrate/20120118121223_create_salary_items.rb
144
+ - db/migrate/20120118155137_add_position_to_salary_item.rb
144
145
  - db/seeds.rb
145
146
  - lib/bookyt_salary.rb
146
147
  - lib/bookyt_salary/navigation.rb