bookyt_projects 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
- %tr[activity]
1
+ - tr_params = {}
2
+ - tr_params = {:rel => 'popover', 'data-placement' => 'bottom', 'data-content' => activity.remarks, 'data-original-title' => t_attr(:remarks, Activity)} if activity.remarks.present?
3
+ %tr[activity]{tr_params}
2
4
  %td= link_to activity.date, activity, {'data-href-container' => 'tr'}
3
- %td= activity.person
4
- %td= activity.project
5
- %td= t('bookyt.projects.hours', :duration => "%0.2f" % activity.duration)
5
+ %td= link_to activity.person, activity.person
6
+ %td= link_to activity.project, activity.project
7
+ %td.right= t('bookyt.projects.hours', :duration => "%0.2f" % activity.duration)
@@ -1,9 +1,16 @@
1
1
  %table.table.table-striped.activities.collection
2
2
  %thead
3
3
  %tr
4
- - [:date, :person, :project, :duration].each do |attr|
4
+ - [:date, :person, :project].each do |attr|
5
5
  %th= t_attr(attr, Activity)
6
+ %th.right= t_attr(:duration, Activity)
6
7
  %tbody
7
8
  = render collection
9
+ %tfoot
10
+ %tr
11
+ %th= "#{collection.minimum(:date)} - #{collection.maximum(:date)}"
12
+ %th
13
+ %th
14
+ %th.right= t('bookyt.projects.hours', :duration => "%0.2f" % collection.sum(:duration))
8
15
 
9
- = render 'sidebar'
16
+ = render 'activities/sidebar'
@@ -1,7 +1,10 @@
1
- - @activities = resource.activities
1
+ - @activities = resource.activities.where(:date => current_month_period(:by_period)).by_project_id(params[:by_project_id])
2
2
  - if @activities.empty?
3
3
  = boot_alert(t('activities.alerts.empty'))
4
4
  .activities.collection
5
5
 
6
6
  - else
7
- = render 'activities/list', :collection => resource.activities unless @activities.empty?
7
+ = render 'activities/list', :collection => @activities unless @activities.empty?
8
+
9
+ .form-actions
10
+ = icon_link_to :new, new_person_activity_path(resource)
@@ -2,7 +2,4 @@
2
2
 
3
3
  .row-fluid
4
4
  .span12
5
- = render 'timesheets/show', :work_days => @employee.work_days.where(:date => current_month_period(:time_sheet_period))
6
-
7
- - content_for :sidebar do
8
- = render 'timesheets/pager'
5
+ = render 'timesheets/show', :work_days => @employee.work_days.where(:date => current_month_period(:by_period))
@@ -1,10 +1,10 @@
1
1
  .tabbable
2
2
  %ul.nav.nav-tabs
3
- %li.active= link_to 'Details', '#details', {:data => {:toggle => 'tab'}}
4
- %li= link_to 'Stundenrapport', '#activities', {:data => {:toggle => 'tab'}}
3
+ %li.active= link_to 'Details', '#tab-details', {:data => {:toggle => 'tab'}}
4
+ %li= link_to t_title(:list, Activity), '#tab-activities', {:data => {:toggle => 'tab'}}
5
5
 
6
6
  .tab-content
7
- #details.tab-pane.active
7
+ #tab-details.tab-pane.active
8
8
  = render "form"
9
- #activities.tab-pane
9
+ #tab-activities.tab-pane
10
10
  = render 'show_activities'
@@ -1,10 +1,10 @@
1
- - @activities = resource.activities
1
+ - @activities = resource.activities.where(:date => current_month_period(:by_period))
2
2
  - if @activities.empty?
3
3
  = boot_alert(t('activities.alerts.empty'))
4
4
  .activities.collection
5
5
 
6
6
  - else
7
- = render 'activities/list', :collection => @project.activities unless @activities.empty?
7
+ = render 'activities/list', :collection => @activities unless @activities.empty?
8
8
 
9
- .contextual
9
+ .form-actions
10
10
  = icon_link_to :new, new_project_activity_path(resource)
@@ -12,9 +12,9 @@
12
12
  %tr{tr_params}
13
13
  %td
14
14
  - if day.activities.empty?
15
- = link_to l(day.date, :format => '%a, %d.%m.%Y'), new_activity_path(:activity => {:person_id => day.person_id, :date => day.date.to_s(:db)}), 'data-href-container' => 'tr'
15
+ = link_to l(day.date, :format => '%d.%m.%Y, %a'), new_activity_path(:activity => {:person_id => day.person_id, :date => day.date.to_s(:db)}), 'data-href-container' => 'tr'
16
16
  - else
17
- = link_to l(day.date, :format => '%a, %d.%m.%Y'), person_activities_path(day.person, :by_date => day.date.to_s(:db)), 'data-href-container' => 'tr'
17
+ = link_to l(day.date, :format => '%d.%m.%Y, %a'), person_activities_path(day.person, :by_date => day.date.to_s(:db)), 'data-href-container' => 'tr'
18
18
  %td.right
19
19
  %span.strong= "%0.2f" % day.hours_worked
20
20
  = "(%0.2f)" % day.hours_due
@@ -68,3 +68,7 @@ de:
68
68
 
69
69
  time_sheet_period:
70
70
  title: Zeitraum
71
+
72
+ # Filters
73
+ by_project_id:
74
+ title: Projekt
@@ -1,3 +1,3 @@
1
1
  module BookytPos
2
- VERSION = '0.20.0'
2
+ VERSION = '0.21.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookyt_projects
3
3
  version: !ruby/object:Gem::Version
4
- hash: 79
4
+ hash: 75
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 20
8
+ - 21
9
9
  - 0
10
- version: 0.20.0
10
+ version: 0.21.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Roman Simecek (CyT)
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-04-15 00:00:00 Z
19
+ date: 2012-04-16 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rails
@@ -128,7 +128,6 @@ files:
128
128
  - app/views/projects/_show.html.haml
129
129
  - app/views/projects/_show_activities.html.haml
130
130
  - app/views/timesheets/_activities_popover.html.haml
131
- - app/views/timesheets/_pager.html.haml
132
131
  - app/views/timesheets/_show.html.haml
133
132
  - app/views/timesheets/index.html.haml
134
133
  - config/application.rb
@@ -183,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
182
  requirements: []
184
183
 
185
184
  rubyforge_project:
186
- rubygems_version: 1.8.15
185
+ rubygems_version: 1.8.10
187
186
  signing_key:
188
187
  specification_version: 3
189
188
  summary: Project management plugin for bookyt
@@ -1,6 +0,0 @@
1
- - filter_name = :time_sheet_period
2
- - params[filter_name] ||= {"from" => Date.today.beginning_of_month.to_s(:db), "to" => Date.today.end_of_month.to_s(:db)}
3
-
4
- - content_for :sidebar do
5
- - filters = month_periods
6
- = boot_nav_filter(filter_name, filters)