Merge branch 'feature/rails3' into feature/rails3_drop_translations_we_cannot_support_at_the_moment

pull/190/head
jwollert 12 years ago
commit 96dd9c77ca
  1. 3
      .gitignore
  2. 22
      .travis.yml
  3. 28
      Gemfile
  4. 204
      Gemfile.lock
  5. 11
      README.rdoc
  6. 3
      Rakefile
  7. BIN
      app/assets/images/budget.png
  8. 67
      app/assets/javascripts/action_menu.js
  9. 166
      app/assets/javascripts/ajaxappender.js
  10. 212
      app/assets/javascripts/application.js
  11. 39
      app/assets/javascripts/context_menu.js
  12. 71
      app/assets/javascripts/issues.js.erb
  13. 71
      app/assets/stylesheets/default/application.css.erb
  14. 12
      app/controllers/application_controller.rb
  15. 12
      app/controllers/issues/reports_controller.rb
  16. 27
      app/controllers/issues_controller.rb
  17. 41
      app/controllers/journals_controller.rb
  18. 3
      app/controllers/members_controller.rb
  19. 12
      app/controllers/time_entries/reports_controller.rb
  20. 2
      app/controllers/versions_controller.rb
  21. 19
      app/helpers/application_helper.rb
  22. 8
      app/helpers/custom_fields_helper.rb
  23. 48
      app/helpers/issues_helper.rb
  24. 8
      app/helpers/journals_helper.rb
  25. 20
      app/helpers/settings_helper.rb
  26. 23
      app/helpers/timelog_helper.rb
  27. 2
      app/helpers/versions_helper.rb
  28. 10
      app/mailers/user_mailer.rb
  29. 2
      app/models/document.rb
  30. 3
      app/models/issue.rb
  31. 11
      app/models/mail_handler.rb
  32. 33
      app/models/permitted_params.rb
  33. 2
      app/models/project.rb
  34. 11
      app/models/query.rb
  35. 4
      app/models/query_column.rb
  36. 12
      app/models/version.rb
  37. 2
      app/models/wiki_page.rb
  38. 6
      app/views/account/_login.html.erb
  39. 6
      app/views/account/login.html.erb
  40. 2
      app/views/account/lost_password.html.erb
  41. 4
      app/views/account/password_recovery.html.erb
  42. 16
      app/views/account/register.html.erb
  43. 2
      app/views/admin/_no_data.html.erb
  44. 10
      app/views/admin/projects.html.erb
  45. 4
      app/views/auth_sources/_form.html.erb
  46. 8
      app/views/auth_sources/index.html.erb
  47. 2
      app/views/boards/edit.html.erb
  48. 2
      app/views/boards/index.html.erb
  49. 6
      app/views/boards/show.html.erb
  50. 2
      app/views/common/_calendar.html.erb
  51. 14
      app/views/common/_tabs.html.erb
  52. 10
      app/views/custom_fields/_index.html.erb
  53. 19
      app/views/documents/_form.html.erb
  54. 2
      app/views/documents/edit.html.erb
  55. 34
      app/views/documents/index.html.erb
  56. 16
      app/views/enumerations/_form.html.erb
  57. 28
      app/views/enumerations/index.html.erb
  58. 4
      app/views/files/index.html.erb
  59. 27
      app/views/files/new.html.erb
  60. 6
      app/views/groups/_form.html.erb
  61. 2
      app/views/groups/_memberships.html.erb
  62. 2
      app/views/groups/_users.html.erb
  63. 2
      app/views/groups/edit.html.erb
  64. 2
      app/views/groups/index.html.erb
  65. 2
      app/views/issue_categories/destroy.html.erb
  66. 2
      app/views/issue_categories/edit.html.erb
  67. 4
      app/views/issue_relations/_form.html.erb
  68. 8
      app/views/issue_statuses/_form.html.erb
  69. 8
      app/views/issue_statuses/index.html.erb
  70. 4
      app/views/issues/_attributes.html.erb
  71. 8
      app/views/issues/_edit.html.erb
  72. 18
      app/views/issues/_form_custom_fields.html.erb
  73. 44
      app/views/issues/_list_simple.html.erb
  74. 24
      app/views/issues/bulk_edit.html.erb
  75. 4
      app/views/issues/index.html.erb
  76. 18
      app/views/issues/moves/new.html.erb
  77. 4
      app/views/issues/previews/create.html.erb
  78. 7
      app/views/issues/reports/_report_category.html.erb
  79. 66
      app/views/issues/show.html.erb
  80. 2
      app/views/layouts/base.html.erb
  81. 22
      app/views/ldap_auth_sources/_form.html.erb
  82. 4
      app/views/messages/_form.html.erb
  83. 4
      app/views/my/_sidebar.html.erb
  84. 4
      app/views/my/account.html.erb
  85. 6
      app/views/my/blocks/_timelog.html.erb
  86. 2
      app/views/my/first_login.html.erb
  87. 6
      app/views/my/password.html.erb
  88. 2
      app/views/news/edit.html.erb
  89. 2
      app/views/news/show.html.erb
  90. 2
      app/views/projects/_form.html.erb
  91. 16
      app/views/projects/settings/_activities.html.erb
  92. 4
      app/views/projects/settings/_boards.html.erb
  93. 4
      app/views/projects/settings/_issue_categories.html.erb
  94. 2
      app/views/projects/settings/_members.html.erb
  95. 14
      app/views/projects/settings/_versions.html.erb
  96. 2
      app/views/projects/show.html.erb
  97. 2
      app/views/queries/_filters.html.erb
  98. 10
      app/views/queries/_form.html.erb
  99. 2
      app/views/queries/edit.html.erb
  100. 8
      app/views/repositories/_dir_list.html.erb
  101. Some files were not shown because too many files have changed in this diff Show More

3
.gitignore vendored

@ -20,7 +20,7 @@
/config/configuration.yml
/config/database.yml
/config/email.yml
#/config/initializers/session_store.rb
/config/secret_token.yml
/coverage
/db/*.db
/db/*.sqlite3
@ -41,6 +41,7 @@
/doc/app
#/Gemfile.lock
/Gemfile.local
/Gemfile.plugins
/.rvmrc*
/.ruby-version

@ -1,17 +1,29 @@
language: ruby
rvm:
- 1.9.3
- 1.9.2
env:
- "RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
- "RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
- "RAILS_ENV=test DB=sqlite BUNDLE_WITHOUT=rmagick:mysql:mysql2:postgres"
script: "bundle exec rake"
# mysql2
- "TEST_SUITE=test:units RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
- "TEST_SUITE=test:functionals RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
- "TEST_SUITE=test:integration RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
- "TEST_SUITE=spec RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
- "TEST_SUITE=cucumber RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
# postgres
- "TEST_SUITE=test:units RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
- "TEST_SUITE=test:functionals RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
- "TEST_SUITE=test:integration RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
- "TEST_SUITE=spec RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
- "TEST_SUITE=cucumber RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
script: "bundle exec rake $TEST_SUITE"
before_install:
- "sudo apt-get update -qq"
- "sudo apt-get --no-install-recommends install git subversion"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
before_script:
- "RAILS_ENV=production bundle exec rake ci:travis:prepare"
after_success:
- "RAILS_ENV=production bundle exec rake coveralls:push"
branches:
only:
- feature/rails3

@ -1,12 +1,6 @@
source 'https://rubygems.org'
gem "rails", :git => "https://github.com/rails/rails.git", :branch => "3-2-13"
# be careful when updating past 3-2-13
# rails commit 9bd5c86c3bdc70bf29be7f756d1dec2fdd4eaaf0 resultsin a bug, when creating WikiContent Objects via FactoryGirl.
# So we use the commit before that for now.
# gem "rails", :git => "https://github.com/rails/rails.git", :ref => "bb0007f70420445f140004587aa1228895ab6653"
gem "sprockets", :git => "https://github.com/tessi/sprockets.git", :branch => "2_2_1-backport"
gem "rails", :git => "https://github.com/rails/rails.git", :branch => "3-2-stable"
gem "coderay", "~> 1.0.5"
gem "rubytree", "~> 0.8.3"
@ -33,6 +27,9 @@ gem 'htmldiff'
gem 'execjs'
gem 'therubyracer'
# will need to be removed once we are on rails4 as it will be part of the rails4 core
gem 'strong_parameters'
group :production do
# we use dalli as standard memcache client remove this if you don't
# requires memcached 1.4+
@ -55,28 +52,29 @@ gem 'jquery-rails', '~> 2.0.3'
gem "i18n-js", :git => "https://github.com/fnando/i18n-js.git", :ref => '8801f8d17ef96c48a7a0269e251fcf1648c8f441'
group :test do
gem 'shoulda', '~> 3.1.1'
gem 'shoulda'
gem 'object-daddy', :git => 'https://github.com/awebneck/object_daddy.git'
gem 'mocha', '~> 0.13.1', :require => false
gem "launchy", "~> 2.1.0"
gem "launchy", "~> 2.3.0"
gem "factory_girl_rails", "~> 4.0"
gem 'cucumber-rails', :require => false
gem 'rack_session_access'
gem 'database_cleaner'
gem "cucumber-rails-training-wheels" # http://aslakhellesoy.com/post/11055981222/the-training-wheels-came-off
gem "rspec-rails", "~> 2.0", :group => :development
gem 'rspec-example_disabler', :git => 'https://github.com/finnlabs/rspec-example_disabler.git'
gem 'capybara'
gem 'spork-rails'
gem 'spork-testunit' # needed for test-unit only
gem 'selenium-webdriver'
gem 'rb-readline' # ruby on CI needs this
# why in Gemfile? see: https://github.com/guard/guard-test
gem 'ruby-prof'
gem 'simplecov', ">= 0.8.pre"
gem 'coveralls', :require => false
end
group :openid do
gem "ruby-openid", '~> 2.1.4', :require => 'openid'
gem "ruby-openid", '~> 2.2.3', :require => 'openid'
end
group :development do
@ -86,9 +84,9 @@ group :development do
gem 'rails-dev-tweaks', '~> 0.6.1'
gem 'guard-rspec'
gem 'guard-cucumber'
gem 'guard-spork'
gem 'rb-fsevent', :group => :test
gem 'rack-mini-profiler'
gem 'thin'
end
group :development, :test do
@ -175,8 +173,8 @@ platforms :jruby do
end
end
# Load Gemfile.local and plugins' Gemfiles
Dir.glob File.expand_path("../{Gemfile.local,lib/plugins/*/Gemfile}", __FILE__) do |file|
# Load Gemfile.local, Gemfile.plugins and plugins' Gemfiles
Dir.glob File.expand_path("../{Gemfile.local,Gemfile.plugins,lib/plugins/*/Gemfile}", __FILE__) do |file|
next unless File.readable?(file)
instance_eval File.read(file)
end

@ -4,6 +4,12 @@ GIT
specs:
object-daddy (1.1.0)
GIT
remote: https://github.com/finnlabs/rspec-example_disabler.git
revision: 05b1af7d349865b3af39d603016803c958e0b95b
specs:
rspec-example_disabler (0.0.1)
GIT
remote: https://github.com/fnando/i18n-js.git
revision: 8801f8d17ef96c48a7a0269e251fcf1648c8f441
@ -14,15 +20,15 @@ GIT
GIT
remote: https://github.com/rails/rails.git
revision: 488699166c3558963fa82d4689a35f8c3fd93f47
branch: 3-2-13
revision: b0f96d4436619b25b8024cc70a71c77bcfc12bf6
branch: 3-2-stable
specs:
actionmailer (3.2.13.rc2)
actionpack (= 3.2.13.rc2)
mail (~> 2.5.3)
actionpack (3.2.13.rc2)
activemodel (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
actionmailer (3.2.13)
actionpack (= 3.2.13)
mail (~> 2.5.4)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
@ -30,31 +36,31 @@ GIT
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.13.rc2)
activesupport (= 3.2.13.rc2)
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activerecord (3.2.13.rc2)
activemodel (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
activerecord (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.13.rc2)
activemodel (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
activesupport (3.2.13.rc2)
i18n (= 0.6.1)
activeresource (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
activesupport (3.2.13)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
rails (3.2.13.rc2)
actionmailer (= 3.2.13.rc2)
actionpack (= 3.2.13.rc2)
activerecord (= 3.2.13.rc2)
activeresource (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
rails (3.2.13)
actionmailer (= 3.2.13)
actionpack (= 3.2.13)
activerecord (= 3.2.13)
activeresource (= 3.2.13)
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13.rc2)
railties (3.2.13.rc2)
actionpack (= 3.2.13.rc2)
activesupport (= 3.2.13.rc2)
railties (= 3.2.13)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
@ -69,17 +75,6 @@ GIT
activerecord (>= 3.0.0)
paper_trail (~> 2)
GIT
remote: https://github.com/tessi/sprockets.git
revision: f8cf7a6d158f000096a94fb4be74195e8459d0fd
branch: 2_2_1-backport
specs:
sprockets (2.2.1)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
GEM
remote: https://rubygems.org/
specs:
@ -89,8 +84,6 @@ GEM
activerecord (>= 3.0.0)
binding_of_caller (0.7.1)
debug_inspector (>= 0.0.1)
bourne (1.4.0)
mocha (~> 0.13.2)
builder (3.0.4)
bullet (4.6.0)
uniform_notifier
@ -110,8 +103,15 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.6.2)
colorize (0.5.8)
columnize (0.3.6)
cucumber (1.3.1)
coveralls (0.6.7)
colorize
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
thor
cucumber (1.3.2)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12.0)
@ -123,15 +123,16 @@ GEM
rails (~> 3.0)
cucumber-rails-training-wheels (1.0.0)
cucumber-rails (>= 1.1.1)
dalli (2.6.2)
database_cleaner (0.9.1)
daemons (1.1.9)
dalli (2.6.3)
database_cleaner (1.0.1)
debug_inspector (0.0.2)
debugger (1.5.0)
debugger (1.6.0)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.1)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.0)
debugger-ruby_core_source (1.2.2)
delayed_job (3.0.5)
activesupport (~> 3.0)
delayed_job_active_record (0.4.4)
@ -139,6 +140,7 @@ GEM
delayed_job (~> 3.0)
diff-lcs (1.2.4)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (4.2.0)
@ -160,19 +162,15 @@ GEM
guard-cucumber (1.4.0)
cucumber (>= 1.2.0)
guard (>= 1.1.0)
guard-rspec (2.5.4)
guard (>= 1.1)
rspec (~> 2.11)
guard-spork (1.5.0)
childprocess (>= 0.2.3)
guard (>= 1.1)
spork (>= 0.8.4)
guard-test (0.8.0)
guard (>= 1.1)
guard-rspec (3.0.0)
guard (>= 1.8)
rspec (~> 2.13)
guard-test (1.0.0)
guard (>= 1.8)
test-unit (~> 2.2)
hike (1.2.2)
htmldiff (0.0.1)
i18n (0.6.1)
i18n (0.6.4)
interception (0.3)
journey (1.0.4)
jquery-rails (2.0.3)
@ -181,21 +179,20 @@ GEM
jquery-ui-rails (4.0.2)
jquery-rails
railties (>= 3.1.0)
json (1.7.7)
launchy (2.1.2)
json (1.8.0)
launchy (2.3.0)
addressable (~> 2.3)
letter_opener (1.0.0)
launchy (>= 2.0.4)
libv8 (3.11.8.17)
listen (1.0.3)
listen (1.1.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
loofah (1.2.1)
nokogiri (>= 1.4.4)
lumberjack (1.0.3)
mail (2.5.3)
i18n (>= 0.4.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.1)
@ -203,7 +200,7 @@ GEM
mime-types (1.23)
mocha (0.13.3)
metaclass (~> 0.0.1)
multi_json (1.7.2)
multi_json (1.7.4)
mysql (2.9.1)
mysql2 (0.3.11)
nokogiri (1.5.9)
@ -214,19 +211,19 @@ GEM
polyglot (0.3.3)
prototype-rails (3.2.1)
rails (~> 3.2)
pry (0.9.12.1)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
pry-debugger (0.2.2)
debugger (~> 1.3)
pry (~> 0.9.10)
pry-doc (0.4.5)
pry-doc (0.4.6)
pry (>= 0.9)
yard (>= 0.8)
pry-rails (0.2.2)
pry-rails (0.3.0)
pry (>= 0.9.10)
pry-rescue (1.1.0)
pry-rescue (1.1.1)
interception (>= 0.3)
pry
pry-stack_explorer (0.4.9)
@ -249,8 +246,8 @@ GEM
railties (~> 3.1)
rails-footnotes (3.7.9)
rails (>= 3.0.0)
rails_autolink (1.0.9)
rails (~> 3.1)
rails_autolink (1.1.0)
rails (> 3.1)
rake (10.0.4)
rb-fsevent (0.9.3)
rb-inotify (0.9.0)
@ -260,7 +257,9 @@ GEM
rb-readline (0.5.0)
rdoc (3.12.2)
json (~> 1.4)
ref (1.0.4)
ref (1.0.5)
rest-client (1.6.7)
mime-types (>= 1.16)
rmagick (2.13.2)
rspec (2.13.0)
rspec-core (~> 2.13.0)
@ -270,20 +269,20 @@ GEM
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rspec-rails (2.13.1)
rspec-rails (2.13.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
ruby-openid (2.1.8)
ruby-openid (2.2.3)
ruby-prof (0.13.0)
rubytree (0.8.3)
json (>= 1.7.5)
structured_warnings (>= 0.1.3)
rubyzip (0.9.9)
sass (3.2.8)
sass (3.2.9)
sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
@ -293,30 +292,40 @@ GEM
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
shoulda (3.1.1)
shoulda-context (~> 1.0)
shoulda-matchers (~> 1.2)
shoulda-context (1.1.1)
shoulda-matchers (1.5.6)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.1.2)
shoulda-matchers (2.1.0)
activesupport (>= 3.0.0)
bourne (~> 1.3)
slop (3.4.4)
spork (1.0.0rc3)
spork-rails (3.2.1)
rails (>= 3.0.0, < 3.3.0)
spork (>= 1.0rc0)
spork-testunit (0.0.8)
spork (>= 0.6.0)
simplecov (0.8.0.pre)
multi_json
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
slop (3.4.5)
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.7)
sqlite3-ruby (1.2.5)
strong_parameters (0.2.1)
actionpack (~> 3.0)
activemodel (~> 3.0)
railties (~> 3.0)
structured_warnings (0.1.4)
test-unit (2.5.4)
test-unit (2.5.5)
therubyracer (0.11.4)
libv8 (~> 3.11.8.12)
ref
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.18.1)
tilt (1.3.7)
tinymce-rails (3.5.8.1)
tilt (1.4.1)
tinymce-rails (3.5.8.2)
railties (>= 3.1.1)
tinymce-rails-langs (0.1)
tinymce-rails (>= 3.4.9)
@ -324,7 +333,7 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.37)
uglifier (2.0.1)
uglifier (2.1.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
uniform_notifier (1.2.0)
@ -345,6 +354,7 @@ DEPENDENCIES
capybara
coderay (~> 1.0.5)
coffee-rails (~> 3.2.1)
coveralls
cucumber-rails
cucumber-rails-training-wheels
dalli
@ -356,14 +366,13 @@ DEPENDENCIES
globalize3!
guard-cucumber
guard-rspec
guard-spork
guard-test
htmldiff
i18n-js!
jquery-rails (~> 2.0.3)
jquery-ui-rails
jruby-openssl
launchy (~> 2.1.0)
launchy (~> 2.3.0)
letter_opener (~> 1.0.0)
loofah
mocha (~> 0.13.1)
@ -387,19 +396,20 @@ DEPENDENCIES
rb-readline
rdoc (>= 2.4.2)
rmagick (>= 1.15.17)
rspec-example_disabler!
rspec-rails (~> 2.0)
ruby-openid (~> 2.1.4)
ruby-openid (~> 2.2.3)
ruby-prof
rubytree (~> 0.8.3)
sass-rails (~> 3.2.3)
selenium-webdriver
shoulda (~> 3.1.1)
spork-rails
spork-testunit
sprockets!
shoulda
simplecov (>= 0.8.pre)
sqlite3
sqlite3-ruby (< 1.3)
strong_parameters
therubyracer
thin
tinymce-rails
tinymce-rails-langs
uglifier (>= 1.0.3)

@ -1,5 +1,9 @@
= OpenProject
{<img src="https://travis-ci.org/opf/openproject.png?branch=feature/rails3" alt="Build Status" />}[https://travis-ci.org/opf/openproject]
{<img src="https://gemnasium.com/opf/openproject.png" alt="Dependency Status" />}[https://gemnasium.com/opf/openproject]
{<img src="https://coveralls.io/repos/opf/openproject/badge.png?branch=feature%2Frails3" alt="Coverage Status" />}[https://coveralls.io/r/opf/openproject?branch=feature%2Frails3]
== This is a beta-Release Branch
You are currently on the beta-release branch. We prepare the OpenProject migration from rails version 2.3 to 3.2.
@ -7,7 +11,7 @@ Although this is the main development branch, it is *not* a stable code base. Fo
== What we do?
OpenProject is a web-based project management software, driven by an active group of open source enthusiasts: software engineers, project managers, creatives, and consultants. OpenProject is supported by companies as well as individuals. What we share? Its the vision to build great project collaboration software based on open source.
OpenProject is a web-based project management software, driven by an active group of open source enthusiasts: software engineers, project managers, creatives, and consultants. OpenProject is supported by companies as well as individuals. What we share? It is the vision to build great project collaboration software based on open source.
The OpenProject Foundation (OPF) will give official guidance to the project and the community and oversees contributions and decisions.
More information can be found on our website[https://www.openproject.org] and soon in the doc directory.
@ -30,8 +34,7 @@ In case you find a bug or need a feature, please report at https://www.openproje
== License
OpenProject is licensed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version.
OpenProject is licensed under the terms of the GNU General Public License version 3.
== Icons credits:
Thanks to Le Moign Vincent and his fabulous Minicons icons on webalys.com[http://www.webalys.com/minicons/icons-free-pack.php].
Thanks to Le Moign Vincent and his fabulous Minicons icons on webalys.com[http://www.webalys.com/minicons/icons-free-pack.php].

@ -5,3 +5,6 @@
require File.expand_path('../config/application', __FILE__)
OpenProject::Application.load_tasks
Rake::Task[:default].clear
task :default => 'test:suite:run'

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

@ -0,0 +1,67 @@
/*
The action menu is a menu that usually belongs to an OpenProject entity (like an Issue, WikiPage, Meeting, ..).
Most likely it looks like this:
<ul class="action_menu_main">
<li><a>Menu item text</a></li>
<li><a>Menu item text</a></li>
<li class="drop-down">
<a class="icon icon-more" href="javascript:">More functions</a>
<ul style="display:none;" class="action_menu_more">
<li><a>Menu item text</a></li>
</ul>
</li>
</ul>
The following code is responsible to open and close the "more functions" submenu.
*/
jQuery(function ($) {
var animationSpeed = 100; // ms
function menu_top_position(menu) {
// if an h2 tag follows the submenu should unfold out at the border
var menu_start_position;
if (menu.next().get(0) != undefined && (menu.next().get(0).tagName == 'H2')){
menu_start_position = menu.next().innerHeight() + menu.next().position().top;
}
else if(menu.next().hasClass("wiki-content") && menu.next().children().next().first().get(0) != undefined && menu.next().children().next().first().get(0).tagName == 'H1'){
var wiki_heading = menu.next().children().next().first();
menu_start_position = wiki_heading.innerHeight() + wiki_heading.position().top;
}
return menu_start_position;
};
function close_menu(event) {
var menu = $(event.data.menu);
// do not close the menu, if the user accidentally clicked next to a menu item (but still within the menu)
if ( event.target !== menu.find(" > li.drop-down.open > ul").get(0)) {
menu.find(" > li.drop-down.open").removeClass("open").find("> ul").slideUp(animationSpeed);
// no need to watch for clicks, when the menu is already closed
$('html').off('click', close_menu);
};
};
function open_menu(menu) {
var drop_down = menu.find(" > li.drop-down")
// do not open a menu, which is already open
if ( !drop_down.hasClass('open') ) {
drop_down.find('> ul').slideDown(animationSpeed, function(){
drop_down.find('li > a:first').focus();
// when clicking on something, which is not the menu, close the menu
$('html').on('click', {menu: menu.get(0)}, close_menu);
});
drop_down.addClass('open');
};
};
// open the given submenu when clicking on it
function install_menu_logic(menu) {
menu.find(" > li.drop-down").click(function(event) {
$(this).find("ul.action_menu_more").css({ top: menu_top_position(menu) });
open_menu(menu);
});
};
$('.action_menu_main').each(function(idx, menu){
install_menu_logic($(menu));
});
});

@ -0,0 +1,166 @@
(function ($) {
var AjaxAppender = function (options) {
var append_href,
close,
target_container,
is_inplace,
is_loaded,
state_loading,
state_loaded,
replace_with_close,
replace_with_open,
slideIn,
init;
options = $.extend(true,
{},
{ loading_class: 'loading',
loading: null,
loaded: null,
load_target: null,
trigger: '.ajax_append',
container_class: 'ajax_appended_information',
indicator_class: 'ajax_indicator',
hide_text: 'Hide',
loading_text: null
},
options);
close = function () {
var close_link = $(this),
information_window = close_link.siblings('.' + options.container_class);
replace_with_open(close_link);
information_window.slideUp();
};
append_href = function (link) {
var target = target_container(link),
loading_div,
url = link.attr('href');
if (is_loaded(link)) {
state_loaded(target, link);
}
else {
state_loading(target);
$.ajax({ url: url,
headers: { Accept: 'text/javascript' },
complete: function (jqXHR) {
target.html(jqXHR.responseText);
state_loaded(target, link);
}
});
}
};
is_inplace = function() {
return options.load_target === null;
};
is_loaded = function(link) {
var container = target_container(link);
return container.children().not('.' + options.indicator_class).size() > 0;
};
target_container = function(link) {
var target,
container_string = '<div class="' + options.container_class + '"></div>',
container;
if (is_inplace()) {
target = link.parent();
}
else {
target = $(options.load_target);
}
container = target.find('.' + options.container_class);
if (container.size() === 0) {
container = $(container_string);
target.append(container);
}
return container;
};
state_loading = function (target) {
var loading = $('<span class="' + options.indicator_class + '"></span>');
if (options.loading_text !== null) {
loading.html(options.loading_text);
}
target.addClass(options.loading_class);
target.append(loading);
if (options.loading !== null) {
options.loading.call(this, target);
}
};
state_loaded = function (target, link) {
target.removeClass(options.loading_class);
if (is_inplace()) {
replace_with_close(link, true);
}
if (options.loaded !== null) {
target.slideDown(function() {
options.loaded.call(this, target, link);
});
}
else{
target.slideDown();
}
};
replace_with_close = function (to_replace, hide) {
var close_link = $('<a href="javascript:void(0)">' + options.hide_text + '</a>');
to_replace.after(close_link);
if (hide) {
to_replace.hide();
}
else {
to_replace.remove();
}
close_link.click(close);
};
replace_with_open = function(to_replace) {
var load_link = to_replace.siblings(options.trigger);
to_replace.remove();
/* this link is never removed, only hidden */
load_link.show();
};
$(options.trigger).click(function(link) {
append_href($(this));
return false;
});
return this;
};
if ($.ajaxAppend) {
return;
}
$.ajaxAppend = function (options) {
AjaxAppender(options);
return this;
};
}(jQuery));

@ -21,12 +21,15 @@
//= require controls
//= require i18n/translations
//= require select2
//= require action_menu
//= require openproject
//= require breadcrumb
//= require findDomElement
//= require context_menu
//= require jstoolbar
//= require calendar
//= require ajaxappender
//= require issues
//source: http://stackoverflow.com/questions/8120065/jquery-and-prototype-dont-work-together-with-array-prototype-reverse
if (typeof []._reverse == 'undefined') {
@ -750,7 +753,6 @@ jQuery(document).ready(function($) {
};
// open and close the main-menu sub-menus
$("#main-menu li:has(ul) > a").not("ul ul a")
.append("<span class='toggler'></span>")
@ -801,7 +803,6 @@ jQuery(document).ready(function($) {
return false;
});
$("#account-nav").onClickDropDown();
$(".action_menu_main").onClickDropDown();
// deal with potentially problematic super-long titles
$(".title-bar h2").css({paddingRight: $(".title-bar-actions").outerWidth() + 15 });
@ -893,175 +894,7 @@ $(window).bind('resizeEnd', function() {
}
});
/* this could and should be moved into separate file once the asset pipeline
is in place */
(function ($) {
var AjaxAppender = function (options) {
var append_href,
close,
target_container,
is_inplace,
is_loaded,
state_loading,
state_loaded,
replace_with_close,
replace_with_open,
slideIn,
init;
options = $.extend(true,
{},
{ loading_class: 'loading',
loading: null,
loaded: null,
load_target: null,
trigger: '.ajax_append',
container_class: 'ajax_appended_information',
indicator_class: 'ajax_indicator',
hide_text: 'Hide',
loading_text: null
},
options);
close = function () {
var close_link = $(this),
information_window = close_link.siblings('.' + options.container_class);
replace_with_open(close_link);
information_window.slideUp();
};
append_href = function (link) {
var target = target_container(link),
loading_div,
url = link.attr('href');
if (is_loaded(link)) {
state_loaded(target, link)
}
else {
state_loading(target);
$.ajax({ url: url,
headers: { Accept: 'text/javascript' },
complete: function (jqXHR) {
target.html(jqXHR.responseText);
state_loaded(target, link);
}
});
}
};
is_inplace = function() {
return options.load_target === null
};
is_loaded = function(link) {
var container = target_container(link);
return container.children().not('.' + options.indicator_class).size() > 0
};
target_container = function(link) {
var target,
container_string = '<div class="' + options.container_class + '"></div>',
container;
if (is_inplace()) {
target = link.parent();
}
else {
target = $(options.load_target)
}
container = target.find('.' + options.container_class);
if (container.size() === 0) {
container = $(container_string);
target.append(container);
}
return container
};
state_loading = function (target) {
var loading = $('<span class="' + options.indicator_class + '"></span>');
if (options.loading_text !== null) {
loading.html(options.loading_text);
}
target.addClass(options.loading_class);
target.append(loading);
if (options.loading !== null) {
options.loading.call(this, target);
}
};
state_loaded = function (target, link) {
target.removeClass(options.loading_class);
if (is_inplace()) {
replace_with_close(link, true);
}
if (options.loaded !== null) {
target.slideDown(function() {
options.loaded.call(this, target);
});
}
else{
target.slideDown();
}
};
replace_with_close = function (to_replace, hide) {
var close_link = $('<a href="javascript:void(0)">' + options.hide_text + '</a>');
to_replace.after(close_link);
if (hide) {
to_replace.hide();
}
else {
to_replace.remove();
}
close_link.click(close);
};
replace_with_open = function(to_replace) {
var load_link = to_replace.siblings(options.trigger);
to_replace.remove();
/* this link is never removed, only hidden */
load_link.show();
};
$(options.trigger).click(function(link) {
append_href($(this));
return false;
});
return this;
};
if ($.ajaxAppend) {
return;
};
$.ajaxAppend = function (options) {
AjaxAppender(options);
return this;
};
}(jQuery));
var Administration = (function ($) {
var update_default_language_options,
@ -1507,43 +1340,4 @@ var Preview = (function ($) {
});
})(jQuery);
var Issue = Issue || {};
Issue.Show = (function($) {
var init;
init = function () {
$.ajaxAppend({
trigger: '.action_menu_main .edit',
indicator_class: 'ajax-indicator',
load_target: '#update',
loading_text: I18n.t("js.ajax.loading"),
loading_class: 'box loading',
loading: function(update) {
$('html, body').animate({
scrollTop: $(update).offset().top
}, 200);
},
loaded: function(update) {
$('html, body').animate({
scrollTop: $(update).offset().top
}, 200);
$("#notes").focus();
}
});
$.ajaxAppend({
trigger: '.description-details',
indicator_class: 'ajax-indicator',
loading_class: 'text-diff',
hide_text: I18n.t("js.ajax.hide")
} );
};
$('document').ready(function () {
if ($('body.controller-issues.action-show').size() > 0) {
init();
};
});
})(jQuery);

@ -1,40 +1,5 @@
/* redMine - project management software
Copyright (C) 2006-2008 Jean-Philippe Lang */
jQuery(document).ready(function($) {
$.fn.onClickDropDown = function(){
var that = this;
$('html').click(function() {
that.find(" > li.drop-down.open").removeClass("open").find("> ul").mySlide();
that.removeClass("hover");
});
// Do not close the login window when using it
that.find("li li").click(function(event){
$(document).trigger(event); // pass click-event to rails ujs-handler
event.stopPropagation();
});
this.find(" > li.drop-down").click(function(event) {
// if an h2 tag follows the submenu should unfold out at the border
var menu_start_position;
if (that.next().get(0) != undefined && (that.next().get(0).tagName == 'H2')){
menu_start_position = that.next().innerHeight() + that.next().position().top;
that.find("ul.action_menu_more").css({ top: menu_start_position });
}
else if(that.next().hasClass("wiki-content") && that.next().children().next().first().get(0) != undefined && that.next().children().next().first().get(0).tagName == 'H1'){
var wiki_heading = that.next().children().next().first();
menu_start_position = wiki_heading.innerHeight() + wiki_heading.position().top;
that.find("ul.action_menu_more").css({ top: menu_start_position });
}
$(this).toggleSubmenu(that);
$(document).trigger(event); // pass click-event to rails ujs-handler
return false;
});
};
});
var observingContextMenuClick;
ContextMenu = Class.create();
@ -48,11 +13,11 @@ ContextMenu.prototype = {
Event.observe(document, 'contextmenu', this.RightClick.bindAsEventListener(this));
observingContextMenuClick = true;
}
this.unselectAll();
this.lastSelected = null;
},
RightClick: function(e) {
this.hideMenu();
// do not show the context menu on links

@ -0,0 +1,71 @@
var Issue = Issue || {};
Issue.Show = (function($) {
var init;
init = function () {
$.ajaxAppend({
trigger: '.action_menu_main .edit',
indicator_class: 'ajax-indicator',
load_target: '#update',
loading_text: I18n.t("js.ajax.loading"),
loading_class: 'box loading',
loading: function(update) {
$('html, body').animate({
scrollTop: $(update).offset().top
}, 200);
},
loaded: function(update) {
$('html, body').animate({
scrollTop: $(update).offset().top
}, 200);
$("#notes").focus();
}
});
$.ajaxAppend({
trigger: '.quote-link',
indicator_class: 'ajax-indicator',
load_target: '#update',
loading_text: I18n.t("js.ajax.loading"),
loading_class: 'box loading',
loading: function(update) {
$('html, body').animate({
scrollTop: $(update).offset().top
}, 200);
},
loaded: function(update, target) {
var content = $(target.context).parent().siblings('.wikicontent');
var text = content.text();
var user = content.attr('data-user');
text = text.trim().replace(/<pre>((.|\s)*?)<\/pre>/g, '[...]');
// remove blank lines generated by redmine textilizable
text = text.replace(/^\s*$[\n\r]{1,}/gm, '');
var quotedText = "<%= ::I18n.t(:text_user_wrote, :value => "{{{user}}}", :locale => Setting.default_language.to_s.gsub(%r{(.+)\-(.+)$}) { "#{$1}-#{$2.upcase}" }) %>\n> ";
quotedText = quotedText.replace("{{{user}}}", user);
quotedText += text.replace(/(\r?\n|\r\n?)/g, "\n> ") + "\n\n";
$('#notes').text(quotedText);
$('html, body').animate({
scrollTop: $(update).offset().top
}, 200);
$("#notes").focus();
}
});
$.ajaxAppend({
trigger: '.description-details',
indicator_class: 'ajax-indicator',
loading_class: 'text-diff',
hide_text: I18n.t("js.ajax.hide")
} );
};
$('document').ready(function () {
if ($('body.controller-issues.action-show').size() > 0) {
init();
}
});
})(jQuery);

@ -665,7 +665,7 @@ color:#505050;
}
/***** Progress bar *****/
#content .meta table.progress {
#content table.progress {
border-spacing: 0pt;
empty-cells: show;
text-align: center;
@ -678,10 +678,10 @@ color:#505050;
border-radius:3px;
}
#content .meta table.progress td { height: 0.9em; }
#content .meta table.progress td.closed { background: #BAE0BA none repeat scroll 0%; }
#content .meta table.progress td.done { background: #DEF0DE none repeat scroll 0%; }
#content .meta table.progress td.open { background: #FFF none repeat scroll 0%; }
#content table.progress td { height: 0.9em; }
#content table.progress td.closed { background: #BAE0BA none repeat scroll 0%; }
#content table.progress td.done { background: #DEF0DE none repeat scroll 0%; }
#content table.progress td.open { background: #FFF none repeat scroll 0%; }
p.pourcent {font-size: 80%;}
p.progress-info {clear: left; font-style: italic; font-size: 80%;}
@ -1654,7 +1654,7 @@ form#issue-list {
font-weight:normal;
}
#content table.issues td, #content table th {
border:1px solid #e6e6e6;
border: 0 none;
padding: 3px 6px;
text-align:left;
position:relative;
@ -1761,27 +1761,15 @@ div.issue hr {
margin-top: -6px;
margin-bottom: 0px;
}
#content .meta table {
border:0 none;
}
#content .meta table tr:hover {
background:none;
}
#content .meta table td, #content .meta table th {
#content div.issue table td, #content div.issue table th {
background: none;
border:0 none;
padding:0 3px;
padding-left: 0px;
}
#content .meta table th {
#content div.issue table th {
font-weight:bold;
}
#content .meta table td a:hover, #content .meta table th a:hover {
text-decoration:underline;
}
#content .meta table td.priority {
text-align:left; /* Is set to center above */
}
.gravatar {
border:1px solid #aaa;
}
@ -2115,39 +2103,6 @@ td.issue div.issue-wrap-outer {
display:block;
}
/* table tooltips */
.js-tooltip {
position:absolute;
left:-30px;
z-index:20;
}
.js-tooltip-inner {
position:absolute;
bottom:5px;
padding:10px;
width:500px;
font-size:11px;
max-height:200px;
overflow:hidden;
z-index:15;
}
.js-tooltip .arrow {
width:16px;
height:12px;
position:absolute;
bottom:-6px;
left:76px;
z-index:16;
background:url(<%= asset_path 'tooltip-arrow.png' %>) no-repeat left top;
}
.js-tooltip .meta {
margin-top:20px;
overflow:hidden;
}
.js-tooltip .meta li {
float:left;
margin-right:30px;
}
.button-large ul {
position:absolute;
right:-1px;
@ -2440,9 +2395,6 @@ fieldset#filters div.add-filter {
tr.time-entry {
white-space:normal;
}
.meta td.priority {
background:none !important;
}
/*===== Replacement Images =====*/
@ -2819,13 +2771,13 @@ ul.action_menu_more {
background-position:-39px -200px;
background-repeat:no-repeat;
}
.navigate-left {
.pagination .navigate-left {
background: url(<%= asset_path 'double_arrow_left.png' %>) 0 1px no-repeat;
width:100%;
height:15px;
padding-left: 18px;
}
.navigate-right {
.pagination .navigate-right {
background: url(<%= asset_path 'double_arrow_right.png' %>) right 1px no-repeat;
width:100%;
height:15px;
@ -3331,9 +3283,6 @@ body.theme-Bsp .buttons .apply,
body.theme-Dtag .buttons .apply {
background-color: #24b3e7;
}
#content table.issues td, #content table th{
border: 0px;
}
.title-bar .title-bar-actions .contextual a.icon:hover {
color: #008BD0;
}

@ -523,7 +523,11 @@ class ApplicationController < ActionController::Base
end
def api_request?
%w(xml json).include? params[:format]
if params[:format].nil?
%w(application/xml application/json).include? request.format.to_s
else
%w(xml json).include? params[:format]
end
end
# Returns the API key present in the request
@ -613,4 +617,10 @@ class ApplicationController < ActionController::Base
helper_method :default_breadcrumb
ActiveSupport.run_load_hooks(:application_controller, self)
private
def permitted_params
@permitted_params ||= PermittedParams.new(params, current_user)
end
end

@ -40,32 +40,32 @@ class Issues::ReportsController < ApplicationController
@field = "tracker_id"
@rows = @project.trackers
@data = Issue.by_tracker(@project)
@report_title = l(:field_tracker)
@report_title = Issue.human_attribute_name(:tracker)
when "version"
@field = "fixed_version_id"
@rows = @project.shared_versions.sort
@data = Issue.by_version(@project)
@report_title = l(:field_version)
@report_title = Issue.human_attribute_name(:version)
when "priority"
@field = "priority_id"
@rows = IssuePriority.all
@data = Issue.by_priority(@project)
@report_title = l(:field_priority)
@report_title = Issue.human_attribute_name(:priority)
when "category"
@field = "category_id"
@rows = @project.issue_categories
@data = Issue.by_category(@project)
@report_title = l(:field_category)
@report_title = Issue.human_attribute_name(:category)
when "assigned_to"
@field = "assigned_to_id"
@rows = @project.members.collect { |m| m.user }.sort
@data = Issue.by_assigned_to(@project)
@report_title = l(:field_assigned_to)
@report_title = Issue.human_attribute_name(:assigned_to)
when "author"
@field = "author_id"
@rows = @project.members.collect { |m| m.user }.sort
@data = Issue.by_author(@project)
@report_title = l(:field_author)
@report_title = Issue.human_attribute_name(:author)
when "subproject"
@field = "project_id"
@rows = @project.descendants.visible

@ -20,7 +20,7 @@ class IssuesController < ApplicationController
menu_item :view_all_issues, :only => [:all]
default_search_scope :issues
before_filter :find_issue, :only => [:show, :edit, :update]
before_filter :find_issue, :only => [:show, :edit, :update, :quoted]
before_filter :find_issues, :only => [:bulk_edit, :bulk_update, :move, :perform_move, :destroy]
before_filter :check_project_uniqueness, :only => [:move, :perform_move]
before_filter :find_project, :only => [:new, :create]
@ -175,6 +175,31 @@ class IssuesController < ApplicationController
end
end
def quoted
@journal = Journal.find(params[:journal_id]) if params[:journal_id]
if @journal
user = @journal.user
text = @journal.notes
else
user = @issue.author
text = @issue.description
@journal = @issue.current_journal
end
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
quoted_text = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> "
quoted_text << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
params[:notes] = quoted_text
update_issue_from_params
respond_to do |format|
format.js { render :partial => 'edit' }
format.html { render :action => 'edit'}
format.xml { }
end
end
def update
update_issue_from_params
JournalObserver.instance.send_notification = params[:send_notification] == '0' ? false : true

@ -15,10 +15,9 @@
require 'diff'
class JournalsController < ApplicationController
before_filter :find_journal, :only => [:edit, :update]
before_filter :find_issue, :only => [:new]
before_filter :find_journal, :only => [:edit, :update, :diff]
before_filter :find_optional_project, :only => [:index]
before_filter :authorize, :only => [:new, :edit, :update ]
before_filter :authorize, :only => [:edit, :update]
accept_key_auth :index
menu_item :issues
@ -42,30 +41,6 @@ class JournalsController < ApplicationController
render_404
end
# Used when replying to an issue or journal
def new
journal = Journal.find(params[:journal_id]) if params[:journal_id]
if journal
user = journal.user
text = journal.notes
else
user = @issue.author
text = @issue.description
end
# Replaces pre blocks with [...]
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> "
content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
render(:update) { |page|
page.<< "$('notes').value = \"#{escape_javascript content}\";"
page.show 'update'
page << "Form.Element.focus('notes');"
page << "Element.scrollTo('update');"
page << "$('notes').scrollTop = $('notes').scrollHeight - $('notes').clientHeight;"
}
end
def edit
(render_403; return false) unless @journal.editable_by?(User.current)
respond_to do |format|
@ -90,8 +65,8 @@ class JournalsController < ApplicationController
def diff
if valid_field?(params[:field])
from = @journal.changes[params[:field]][0]
to = @journal.changes[params[:field]][1]
from = @journal.changed_data[params[:field]][0]
to = @journal.changed_data[params[:field]][1]
@diff = Redmine::Helpers::Diff.new(to, from)
@issue = @journal.journaled
@ -113,14 +88,6 @@ class JournalsController < ApplicationController
render_404
end
# TODO: duplicated in IssuesController
def find_issue
@issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])
@project = @issue.project
rescue ActiveRecord::RecordNotFound
render_404
end
# Is this a valid field for diff'ing?
def valid_field?(field)
field.to_s.strip == "description"

@ -14,7 +14,8 @@
class MembersController < ApplicationController
model_object Member
before_filter :find_model_object_and_project
before_filter :find_model_object_and_project, :except => [:autocomplete_for_member]
before_filter :find_project, :only => [:autocomplete_for_member]
before_filter :authorize
def create

@ -160,25 +160,25 @@ class TimeEntries::ReportsController < ApplicationController
def load_available_criterias
@available_criterias = { 'project' => {:sql => "#{TimeEntry.table_name}.project_id",
:klass => Project,
:label => :label_project},
:label => Project.model_name.human},
'version' => {:sql => "#{Issue.table_name}.fixed_version_id",
:klass => Version,
:label => :label_version},
:label => Version.model_name.human},
'category' => {:sql => "#{Issue.table_name}.category_id",
:klass => IssueCategory,
:label => :field_category},
:label => IssueCategory.model_name.human},
'member' => {:sql => "#{TimeEntry.table_name}.user_id",
:klass => User,
:label => :label_member},
:label => Member.model_name.human},
'tracker' => {:sql => "#{Issue.table_name}.tracker_id",
:klass => Tracker,
:label => :label_tracker},
:label => Tracker.model_name.human},
'activity' => {:sql => "#{TimeEntry.table_name}.activity_id",
:klass => TimeEntryActivity,
:label => :label_activity},
'issue' => {:sql => "#{TimeEntry.table_name}.issue_id",
:klass => Issue,
:label => :label_issue}
:label => Issue.model_name.human}
}
# Add list and boolean custom fields as available criterias

@ -79,7 +79,7 @@ class VersionsController < ApplicationController
format.js do
# IE doesn't support the replace_html rjs method for select box options
render(:update) {|page| page.replace "issue_fixed_version_id",
content_tag('select', '<option></option>' + version_options_for_select(@project.shared_versions.open, @version), :id => 'issue_fixed_version_id', :name => 'issue[fixed_version_id]')
content_tag('select', '<option></option>'.html_safe + version_options_for_select(@project.shared_versions.open, @version).html_safe, :id => 'issue_fixed_version_id', :name => 'issue[fixed_version_id]')
}
end
end

@ -137,13 +137,14 @@ module ApplicationHelper
end
end
closed = issue.closed? ? content_tag(:span, l(:label_closed_issues), :class => "hidden-for-sighted") : ""
s = link_to "#{closed}#{h(options[:before_text].to_s)}#{h(issue.tracker)} ##{issue.id}".html_safe,
s = ActiveSupport::SafeBuffer.new
s << "#{issue.project} - " if options[:project]
s << link_to("#{closed}#{h(options[:before_text].to_s)}#{h(issue.tracker)} ##{issue.id}".html_safe,
issue,
:class => issue.css_classes,
:title => h(title)
s << ": #{h subject}" if subject
s = "#{h issue.project} - " + s if options[:project]
s.html_safe
:title => h(title))
s << ": #{subject}" if subject
s
end
# Generates a link to an attachment.
@ -153,12 +154,16 @@ module ApplicationHelper
def link_to_attachment(attachment, options={})
text = options.delete(:text) || attachment.filename
action = options.delete(:download) ? 'download' : 'show'
only_path = options.delete(:only_path) { true }
link_to h(text),
{:controller => '/attachments',
:action => action,
:id => attachment,
:filename => attachment.filename },
:filename => attachment.filename,
:host => Setting.host_name,
:protocol => Setting.protocol,
:only_path => only_path },
options
end
@ -1096,7 +1101,7 @@ module ApplicationHelper
});
})
unless User.current.pref.warn_on_leaving_unsaved == '0'
tags += javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
tags += javascript_tag("jQuery(function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
end
if User.current.impaired? and accessibility_js_enabled?

@ -60,14 +60,14 @@ module CustomFieldsHelper
# Return custom field label tag
def custom_field_label_tag(name, custom_value)
content_tag "label", h(custom_value.custom_field.name) +
(custom_value.custom_field.is_required? ? " <span class=\"required\">*</span>" : ""),
:for => "#{name}_custom_field_values_#{custom_value.custom_field.id}",
:class => (custom_value.errors.empty? ? nil : "error" )
(custom_value.custom_field.is_required? ? content_tag("span", ' *', :class => "required") : ""),
:for => "#{name}_custom_field_values_#{custom_value.custom_field.id}",
:class => (custom_value.errors.empty? ? nil : "error" )
end
def blank_custom_field_label_tag(name, custom_field)
content_tag "label", h(custom_field.name) +
(custom_field.is_required? ? content_tag("span", "*", :class => "required") : ""),
(custom_field.is_required? ? content_tag("span", ' *', :class => "required") : ""),
:for => "#{name}_custom_field_values_#{custom_field.id}"
end

@ -36,12 +36,12 @@ module IssuesHelper
# </div>
#
def render_issue_tooltip(issue)
@cached_label_status ||= l(:field_status)
@cached_label_start_date ||= l(:field_start_date)
@cached_label_due_date ||= l(:field_due_date)
@cached_label_assigned_to ||= l(:field_assigned_to)
@cached_label_priority ||= l(:field_priority)
@cached_label_project ||= l(:field_project)
@cached_label_status ||= Issue.human_attribute_name(:status)
@cached_label_start_date ||= Issue.human_attribute_name(:start_date)
@cached_label_due_date ||= Issue.human_attribute_name(:due_date)
@cached_label_assigned_to ||= Issue.human_attribute_name(:assigned_to)
@cached_label_priority ||= Issue.human_attribute_name(:priority)
@cached_label_project ||= Issue.human_attribute_name(:project)
(link_to_issue(issue) + "<br /><br />" +
"<strong>#{@cached_label_project}</strong>: #{link_to_project(issue.project)}<br />" +
@ -197,29 +197,29 @@ module IssuesHelper
export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv|
# csv header fields
headers = [ "#",
l(:field_status),
l(:field_project),
l(:field_tracker),
l(:field_priority),
l(:field_subject),
l(:field_assigned_to),
l(:field_category),
l(:field_fixed_version),
l(:field_author),
l(:field_start_date),
l(:field_due_date),
l(:field_done_ratio),
l(:field_estimated_hours),
l(:field_parent_issue),
l(:field_created_on),
l(:field_updated_on)
Issue.human_attribute_name(:status),
Issue.human_attribute_name(:project),
Issue.human_attribute_name(:tracker),
Issue.human_attribute_name(:priority),
Issue.human_attribute_name(:subject),
Issue.human_attribute_name(:assigned_to),
Issue.human_attribute_name(:category),
Issue.human_attribute_name(:fixed_version),
Issue.human_attribute_name(:author),
Issue.human_attribute_name(:start_date),
Issue.human_attribute_name(:due_date),
Issue.human_attribute_name(:done_ratio),
Issue.human_attribute_name(:estimated_hours),
Issue.human_attribute_name(:parent_issue),
Issue.human_attribute_name(:created_on),
Issue.human_attribute_name(:updated_on)
]
# Export project custom fields if project is given
# otherwise export custom fields marked as "For all projects"
custom_fields = project.nil? ? IssueCustomField.for_all : project.all_issue_custom_fields
custom_fields.each {|f| headers << f.name}
# Description in the last column
headers << l(:field_description)
headers << CustomField.human_attribute_name(:description)
csv << headers.collect {|c| begin; c.to_s.encode(l(:general_csv_encoding), 'UTF-8'); rescue; c.to_s; end }
# csv lines
issues.each do |issue|
@ -286,7 +286,7 @@ module IssuesHelper
end
def entries_for_filter_select_sorted(query)
[["",""]] + query.available_filters.collect{|field| [ field[1][:name] || l(("field_"+field[0].to_s.gsub(/_id$/, "")).to_sym), field[0]] unless query.has_filter?(field[0])}.compact.sort_by do |el|
[["",""]] + query.available_filters.collect{|field| [ field[1][:name] || Issue.human_attribute_name(field[0]), field[0]] unless query.has_filter?(field[0])}.compact.sort_by do |el|
ActiveSupport::Inflector.transliterate(el[0]).downcase
end
end

@ -79,11 +79,9 @@ module JournalsHelper
if reply_links
l << link_to(image_tag('quote.png', :alt => l(:button_quote), :title => l(:button_quote)),
{ :controller => controller,
:action => action,
:action => 'quoted',
:id => model,
:journal_id => journal },
:method => :get,
:remote => true)
:journal_id => journal }, :class => 'quote-link')
end
if editable
l << link_to_in_place_notes_editor(image_tag('edit.png', :alt => l(:button_edit), :title => l(:button_edit)), "journal-#{journal.id}-notes",
@ -95,7 +93,7 @@ module JournalsHelper
content = ''
content << content_tag('div', links.join(' '),{ :class => 'contextual' }, false) unless links.empty?
content << textilizable(journal, :notes)
content << content_tag('div', textilizable(journal, :notes), :class => 'wikicontent', "data-user" => journal.author)
css_classes = "wiki"
css_classes << " editable" if editable

@ -14,16 +14,16 @@
module SettingsHelper
def administration_settings_tabs
tabs = [{:name => 'general', :partial => 'settings/general', :label => :label_general},
{:name => 'display', :partial => 'settings/display', :label => :label_display},
{:name => 'authentication', :partial => 'settings/authentication', :label => :label_authentication},
{:name => 'users', :partial => 'settings/users', :label => :label_user_plural },
{:name => 'projects', :partial => 'settings/projects', :label => :label_project_plural},
{:name => 'issues', :partial => 'settings/issues', :label => :label_issue_tracking},
{:name => 'notifications', :partial => 'settings/notifications', :label => :field_mail_notification},
{:name => 'mail_handler', :partial => 'settings/mail_handler', :label => :label_incoming_emails},
{:name => 'repositories', :partial => 'settings/repositories', :label => :label_repository_plural}
]
[{:name => 'general', :partial => 'settings/general', :label => :label_general},
{:name => 'display', :partial => 'settings/display', :label => :label_display},
{:name => 'authentication', :partial => 'settings/authentication', :label => :label_authentication},
{:name => 'users', :partial => 'settings/users', :label => :label_user_plural },
{:name => 'projects', :partial => 'settings/projects', :label => :label_project_plural},
{:name => 'issues', :partial => 'settings/issues', :label => :label_issue_tracking},
{:name => 'notifications', :partial => 'settings/notifications', :label => Proc.new { User.human_attribute_name(:mail_notification) } },
{:name => 'mail_handler', :partial => 'settings/mail_handler', :label => :label_incoming_emails},
{:name => 'repositories', :partial => 'settings/repositories', :label => :label_repository_plural}
]
end
def setting_select(setting, choices, options={})

@ -85,15 +85,15 @@ module TimelogHelper
custom_fields = TimeEntryCustomField.find(:all)
export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv|
# csv header fields
headers = [l(:field_spent_on),
l(:field_user),
l(:field_activity),
l(:field_project),
l(:field_issue),
l(:field_tracker),
l(:field_subject),
l(:field_hours),
l(:field_comments)
headers = [TimeEntry.human_attribute_name(:spent_on),
TimeEntry.human_attribute_name(:user),
TimeEntry.human_attribute_name(:activity),
TimeEntry.human_attribute_name(:project),
TimeEntry.human_attribute_name(:issue),
TimeEntry.human_attribute_name(:tracker),
TimeEntry.human_attribute_name(:subject),
TimeEntry.human_attribute_name(:hours),
TimeEntry.human_attribute_name(:comments)
]
# Export custom fields
headers += custom_fields.collect(&:name)
@ -137,7 +137,10 @@ module TimelogHelper
def report_to_csv(criterias, periods, hours)
export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv|
# Column headers
headers = criterias.collect {|criteria| l(@available_criterias[criteria][:label]) }
headers = criterias.collect do |criteria|
label = @available_criterias[criteria][:label]
label.is_a?(Symbol) ? l(label) : label
end
headers += periods
headers << l(:label_total)
csv << headers.collect {|c| to_utf8_for_timelogs(c) }

@ -38,6 +38,6 @@ module VersionsHelper
end
def status_by_options_for_select(value)
options_for_select(STATUS_BY_CRITERIAS.collect {|criteria| [l("field_#{criteria}".to_sym), criteria]}, value)
options_for_select(STATUS_BY_CRITERIAS.collect {|criteria| [Issue.human_attribute_name(criteria.to_sym), criteria]}, value)
end
end

@ -80,7 +80,7 @@ class UserMailer < ActionMailer::Base
message_id @news
with_locale_for(user) do
subject = "#{t(:label_news)}: #{@news.title}"
subject = "#{News.model_name.human}: #{@news.title}"
subject = "[#{@news.project.name}] #{subject}" if @news.project
mail :to => user.mail, :subject => subject
end
@ -113,7 +113,7 @@ class UserMailer < ActionMailer::Base
references @news
with_locale_for(user) do
subject = "#{t(:label_news)}: #{@news.title}"
subject = "#{News.model_name.human}: #{@news.title}"
subject = "Re: [#{@news.project.name}] #{subject}" if @news.project
mail :to => user.mail, :subject => subject
end
@ -231,13 +231,13 @@ class UserMailer < ActionMailer::Base
case container.class.name
when 'Project'
@added_to = "#{t(:label_project)}: #{container}"
@added_to = "#{Project.model_name.human}: #{container}"
@added_to_url = url_for(:controller => '/files', :action => 'index', :project_id => container)
when 'Version'
@added_to = "#{t(:label_version)}: #{container.name}"
@added_to = "#{Version.model_name.human}: #{container.name}"
@added_to_url = url_for(:controller => '/files', :action => 'index', :project_id => container.project)
when 'Document'
@added_to = "#{t(:label_document)}: #{container.title}"
@added_to = "#{Document.model_name.human}: #{container.title}"
@added_to_url = url_for(:controller => '/documents', :action => 'show', :id => container.id)
end

@ -18,7 +18,7 @@ class Document < ActiveRecord::Base
belongs_to :category, :class_name => "DocumentCategory", :foreign_key => "category_id"
acts_as_attachable :delete_permission => :manage_documents
acts_as_journalized :event_title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"},
acts_as_journalized :event_title => Proc.new {|o| "#{Document.model_name.human}: #{o.title}"},
:event_url => Proc.new {|o| {:controller => '/documents', :action => 'show', :id => o.journaled_id}},
:event_author => (Proc.new do |o|
o.attachments.find(:first, :order => "#{Attachment.table_name}.created_on ASC").try(:author)

@ -265,7 +265,8 @@ class Issue < ActiveRecord::Base
alias_method_chain(:attributes=, :tracker_first) unless method_defined?(:attributes_without_tracker_first=)
def estimated_hours=(h)
write_attribute :estimated_hours, (h.is_a?(String) ? h.to_hours : h)
converted_hours = (h.is_a?(String) ? h.to_hours : h)
write_attribute :estimated_hours, !!converted_hours ? converted_hours : h
end
safe_attributes 'tracker_id',

@ -252,7 +252,7 @@ class MailHandler < ActionMailer::Base
else
@keywords[attr] = begin
if (options[:override] || @@handler_options[:allow_override].include?(attr)) &&
(v = extract_keyword!(plain_text_body, attr.to_sym, options[:format]))
(v = extract_keyword!(plain_text_body, attr, options[:format]))
v
elsif !@@handler_options[:issue][attr.to_sym].blank?
@@handler_options[:issue][attr.to_sym]
@ -265,10 +265,9 @@ class MailHandler < ActionMailer::Base
# Returns nil if no matching keyword found
def extract_keyword!(text, attr, format=nil)
keys = [attr.to_s.humanize]
if attr.is_a?(Symbol)
keys << l("field_#{attr}", :default => '', :locale => user.language) if user && user.language.present?
keys << l("field_#{attr}", :default => '', :locale => Setting.default_language) if Setting.default_language.present?
end
keys << all_attribute_translations(user.language)[attr.to_sym] if user && user.language.present?
keys << all_attribute_translations(Setting.default_language)[attr.to_sym] if Setting.default_language.present?
keys.reject! {|k| k.blank?}
keys.collect! {|k| Regexp.escape(k)}
format ||= '.+'
@ -300,7 +299,7 @@ class MailHandler < ActionMailer::Base
'due_date' => get_keyword(:due_date, :override => true, :format => '\d{4}-\d{2}-\d{2}'),
'estimated_hours' => get_keyword(:estimated_hours, :override => true),
'done_ratio' => get_keyword(:done_ratio, :override => true, :format => '(\d|10)?0')
}.delete_if {|k, v| v.blank? }
}.delete_if {|_, v| v.blank? }
if issue.new_record? && attrs['tracker_id'].nil?
attrs['tracker_id'] = issue.project.trackers.find(:first).try(:id)

@ -0,0 +1,33 @@
class PermittedParams < Struct.new(:params, :user)
# This class intends to provide a method for all params hashes comming from the
# client and that are used for mass assignment.
#
# As such, please make it a deliberate decission to whitelist attributes.
#
# This implementation depends on the strong_parameters gem. For further
# information see here: https://github.com/rails/strong_parameters
#
#
# A method should look like the following:
#
# def name_of_the_params_key_referenced
# params.require(:name_of_the_params_key_referenced).permit(list_of_whitelisted_params)
# end
#
#
# A controller could use a permitted_params method like this
#
# model_instance.attributes = permitted_params.name_of_the_params_key_referenced
#
# instead of doing something like this which will not work anymore once the
# model is protected:
#
# model_instance.attributes = params[:name_of_the_params_key_referenced]
#
#
# A model will need the following module included in order to be protected by
# strong_params
#
# include ActiveModel::ForbiddenAttributesProtection
end

@ -69,7 +69,7 @@ class Project < ActiveRecord::Base
acts_as_customizable
acts_as_searchable :columns => ["#{table_name}.name", "#{table_name}.identifier", "#{table_name}.description", "#{table_name}.summary"], :project_key => 'id', :permission => nil
acts_as_event :title => Proc.new {|o| "#{l(:label_project)}: #{o.name}"},
acts_as_event :title => Proc.new {|o| "#{Project.model_name.human}: #{o.name}"},
:url => Proc.new {|o| {:controller => '/projects', :action => 'show', :id => o}},
:author => nil

@ -65,7 +65,7 @@ class Query < ActiveRecord::Base
@@available_columns = [
QueryColumn.new(:project, :sortable => "#{Project.table_name}.name", :groupable => true),
QueryColumn.new(:tracker, :sortable => "#{Tracker.table_name}.position", :groupable => true),
QueryColumn.new(:parent, :sortable => ["#{Issue.table_name}.root_id", "#{Issue.table_name}.lft ASC"], :default_order => 'desc', :caption => :field_parent_issue),
QueryColumn.new(:parent, :sortable => ["#{Issue.table_name}.root_id", "#{Issue.table_name}.lft ASC"], :default_order => 'desc', :caption => :parent_issue),
QueryColumn.new(:status, :sortable => "#{IssueStatus.table_name}.position", :groupable => true),
QueryColumn.new(:priority, :sortable => "#{IssuePriority.table_name}.position", :default_order => 'desc', :groupable => true),
QueryColumn.new(:subject, :sortable => "#{Issue.table_name}.subject"),
@ -152,10 +152,10 @@ class Query < ActiveRecord::Base
@available_filters["author_id"] = { :type => :list, :order => 5, :values => user_values } unless user_values.empty?
group_values = Group.all.collect {|g| [g.name, g.id.to_s] }
@available_filters["member_of_group"] = { :type => :list_optional, :order => 6, :values => group_values } unless group_values.empty?
@available_filters["member_of_group"] = { :type => :list_optional, :order => 6, :values => group_values, :name => I18n.t('query_fields.member_of_group') } unless group_values.empty?
role_values = Role.givable.collect {|r| [r.name, r.id.to_s] }
@available_filters["assigned_to_role"] = { :type => :list_optional, :order => 7, :values => role_values } unless role_values.empty?
@available_filters["assigned_to_role"] = { :type => :list_optional, :order => 7, :values => role_values, :name => I18n.t('query_fields.assigned_to_role') } unless role_values.empty?
if User.current.logged?
# populate the watcher list with the same user list as other user filters if the user has the :view_issue_watchers permission in at least one project
@ -177,7 +177,7 @@ class Query < ActiveRecord::Base
unless project.leaf?
subprojects = project.descendants.visible.all
unless subprojects.empty?
@available_filters["subproject_id"] = { :type => :list_subprojects, :order => 13, :values => subprojects.collect{|s| [s.name, s.id.to_s] } }
@available_filters["subproject_id"] = { :type => :list_subprojects, :order => 13, :values => subprojects.collect{|s| [s.name, s.id.to_s] }, :name => I18n.t('query_fields.subproject_id') }
end
end
add_custom_fields_filters(project.all_issue_custom_fields)
@ -601,7 +601,8 @@ class Query < ActiveRecord::Base
end
def add_custom_fields_filters(custom_fields)
@available_filters ||= {}
available_filters # compute default available_filters
return available_filters if available_filters.any? { |key, _| key.starts_with? 'cf_' }
custom_fields.select(&:is_filter?).each do |field|
case field.field_format

@ -10,11 +10,11 @@ class QueryColumn
self.groupable = name.to_s
end
self.default_order = options[:default_order]
@caption_key = options[:caption] || "field_#{name}"
@caption_key = options[:caption] || name.to_s
end
def caption
l(@caption_key)
Issue.human_attribute_name(@caption_key)
end
# Returns true if the column is sortable, otherwise false

@ -33,6 +33,7 @@ class Version < ActiveRecord::Base
validates_format_of :start_date, :with => /^\d{4}-\d{2}-\d{2}$/, :message => :not_a_date, :allow_nil => true
validates_inclusion_of :status, :in => VERSION_STATUSES
validates_inclusion_of :sharing, :in => VERSION_SHARINGS
validate :validate_start_date_before_effective_date
scope :open, :conditions => {:status => 'open'}
scope :visible, lambda {|*args| { :include => :project,
@ -58,7 +59,10 @@ class Version < ActiveRecord::Base
# Can either be a set date stored in the database or a dynamic one
# based on the earlist start_date of the fixed_issues
def start_date
read_attribute(:start_date) || fixed_issues.minimum('start_date')
# when self.id is nil (e.g. when self is a new_record),
# minimum('start_date') works on all issues with :fixed_version => nil
# but we expect only issues belonging to this version
read_attribute(:start_date) || fixed_issues.where(Issue.arel_table[:fixed_version_id].not_eq(nil)).minimum('start_date')
end
def due_date
@ -199,6 +203,12 @@ class Version < ActiveRecord::Base
private
def validate_start_date_before_effective_date
if self.effective_date && self.start_date && self.effective_date < self.start_date
errors.add :effective_date, :greater_than_start_date
end
end
# Update the issue's fixed versions. Used if a version's sharing changes.
def update_issues_from_sharing_change
if sharing_changed?

@ -22,7 +22,7 @@ class WikiPage < ActiveRecord::Base
acts_as_tree :dependent => :nullify, :order => 'title'
acts_as_watchable
acts_as_event :title => Proc.new {|o| "#{l(:label_wiki)}: #{o.title}"},
acts_as_event :title => Proc.new {|o| "#{Wiki.model_name.human}: #{o.title}"},
:description => :text,
:datetime => :created_on,
:url => Proc.new {|o| {:controller => '/wiki', :action => 'show', :project_id => o.wiki.project, :id => o.title}}

@ -3,8 +3,8 @@
<%= back_url_to_current_page_hidden_field_tag %>
<table>
<tr>
<td><label for="username-pulldown"><%= l(:field_login) %></label></td>
<td><label for="password-pulldown"><%= l(:field_password) %></label></td>
<td><label for="username-pulldown"><%= User.human_attribute_name :login %></label></td>
<td><label for="password-pulldown"><%= User.human_attribute_name :password %></label></td>
</tr>
<tr>
<td><%= text_field_tag 'username', nil, :id => 'username-pulldown' %></td>
@ -14,7 +14,7 @@
</table>
<div id = "optional_login_fields" style = "top = 10px; white-space:nowrap">
<% if Setting.openid? %>
<%= text_field_tag "openid_url", nil, :placeholder => l(:field_identity_url) %>
<%= text_field_tag "openid_url", nil, :placeholder => User.human_attribute_name(:identity_url) %>
<% end %>
<% if Setting.autologin? %>

@ -7,16 +7,16 @@
<%= back_url_hidden_field_tag %>
<table>
<tr>
<td align="right"><label for="username"><%=l(:field_login)%>:</label></td>
<td align="right"><label for="username"><%= User.human_attribute_name :login %>:</label></td>
<td align="left"><%= text_field_tag 'username', nil %></td>
</tr>
<tr>
<td align="right"><label for="password"><%=l(:field_password)%>:</label></td>
<td align="right"><label for="password"><%= User.human_attribute_name :password %>:</label></td>
<td align="left"><%= password_field_tag 'password', nil %></td>
</tr>
<% if Setting.openid? %>
<tr>
<td align="right"><label for="openid_url"><%=l(:field_identity_url)%></label></td>
<td align="right"><label for="openid_url"><%= User.human_attribute_name :identity_url %></label></td>
<td align="left"><%= text_field_tag "openid_url", nil %></td>
</tr>
<% end %>

@ -5,7 +5,7 @@
<div class="box">
<%= form_tag({:action=> "lost_password"}, :class => "tabular") do %>
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
<p><label for="mail"><%= User.human_attribute_name(:mail) %> <span class="required">*</span></label>
<%= text_field_tag 'mail', nil, :size => 40 %>
<%= submit_tag l(:button_submit) %></p>

@ -6,11 +6,11 @@
<%= form_tag({:token => @token.value}) do %>
<div class="box tabular">
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
<p><label for="new_password"><%= User.human_attribute_name(:new_password) %> <span class="required">*</span></label>
<%= password_field_tag 'new_password', nil, :size => 25 %><br />
<%= password_complexity_requirements %></p>
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
<p><label for="new_password_confirmation"><%= User.human_attribute_name(:password_confirmation) %> <span class="required">*</span></label>
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
</div>
<p><%= submit_tag l(:button_save) %></p>

@ -8,31 +8,31 @@
<div class="box">
<!--[form:user]-->
<% if @user.auth_source_id.nil? %>
<p><label for="user_login"><%=l(:field_login)%> <span class="required">*</span></label>
<p><label for="user_login"><%= User.human_attribute_name :login %> <span class="required">*</span></label>
<%= text_field 'user', 'login', :size => 25 %></p>
<p><label for="user_password"><%=l(:field_password)%> <span class="required">*</span></label>
<p><label for="user_password"><%= User.human_attribute_name :password %> <span class="required">*</span></label>
<%= password_field 'user', 'password', :size => 25 %><br />
<%= password_complexity_requirements %></p>
<p><label for="user_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
<p><label for="user_password_confirmation"><%= User.human_attribute_name :password_confirmation %> <span class="required">*</span></label>
<%= password_field 'user', 'password_confirmation', :size => 25 %></p>
<% end %>
<p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
<p><label for="user_firstname"><%= User.human_attribute_name :firstname %> <span class="required">*</span></label>
<%= text_field 'user', 'firstname' %></p>
<p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>
<p><label for="user_lastname"><%= User.human_attribute_name :lastname %> <span class="required">*</span></label>
<%= text_field 'user', 'lastname' %></p>
<p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label>
<p><label for="user_mail"><%= User.human_attribute_name :mail %> <span class="required">*</span></label>
<%= text_field 'user', 'mail' %></p>
<p><label for="user_language"><%=l(:field_language)%></label>
<p><label for="user_language"><%= User.human_attribute_name :language %></label>
<%= select("user", "language", lang_options_for_select) %></p>
<% if Setting.openid? %>
<p><label for="user_identity_url"><%=l(:field_identity_url)%></label>
<p><label for="user_identity_url"><%= User.human_attribute_name :identity_url %></label>
<%= text_field 'user', 'identity_url' %></p>
<% end %>

@ -1,7 +1,7 @@
<div class="nodata">
<%= form_tag({:action => 'default_configuration'}) do %>
<%= simple_format(l(:text_no_configuration_data)) %>
<p><%= l(:field_language) %>:
<p><%= User.human_attribute_name(:language) %>:
<%= select_tag 'lang', options_for_select(lang_options_for_select(false), current_language.to_s) %>
<%= submit_tag l(:text_load_default_configuration) %></p>
<% end %>

@ -10,9 +10,9 @@
<%= form_tag({}, :method => :get) do %>
<fieldset><legend><%= l(:label_filter_plural) %></legend>
<label for='status'><%= l(:field_status) %> :</label>
<label for='status'><%= Project.human_attribute_name(:status) %> :</label>
<%= select_tag 'status', project_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
<label for='name'><%= l(:label_project) %>:</label>
<label for='name'><%= Project.model_name.human %>:</label>
<%= text_field_tag 'name', params[:name], :size => 30 %>
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
<%= link_to l(:button_clear), {:controller => '/admin', :action => 'projects'}, :class => 'icon icon-reload' %>
@ -23,9 +23,9 @@
<div class="autoscroll">
<table class="list">
<thead><tr>
<th><%=l(:label_project)%></th>
<th><%=l(:field_is_public)%></th>
<th><%=l(:field_created_on)%></th>
<th><%= Project.model_name.human %></th>
<th><%= Project.human_attribute_name(:is_public) %></th>
<th><%= Project.human_attribute_name(:created_on) %></th>
<th></th>
</tr></thead>
<tbody>

@ -2,10 +2,10 @@
<div class="box">
<!--[form:auth_source]-->
<p><label for="auth_source_name"><%=l(:field_name)%> <span class="required">*</span></label>
<p><label for="auth_source_name"><%= AuthSource.human_attribute_name(:name) %> <span class="required">*</span></label>
<%= text_field 'auth_source', 'name' %></p>
<p><label for="auth_source_onthefly_register"><%=l(:field_onthefly)%></label>
<p><label for="auth_source_onthefly_register"><%= AuthSource.human_attribute_name(:onthefly) %></label>
<%= check_box 'auth_source', 'onthefly_register' %></p>
</div>

@ -6,10 +6,10 @@
<table class="list">
<thead><tr>
<th><%=l(:field_name)%></th>
<th><%=l(:field_type)%></th>
<th><%=l(:field_host)%></th>
<th><%=l(:label_user_plural)%></th>
<th><%= AuthSource.human_attribute_name(:name) %></th>
<th><%= AuthSource.human_attribute_name(:type) %></th>
<th><%= AuthSource.human_attribute_name(:host) %></th>
<th><%= l(:label_user_plural)%></th>
<th></th>
</tr></thead>
<tbody>

@ -1,4 +1,4 @@
<h2><%= l(:label_board) %></h2>
<h2><%= Board.name.humanize %></h2>
<%= labelled_tabular_form_for [@project, @board] do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>

@ -2,7 +2,7 @@
<table class="list boards">
<thead><tr>
<th><%= l(:label_board) %></th>
<th><%= Board.name.humanize %></th>
<th><%= l(:label_topic_plural) %></th>
<th><%= l(:label_message_plural) %></th>
<th><%= l(:label_message_last) %></th>

@ -31,9 +31,9 @@
<% if @topics.any? %>
<table class="list messages">
<thead><tr>
<th><%= l(:field_subject) %></th>
<th><%= l(:field_author) %></th>
<%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
<th><%= Message.human_attribute_name(:subject) %></th>
<th><%= Message.human_attribute_name(:author) %></th>
<%= sort_header_tag('created_on', :caption => Message.human_attribute_name(:created_on)) %>
<%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
<%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
</tr></thead>

@ -31,7 +31,7 @@ while day <= calendar.enddt %>
<% else %>
<span>
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_version i, {}, {:before_text => image_tag("package.png", :title => l(:label_version), :alt => l(:label_version), :class => "imgtag-icon") }%>
<%= link_to_version i, {}, {:before_text => image_tag("package.png", :title => Version.model_name.human, :alt => Version.model_name.human, :class => "imgtag-icon") }%>
</span>
<% end %>
<% end %>

@ -5,10 +5,16 @@
<% tabs.each do |tab| -%>
<li><%=
position_span = you_are_here_info(tab[:name] == selected_tab)
link_to(position_span + l(tab[:label]), { :tab => tab[:name] },
:id => "tab-#{tab[:name]}",
:class => (tab[:name] != selected_tab ? nil : 'selected'),
:onclick => "showTab('#{tab[:name]}'); this.blur(); return false;") %></li>
caption = case tab[:label]
when Proc
tab[:label].call
else
l(tab[:label])
end
link_to(position_span + caption, { :tab => tab[:name] },
:id => "tab-#{tab[:name]}",
:class => (tab[:name] != selected_tab ? nil : 'selected'),
:onclick => "showTab('#{tab[:name]}'); this.blur(); return false;") %></li>
<% end -%>
</ul>
<div class="tabs-buttons" style="display:none;">

@ -1,10 +1,10 @@
<table class="list">
<thead><tr>
<th width="30%"><%=l(:field_name)%></th>
<th><%=l(:field_field_format)%></th>
<th><%=l(:field_is_required)%></th>
<th width="30%"><%= CustomField.human_attribute_name(:name) %></th>
<th><%= CustomField.human_attribute_name(:field_format) %></th>
<th><%= CustomField.human_attribute_name(:is_required) %></th>
<% if tab[:name] == 'IssueCustomField' %>
<th><%=l(:field_is_for_all)%></th>
<th><%= CustomField.human_attribute_name(:is_for_all) %></th>
<th><%=l(:label_used_by)%></th>
<% end %>
<th><%=l(:button_sort)%></th>
@ -14,7 +14,7 @@
<% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
<tr class="<%= cycle("odd", "even") %>">
<td><%= link_to h(custom_field.name), :action => 'edit', :id => custom_field %></td>
<td align="center"><%= l(Redmine::CustomFieldFormat.label_for(custom_field.field_format)) %></td>
<td align="center"><%= Redmine::CustomFieldFormat.label_for(custom_field.field_format) %></td>
<td align="center"><%= checked_image custom_field.is_required? %></td>
<% if tab[:name] == 'IssueCustomField' %>
<td align="center"><%= checked_image custom_field.is_for_all? %></td>

@ -1,14 +1,21 @@
<%= error_messages_for 'document' %>
<div class="box">
<!--[form:document]-->
<p><label for="document_category_id"><%=l(:field_category)%> <span class="required">*</span></label>
<%= select('document', 'category_id', DocumentCategory.all.collect {|c| [c.name, c.id]}) %></p>
<p>
<label for="document_category_id"><%= Document.human_attribute_name(:category)%> <span class="required">*</span></label>
<%= select('document', 'category_id', DocumentCategory.all.collect {|c| [c.name, c.id]}) %>
</p>
<p><label for="document_title"><%=l(:field_title)%> <span class="required">*</span></label>
<%= text_field 'document', 'title', :size => 60 %></p>
<p>
<label for="document_title"><%= Document.human_attribute_name(:title)%> <span class="required">*</span></label>
<%= text_field 'document', 'title', :size => 60 %>
</p>
<p>
<label for="document_description"><%= Document.human_attribute_name(:description)%></label>
<%= text_area 'document', 'description', :cols => 60, :rows => 15, :class => 'wiki-edit' %>
</p>
<p><label for="document_description"><%=l(:field_description)%></label>
<%= text_area 'document', 'description', :cols => 60, :rows => 15, :class => 'wiki-edit' %></p>
<!--[eoform:document]-->
</div>

@ -1,4 +1,4 @@
<h2><%=l(:label_document)%></h2>
<h2><%= Document.model_name.human %></h2>
<%= form_tag(document_path(@document),
:method => :put,

@ -6,21 +6,35 @@
<h2><%=l(:label_document_plural)%></h2>
<% if @grouped.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %>
<% if @grouped.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<% @grouped.keys.sort.each do |group| %>
<h3><%= group %></h3>
<%= render :partial => 'documents/document', :collection => @grouped[group] %>
<h3><%= group %></h3>
<%= render :partial => 'documents/document', :collection => @grouped[group] %>
<% end %>
<% content_for :sidebar do %>
<h3><%= l(:label_sort_by, '') %></h3>
<%= form_tag({}, :method => :get) do %>
<label><%= radio_button_tag 'sort_by', 'category', (@sort_by == 'category'), :onclick => 'this.form.submit();' %> <%= l(:field_category) %></label><br />
<label><%= radio_button_tag 'sort_by', 'date', (@sort_by == 'date'), :onclick => 'this.form.submit();' %> <%= l(:label_date) %></label><br />
<label><%= radio_button_tag 'sort_by', 'title', (@sort_by == 'title'), :onclick => 'this.form.submit();' %> <%= l(:field_title) %></label><br />
<label><%= radio_button_tag 'sort_by', 'author', (@sort_by == 'author'), :onclick => 'this.form.submit();' %> <%= l(:field_author) %></label>
<% end %>
<h3><%= l(:label_sort_by, '') %></h3>
<%= form_tag({}, :method => :get) do %>
<label>
<%= radio_button_tag 'sort_by', 'category', (@sort_by == 'category'), :onclick => 'this.form.submit();' %>
<%= Document.human_attribute_name(:category) %>
</label><br />
<label>
<%= radio_button_tag 'sort_by', 'date', (@sort_by == 'date'), :onclick => 'this.form.submit();' %>
<%= l(:label_date) %>
</label><br />
<label>
<%= radio_button_tag 'sort_by', 'title', (@sort_by == 'title'), :onclick => 'this.form.submit();' %>
<%= Document.human_attribute_name(:title) %>
</label><br />
<label>
<%= radio_button_tag 'sort_by', 'author', (@sort_by == 'author'), :onclick => 'this.form.submit();' %>
<%= Document.human_attribute_name(:author) %>
</label>
<% end %>
<% end %>
<% html_title(l(:label_document_plural)) -%>

@ -1,19 +1,19 @@
<%= error_messages_for 'enumeration' %>
<div class="box">
<!--[form:optvalue]-->
<%= hidden_field 'enumeration', 'type' %>
<%= hidden_field 'enumeration', 'type' %>
<p><label for="enumeration_name"><%=l(:field_name)%></label>
<%= text_field 'enumeration', 'name' %></p>
<p><label for="enumeration_name"><%= Enumeration.human_attribute_name(:name) %></label>
<%= text_field 'enumeration', 'name' %></p>
<p><label for="enumeration_active"><%=l(:field_active)%></label>
<%= check_box 'enumeration', 'active' %></p>
<p><label for="enumeration_active"><%= Enumeration.human_attribute_name(:active) %></label>
<%= check_box 'enumeration', 'active' %></p>
<p><label for="enumeration_is_default"><%=l(:field_is_default)%></label>
<%= check_box 'enumeration', 'is_default' %></p>
<p><label for="enumeration_is_default"><%= Enumeration.human_attribute_name(:is_default) %></label>
<%= check_box 'enumeration', 'is_default' %></p>
<!--[eoform:optvalue]-->
<% @enumeration.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :enumeration, value %></p>
<p><%= custom_field_tag_with_label :enumeration, value %></p>
<% end %>
</div>

@ -7,24 +7,24 @@
<% if enumerations.any? %>
<table class="list"><thead>
<tr>
<th><%= l(:field_name) %></th>
<th style="width:15%;"><%= l(:field_is_default) %></th>
<th style="width:15%;"><%= l(:field_active) %></th>
<th style="width:15%;"></th>
<th align="center" style="width:10%;"> </th>
<th><%= Enumeration.human_attribute_name(:name) %></th>
<th style="width:15%;"><%= Enumeration.human_attribute_name(:is_default) %></th>
<th style="width:15%;"><%= Enumeration.human_attribute_name(:active) %></th>
<th style="width:15%;"></th>
<th align="center" style="width:10%;"> </th>
</tr></thead>
<% enumerations.each do |enumeration| %>
<tr class="<%= cycle('odd', 'even') %>">
<td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
<td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td>
<td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :method => :put) %></td>
<td class="buttons">
<td><%= link_to h(enumeration), :action => 'edit', :id => enumeration %></td>
<td class="center" style="width:15%;"><%= checked_image enumeration.is_default? %></td>
<td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
<td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :method => :put) %></td>
<td class="buttons">
<%= link_to l(:button_delete), { :action => 'destroy', :id => enumeration },
:method => :post,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-del' %>
</td>
:method => :post,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-del' %>
</td>
</tr>
<% end %>
</table>

@ -8,9 +8,9 @@
<table class="list files">
<thead><tr>
<%= sort_header_tag('filename', :caption => l(:field_filename)) %>
<%= sort_header_tag('filename', :caption => Attachment.human_attribute_name(:filename)) %>
<%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %>
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %>
<%= sort_header_tag('size', :caption => Attachment.human_attribute_name(:filesize), :default_order => 'desc') %>
<%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %>
<th>MD5</th>
<th></th>

@ -1,16 +1,19 @@
<h2><%=l(:label_attachment_new)%></h2>
<%= error_messages_for 'attachment' %>
<div class="box">
<%= form_tag(project_files_path(@project), :multipart => true, :class => "tabular") do %>
<% if @versions.any? %>
<p><label for="version_id"><%=l(:field_version)%></label>
<%= select_tag "version_id", content_tag('option', '') +
options_from_collection_for_select(@versions, "id", "name") %></p>
<% end %>
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
<div class="box">
<%= form_tag(project_files_path(@project), :multipart => true, :class => "tabular") do %>
<% if @versions.any? %>
<p>
<label for="version_id"><%= Journal.human_attribute_name(:version) %></label>
<%= select_tag "version_id", content_tag('option', '') +
options_from_collection_for_select(@versions, "id", "name") %>
</p>
<% end %>
<p>
<label><%= l(:label_attachment_plural) %></label>
<%= render :partial => 'attachments/form' %>
</p>
<%= submit_tag l(:button_add) %>
<% end %>
</div>
<%= submit_tag l(:button_add) %>
<% end %>

@ -1,8 +1,8 @@
<%= error_messages_for :group %>
<div class="box tabular">
<p><%= f.text_field :lastname, :label => :field_name %></p>
<% @group.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :group, value %></p>
<p><%= f.text_field :lastname, :label => Group.human_attribute_name(:name) %></p>
<% @group.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :group, value %></p>
<% end %>
</div>

@ -5,7 +5,7 @@
<% if @group.memberships.any? %>
<table class="list memberships">
<thead><tr>
<th><%= l(:label_project) %></th>
<th><%= Project.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
</tr></thead>

@ -2,7 +2,7 @@
<% if @group.users.any? %>
<table class="list users">
<thead><tr>
<th><%= l(:label_user) %></th>
<th><%= User.model_name.human %></th>
<th style="width:15%"></th>
</tr></thead>
<tbody>

@ -2,4 +2,4 @@
<%= render_tabs group_settings_tabs %>
<% html_title(l(:label_group), @group, l(:label_administration)) -%>
<% html_title( Group.model_name.human, @group, l(:label_administration)) -%>

@ -7,7 +7,7 @@
<% if @groups.any? %>
<table class="list groups">
<thead><tr>
<th><%=l(:label_group)%></th>
<th><%= Group.model_name.human %></th>
<th><%=l(:label_user_plural)%></th>
<th></th>
</tr></thead>

@ -1,4 +1,4 @@
<h2><%=l(:label_issue_category)%>: <%=h @category.name %></h2>
<h2><%= IssueCategory.model_name.human %>: <%=h @category.name %></h2>
<%= form_tag({}) do %>
<div class="box">

@ -1,4 +1,4 @@
<h2><%=l(:label_issue_category)%></h2>
<h2><%= IssueCategory.model_name.human %></h2>
<%= labelled_tabular_form_for @category, :as => :category do |f| %>
<%= render :partial => 'issue_categories/form', :locals => { :f => f } %>

@ -2,11 +2,11 @@
<p>
<%= f.select :relation_type, collection_for_relation_type_select, {}, :onchange => "setPredecessorFieldsVisibility();" %>
<%= l(:label_issue) %> #<%= f.text_field :issue_to_id, :size => 10 %>
<%= Issue.model_name.human %> #<%= f.text_field :issue_to_id, :size => 10 %>
<div id="related_issue_candidates" class="autocomplete"></div>
<%= javascript_tag "observeRelatedIssueField('#{issues_auto_complete_path(:id => @issue, :project_id => @project, :escape => false) }')" %>
<span id="predecessor_fields" style="display:none;">
<%= l(:field_delay) %>: <%= f.text_field :delay, :size => 3 %> <%= l(:label_day_plural) %>
<%= IssueRelation.human_attribute_name(:delay) %>: <%= f.text_field :delay, :size => 3 %> <%= l(:label_day_plural) %>
</span>
<%= submit_tag l(:button_add) %>
<%= toggle_link l(:button_cancel), 'new-relation-form'%>

@ -2,18 +2,18 @@
<div class="box">
<!--[form:issue_status]-->
<p><label for="issue_status_name"><%=l(:field_name)%><span class="required"> *</span></label>
<p><label for="issue_status_name"><%= IssueStatus.human_attribute_name(:name) %><span class="required"> *</span></label>
<%= text_field 'issue_status', 'name' %></p>
<% if Issue.use_status_for_done_ratio? %>
<p><label for="issue_done_ratio"><%=l(:field_done_ratio)%></label>
<p><label for="issue_done_ratio"><%= Issue.human_attribute_name(:done_ratio) %></label>
<%= select 'issue_status', :default_done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }), :include_blank => true %></p>
<% end %>
<p><label for="issue_status_is_closed"><%=l(:field_is_closed)%></label>
<p><label for="issue_status_is_closed"><%=IssueStatus.human_attribute_name(:is_closed) %></label>
<%= check_box 'issue_status', 'is_closed' %></p>
<p><label for="issue_status_is_default"><%=l(:field_is_default)%></label>
<p><label for="issue_status_is_default"><%= IssueStatus.human_attribute_name(:is_default) %></label>
<%= check_box 'issue_status', 'is_default' %></p>
<%= call_hook(:view_issue_statuses_form, :issue_status => @issue_status) %>

@ -7,12 +7,12 @@
<table class="list">
<thead><tr>
<th><%=l(:field_status)%></th>
<th><%= IssueStatus.model_name.human %></th>
<% if Issue.use_status_for_done_ratio? %>
<th><%=l(:field_done_ratio)%></th>
<th><%= Issue.human_attribute_name(:done_ratio) %></th>
<% end %>
<th><%=l(:field_is_default)%></th>
<th><%=l(:field_is_closed)%></th>
<th><%= IssueStatus.human_attribute_name(:is_default) %></th>
<th><%= IssueStatus.human_attribute_name(:is_closed) %></th>
<th><%=l(:button_sort)%></th>
<th></th>
</tr></thead>

@ -4,7 +4,7 @@
<% if @issue.new_record? || @allowed_statuses.any? %>
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
<% else %>
<p><label><%= l(:field_status) %></label> <%= h(@issue.status.name) %></p>
<p><label><%= Issue.human_attribute_name(:status) %></label> <%= h(@issue.status.name) %></p>
<% end %>
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), {:required => true}, :disabled => !@issue.leaf? %></p>
@ -31,7 +31,7 @@
<div class="splitcontentright">
<p><%= f.text_field :start_date, :size => 10, :disabled => !@issue.leaf? %><%= calendar_for('issue_start_date') if @issue.leaf? %></p>
<p><%= f.text_field :due_date, :size => 10, :disabled => !@issue.leaf? %><%= calendar_for('issue_due_date') if @issue.leaf? %></p>
<p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf? %> <%= l(:field_hours) %></p>
<p><%= f.text_field :estimated_hours, :size => 3, :disabled => !@issue.leaf? %> <%= TimeEntry.human_attribute_name(:hours) %></p>
<% if @issue.leaf? && Issue.use_field_for_done_ratio? %>
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
<% end %>

@ -18,21 +18,21 @@
<fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
<%= fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
<div class="splitcontentleft">
<p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
<p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= TimeEntry.human_attribute_name(:hours) %></p>
</div>
<div class="splitcontentright">
<p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
</div>
<p><%= time_entry.text_field :comments, :size => 60 %></p>
<% @time_entry.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :time_entry, value %></p>
<p><%= custom_field_tag_with_label :time_entry, value %></p>
<% end %>
<% end %>
</fieldset>
<% end %>
<fieldset><legend><%= l(:field_notes) %></legend>
<%= label_tag 'notes', l(:field_notes), :class => 'hidden-for-sighted' %>
<fieldset><legend><%= Journal.human_attribute_name(:notes) %></legend>
<%= label_tag 'notes', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %>
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'notes' %>
<%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>

@ -1,12 +1,12 @@
<div class="splitcontentleft">
<% i = 0 %>
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
<% @issue.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :issue, value %></p>
<% if i == split_on -%>
</div><div class="splitcontentright">
<% end -%>
<% i += 1 -%>
<% end -%>
<% i = 0 %>
<% split_on = (@issue.custom_field_values.size / 2.0).ceil - 1 %>
<% @issue.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :issue, value %></p>
<% if i == split_on -%>
</div><div class="splitcontentright">
<% end -%>
<% i += 1 -%>
<% end -%>
</div>
<div style="clear:both;"> </div>

@ -1,29 +1,29 @@
<% if issues && issues.any? %>
<%= form_tag({}) do %>
<table class="list issues">
<thead><tr>
<th>#</th>
<th><%=l(:field_project)%></th>
<th><%=l(:field_tracker)%></th>
<th><%=l(:field_subject)%></th>
</tr></thead>
<tbody>
<% for issue in issues %>
<tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
<td class="id">
<%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;') %>
<%= link_to(h(issue.id), :controller => '/issues', :action => 'show', :id => issue) %>
</td>
<td class="project"><%= link_to_project(issue.project) %></td>
<td class="tracker"><%=h issue.tracker %></td>
<td class="subject">
<table class="list issues">
<thead><tr>
<th>#</th>
<th><%= Issue.human_attribute_name(:project)%></th>
<th><%= Issue.human_attribute_name(:tracker)%></th>
<th><%= Issue.human_attribute_name(:subject)%></th>
</tr></thead>
<tbody>
<% for issue in issues %>
<tr id="issue-<%= h(issue.id) %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %>">
<td class="id">
<%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;') %>
<%= link_to(h(issue.id), :controller => '/issues', :action => 'show', :id => issue) %>
</td>
<td class="project"><%= link_to_project(issue.project) %></td>
<td class="tracker"><%=h issue.tracker %></td>
<td class="subject">
<%= link_to h(truncate(issue.subject, :length => 60)), :controller => '/issues', :action => 'show', :id => issue %> (<%=h issue.status %>)
</td>
</tr>
<% end %>
</tbody>
</table>
</tr>
<% end %>
</tbody>
</table>
<% end %>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>

@ -10,28 +10,28 @@
<div class="splitcontentleft">
<p>
<label for="issue_tracker_id"><%= l(:field_tracker) %></label>
<label for="issue_tracker_id"><%= Issue.human_attribute_name(:tracker) %></label>
<%= select_tag('issue[tracker_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, :id, :name)) %>
</p>
<% if @available_statuses.any? %>
<p>
<label for='issue_status_id'><%= l(:field_status) %></label>
<label for='issue_status_id'><%= Issue.human_attribute_name(:status) %></label>
<%= select_tag('issue[status_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
</p>
<% end %>
<p>
<label for='issue_priority_id'><%= l(:field_priority) %></label>
<label for='issue_priority_id'><%= Issue.human_attribute_name(:priority) %></label>
<%= select_tag('issue[priority_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
</p>
<p>
<label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
<label for='issue_assigned_to_id'><%= Issue.human_attribute_name(:assigned_to) %></label>
<%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@assignables, :id, :name)) %>
</p>
<% if @project %>
<p>
<label for='issue_category_id'><%= l(:field_category) %></label>
<label for='issue_category_id'><%= Issue.human_attribute_name(:category) %></label>
<%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_none), :value => 'none') +
options_from_collection_for_select(@project.issue_categories, :id, :name)) %>
@ -40,7 +40,7 @@
<% #TODO: allow editing versions when multiple projects %>
<% if @project %>
<p>
<label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
<label for='issue_fixed_version_id'><%= Issue.human_attribute_name(:fixed_version) %></label>
<%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_none), :value => 'none') +
version_options_for_select(@project.shared_versions.open.sort)) %>
@ -60,23 +60,23 @@
<div class="splitcontentright">
<% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
<p>
<label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
<label for='issue_parent_issue_id'><%= Issue.human_attribute_name(:parent_issue) %></label>
<%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
</p>
<div id="parent_issue_candidates" class="autocomplete"></div>
<%= javascript_tag "observeParentIssueField('#{issues_auto_complete_path }')" %>
<% end %>
<p>
<label for='issue_start_date'><%= l(:field_start_date) %></label>
<label for='issue_start_date'><%= Issue.human_attribute_name(:start_date) %></label>
<%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
</p>
<p>
<label for='issue_due_date'><%= l(:field_due_date) %></label>
<label for='issue_due_date'><%= Issue.human_attribute_name(:due_date) %></label>
<%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
</p>
<% if Issue.use_field_for_done_ratio? %>
<p>
<label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
<label for='issue_done_ratio'><%= Issue.human_attribute_name(:done_ratio) %></label>
<%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
</p>
<% end %>
@ -84,8 +84,8 @@
</fieldset>
<fieldset><legend><%= l(:field_notes) %></legend>
<%= label_tag 'notes', l(:field_notes), :class => 'hidden-for-sighted' %>
<fieldset><legend><%= Journal.human_attribute_name(:notes) %></legend>
<%= label_tag 'notes', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %>
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'notes' %>
<%= send_notification_option %>

@ -25,11 +25,11 @@
<div style="display: none;">
<table>
<tr>
<td><%= l(:field_column_names) %></td>
<td><%= Query.human_attribute_name(:column_names) %></td>
<td><%= render :partial => 'queries/columns', :locals => {:query => @query} %></td>
</tr>
<tr>
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
<td><label for='group_by'><%= Query.human_attribute_name(:group_by) %></label></td>
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, @query.group_by)) %></td>
</tr>
<% if any_summable_columns? %>

@ -14,7 +14,7 @@
<legend><%= l(:label_change_properties) %></legend>
<div class="splitcontentleft">
<p><label for="new_project_id"><%=l(:field_project)%>:</label>
<p><label for="new_project_id"><%= Issue.human_attribute_name(:project) %>:</label>
<%= select_tag "new_project_id",
project_tree_options_for_select(@allowed_projects, :selected => @target_project),
:onchange => remote_function(:url => { :action => 'new' },
@ -22,21 +22,21 @@
:update => 'content',
:with => "Form.serialize('move_form')") %></p>
<p><label for="new_tracker_id"><%=l(:field_tracker)%>:</label>
<p><label for="new_tracker_id"><%= Issue.human_attribute_name(:tracker) %>:</label>
<%= select_tag "new_tracker_id", "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, "id", "name") %></p>
<p>
<label for='status_id'><%= l(:field_status) %></label>
<label for='status_id'><%= Issue.human_attribute_name(:status) %></label>
<%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
</p>
<p>
<label for='priority_id'><%= l(:field_priority) %></label>
<label for='priority_id'><%= Issue.human_attribute_name(:priority) %></label>
<%= select_tag('priority_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
</p>
<p>
<label for='assigned_to_id'><%= l(:field_assigned_to) %></label>
<label for='assigned_to_id'><%= Issue.human_attribute_name(:assigned_to) %></label>
<%= select_tag('assigned_to_id', content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@target_project.assignable_users, :id, :name)) %>
@ -45,21 +45,21 @@
<div class="splitcontentright">
<p>
<label for='start_date'><%= l(:field_start_date) %></label>
<label for='start_date'><%= Issue.human_attribute_name(:start_date) %></label>
<%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %>
</p>
<p>
<label for='due_date'><%= l(:field_due_date) %></label>
<label for='due_date'><%= Issue.human_attribute_name(:due_date) %></label>
<%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
</p>
</div>
</fieldset>
<fieldset><legend><%= l(:field_notes) %></legend>
<fieldset><legend><%= Journal.human_attribute_name(:notes) %></legend>
<%= label_tag 'notes', l(:field_notes), :class => 'hidden-for-sighted' %>
<%= label_tag 'notes', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %>
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'notes' %>
</fieldset>

@ -1,11 +1,11 @@
<% if @notes %>
<fieldset class="preview"><legend><%= l(:field_notes) %></legend>
<fieldset class="preview"><legend><%= Journal.human_attribute_name(:notes) %></legend>
<%= textilizable @notes, :attachments => @attachements, :object => @issue %>
</fieldset>
<% end %>
<% if @description %>
<fieldset class="preview"><legend><%= l(:field_description) %></legend>
<fieldset class="preview"><legend><%= Issue.human_attribute_name(:description) %></legend>
<%= textilizable @description, :attachments => @attachements, :object => @issue %>
</fieldset>
<% end %>

@ -1,7 +1,8 @@
<h3><%=l(:"field_#{detail}")%>&nbsp;&nbsp;
<h3>
<%= Issue.human_attribute_name(detail) %>&nbsp;&nbsp;
<%= link_to image_tag('zoom_in.png',
:alt => l(:text_analyze, :subject => l(:"field_#{detail}")),
:title => l(:text_analyze, :subject => l(:"field_#{detail}"))),
:alt => l(:text_analyze, :subject => Issue.human_attribute_name(detail)),
:title => l(:text_analyze, :subject => Issue.human_attribute_name(detail))),
:action => 'report_details', :detail => detail %>
</h3>
<%= render :partial => 'report', :locals => { :data => data,

@ -19,46 +19,44 @@
<% end %>
</p>
<div class="meta">
<table class="attributes">
<tr>
<th class="status"><%=l(:field_status)%>:</th><td class="status"><%= h(@issue.status.name) %></td>
<th class="start-date"><%=l(:field_start_date)%>:</th><td class="start-date"><%= format_date(@issue.start_date) %></td>
</tr>
<tr>
<th class="priority"><%=l(:field_priority)%>:</th><td class="priority"><%= h(@issue.priority.name) %></td>
<th class="due-date"><%=l(:field_due_date)%>:</th><td class="due-date"><%= format_date(@issue.due_date) %></td>
</tr>
<tr>
<th class="assigned-to"><%=l(:field_assigned_to)%>:</th><td class="assigned-to"><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
<th class="progress"><%=l(:field_done_ratio)%>:</th><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
</tr>
<tr>
<th class="category"><%=l(:field_category)%>:</th><td class="category"><%=h(@issue.category ? @issue.category.name : "-") %></td>
<% if User.current.allowed_to?(:view_time_entries, @project) %>
<th class="spent-time"><%=l(:label_spent_time)%>:</th>
<td class="spent-time"><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), issue_time_entries_path(@issue)) : "-" %></td>
<% end %>
</tr>
<tr>
<th class="fixed-version"><%=l(:field_fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
<% if @issue.estimated_hours %>
<th class="estimated-hours"><%=l(:field_estimated_hours)%>:</th><td class="estimated-hours"><%= l_hours(@issue.estimated_hours) %></td>
<% end %>
</tr>
<%= render_custom_fields_rows(@issue) %>
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
</table>
</div><!-- .meta -->
<table class="attributes">
<tr>
<th class="status"><%= Issue.human_attribute_name(:status)%>:</th><td class="status"><%= h(@issue.status.name) %></td>
<th class="start-date"><%= Issue.human_attribute_name(:start_date)%>:</th><td class="start-date"><%= format_date(@issue.start_date) %></td>
</tr>
<tr>
<th class="priority"><%= Issue.human_attribute_name(:priority)%>:</th><td class="priority"><%= h(@issue.priority.name) %></td>
<th class="due-date"><%= Issue.human_attribute_name(:due_date)%>:</th><td class="due-date"><%= format_date(@issue.due_date) %></td>
</tr>
<tr>
<th class="assigned-to"><%= Issue.human_attribute_name(:assigned_to)%>:</th><td class="assigned-to"><%= avatar(@issue.assigned_to, :size => "14") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
<th class="progress"><%= Issue.human_attribute_name(:done_ratio)%>:</th><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
</tr>
<tr>
<th class="category"><%= Issue.human_attribute_name(:category)%>:</th><td class="category"><%=h(@issue.category ? @issue.category.name : "-") %></td>
<% if User.current.allowed_to?(:view_time_entries, @project) %>
<th class="spent-time"><%=l(:label_spent_time)%>:</th>
<td class="spent-time"><%= @issue.spent_hours > 0 ? (link_to l_hours(@issue.spent_hours), issue_time_entries_path(@issue)) : "-" %></td>
<% end %>
</tr>
<tr>
<th class="fixed-version"><%= Issue.human_attribute_name(:fixed_version)%>:</th><td class="fixed-version"><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
<% if @issue.estimated_hours %>
<th class="estimated-hours"><%= Issue.human_attribute_name(:estimated_hours)%>:</th><td class="estimated-hours"><%= l_hours(@issue.estimated_hours) %></td>
<% end %>
</tr>
<%= render_custom_fields_rows(@issue) %>
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
</table>
<% if @issue.description? %>
<div class="description">
<hr />
<div class="contextual">
<%= link_to_remote_if_authorized(l(:button_quote), { :url => {:controller => '/journals', :action => 'new', :id => @issue} }, :class => 'icon icon-comment') %>
<%= link_to_if_authorized(l(:button_quote), { :controller => '/issues', :action => 'quoted', :id => @issue }, :class => 'quote-link icon icon-comment') %>
</div>
<p><strong><%=l(:field_description)%></strong></p>
<div class="wiki">
<p><strong><%= Issue.human_attribute_name(:description)%></strong></p>
<div class="wiki wikicontent" data-user="<%= @issue.author %>">
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
</div>
</div>

@ -48,7 +48,7 @@
<%= full_breadcrumb %>
</h1>
</div>
<%= javascript_tag('jQuery("div#breadcrumb ul.breadcrumb").adjustBreadcrumbToWindowSize()') %>
<%= javascript_tag('jQuery(function($) { $("div#breadcrumb ul.breadcrumb").adjustBreadcrumbToWindowSize(); });') %>
</div>
<% main_menu = render_main_menu(@project) %>

@ -2,42 +2,42 @@
<div class="box">
<!--[form:auth_source]-->
<p><label for="auth_source_name"><%=l(:field_name)%> <span class="required">*</span></label>
<p><label for="auth_source_name"><%= AuthSource.human_attribute_name(:name) %> <span class="required">*</span></label>
<%= text_field 'auth_source', 'name' %></p>
<p><label for="auth_source_host"><%=l(:field_host)%> <span class="required">*</span></label>
<p><label for="auth_source_host"><%= AuthSource.human_attribute_name(:host) %> <span class="required">*</span></label>
<%= text_field 'auth_source', 'host' %></p>
<p><label for="auth_source_port"><%=l(:field_port)%> <span class="required">*</span></label>
<p><label for="auth_source_port"><%= AuthSource.human_attribute_name(:port) %> <span class="required">*</span></label>
<%= text_field 'auth_source', 'port', :size => 6 %> <%= check_box 'auth_source', 'tls' %> LDAPS</p>
<p><label for="auth_source_account"><%=l(:field_account)%></label>
<p><label for="auth_source_account"><%= AuthSource.human_attribute_name(:account) %></label>
<%= text_field 'auth_source', 'account' %></p>
<p><label for="auth_source_account_password"><%=l(:field_password)%></label>
<p><label for="auth_source_account_password"><%= AuthSource.human_attribute_name(:password) %></label>
<%= password_field 'auth_source', 'account_password', :name => 'ignore',
:value => ((@auth_source.new_record? || @auth_source.account_password.blank?) ? '' : ('x'*15)),
:onfocus => "this.value=''; this.name='auth_source[account_password]';",
:onchange => "this.name='auth_source[account_password]';" %></p>
<p><label for="auth_source_base_dn"><%=l(:field_base_dn)%> <span class="required">*</span></label>
<p><label for="auth_source_base_dn"><%= AuthSource.human_attribute_name(:base_dn) %> <span class="required">*</span></label>
<%= text_field 'auth_source', 'base_dn', :size => 60 %></p>
<p><label for="auth_source_onthefly_register"><%=l(:field_onthefly)%></label>
<p><label for="auth_source_onthefly_register"><%= AuthSource.human_attribute_name(:onthefly) %></label>
<%= check_box 'auth_source', 'onthefly_register' %></p>
</div>
<fieldset class="box"><legend><%=l(:label_attribute_plural)%></legend>
<p><label for="auth_source_attr_login"><%=l(:field_login)%> <span class="required">*</span></label>
<p><label for="auth_source_attr_login"><%= AuthSource.human_attribute_name(:login) %> <span class="required">*</span></label>
<%= text_field 'auth_source', 'attr_login', :size => 20 %></p>
<p><label for="auth_source_attr_firstname"><%=l(:field_firstname)%></label>
<p><label for="auth_source_attr_firstname"><%= AuthSource.human_attribute_name(:firstname) %></label>
<%= text_field 'auth_source', 'attr_firstname', :size => 20 %></p>
<p><label for="auth_source_attr_lastname"><%=l(:field_lastname)%></label>
<p><label for="auth_source_attr_lastname"><%= AuthSource.human_attribute_name(:lastname) %></label>
<%= text_field 'auth_source', 'attr_lastname', :size => 20 %></p>
<p><label for="auth_source_attr_mail"><%=l(:field_mail)%></label>
<p><label for="auth_source_attr_mail"><%= AuthSource.human_attribute_name(:mail) %></label>
<%= text_field 'auth_source', 'attr_mail', :size => 20 %></p>
</fieldset>
<!--[eoform:auth_source]-->

@ -3,7 +3,7 @@
<div class="box">
<!--[form:message]-->
<p><label for="message_subject"><%= l(:field_subject) %></label><br />
<p><label for="message_subject"><%= Message.human_attribute_name(:subject) %></label><br />
<%= f.text_field :subject, :size => 120, :id => "message_subject" %>
<% if !replying && User.current.allowed_to?(:edit_messages, @project) %>
@ -13,7 +13,7 @@
</p>
<% if !replying && !@message.new_record? && User.current.allowed_to?(:edit_messages, @project) %>
<p><label><%= l(:label_board) %></label><br />
<p><label><%= Board.name.humanize %></label><br />
<%= f.select :board_id, @project.boards.collect {|b| [b.name, b.id]} %></p>
<% end %>

@ -5,8 +5,8 @@
<h3><%=l(:label_my_account_data)%></h3>
<p><%=l(:field_login)%>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
<p><%= User.human_attribute_name(:login) %>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
<%= User.human_attribute_name(:created_on) %>: <%= format_time(@user.created_on) %></p>
<h3><%= l(:label_feeds_access_key) %></h3>

@ -30,12 +30,12 @@
</div>
<div class="splitcontentright">
<h3><%=l(:field_mail_notification)%></h3>
<h3><%= User.human_attribute_name(:mail_notification) %></h3>
<div class="box">
<%= render :partial => 'users/mail_notifications' %>
</div>
<h3><%=l(:field_ui, :app_title => Setting.app_title)%></h3>
<h3><%=l(:label_ui, :app_title => Setting.app_title)%></h3>
<div class="box tabular">
<%= render :partial => 'users/impaired_settings' %>
</div>

@ -15,9 +15,9 @@ entries_by_day = entries.group_by(&:spent_on)
<table class="list time-entries">
<thead><tr>
<th><%= l(:label_activity) %></th>
<th><%= l(:label_project) %></th>
<th><%= l(:field_comments) %></th>
<th><%= l(:field_hours) %></th>
<th><%= Project.model_name.human %></th>
<th><%= TimeEntry.human_attribute_name(:comments) %></th>
<th><%= TimeEntry.human_attribute_name(:hours) %></th>
<th></th>
</tr></thead>
<tbody>

@ -1,5 +1,5 @@
<%= form_tag({:controller => '/my', :action => "first_login", :back_url => @back_url }, {:method => :put}) do %>
<h3><%=l(:field_ui, :app_title => Setting.app_title)%></h3>
<h3><%=l(:label_ui, :app_title => Setting.app_title)%></h3>
<div class="box tabular">
<%= render :partial => "users/impaired_settings" %>
</div>

@ -4,14 +4,14 @@
<%= form_tag({}, :class => "tabular") do %>
<div class="box">
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
<p><label for="password"><%= User.human_attribute_name(:password)%> <span class="required">*</span></label>
<%= password_field_tag 'password', nil, :size => 25 %></p>
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
<p><label for="new_password"><%= User.human_attribute_name(:new_password) %> <span class="required">*</span></label>
<%= password_field_tag 'new_password', nil, :size => 25 %><br />
<%= password_complexity_requirements %></p>
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
<p><label for="new_password_confirmation"><%= User.human_attribute_name(:password_confirmation) %> <span class="required">*</span></label>
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
</div>
<%= submit_tag l(:button_apply) %>

@ -1,4 +1,4 @@
<h2><%=l(:label_news)%></h2>
<h2><%= News.model_name.human %></h2>
<%= labelled_tabular_form_for @news, :html => { :id => 'news-form' } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>

@ -56,7 +56,7 @@
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
<%= form_for([@news, Comment.new], :html => { :id => "add_comment_form", :style => "display:none;" }) do %>
<div class="box">
<%= label_tag 'comment_comments', l(:field_notes), :class => 'hidden-for-sighted' %>
<%= label_tag 'comment_comments', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %>
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'comment_comments' %>
</div>

@ -5,7 +5,7 @@
<p><%= f.text_field :name, :required => true, :size => 60 %></p>
<% unless @project.allowed_parents.compact.empty? %>
<p><%= label(:project, :parent_id, l(:field_parent)) %><%= parent_project_select_tag(@project) %></p>
<p><%= label(:project, :parent_id, Project.human_attribute_name(:parent)) %><%= parent_project_select_tag(@project) %></p>
<% end %>
<p><%= f.text_area :summary, :rows => 2, :class => 'wiki-edit' %></p>

@ -2,12 +2,12 @@
<table class="list">
<thead><tr>
<th><%= l(:field_name) %></th>
<th><%= Enumeration.human_attribute_name(:name) %></th>
<th><%= l(:enumeration_system_activity) %></th>
<% TimeEntryActivity.new.available_custom_fields.each do |value| %>
<th><%= h value.name %></th>
<th><%= h value.name %></th>
<% end %>
<th style="width:15%;"><%= l(:field_active) %></th>
<th style="width:15%;"><%= Enumeration.human_attribute_name(:active) %></th>
</tr></thead>
<% @project.activities(true).each do |enumeration| %>
@ -19,9 +19,9 @@
</td>
<td align="center" style="width:15%;"><%= checked_image !enumeration.project %></td>
<% enumeration.custom_field_values.each do |value| %>
<td align="center">
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<td align="center">
<%= custom_field_tag "enumerations[#{enumeration.id}]", value %>
</td>
<% end %>
<td align="center" style="width:15%;">
<%= label_tag "enumerations_#{enumeration.id}_active", l(:description_active), :class => "hidden-for-sighted" %>
@ -34,8 +34,8 @@
<div class="contextual">
<%= link_to(l(:button_reset), project_enumerations_path(@project),
:method => :delete,
:confirm => l(:text_are_you_sure),
:method => :delete,
:confirm => l(:text_are_you_sure),
:class => 'icon icon-del') %>
</div>

@ -1,8 +1,8 @@
<% if @project.boards.any? %>
<table class="list">
<thead><tr>
<th><%= l(:label_board) %></th>
<th><%= l(:field_description) %></th>
<th><%= Board.model_name.human %></th>
<th><%= Board.human_attribute_name(:description) %></th>
<th></th>
<th></th>
</tr></thead>

@ -1,8 +1,8 @@
<% if @project.issue_categories.any? %>
<table class="list">
<thead><tr>
<th><%= l(:label_issue_category) %></th>
<th><%= l(:field_assigned_to) %></th>
<th><%= IssueCategory.model_name.human %></th>
<th><%= IssueCategory.human_attribute_name(:assigned_to) %></th>
<th></th>
</tr></thead>
<tbody>

@ -19,7 +19,7 @@
<% authorized = authorize_for('members', 'edit') %>
<table class="list members">
<thead><tr>
<th><%= l(:label_user) %> / <%= l(:label_group) %></th>
<th><%= User.model_name.human %> / <%= Group.model_name.human %></th>
<th><%= l(:label_role_plural) %></th>
<th style="width:15%"></th>
<%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>

@ -1,13 +1,13 @@
<% if @project.shared_versions.any? %>
<table class="list versions">
<thead><tr>
<th><%= l(:label_version) %></th>
<th><%= l(:field_start_date) %></th>
<th><%= l(:field_effective_date) %></th>
<th><%= l(:field_description) %></th>
<th><%= l(:field_status) %></th>
<th><%= l(:field_sharing) %></th>
<th><%= l(:label_wiki_page) %></th>
<th><%= Version.model_name.human %></th>
<th><%= Version.human_attribute_name(:start_date) %></th>
<th><%= Version.human_attribute_name(:effective_date) %></th>
<th><%= Version.human_attribute_name(:description) %></th>
<th><%= Version.human_attribute_name(:status) %></th>
<th><%= Version.human_attribute_name(:sharing) %></th>
<th><%= WikiPage.model_name.human %></th>
<th style="width:15%"></th>
</tr></thead>
<tbody>

@ -13,7 +13,7 @@
</div>
<ul>
<% if @project.homepage.present? %>
<li><%= l(:field_homepage) %>: <%=raw auto_link(@project.homepage) %></li>
<li><%= Project.human_attribute_name(:homepage) %>: <%=raw auto_link(@project.homepage) %></li>
<% end %>
<% if @subprojects.any? %>
<li>

@ -82,7 +82,7 @@ Event.observe(document,"dom:loaded", apply_filters_observer);
<tr <%= 'style="display:none;"'.html_safe unless query.has_filter?(field) %> id="tr_<%= field %>" class="filter">
<td style="width:200px;">
<%= check_box_tag 'f[]', field, query.has_filter?(field), :onclick => "toggle_filter('#{field}');", :id => "cb_#{field}" %>
<label for="cb_<%= field %>"><%= filter[1][:name] || l(("field_"+field.to_s.gsub(/\_id$/, "")).to_sym) %></label>
<label for="cb_<%= field %>"><%= filter[1][:name] || Issue.human_attribute_name(field) %></label>
</td>
<td style="width:150px;">
<%= label_tag "op_#{field}", l(:description_filter), :class => "hidden-for-sighted" %>

@ -4,7 +4,7 @@
<div class="box">
<div class="tabular">
<p>
<%= label_tag :query_name, l(:field_name) %>
<%= label_tag :query_name, Query.human_attribute_name(:name) %>
<%= text_field 'query', 'name', :size => 80 %>
</p>
<% if any_summable_columns? %>
@ -17,12 +17,12 @@
<%= call_hook(:view_query_form_top, :query => query) %>
<% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, @project) %>
<p><label for="query_is_public"><%=l(:field_is_public)%></label>
<p><label for="query_is_public"><%= Query.human_attribute_name(:is_public) %></label>
<%= check_box 'query', 'is_public',
:onchange => (User.current.admin? ? nil : 'if (this.checked) {$("query_is_for_all").checked = false; $("query_is_for_all").disabled = true;} else {$("query_is_for_all").disabled = false;}') %></p>
<% end %>
<p><label for="query_is_for_all"><%=l(:field_is_for_all)%></label>
<p><label for="query_is_for_all"><%= Query.human_attribute_name(:is_for_all) %></label>
<%= check_box_tag 'query_is_for_all', 1, @query.project.nil?,
:disabled => (!@query.new_record? && (@query.project.nil? || (@query.is_public? && !User.current.admin?))) %></p>
@ -30,7 +30,7 @@
<%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns',
:onclick => 'if (this.checked) {Element.hide("columns")} else {Element.show("columns")}' %></p>
<p><label for="query_group_by"><%= l(:field_group_by) %></label>
<p><label for="query_group_by"><%= Query.human_attribute_name(:group_by) %></label>
<%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
</div>
@ -50,7 +50,7 @@
</fieldset>
<%= content_tag 'fieldset', :id => 'columns', :style => (query.has_default_columns? ? 'display:none;' : nil) do %>
<legend><%= l(:field_column_names) %></legend>
<legend><%= Query.human_attribute_name(:column_names) %></legend>
<%= render :partial => 'queries/columns', :locals => {:query => query}%>
<% end %>

@ -1,4 +1,4 @@
<h2><%= l(:label_query) %></h2>
<h2><%= Query.model_name.human %></h2>
<%= form_tag({:action => 'edit', :id => @query}, :onsubmit => 'selectAllOptions("selected_columns");') do %>
<%= render :partial => 'form', :locals => {:query => @query} %>

@ -1,12 +1,12 @@
<table class="list entries" id="browser">
<thead>
<tr id="root">
<th><%= l(:field_name) %></th>
<th><%= l(:field_filesize) %></th>
<th><%= Attachment.human_attribute_name(:filename) %></th>
<th><%= Attachment.human_attribute_name(:filesize) %></th>
<th><%= l(:label_revision) %></th>
<th><%= l(:label_age) %></th>
<th><%= l(:field_author) %></th>
<th><%= l(:field_comments) %></th>
<th><%= Changeset.human_attribute_name(:author) %></th>
<th><%= Changeset.human_attribute_name(:comments) %></th>
</tr>
</thead>
<tbody>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save