backlog 0.36.2 → 0.37.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +16 -4
- data/Gemfile.lock +130 -0
- data/History.txt +17 -0
- data/README.txt +0 -2
- data/Rakefile +17 -7
- data/app/controllers/absences_controller.rb +1 -2
- data/app/controllers/application_controller.rb +13 -14
- data/app/controllers/application_controller.rb.rails2 +186 -0
- data/app/controllers/estimates_controller.rb +1 -1
- data/app/controllers/groups_controller.rb +3 -1
- data/app/controllers/periods_controller.rb +61 -50
- data/app/controllers/{backlogs_controller.rb → projects_controller.rb} +35 -35
- data/app/controllers/search_controller.rb +2 -2
- data/app/controllers/tasks_controller.rb +11 -11
- data/app/controllers/user_controller.rb +6 -4
- data/app/controllers/welcome_controller.rb +4 -4
- data/app/controllers/work_locks_controller.rb +2 -2
- data/app/controllers/works_controller.rb +31 -31
- data/app/helpers/application_helper.rb +2 -2
- data/app/helpers/application_helper.rb.rails2 +118 -0
- data/app/helpers/periods_helper.rb +3 -3
- data/app/helpers/{backlogs_helper.rb → projects_helper.rb} +5 -5
- data/app/helpers/user_helper.rb +2 -2
- data/app/{models → mailers}/user_notify.rb +1 -0
- data/app/models/absence.rb +2 -2
- data/{lib → app/models}/clock.rb +0 -0
- data/app/models/estimate.rb +2 -2
- data/app/models/party.rb +1 -2
- data/app/models/period.rb +17 -18
- data/app/models/{backlog.rb → project.rb} +2 -2
- data/app/models/sidebar.rb +2 -2
- data/app/models/task.rb +28 -28
- data/app/models/user.rb +5 -4
- data/app/models/work.rb +29 -23
- data/app/models/work_lock_nagger.rb +1 -1
- data/app/models/works_report_filter.rb +4 -4
- data/app/views/customers/_name_list.rhtml +1 -1
- data/app/views/layouts/_headers.rhtml +2 -1
- data/app/views/layouts/_left_top.rhtml +32 -29
- data/app/views/layouts/_shortcuts.rhtml +15 -9
- data/app/views/layouts/_shortcuts_js.rhtml +4 -4
- data/app/views/layouts/mwrt002.html.erb +44 -0
- data/app/views/periods/_burn_down_chart.rhtml +1 -1
- data/app/views/periods/_show_active.rhtml +3 -3
- data/app/views/periods/_title.rhtml +1 -1
- data/app/views/{backlogs → projects}/_buttons.rhtml +4 -4
- data/app/views/projects/_form.rhtml +44 -0
- data/app/views/projects/_name_list.rhtml +5 -0
- data/app/views/projects/edit.rhtml +14 -0
- data/app/views/{backlogs → projects}/finish_task.rjs +0 -0
- data/app/views/projects/list.rhtml +16 -0
- data/app/views/{backlogs → projects}/move_task_to_period.rjs +0 -0
- data/app/views/{backlogs → projects}/new.rhtml +1 -1
- data/app/views/{backlogs → projects}/reopen_task.rjs +0 -0
- data/app/views/{backlogs → projects}/show.rhtml +6 -6
- data/app/views/search/results.rhtml +3 -3
- data/app/views/tasks/_backlog_header.rhtml +4 -4
- data/app/views/tasks/_completed.rhtml +2 -2
- data/app/views/tasks/_form.rhtml +13 -13
- data/app/views/tasks/_task.rhtml +10 -10
- data/app/views/tasks/edit.rhtml +1 -1
- data/app/views/tasks/list.rhtml +3 -3
- data/app/views/tasks/list_started.rhtml +4 -4
- data/app/views/tasks/start_work.rjs +1 -1
- data/app/views/user/login.rhtml +1 -1
- data/app/views/user/signup.rhtml +1 -1
- data/app/views/user/welcome.rhtml +1 -1
- data/app/views/works/_description_list.rhtml +1 -1
- data/app/views/works/_form.rhtml +5 -5
- data/app/views/works/_new_row.rhtml +8 -8
- data/app/views/works/_row.rhtml +1 -1
- data/app/views/works/_task_id_list.rhtml +1 -1
- data/app/views/works/daily_work_sheet.rhtml +1 -1
- data/app/views/works/list.rhtml +5 -5
- data/app/views/works/list_excel.rhtml +2 -2
- data/app/views/works/timeliste.rhtml +14 -14
- data/app/views/works/weekly_work_sheet.rhtml +5 -5
- data/app/views/works/weekly_work_sheet_details.rhtml +5 -5
- data/backlog.gemspec +44 -0
- data/bin/backlog +5 -1
- data/config.ru +4 -0
- data/config/application.rb +10 -0
- data/config/boot.rb +12 -116
- data/config/database.yml +3 -6
- data/config/database.yml~ +17 -0
- data/config/environment.rb +28 -49
- data/config/environments/development.rb +24 -20
- data/config/environments/development.rb.rails2 +26 -0
- data/config/environments/production.rb +26 -22
- data/config/environments/test.rb +20 -15
- data/config/environments/user_environment.rb +1 -1
- data/config/initializers/backtrace_silencers.rb +7 -0
- data/config/initializers/inflections.rb +10 -0
- data/config/initializers/jdbc.rb +1 -1
- data/config/initializers/mime_types.rb +5 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +8 -0
- data/config/locales/en.yml +22 -11
- data/config/locales/no.yml +1 -0
- data/config/routes.rb +4 -5
- data/cruise_build.sh +6 -2
- data/db/migrate/004_add_period.rb +22 -22
- data/db/migrate/015_add_user_option.rb +5 -19
- data/db/migrate/017_increase_backlog_name_limit.rb +10 -0
- data/db/migrate/021_create_work_accounts.rb +0 -2
- data/db/migrate/20101006092700_rename_backlogs_to_projects.rb +22 -0
- data/db/migrate/20101006092700_rename_backlogs_to_projects.rb~ +22 -0
- data/db/schema.rb +27 -30
- data/db/seeds.rb +7 -0
- data/lib/array_helper.rb +0 -8
- data/lib/class_table_inheritance.rb +8 -7
- data/lib/tasks/backup.rake +3 -3
- data/lib/tasks/jdbc.rake +2 -2
- data/lib/version_from_history.rb +1 -1
- data/public/404.html +23 -7
- data/public/422.html +26 -0
- data/public/500.html +23 -6
- data/public/images/rails.png +0 -0
- data/public/javascripts/controls.js +5 -3
- data/public/javascripts/dragdrop.js +7 -6
- data/public/javascripts/effects.js +8 -13
- data/public/javascripts/prototype.js +3381 -1700
- data/public/javascripts/rails.js +175 -0
- data/public/robots.txt +5 -1
- data/script/rails +6 -0
- data/test/client/login.rb +0 -2
- data/test/client/login_test.rb +1 -1
- data/test/client/setup.rb +25 -24
- data/test/fixtures/{backlogs.yml → projects.yml} +2 -2
- data/test/fixtures/tasks.yml +9 -9
- data/test/fixtures/work_lock_subscriptions.yml +2 -2
- data/test/fixtures/works.yml +7 -7
- data/test/functional/periods_controller_test.rb +1 -1
- data/test/functional/{backlogs_controller_test.rb → projects_controller_test.rb} +22 -21
- data/test/functional/search_controller_test.rb +1 -1
- data/test/functional/tasks_controller_test.rb +17 -17
- data/test/functional/user_controller_test.rb +16 -21
- data/test/functional/welcome_controller_test.rb +4 -3
- data/test/functional/works_controller_test.rb +5 -5
- data/test/integration/user_system_test.rb +1 -1
- data/test/mocks/test/clock.rb +1 -1
- data/test/performance/browsing_test.rb +9 -0
- data/test/performance/common.rb +1 -1
- data/test/test_helper.rb +23 -6
- data/test/test_helper.rb~ +121 -0
- data/test/unit/user_test.rb +3 -3
- data/test/unit/work_test.rb +7 -7
- data/vendor/plugins/assert_cookie/lib/assert_cookie.rb +0 -2
- data/vendor/plugins/{foreign_key_migrations → dynamic_form}/MIT-LICENSE +1 -1
- data/vendor/plugins/dynamic_form/README +13 -0
- data/vendor/plugins/dynamic_form/Rakefile +10 -0
- data/vendor/plugins/dynamic_form/dynamic_form.gemspec +12 -0
- data/vendor/plugins/dynamic_form/init.rb +1 -0
- data/vendor/plugins/dynamic_form/lib/action_view/helpers/dynamic_form.rb +300 -0
- data/vendor/plugins/dynamic_form/lib/action_view/locale/en.yml +8 -0
- data/vendor/plugins/dynamic_form/lib/dynamic_form.rb +5 -0
- data/vendor/plugins/dynamic_form/test/dynamic_form_i18n_test.rb +42 -0
- data/vendor/plugins/dynamic_form/test/dynamic_form_test.rb +370 -0
- data/vendor/plugins/dynamic_form/test/test_helper.rb +9 -0
- data/vendor/plugins/prototype_legacy_helper/lib/prototype_legacy_helper.rb +432 -0
- data/vendor/plugins/prototype_legacy_helper/test/test_prototype_helper.rb +297 -0
- data/vendor/plugins/rails_time/test/debug.log +1 -0
- data/vendor/plugins/{redhillonrails_core → verification}/MIT-LICENSE +1 -1
- data/vendor/plugins/verification/README +34 -0
- data/vendor/plugins/verification/Rakefile +22 -0
- data/vendor/plugins/verification/init.rb +3 -0
- data/vendor/plugins/verification/lib/action_controller/verification.rb +132 -0
- data/vendor/plugins/verification/test/test_helper.rb +18 -0
- data/vendor/plugins/verification/test/verification_test.rb +270 -0
- data/vendor/plugins/will_paginate/lib/will_paginate/collection.rb +1 -1
- metadata +115 -134
- data/Gemfile~ +0 -4
- data/History.txt~ +0 -961
- data/LICENSE_LOCALIZATION +0 -20
- data/README_LOCALIZATION +0 -61
- data/README_RAILS +0 -180
- data/app/views/backlogs/_form.rhtml +0 -44
- data/app/views/backlogs/_name_list.rhtml +0 -5
- data/app/views/backlogs/edit.rhtml +0 -14
- data/app/views/backlogs/list.rhtml +0 -16
- data/app/views/layouts/mwrt002.rhtml +0 -43
- data/config/initializers/mongrel.rb +0 -83
- data/config/preinitializer.rb +0 -20
- data/config/warble.rb~ +0 -84
- data/db/migrate/017_insert_datek_projects.rb +0 -98
- data/lib/change_column_null_migration_fix.rb +0 -15
- data/no_test.rb~ +0 -6
- data/public/dispatch.cgi +0 -10
- data/public/dispatch.fcgi +0 -24
- data/public/dispatch.rb +0 -10
- data/script/about +0 -3
- data/script/breakpointer +0 -3
- data/script/console +0 -3
- data/script/dbconsole +0 -3
- data/script/destroy +0 -3
- data/script/generate +0 -3
- data/script/performance/benchmarker +0 -3
- data/script/performance/profiler +0 -3
- data/script/plugin +0 -3
- data/script/process/inspector +0 -3
- data/script/process/reaper +0 -3
- data/script/process/spawner +0 -3
- data/script/runner +0 -3
- data/script/server +0 -3
- data/test/client/login.rb~ +0 -33
- data/test/mocks/test/user_notify.rb +0 -16
- data/vendor/plugins/foreign_key_migrations/CHANGELOG +0 -103
- data/vendor/plugins/foreign_key_migrations/README +0 -87
- data/vendor/plugins/foreign_key_migrations/about.yml +0 -5
- data/vendor/plugins/foreign_key_migrations/init.rb +0 -1
- data/vendor/plugins/foreign_key_migrations/install.rb +0 -1
- data/vendor/plugins/foreign_key_migrations/lib/foreign_key_migrations.rb +0 -3
- data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/base.rb +0 -22
- data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/connection_adapters/abstract_adapter.rb +0 -22
- data/vendor/plugins/foreign_key_migrations/lib/red_hill_consulting/foreign_key_migrations/active_record/connection_adapters/table_definition.rb +0 -28
- data/vendor/plugins/lightwindow_helper/README +0 -33
- data/vendor/plugins/lightwindow_helper/assets/images/ajax-loading.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/arrow-down.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/arrow-up.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/black-70.png +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/black.png +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/nextlabel.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/images/prevlabel.gif +0 -0
- data/vendor/plugins/lightwindow_helper/assets/javascripts/lightwindow.js +0 -1921
- data/vendor/plugins/lightwindow_helper/assets/stylesheets/lightwindow.css +0 -376
- data/vendor/plugins/lightwindow_helper/init.rb +0 -1
- data/vendor/plugins/lightwindow_helper/install.rb +0 -7
- data/vendor/plugins/lightwindow_helper/lib/lightwindow_helper.rb +0 -31
- data/vendor/plugins/redhillonrails_core/CHANGELOG +0 -150
- data/vendor/plugins/redhillonrails_core/README +0 -124
- data/vendor/plugins/redhillonrails_core/init.rb +0 -19
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/base.rb +0 -54
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/abstract_adapter.rb +0 -31
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/column.rb +0 -21
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/foreign_key_definition.rb +0 -26
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/index_definition.rb +0 -11
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/mysql_adapter.rb +0 -74
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/mysql_column.rb +0 -8
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/postgresql_adapter.rb +0 -99
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/schema_statements.rb +0 -16
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/sqlite3_adapter.rb +0 -9
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/table_definition.rb +0 -27
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/schema.rb +0 -27
- data/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/schema_dumper.rb +0 -47
- data/vendor/plugins/transactional_migrations/CHANGELOG +0 -9
- data/vendor/plugins/transactional_migrations/MIT-LICENSE +0 -20
- data/vendor/plugins/transactional_migrations/README +0 -15
- data/vendor/plugins/transactional_migrations/about.yml +0 -5
- data/vendor/plugins/transactional_migrations/init.rb +0 -1
- data/vendor/plugins/transactional_migrations/lib/red_hill_consulting/transactional_migrations/active_record/migration.rb +0 -19
data/app/views/tasks/_form.rhtml
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
<!--[form:task]-->
|
2
2
|
<p>
|
3
|
-
<% if @task.
|
4
|
-
<label for="
|
5
|
-
<%= select 'task', '
|
3
|
+
<% if @task.project.nil? || @task.new_record? || @task.active? %>
|
4
|
+
<label for="task_project_id"><%=l :project%></label><br/>
|
5
|
+
<%= select 'task', 'project_id', [['', '']] + @projects.map{|project| [project.name, project.id]}, {}, :onchange => "form.action = '#{url_for}'; form.submit();" %>
|
6
6
|
<% else %>
|
7
|
-
<label for="
|
8
|
-
<%=hidden_field 'task', '
|
7
|
+
<label for="task_project_id"><%=l :project%></label>:
|
8
|
+
<%=hidden_field 'task', 'project_id' %><%=detour_to h(@task.project.name), :controller => 'projects', :action => :show, :id => @task.project_id %>
|
9
9
|
<% end %>
|
10
|
-
<% if @task.
|
11
|
-
<%=image_detour_to('clipboard.png', "#{l(:
|
10
|
+
<% if @task.project %>
|
11
|
+
<%=image_detour_to('clipboard.png', "#{l(:project)} #{@task.project.name}", {:controller => 'projects', :action => :edit, :id => @task.project}, {:class => 'image-submit', :style => 'vertical-align: bottom'}) %>
|
12
12
|
<% end %>
|
13
|
-
<%=detour_to l(:
|
13
|
+
<%=detour_to l(:new_project), :controller => 'projects', :action => :new %>
|
14
14
|
</p>
|
15
15
|
|
16
16
|
|
17
|
-
<% if @task.
|
17
|
+
<% if @task.project && @task.project.enable_periods? %>
|
18
18
|
<p><label for="task_period_id"><%=l :period%></label><br/>
|
19
19
|
<% if @task.active? %>
|
20
20
|
<%= select 'task', 'period_id', [['', '']] + @periods.map{|p| [p.name, p.id]}, {},
|
@@ -31,7 +31,7 @@
|
|
31
31
|
<% end %>
|
32
32
|
|
33
33
|
|
34
|
-
<% if @task.
|
34
|
+
<% if @task.project %>
|
35
35
|
|
36
36
|
<p><label for="task_description"><%=l :task%> #<%=@task.id%></label><br/>
|
37
37
|
<% if @task.active? -%>
|
@@ -68,13 +68,13 @@
|
|
68
68
|
<% end %>
|
69
69
|
|
70
70
|
<% if @task.total_done != 0 -%>
|
71
|
-
<p style="float: left"><%=l :done
|
71
|
+
<p style="float: left"><%=l :done%><br/>
|
72
72
|
<%=t @task.total_done%>
|
73
73
|
</p>
|
74
74
|
<% end %>
|
75
75
|
<br clear="all" />
|
76
76
|
|
77
|
-
<% if @task.
|
77
|
+
<% if @task.project.enable_users? %>
|
78
78
|
<% unless @task.new_record? %>
|
79
79
|
<p><label><%=l :ownership%></label><br/>
|
80
80
|
<%= if @task.users.empty?
|
@@ -121,5 +121,5 @@ end.join(' ')%><br clear="all"/>
|
|
121
121
|
|
122
122
|
|
123
123
|
<script type="text/JavaScript">
|
124
|
-
document.getElementById('<%=@task.
|
124
|
+
document.getElementById('<%=@task.project.nil? ? 'task_project_id' : @task.period.nil? ? 'task_period_id' : (@task.description.nil? || @task.description.empty?) ? 'task_description' : 'task_notes' %>').focus();
|
125
125
|
</script>
|
data/app/views/tasks/_task.rhtml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<li id="task_<%=task.id%>"<%=' class="tasks" onmouseover="this.style.border=\'1px solid black\'" onmouseout="this.style.border=\'1px solid transparent\'"' if active && (task.period.nil? || task.period.active_or_future?) && (not task.work_started?) %><%=' class="highlight"' if highlight_task %><%=' style="display: none"' if hidden %>>
|
2
|
-
<div style="float: left" style="border:
|
2
|
+
<div style="float: left" style="border: 0">
|
3
3
|
<% if task.enable_subtasks? && active && (task.period.nil? || task.period.active_or_future?) %>
|
4
4
|
<% form_tag({:controller => 'tasks', :action => :specify, :id => task}) do %>
|
5
5
|
<%=image_button_to('add.png', l(:specify), {:controller => 'tasks', :action => :specify, :id => task.id},
|
@@ -17,9 +17,9 @@
|
|
17
17
|
</div>
|
18
18
|
<div id="task_<%=task.id%>_description" class="task_description">
|
19
19
|
<b><%=h(task.description)%></b>
|
20
|
-
<% if
|
20
|
+
<% if show_project %>
|
21
21
|
<br/>
|
22
|
-
<%=l :
|
22
|
+
<%=l :project%>: <%=detour_to(h(task.project.name), :controller => 'projects', :action => :show, :id => task.project) %>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
25
|
|
@@ -29,13 +29,13 @@
|
|
29
29
|
<div class="task_start">
|
30
30
|
<% if active && task.loggable? -%>
|
31
31
|
<% if task.work_started? -%>
|
32
|
-
|
32
|
+
<%=form_for(:work, :remote => true, :url => {:controller => 'works', :action => 'update_time', :id => task.started_work}) do |f| %>
|
33
33
|
<%=submit_tag('checkmark', :value => l(:save), :style => 'display: none')%>
|
34
34
|
<%=f.text_field 'start_time', :id => "work_#{task.started_work.id}_start_time", :tabindex => i+1, :value => (task.started_work.start_time ? task.started_work.start_time.strftime('%H:%M') : ''),
|
35
35
|
:class => :task_time, :maxlength => 5 %>
|
36
36
|
<% end %>
|
37
37
|
<% elsif task.track_times? && (task.period_id.nil? || task.period.active?) %>
|
38
|
-
<%=image_link_to_remote 'hammer.png', l(:start_work),
|
38
|
+
<%=image_link_to_remote 'hammer.png', l(:start_work), with_detour({:controller => 'tasks', :action => :start_work, :id => task.id}), nil, true %>
|
39
39
|
<% else -%>
|
40
40
|
|
41
41
|
<% end -%>
|
@@ -45,7 +45,7 @@
|
|
45
45
|
</div>
|
46
46
|
<div class="task_end_work">
|
47
47
|
<% if active && task.loggable? && task.work_started? -%>
|
48
|
-
|
48
|
+
<%=form_tag({:controller => 'works', :action => 'update', :id => task.started_work}) do %>
|
49
49
|
<%= image_detour_to('ernes_stop.png', l(:end_work), {:controller => 'tasks', :action => :end_work, :id => task.id}, nil, true) %>
|
50
50
|
<% end -%>
|
51
51
|
<% else %>
|
@@ -72,7 +72,7 @@
|
|
72
72
|
<% if active && task.loggable? -%>
|
73
73
|
<% if task.track_todo? -%>
|
74
74
|
<% if task.period.nil? || task.period.active_or_future? -%>
|
75
|
-
<%
|
75
|
+
<% form_for(:estimate, :remote => true, :url => {:action => :update_task_estimate, :id => task}) do |f| -%>
|
76
76
|
<%=f.text_field :todo, :tabindex => i+2, :id => "task_#{task.id}_todo", :value => task.todo, :class => :task_hours, :maxlength => 4 %>
|
77
77
|
<% end -%>
|
78
78
|
<% else -%>
|
@@ -89,14 +89,14 @@
|
|
89
89
|
<% if task.active? -%>
|
90
90
|
<% if task.loggable? -%>
|
91
91
|
<% unless task.work_started? -%>
|
92
|
-
<% if task.
|
92
|
+
<% if task.project.enable_users? %>
|
93
93
|
<% if task.users.include?(current_user) %>
|
94
94
|
<%=image_link_to_remote('grab.png', l(:release_task), {:url => with_detour({:controller => 'tasks', :action => :release, :id => task})}, nil, true)%>
|
95
95
|
<% else %>
|
96
96
|
<%=image_link_to_remote('grab_gray.png', "#{l:grab_task} #{" (#{l :not_grabbed})" if task.users.empty?}", {:url => with_detour({:controller => 'tasks', :action => :grab, :id => task})}, nil, true)%>
|
97
97
|
<% end %>
|
98
98
|
<% end %>
|
99
|
-
<%=image_link_to_remote('arrow_right.png', l(:move_to_next_period), {:
|
99
|
+
<%=image_link_to_remote('arrow_right.png', l(:move_to_next_period), {:controller => 'periods', :action => :move_task_to_next_period, :id => task}, nil, true) if task.project.enable_periods? || task.period_id%>
|
100
100
|
<%=image_link_to_remote('ernes_stop.png', l(:abort), {:url => {:action => :abort_task, :id => task}}, nil, true)%>
|
101
101
|
<% end -%>
|
102
102
|
<% end -%>
|
@@ -111,6 +111,6 @@
|
|
111
111
|
</li>
|
112
112
|
|
113
113
|
<% for subtask in task.children %>
|
114
|
-
<%=render :partial => '/tasks/task', :locals => { :task => subtask, :i => i, :active => active, :hidden => false, :
|
114
|
+
<%=render :partial => '/tasks/task', :locals => { :task => subtask, :i => i, :active => active, :hidden => false, :show_project => false, :highlight_task => subtask == @selected_task, :update => update } if (active && subtask.active?) || (!active && subtask.completed?) %>
|
115
115
|
<% i += 1 %>
|
116
116
|
<% end %>
|
data/app/views/tasks/edit.rhtml
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<% if @task.loggable? -%>
|
52
52
|
<% unless @task.work_started? -%>
|
53
53
|
<%# form_tag({:controller => 'tasks', :action => 'update', :id => @task}) do -%>
|
54
|
-
<%=image_link_to_remote('arrow_right.png', l(:move_to_next_period), {:url => {:action => :move_task_to_next_period, :id => @task}}, nil, true) if @task.
|
54
|
+
<%=image_link_to_remote('arrow_right.png', l(:move_to_next_period), {:url => {:action => :move_task_to_next_period, :id => @task}}, nil, true) if @task.project.enable_periods? || @task.period_id%>
|
55
55
|
<%=image_link_to_remote('ernes_stop.png', l(:abort), {:url => {:action => :abort_task, :id => @task}}, nil, true)%>
|
56
56
|
<%# end -%>
|
57
57
|
<% end -%>
|
data/app/views/tasks/list.rhtml
CHANGED
@@ -10,10 +10,10 @@ function handlePageEvent(event) {
|
|
10
10
|
</script>
|
11
11
|
|
12
12
|
<div class="btitle">
|
13
|
-
<h4><%=h @
|
13
|
+
<h4><%=h @project.name %></h4>
|
14
14
|
</div>
|
15
15
|
|
16
|
-
<!-- Insert
|
16
|
+
<!-- Insert project logo here
|
17
17
|
<img src="/images/blank.jpg" width="100" height="100" alt="Place An Alternate Description Here!" longdesc="image-description.txt" />
|
18
18
|
<a href="image-description.txt" class="dlink" title="Place An Alternate Description Here!"></a>
|
19
19
|
-->
|
@@ -27,7 +27,7 @@ function handlePageEvent(event) {
|
|
27
27
|
<th><%=l :task %></th>
|
28
28
|
</tr>
|
29
29
|
<% i = 1 %>
|
30
|
-
<% for task in @
|
30
|
+
<% for task in @project.tasks %>
|
31
31
|
<% i += 1 %>
|
32
32
|
<script type="text/javascript">
|
33
33
|
function handle<%=task.id%>(event) {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<h4><%=l :started_tasks %> (<%= Date.today %>)</h4>
|
5
5
|
</div>
|
6
6
|
|
7
|
-
<!-- TODO: Insert
|
7
|
+
<!-- TODO: Insert project logo here
|
8
8
|
<img src="/images/blank.jpg" width="100" height="100" alt="Place An Alternate Description Here!" longdesc="image-description.txt" />
|
9
9
|
<a href="image-description.txt" class="dlink" title="Place An Alternate Description Here!"></a>
|
10
10
|
-->
|
@@ -36,13 +36,13 @@ function handleEvent(field, event, id) {
|
|
36
36
|
</script>
|
37
37
|
|
38
38
|
<% if @tasks %>
|
39
|
-
<%=render :partial => '/tasks/fields_header', :locals => {:
|
39
|
+
<%=render :partial => '/tasks/fields_header', :locals => {:project => nil, :active => true, :track_todo => @tasks.find {|t|t.track_todo?}, :track_done => @tasks.find {|t|t.track_done?}, :track_times => @tasks.find {|t|t.period && t.period.active?}, :work_done => nil} %>
|
40
40
|
<ul class="task_list">
|
41
41
|
<% i = 0 %>
|
42
|
-
<%
|
42
|
+
<% current_project = nil %>
|
43
43
|
<% current_period = nil %>
|
44
44
|
<% for task in @tasks %>
|
45
|
-
<%=render :partial => 'task', :locals => { :task => task, :i => i, :active => true, :highlight_task => (task == @selected_task), :update => :spotlight, :
|
45
|
+
<%=render :partial => 'task', :locals => { :task => task, :i => i, :active => true, :highlight_task => (task == @selected_task), :update => :spotlight, :show_project => true, :hidden => false } %>
|
46
46
|
<% i += 1 %>
|
47
47
|
<% end %>
|
48
48
|
|
@@ -1 +1 @@
|
|
1
|
-
page.replace "task_#{@task.id}", :partial => '/tasks/task', :locals => { :task => @task, :i => 1, :active => true, :highlight_task => false, :update => :spotlight, :hidden => false, :
|
1
|
+
page.replace "task_#{@task.id}", :partial => '/tasks/task', :locals => { :task => @task, :i => 1, :active => true, :highlight_task => false, :update => :spotlight, :hidden => false, :show_project => false }
|
data/app/views/user/login.rhtml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<div title="<%= title_helper %>" class="form">
|
4
4
|
<div class="form-padding">
|
5
|
-
|
5
|
+
<%=form_for :user, :html => {:id => 'loginForm'} do |f| %>
|
6
6
|
<table>
|
7
7
|
<tr class="two_columns">
|
8
8
|
<td class="prompt"><label>Login:</label></td>
|
data/app/views/user/signup.rhtml
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<div class="form-padding">
|
6
6
|
<%= start_form_tag_helper %>
|
7
|
-
<%= render :partial => 'edit', :locals => {:submit => false}
|
7
|
+
<%= render :partial => 'edit', :locals => {:submit => false} %><br/>
|
8
8
|
<%= render :partial => 'password', :locals => {:submit => false} %>
|
9
9
|
|
10
10
|
<div class="button-bar">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<ul class="tasks">
|
2
2
|
<% for task in @tasks do -%>
|
3
|
-
<li class="task"><div class="name"><%="#{h task.root_task.
|
3
|
+
<li class="task"><div class="name"><%="#{h task.root_task.project.name}: " unless @project%><%=h task.description %></div><div class="email" align="right"><span class="informal"><%=h task.root_task.project.name %></span></div></li>
|
4
4
|
<% end -%>
|
5
5
|
</ul>
|
data/app/views/works/_form.rhtml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
<!--[form:work]-->
|
2
2
|
|
3
|
-
<p><%=l :
|
4
|
-
<%= select 'work', '
|
5
|
-
<% if @work.
|
6
|
-
<%=image_detour_to('work_account.png', "#{l(:
|
3
|
+
<p><%=l :project%>:<br/>
|
4
|
+
<%= select 'work', 'project_id', @projects.map{|wa| [wa.name, wa.id]}.sort %>
|
5
|
+
<% if @work.project -%>
|
6
|
+
<%=image_detour_to('work_account.png', "#{l(:project)} #{@work.project.name}", {:controller => 'projects', :action => :edit, :id => @work.project}, {:class => 'image-submit', :style => 'vertical-align: bottom'}) %>
|
7
7
|
<% end -%>
|
8
|
-
<%=detour_to l(:
|
8
|
+
<%=detour_to l(:new_project), :controller => 'projects', :action => :new %>
|
9
9
|
</p>
|
10
10
|
|
11
11
|
<p><%=l :task%>:<br/>
|
@@ -1,10 +1,9 @@
|
|
1
|
-
|
2
|
-
<%=submit_tag('checkmark', :value => l(:save), :style => 'display: none')%>
|
1
|
+
<%=form_for @work, :url => with_detour(:controller => 'works', :action => 'create'), :html => {:id => "work_form"} do |f| %>
|
3
2
|
<%=hidden_field :work, :started_on, :value => @date %>
|
4
3
|
|
5
4
|
<tr>
|
6
5
|
<td id="account_cell" valign="bottom">
|
7
|
-
<%=select :
|
6
|
+
<%=f.select :project_id, [['', '']] + @projects.map{|wa| [wa.name, wa.id]}, :value => '' %>
|
8
7
|
</td>
|
9
8
|
<td valign="bottom">
|
10
9
|
<%=text_field_with_auto_complete :work, :description, {:class => :task_description,
|
@@ -19,13 +18,13 @@
|
|
19
18
|
e.focus();
|
20
19
|
e.select();
|
21
20
|
} else if(event.keyCode == 13) {
|
22
|
-
e = $('
|
21
|
+
e = $('work_project_id');
|
23
22
|
if(e.value == '') {
|
24
23
|
e.focus();
|
25
24
|
e.select();
|
26
25
|
return false;
|
27
26
|
}
|
28
|
-
}"}, :with => "'description=' + $('work_description').value + '&
|
27
|
+
}"}, :with => "'description=' + $('work_description').value + '&project_id=' + $('work_project_id').value"
|
29
28
|
%>
|
30
29
|
<br clear="all"/>
|
31
30
|
<% field = 'notes' %>
|
@@ -72,7 +71,7 @@
|
|
72
71
|
e.focus();
|
73
72
|
e.select();
|
74
73
|
} else if(event.keyCode == 13) {
|
75
|
-
e = $('
|
74
|
+
e = $('work_project_id');
|
76
75
|
if(e.value == '') {
|
77
76
|
e.focus();
|
78
77
|
e.select();
|
@@ -99,7 +98,7 @@
|
|
99
98
|
e.focus();
|
100
99
|
e.select();
|
101
100
|
} else if(event.keyCode == 13) {
|
102
|
-
e = $('
|
101
|
+
e = $('work_project_id');
|
103
102
|
if(e.value == '') {
|
104
103
|
e.focus();
|
105
104
|
e.select();
|
@@ -117,7 +116,7 @@
|
|
117
116
|
e.focus();
|
118
117
|
e.select();
|
119
118
|
} else if(event.keyCode == 13) {
|
120
|
-
e = $('
|
119
|
+
e = $('work_project_id');
|
121
120
|
if(e.value == '') {
|
122
121
|
e.focus();
|
123
122
|
e.select();
|
@@ -136,6 +135,7 @@
|
|
136
135
|
<%=text_field_with_auto_complete :work, :customer_name, {:value => '', :size => 16, :class => :task_description} %>
|
137
136
|
</td>
|
138
137
|
<td id="work_icons_cell" valign="bottom">
|
138
|
+
<%=submit_tag('checkmark', :value => l(:save))%>
|
139
139
|
</td>
|
140
140
|
</tr>
|
141
141
|
<% end %>
|
data/app/views/works/_row.rhtml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<tr id="work_<%=@work.id%>" style="border: 1px solid black; vertical-align: top">
|
2
2
|
<td>
|
3
3
|
<% remote_form_for :work, :url => {:action => :update_row, :id => @work.id, :next_field => :description}, :html => {:id => "work_#{@work.id}_form"} do |f|%>
|
4
|
-
<%=f.select :
|
4
|
+
<%=f.select :project_id, @projects.map {|wa| [wa.name, wa.id]}, {}, :id => "work_#{@work.id}_project_id", :onchange => "new Ajax.Request('/works/update_row/#{@work.id}?next_field=customer_id', {asynchronous:true, evalScripts:true, parameters:Form.serialize(form)})"%>
|
5
5
|
<% end %>
|
6
6
|
</td>
|
7
7
|
<td>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<ul class="tasks" style="width: 30em; background: white">
|
2
2
|
<% for task in @tasks do -%>
|
3
|
-
<li><div style="width: 40em"><%=task.id%><span class="informal"> <%="#{h task.root_task.
|
3
|
+
<li><div style="width: 40em"><%=task.id%><span class="informal"> <%="#{h task.root_task.project.name}: " unless @project%><%=h task.description %></span></div></li>
|
4
4
|
<% end -%>
|
5
5
|
</ul>
|
data/app/views/works/list.rhtml
CHANGED
@@ -9,10 +9,10 @@
|
|
9
9
|
<table>
|
10
10
|
<tr>
|
11
11
|
<td coslpan="3">
|
12
|
-
<label for="
|
12
|
+
<label for="report_filter_project_id"><%=l :project%></label>
|
13
13
|
</td>
|
14
14
|
<td>
|
15
|
-
<%=f.select :
|
15
|
+
<%=f.select :project_id, [[l(:all), nil]] + @projects.map{|wa|[wa.name, wa.id]}, {}, {:onchange => 'form.submit()'} %>
|
16
16
|
</td>
|
17
17
|
</tr>
|
18
18
|
<tr>
|
@@ -101,7 +101,7 @@
|
|
101
101
|
<tr>
|
102
102
|
<th><%=l :user %></th>
|
103
103
|
<th><%=l :done %></th>
|
104
|
-
<th><%=l :
|
104
|
+
<th><%=l :project %></th>
|
105
105
|
<th><%=l :description %></th>
|
106
106
|
<th><%=l :invoice %></th>
|
107
107
|
<th><%=l :started_at %></th>
|
@@ -112,7 +112,7 @@
|
|
112
112
|
<tr>
|
113
113
|
<td valign="top"><%=work.user && work.user.login %></td>
|
114
114
|
<td align="right" valign="top"><%='%.2f' % work.hours %></td>
|
115
|
-
<td valign="top"><%=work.
|
115
|
+
<td valign="top"><%=work.project.name %></td>
|
116
116
|
<%if work.task
|
117
117
|
link = "Task: #{work.task.description} <br/>"
|
118
118
|
else
|
@@ -138,7 +138,7 @@
|
|
138
138
|
<% if @period %>
|
139
139
|
<%=back_or_link_to l(:back), :controller => 'periods', :action => :show, :id => @period %>
|
140
140
|
<% else %>
|
141
|
-
<%=back_or_link_to l(:back), :controller => '
|
141
|
+
<%=back_or_link_to l(:back), :controller => 'projects', :action => :show, :id => @project %>
|
142
142
|
<% end %>
|
143
143
|
|
144
144
|
</div>
|
@@ -59,7 +59,7 @@
|
|
59
59
|
</Row>
|
60
60
|
|
61
61
|
<Row ss:AutoFitHeight="0" ss:Height="19.875">
|
62
|
-
<Cell ss:StyleID="header"><Data ss:Type="String"><%=l :
|
62
|
+
<Cell ss:StyleID="header"><Data ss:Type="String"><%=l :project%></Data></Cell>
|
63
63
|
<Cell ss:StyleID="header"><Data ss:Type="String"><%=l :user%></Data></Cell>
|
64
64
|
<Cell ss:StyleID="header"><Data ss:Type="String"><%=l :task%></Data></Cell>
|
65
65
|
<Cell ss:StyleID="header"><Data ss:Type="String"><%=l :description%></Data></Cell>
|
@@ -71,7 +71,7 @@
|
|
71
71
|
|
72
72
|
<% for work in @works %>
|
73
73
|
<Row>
|
74
|
-
<Cell><Data ss:Type="String"><%=work.
|
74
|
+
<Cell><Data ss:Type="String"><%=work.project.name %></Data></Cell>
|
75
75
|
<Cell><Data ss:Type="String"><%=work.user && work.user.name %></Data></Cell>
|
76
76
|
<Cell><Data ss:Type="String"><%=work.task && work.task.description %></Data></Cell>
|
77
77
|
<Cell><Data ss:Type="String"><%=work.description %></Data></Cell>
|
@@ -450,12 +450,12 @@
|
|
450
450
|
<Cell ss:StyleID="s37"><Data ss:Type="String">Merknad</Data></Cell>
|
451
451
|
</Row>
|
452
452
|
|
453
|
-
<% for
|
454
|
-
<% invoice_works_per_day = @
|
453
|
+
<% for project_id in @work_totals_per_project.keys %>
|
454
|
+
<% invoice_works_per_day = @work_totals_per_project[project_id][0]%>
|
455
455
|
<% if invoice_works_per_day.find{|total| total > 0} %>
|
456
456
|
<Row>
|
457
|
-
<Cell ss:StyleID="s24"><Data ss:Type="String"><%=
|
458
|
-
<Cell ss:StyleID="s25"><Data ss:Type="String"><%=
|
457
|
+
<Cell ss:StyleID="s24"><Data ss:Type="String"><%=Project.find(project_id).invoice_code %></Data></Cell>
|
458
|
+
<Cell ss:StyleID="s25"><Data ss:Type="String"><%=Project.find(project_id).name %></Data></Cell>
|
459
459
|
<Cell ss:StyleID="s25"><Data ss:Type="String"> X</Data></Cell>
|
460
460
|
<Cell ss:StyleID="s25"/>
|
461
461
|
<Cell ss:StyleID="s25"/>
|
@@ -469,11 +469,11 @@
|
|
469
469
|
</Row>
|
470
470
|
<% end %>
|
471
471
|
|
472
|
-
<% internal_works_per_day = @
|
472
|
+
<% internal_works_per_day = @work_totals_per_project[project_id][1]%>
|
473
473
|
<% if internal_works_per_day.find{|total| total > 0} %>
|
474
474
|
<Row>
|
475
|
-
<Cell ss:StyleID="s24"><Data ss:Type="String"><%=
|
476
|
-
<Cell ss:StyleID="s25"><Data ss:Type="String"><%=
|
475
|
+
<Cell ss:StyleID="s24"><Data ss:Type="String"><%=Project.find(project_id).invoice_code%></Data></Cell>
|
476
|
+
<Cell ss:StyleID="s25"><Data ss:Type="String"><%=Project.find(project_id).name %></Data></Cell>
|
477
477
|
<Cell ss:StyleID="s25"/>
|
478
478
|
<Cell ss:StyleID="s25"/>
|
479
479
|
<Cell ss:StyleID="s25"/>
|
@@ -528,25 +528,25 @@
|
|
528
528
|
<Cell ss:StyleID="s46"/>
|
529
529
|
<Cell ss:StyleID="s46"/>
|
530
530
|
<Cell ss:StyleID="s46"
|
531
|
-
ss:Formula="=IF(SUM(R[-<%=@
|
531
|
+
ss:Formula="=IF(SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),"")"><Data
|
532
532
|
ss:Type="String"></Data></Cell>
|
533
533
|
<Cell ss:StyleID="s46"
|
534
|
-
ss:Formula="=IF(SUM(R[-<%=@
|
534
|
+
ss:Formula="=IF(SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),"")"><Data
|
535
535
|
ss:Type="String"></Data></Cell>
|
536
536
|
<Cell ss:StyleID="s46"
|
537
|
-
ss:Formula="=IF(SUM(R[-<%=@
|
537
|
+
ss:Formula="=IF(SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),"")"><Data
|
538
538
|
ss:Type="String"></Data></Cell>
|
539
539
|
<Cell ss:StyleID="s46"
|
540
|
-
ss:Formula="=IF(SUM(R[-<%=@
|
540
|
+
ss:Formula="=IF(SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),"")"><Data
|
541
541
|
ss:Type="String"></Data></Cell>
|
542
542
|
<Cell ss:StyleID="s46"
|
543
|
-
ss:Formula="=IF(SUM(R[-<%=@
|
543
|
+
ss:Formula="=IF(SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),"")"><Data
|
544
544
|
ss:Type="String"></Data></Cell>
|
545
545
|
<Cell ss:StyleID="s46"
|
546
|
-
ss:Formula="=IF(SUM(R[-<%=@
|
546
|
+
ss:Formula="=IF(SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),"")"><Data
|
547
547
|
ss:Type="String"></Data></Cell>
|
548
548
|
<Cell ss:StyleID="s46"
|
549
|
-
ss:Formula="=IF(SUM(R[-<%=@
|
549
|
+
ss:Formula="=IF(SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),SUM(R[-<%=@work_totals_per_project.size*2+2%>]C:R[-1]C),"")"><Data
|
550
550
|
ss:Type="String"></Data></Cell>
|
551
551
|
<Cell ss:StyleID="s47"/>
|
552
552
|
</Row>
|