bookyt_projects 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,8 +20,4 @@ class ActivitiesController < AuthorizedController
20
20
  def create
21
21
  create! { @activity.project }
22
22
  end
23
-
24
- def index
25
- redirect_to :projects
26
- end
27
23
  end
@@ -1,7 +1,7 @@
1
- = semantic_form_for @activity do |f| #when:date from:datetime to:datetime person_id:integer project_id:integer comment:string
1
+ = semantic_form_for @activity do |f|
2
2
  = f.inputs do
3
- = f.input :person
4
- = f.input :project
3
+ = f.input :project, :as => :combobox
4
+ = f.input :person, :as => :combobox
5
5
  = f.inputs do
6
6
  = f.input :when, :as => :date_field, :required => true
7
7
  = f.input :from, :as => :hour_field
@@ -0,0 +1,14 @@
1
+ %table.list
2
+ %tr
3
+ - [:person, :when, :duration].each do |attr|
4
+ %th= t_attr(attr, Activity)
5
+ %th.action-links
6
+
7
+ - collection.each do |task|
8
+ %tr
9
+ %td= task.person
10
+ %td= link_to task.when, task, {'data-href-container' => 'tr'}
11
+ %td= t('bookyt.projects.minutes', :duration => task.duration)
12
+ %td.action-links
13
+ = list_link_for(:edit, task)
14
+ = list_link_for(:delete, task)
@@ -2,4 +2,4 @@
2
2
  = f.semantic_errors
3
3
  = f.inputs :name
4
4
  = f.buttons do
5
- = f.submit
5
+ = f.commit_button
@@ -2,10 +2,10 @@
2
2
  = f.semantic_errors
3
3
  = f.inputs do
4
4
  = f.input :name, :input_html => {'data-autofocus' => 'true'}
5
- = f.input :comment
5
+ = f.input :comment, :input_html => {:rows => 5}
6
6
  = f.input :from, :as => :date_field
7
7
  = f.input :to, :as => :date_field
8
8
  = f.input :project_state
9
- = f.input :client
9
+ = f.input :client, :as => :combobox
10
10
  = f.buttons do
11
- = f.submit
11
+ = f.commit_button
@@ -4,7 +4,6 @@
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, Activity)
8
7
  %th.action-links
9
8
 
10
9
  - @attributes = @attributes - ['name', 'client_id', 'project_state_id']
@@ -16,8 +15,6 @@
16
15
  %td= r.send(field) if r.respond_to?(field)
17
16
  %td= r.client
18
17
  %td= r.project_state
19
- %td= link_to t_title(:new, Activity), new_project_activity_url(r)
20
18
  %td.action-links
21
- = list_link_for(:show, r)
22
19
  = list_link_for(:edit, r)
23
20
  = list_link_for(:delete, r)
@@ -0,0 +1,8 @@
1
+ .form-view
2
+ = render 'form'
3
+
4
+ .contextual
5
+ = icon_link_to :new, new_project_activity_path(resource)
6
+ %h2= t_title :index, Activity
7
+
8
+ = render 'activities/list', :collection => @project.activities
@@ -1,9 +1,9 @@
1
1
  de:
2
2
  activerecord:
3
3
  models:
4
- project: Projekte
5
- project_state: Projektstatus
6
- activity: Arbeitsschritt
4
+ project: Projekt
5
+ project_state: Projektstatus
6
+ activity: Aktivität
7
7
  attributes:
8
8
  project:
9
9
  name: Bezeichnung
@@ -15,14 +15,21 @@ de:
15
15
  client: Kunde
16
16
  client_id: Kunde
17
17
  project_state:
18
- name: Bezeichnung
18
+ name: Bezeichnung
19
19
  activity:
20
- person: Person
21
- when: Datum
22
- duration: Dauer
23
- project: Projekt
24
- comment: Kommentar
25
- time: Zeitraum
20
+ person: Person
21
+ person_id: Person
22
+ when: Datum
23
+ from: Von
24
+ to: Bis
25
+ duration: Dauer
26
+ hours: Stunden
27
+ minutes: Minuten
28
+ project: Projekt
29
+ project_id: Projekt
30
+ comment: Kommentar
31
+ time: Zeitraum
32
+
26
33
  bookyt:
27
34
  projects:
28
- minutes: "%{duration} Minuten"
35
+ minutes: "%{duration} Minuten"
data/config/routes.rb CHANGED
@@ -4,4 +4,4 @@ Rails.application.routes.draw do
4
4
  end
5
5
  resources :project_states
6
6
  resources :activities
7
- end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module BookytPos
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.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: 3
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 7
8
+ - 8
9
9
  - 0
10
- version: 0.7.0
10
+ version: 0.8.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: 2011-10-20 00:00:00 +02:00
19
+ date: 2011-10-22 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -77,7 +77,7 @@ dependencies:
77
77
  version: "0"
78
78
  type: :development
79
79
  version_requirements: *id004
80
- description: This plugin extends bookyt with project management functionallty.
80
+ description: This plugin extends bookyt with project management functionality.
81
81
  email:
82
82
  - roman.simecek@cyt.ch
83
83
  - simon.huerlimann@cyt.ch
@@ -97,15 +97,11 @@ files:
97
97
  - app/models/project.rb
98
98
  - app/models/project_state.rb
99
99
  - app/views/activities/_form.html.haml
100
- - app/views/activities/_resource_detail.html.haml
101
- - app/views/activities/show.html.haml
100
+ - app/views/activities/_list.html.haml
102
101
  - app/views/project_states/_form.html.haml
103
- - app/views/project_states/new.html.haml
104
102
  - app/views/projects/_form.html.haml
105
103
  - app/views/projects/_list.html.haml
106
- - app/views/projects/_resource_detail.html.haml
107
- - app/views/projects/new.html.haml
108
- - app/views/projects/show.html.haml
104
+ - app/views/projects/_show.html.haml
109
105
  - config/application.rb
110
106
  - config/boot.rb
111
107
  - config/locales/de.yml
@@ -1,19 +0,0 @@
1
- %table{:class => "#{collection.first.class.to_s.downcase} detail"}
2
- %tr
3
- %th= t_attr(:project)
4
- %td= resource.project
5
- %tr
6
- %th= t_attr(:person)
7
- %td= resource.person
8
- %tr
9
- %th= t_attr(:when)
10
- %td= l(resource.when)
11
- %tr
12
- %th= t_attr(:time)
13
- %td= "#{l(resource.from, :format => :time)} - #{l(resource.to, :format => :time)}"
14
- %tr
15
- %th= t_attr(:duration)
16
- %td= t('bookyt.projects.minutes', :duration => resource.duration)
17
- %tr
18
- %th= t_attr(:comment)
19
- %td= resource.comment
@@ -1,6 +0,0 @@
1
- .contextual
2
- = link_to 'Liste', project_path(@task.project), :class => 'icon icon-index'
3
-
4
- %h1= t_title
5
-
6
- = render "resource_detail"
@@ -1,3 +0,0 @@
1
- %h1= t_title(:new, ProjectState)
2
-
3
- = render 'form'
@@ -1,25 +0,0 @@
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, Activity)
19
- - @project.activities.each do |task|
20
- %tr
21
- %td= task.person
22
- %td= task.when
23
- %td= t('bookyt.projects.minutes', :duration => task.duration)
24
-
25
- = link_to t_title(:new, Activity), new_project_activity_path(resource)
@@ -1,3 +0,0 @@
1
- %h1= t_title(:new)
2
-
3
- = render 'form'
@@ -1,5 +0,0 @@
1
- = contextual_links
2
-
3
- %h1= t_title
4
-
5
- = render "resource_detail"