bookyt_projects 0.2.0 → 0.2.1
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/VERSION +1 -1
- data/app/controllers/tasks_controller.rb +9 -1
- data/app/models/project.rb +1 -0
- data/app/models/task.rb +4 -0
- data/app/views/projects/_list.html.haml +3 -0
- data/app/views/projects/_resource_detail.html.haml +25 -0
- data/app/views/projects/show.html.haml +5 -0
- data/bookyt_projects.gemspec +3 -1
- data/config/locales/de.yml +4 -0
- data/config/routes.rb +3 -1
- metadata +5 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -1,2 +1,10 @@
|
|
1
|
-
class TasksController < AuthorizedController
|
1
|
+
class TasksController < AuthorizedController
|
2
|
+
|
3
|
+
def new
|
4
|
+
@task = Task.new(:project_id => params[:project_id]) if params[:project_id]
|
5
|
+
@task.person = current_user.person if current_user
|
6
|
+
|
7
|
+
new!{ projects_url(@task.project) }
|
8
|
+
end
|
9
|
+
|
2
10
|
end
|
data/app/models/project.rb
CHANGED
data/app/models/task.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
%tr
|
5
5
|
- @attributes.each do |field|
|
6
6
|
%th= t_attr field, collection.first.class
|
7
|
+
%th.new-task= t_title(:new, Task)
|
7
8
|
%th.action-links
|
8
9
|
|
9
10
|
- @attributes = @attributes - ['client_id', 'project_state_id']
|
@@ -14,6 +15,8 @@
|
|
14
15
|
%td= r.send(field) if r.respond_to?(field)
|
15
16
|
%td= r.client
|
16
17
|
%td= r.project_state
|
18
|
+
%td= link_to t_title(:new, Task), new_project_task_url(r)
|
17
19
|
%td.action-links
|
20
|
+
= list_link_for(:show, r)
|
18
21
|
= list_link_for(:edit, r)
|
19
22
|
= list_link_for(:delete, r)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
%table{:class => "#{collection.first.class.to_s.downcase} detail"}
|
2
|
+
- resource.attributes.each_pair do |attr, value|
|
3
|
+
- next if ['id', 'created_at', 'updated_at', 'client_id', 'project_state_id'].include?(attr)
|
4
|
+
%tr
|
5
|
+
%td= attr.titleize
|
6
|
+
%td= value
|
7
|
+
%tr
|
8
|
+
%td= t_model(ProjectState)
|
9
|
+
%td= @project.project_state
|
10
|
+
%tr
|
11
|
+
%td= t_model(Company)
|
12
|
+
%td= @project.client
|
13
|
+
|
14
|
+
|
15
|
+
%table.list
|
16
|
+
%tr
|
17
|
+
- [:person, :when, :duration].each do |attr|
|
18
|
+
%th= t_attr(attr, Task)
|
19
|
+
- @project.tasks.each do |task|
|
20
|
+
%tr
|
21
|
+
%td= task.person
|
22
|
+
%td= task.when
|
23
|
+
%td= task.duration
|
24
|
+
|
25
|
+
= link_to t_title(:new, Task), new_project_task_path(resource)
|
data/bookyt_projects.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{bookyt_projects}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = [%q{Roman Simecek}]
|
@@ -35,7 +35,9 @@ Gem::Specification.new do |s|
|
|
35
35
|
"app/views/project_states/new.html.haml",
|
36
36
|
"app/views/projects/_form.html.haml",
|
37
37
|
"app/views/projects/_list.html.haml",
|
38
|
+
"app/views/projects/_resource_detail.html.haml",
|
38
39
|
"app/views/projects/new.html.haml",
|
40
|
+
"app/views/projects/show.html.haml",
|
39
41
|
"app/views/tasks/_form.html.haml",
|
40
42
|
"bookyt_projects.gemspec",
|
41
43
|
"config/locales/de.yml",
|
data/config/locales/de.yml
CHANGED
data/config/routes.rb
CHANGED
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: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Roman Simecek
|
@@ -122,7 +122,9 @@ files:
|
|
122
122
|
- app/views/project_states/new.html.haml
|
123
123
|
- app/views/projects/_form.html.haml
|
124
124
|
- app/views/projects/_list.html.haml
|
125
|
+
- app/views/projects/_resource_detail.html.haml
|
125
126
|
- app/views/projects/new.html.haml
|
127
|
+
- app/views/projects/show.html.haml
|
126
128
|
- app/views/tasks/_form.html.haml
|
127
129
|
- bookyt_projects.gemspec
|
128
130
|
- config/locales/de.yml
|