bookyt_projects 0.19.23 → 0.20.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.
- data/app/controllers/activities_controller.rb +2 -0
- data/app/models/activity.rb +10 -0
- data/app/views/activities/_activity.html.haml +2 -1
- data/app/views/activities/_list.html.haml +3 -1
- data/app/views/activities/_sidebar.html.haml +10 -0
- data/config/locales/bookyt_projects.de.yml +2 -0
- data/lib/bookyt_projects/navigation.rb +1 -0
- data/lib/bookyt_projects/version.rb +1 -1
- metadata +7 -6
data/app/models/activity.rb
CHANGED
@@ -7,6 +7,16 @@ class Activity < ActiveRecord::Base
|
|
7
7
|
|
8
8
|
# Scopes
|
9
9
|
scope :by_date, lambda {|value| where(:date => value)}
|
10
|
+
scope :by_period, lambda {|value|
|
11
|
+
if value.is_a? Array
|
12
|
+
where(:date => (value[0]..value[1]))
|
13
|
+
else
|
14
|
+
where(:date => value)
|
15
|
+
end
|
16
|
+
}
|
17
|
+
scope :by_project_id, lambda {|value|
|
18
|
+
where(:project_id => value) if value.present?
|
19
|
+
}
|
10
20
|
|
11
21
|
# Sorting
|
12
22
|
default_scope order("date DESC")
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- filter_name = :by_period
|
2
|
+
- content_for :sidebar do
|
3
|
+
- filters = month_periods
|
4
|
+
= boot_nav_filter(filter_name, [{:title => t('bookyt.all'), :value => nil}] + filters)
|
5
|
+
|
6
|
+
|
7
|
+
- filter_name = :by_project_id
|
8
|
+
- content_for :sidebar do
|
9
|
+
- filters = Project.all.collect{|project| {:title => project.to_s, :value => project.id} }
|
10
|
+
= boot_nav_filter(filter_name, [{:title => t('bookyt.all'), :value => nil}] + filters)
|
@@ -5,6 +5,7 @@ module BookytProjects
|
|
5
5
|
projects.item :project_index, t_title(:index, Project), projects_path, :highlights_on => /\/(projects|activities)($|\/[0-9]*($|\/.*))/
|
6
6
|
projects.item :new_project, t_title(:new, Project), new_project_path
|
7
7
|
projects.item :divider, "", :class => 'divider'
|
8
|
+
projects.item :activities, t_title(:index, Activity), activities_path
|
8
9
|
projects.item :capture_hours, t('activities.new.title'), new_batch_activity_path
|
9
10
|
end
|
10
11
|
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:
|
4
|
+
hash: 79
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 20
|
9
|
+
- 0
|
10
|
+
version: 0.20.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-
|
19
|
+
date: 2012-04-15 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- app/views/activities/_activity.html.haml
|
117
117
|
- app/views/activities/_form.html.haml
|
118
118
|
- app/views/activities/_list.html.haml
|
119
|
+
- app/views/activities/_sidebar.html.haml
|
119
120
|
- app/views/batch_activities/_form.html.haml
|
120
121
|
- app/views/batch_activities/new.html.haml
|
121
122
|
- app/views/people/_show_activities.html.haml
|
@@ -182,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
183
|
requirements: []
|
183
184
|
|
184
185
|
rubyforge_project:
|
185
|
-
rubygems_version: 1.8.
|
186
|
+
rubygems_version: 1.8.15
|
186
187
|
signing_key:
|
187
188
|
specification_version: 3
|
188
189
|
summary: Project management plugin for bookyt
|