Compare commits

...

835 Commits
1.4.0 ... 2.1.5

Author SHA1 Message Date
Jean-Philippe Lang
e045f0b3b5 tagged version 2.1.5
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/tags/2.1.5@11048 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-18 12:57:45 +00:00
Jean-Philippe Lang
68b923640e Set version to 2.1.5
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11046 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-18 12:56:45 +00:00
Jean-Philippe Lang
e64ba44fca tagged version 2.1.5
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/tags/2.1.5@11044 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-18 12:42:42 +00:00
Jean-Philippe Lang
4e2fbf440b Changelog for 2.1.5 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11043 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-18 12:24:45 +00:00
Toshi MARUYAMA
5572b6c715 Merged r11035 from trunk to 2.1-stable (#12615)
Russian translation updated by Kirill Bezrukov.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11038 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-17 23:45:36 +00:00
Toshi MARUYAMA
d63f0fa5b0 Merged r11022 from trunk to 2.1-stable (#12614)
Dutch translation updated.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11024 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-17 12:44:13 +00:00
Toshi MARUYAMA
dff772b066 Merged r11014 from trunk to 2.1-stable (#12605)
Norwegian translation for 1.4-stable updated by Ketil Mehl.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11019 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-16 07:39:07 +00:00
Jean-Philippe Lang
fb2cbdc6cc Merged r10991 from trunk (#12568).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11008 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-15 07:55:41 +00:00
Jean-Philippe Lang
6062a0a89d Merged r10885 from trunk (#12451).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11007 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-15 07:54:21 +00:00
Jean-Philippe Lang
0ebf95d819 Merged r10992 from trunk (#12400).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11005 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-15 07:52:31 +00:00
Jean-Philippe Lang
14879e24c4 Merged r10956 from trunk (#12513).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11003 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-15 07:50:45 +00:00
Jean-Philippe Lang
ca0b289479 Merged r10975 from trunk (#12566).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@11001 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-12-15 07:48:42 +00:00
Jean-Philippe Lang
e36a611f81 Reverts r10895 (#12472).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10897 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-30 10:25:22 +00:00
Jean-Philippe Lang
6c2eec59d8 Merged r10893 into 2.1-stable (#12472).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10895 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-30 08:58:26 +00:00
Jean-Philippe Lang
905ed3aa75 Updates for 2.1.4 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10875 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-24 09:35:08 +00:00
Jean-Philippe Lang
bb4c530ba2 Merged r10865 and r10866 from trunk (#12431).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10873 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-23 22:31:02 +00:00
Jean-Philippe Lang
e3958ef577 Merged r10838 from trunk (#12274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10872 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-23 22:29:45 +00:00
Jean-Philippe Lang
c5f2dadb2c Merged r10836 from trunk (#12298).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10871 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-23 22:28:37 +00:00
Jean-Philippe Lang
af8dcccb7b Merged r10837 from trunk (#12332).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10870 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-23 22:25:40 +00:00
Toshi MARUYAMA
c0742ed9e6 Merged r10862 from trunk to 2.1-stable (#12409)
scm: git: change extra_report_last_commit type at unit test to string.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10863 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-22 01:10:50 +00:00
Jean-Philippe Lang
8c7ae20402 Merged r10850 from trunk (#12396).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10861 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-21 20:44:19 +00:00
Toshi MARUYAMA
06b68f1948 Merged r10856 and r10857 from trunk to 2.1-stable (#12409)
scm: git: fix changesets aren't read after clear_changesets call.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10858 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-21 09:55:48 +00:00
Toshi MARUYAMA
b51203bc83 Merged r10853 from trunk (#12399)
svn propset svn:eol-style native to fixtures.


git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10855 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-21 07:19:57 +00:00
Toshi MARUYAMA
f578a5c4f6 Merged r10852 from trunk (#12399)
fix non ASCII attachment filename encoding broken (MOJIBAKE) in receiving mail on Ruby 1.8.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10854 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-21 07:14:30 +00:00
Jean-Philippe Lang
17d1907747 Merged r10840 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10848 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-18 20:37:28 +00:00
Jean-Philippe Lang
0e241bb857 Updates for 2.1.3 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10832 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-17 12:49:43 +00:00
Jean-Philippe Lang
9dcde53dab Merged r10829 from trunk (#12358).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10830 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-17 12:18:40 +00:00
Jean-Philippe Lang
a44521527a Merged r10745 from trunk (#12231).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10824 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-17 09:24:19 +00:00
Jean-Philippe Lang
f12590fa5c Merged r10806 from trunk (#12195).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10823 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-17 09:02:07 +00:00
Jean-Philippe Lang
a1c6f710aa Backported r10792 and r10793 from trunk (#12310).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10822 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-17 08:58:26 +00:00
Jean-Philippe Lang
3ad82e4665 Merged r10810 from trunk (#12359).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10821 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-17 08:52:51 +00:00
Jean-Philippe Lang
eef3b5b5ca Merged r10790 from trunk (#12294).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10820 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-17 08:51:17 +00:00
Jean-Philippe Lang
ab69845ea2 Merged r10801 from trunk (#12349).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10819 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-17 08:50:19 +00:00
Toshi MARUYAMA
af51a68b34 Merged r10813 from trunk (#12375)
svn propset svn:eol-style native to fixtures.


git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10817 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-16 07:57:10 +00:00
Toshi MARUYAMA
d5c08680f6 Merged r10812 from trunk (#12375)
fix receiving mail subject broken which does not begin with encoding name.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10816 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-16 07:52:05 +00:00
Toshi MARUYAMA
9b82b948e3 Merged r10811 from trunk (#12375)
add test of receiving mail subject begins with encoding name.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10815 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-16 07:51:53 +00:00
Toshi MARUYAMA
1c8510bc80 Merged r10763 from trunk (#12237)
German Translation updated by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10764 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-29 16:03:23 +00:00
Toshi MARUYAMA
23861c7cc1 Merged from r10758 trunk (#12237)
German Translation updated by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10760 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-29 13:08:12 +00:00
Toshi MARUYAMA
6550343cb9 Merged r10733 from trunk (#12232, #12235)
German translation for 2.1-stable updated by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10738 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-28 01:59:00 +00:00
Jean-Philippe Lang
a70cf2f833 Merged r10715 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10724 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-26 03:16:15 +00:00
Jean-Philippe Lang
0f219b973a Merged r10714 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10723 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-26 03:15:21 +00:00
Jean-Philippe Lang
d02e5e54a8 Merged r10580 and r10581 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10722 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-26 03:13:34 +00:00
Toshi MARUYAMA
c050028102 Merged r10709 from trunk to 2.1-stable (#12196)
fix "Page not found" on OK button in SCM "View all revisions" page.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10710 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-24 10:22:17 +00:00
Toshi MARUYAMA
012ffdf9e8 Merged r10702 from trunk to 2.1-stable (#12189)
add tmp/pdf directory.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10703 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-23 10:56:43 +00:00
Toshi MARUYAMA
9e3aeeef88 Merged r10699 from trunk (#12188)
Simplified Chinese translation for 2.1-stable updated by Steven Wong.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10701 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-23 07:57:06 +00:00
Toshi MARUYAMA
21b162a624 Merged r10689 from trunk to 2.1-stable
Partial backout r10263.

Backout replacing shoulda context of test/unit/helpers/issues_helper_test.rb.
Test methods in shoulda context do not run on Ruby 1.8.7-p370.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10691 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-22 03:24:01 +00:00
Toshi MARUYAMA
b7e999d1aa Merged r10688 from trunk to 2.1-stable
Backout r10253.

Backout replacing shoulda context of test/unit/helpers/issues_helper_test.rb.
Test methods in shoulda context do not run on Ruby 1.8.7-p370.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10690 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-22 03:23:28 +00:00
Toshi MARUYAMA
284d03e1f8 Merged r10596 from trunk to 2.1-stable (#9732)
German translation updated by Raphael Kallensee.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10600 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-11 03:47:22 +00:00
Toshi MARUYAMA
3b4126e14f Merged r10572 from trunk
add missing fixtures to test/unit/issue_relation_test.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10577 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-09 11:56:45 +00:00
Toshi MARUYAMA
46a76ecb6e Merged r10571 from trunk
add missing fixture to test/integration/api_test/issues_test.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10576 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-09 11:56:31 +00:00
Toshi MARUYAMA
5a74edef89 Merged r10563 from trunk (#12021)
Russian translation for 2.1-stable updated.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10565 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-10-04 23:47:53 +00:00
Jean-Philippe Lang
2f9c2e6bd3 Merged r10535 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10536 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-30 10:42:57 +00:00
Jean-Philippe Lang
2df7c0ff3a Merged r10465 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10534 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-30 08:33:25 +00:00
Jean-Philippe Lang
f5d5077d2b Merged r10531 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10532 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-30 08:07:17 +00:00
Jean-Philippe Lang
94a1eb21a4 Merged r10527 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10528 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-29 17:13:15 +00:00
Jean-Philippe Lang
1f80a4b0d9 Merged r10433, r10437 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10526 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-29 16:38:53 +00:00
Jean-Philippe Lang
55220950d2 Merged r10412 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10525 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-29 16:34:30 +00:00
Jean-Philippe Lang
daea57a37c Merged r10438 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10524 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-29 16:32:11 +00:00
Jean-Philippe Lang
fe61739108 Merged r10494 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10523 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-29 16:31:13 +00:00
Jean-Philippe Lang
a4cd96e8b0 Merged r10436 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10522 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-29 16:28:40 +00:00
Jean-Philippe Lang
804302ce61 Merged r10413 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10521 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-29 16:27:03 +00:00
Jean-Philippe Lang
89ecbe9cdc Merged r10439 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10520 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-29 16:26:08 +00:00
Toshi MARUYAMA
aac3e1e51c Merged r10503 from trunk to 2.1-stable (#11982, #11966)
add functional test of sub repository diff path.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10511 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-28 06:38:50 +00:00
Toshi MARUYAMA
595fef0d68 Merged r10502 from trunk to 2.1-stable (#11982, #11966)
add functional test of main repository diff path.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10510 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-28 06:38:23 +00:00
Toshi MARUYAMA
65a6e3985e Merged r10490 from trunk to 2.1-stable (#11982, #11966)
explicitly define route at scm diff view.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10509 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-28 06:37:48 +00:00
Toshi MARUYAMA
f27a0eca5b Merged r10501 from trunk
set user preference diff type nil at functional tests.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10505 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-28 03:54:07 +00:00
Toshi MARUYAMA
2d34ab9235 Merged r10498 from trunk
scm: git: use with_settings instead of assigned setting at functional test

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10499 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-28 00:17:59 +00:00
Toshi MARUYAMA
03bff3308f Merged r10487 from trunk (#11885)
fix broken issue list filter.

Array indexOf() is not defined on IE8.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10489 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-27 07:29:22 +00:00
Toshi MARUYAMA
006a1b4fd7 Merged r10486 from trunk (#11885)
fix javascript syntax mistake in application.js.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10488 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-27 07:29:07 +00:00
Toshi MARUYAMA
9095874a07 Merged r10478 from trunk
use set_language_if_valid 'en' at test_parent_should_be_in_same_project at unit board test.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10482 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-26 11:59:44 +00:00
Toshi MARUYAMA
8ecfd1dcf8 Merged r10477 from trunk
set default_language en at test_commit_closing_a_subproject_issue of unit changeset test.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10481 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-26 11:59:19 +00:00
Toshi MARUYAMA
35584bc53a Merged r10476 from trunk (#11922)
fix number_to_currency() raises exception on Rails3 bs and de locale.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10479 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-26 11:09:24 +00:00
Toshi MARUYAMA
21a16e0958 Merged r10472 from trunk (#11945)
add more error message if public/plugin_assets cannot be created.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10474 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-26 05:39:40 +00:00
Toshi MARUYAMA
76d24e44bf Merged r10471 from trunk (#11945)
fix "can't convert Errno::EACCES into String" in case of no permission of public/plugin_assets on Ruby 1.9.3.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10473 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-26 05:39:23 +00:00
Toshi MARUYAMA
efbdef9357 Merged r10434 from trunk (#11897)
Traditional Chinese translation updated by ChunChang Lo.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10435 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-20 11:35:55 +00:00
Jean-Philippe Lang
5eab4af70d Merged r10391 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10392 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-16 12:43:43 +00:00
Toshi MARUYAMA
96b2e00015 Merged r10379 from trunk (#11836)
Japanese translation updated by Go MAEDA.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10380 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-15 12:02:36 +00:00
Jean-Philippe Lang
9939fbeef6 Merged r10375 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10376 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-12 19:16:31 +00:00
Jean-Philippe Lang
b369f82d15 Merged r10368 to r10373 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10374 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 19:40:59 +00:00
Jean-Philippe Lang
0ad5dfaba0 Set branch to stable.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10367 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 16:33:49 +00:00
Jean-Philippe Lang
d7d18689b7 Added 2.1-stable branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.1-stable@10366 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 16:30:57 +00:00
Jean-Philippe Lang
4cd22bb53a Set version to 2.1.0.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10365 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 16:30:07 +00:00
Toshi MARUYAMA
7d8db59dae do not show estimated time if it is nil on issue page
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10364 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 14:13:30 +00:00
Toshi MARUYAMA
d1606fd3e3 add asserting that issue estimated hours is nil when creating minimal issue
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10363 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 14:13:11 +00:00
Toshi MARUYAMA
097d9661c9 gantt: use content_tag instead of html tag at the tooltip
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10362 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 03:45:06 +00:00
Toshi MARUYAMA
f8cedf00a8 gantt: use content_tag instead of html tag at the label on the right
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10361 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 03:44:52 +00:00
Toshi MARUYAMA
2461d12388 gantt: remove redundant empty lines from unit gantt helper test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10360 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 02:58:59 +00:00
Toshi MARUYAMA
bcd8ce2de2 gantt: use content_tag instead of html tag at subject for project
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10359 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 02:16:32 +00:00
Toshi MARUYAMA
0cd9149e7a gantt: use content_tag instead of html tag at the markers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10358 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 02:16:18 +00:00
Toshi MARUYAMA
69d0660760 gantt: code layout cleanup to_pdf method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10357 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 02:16:03 +00:00
Toshi MARUYAMA
3f7a7d9b14 gantt: fix unit gantt helper test fails
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10356 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 01:53:34 +00:00
Toshi MARUYAMA
66f881aad3 gantt: use content_tag instead of html tag at the task bar
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10355 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 00:57:10 +00:00
Toshi MARUYAMA
d3d719c0e7 gantt: code layout cleanup image_task method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10354 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 00:56:56 +00:00
Toshi MARUYAMA
03aa7037a5 gantt: code layout cleanup to_image method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10353 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 00:56:41 +00:00
Toshi MARUYAMA
ffb981255c gantt: use content_tag instead of html tag at helper subject_for_version method
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10352 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 00:09:01 +00:00
Toshi MARUYAMA
3bbb2566c8 gantt: code layout cleanup pdf_task method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10351 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 00:08:46 +00:00
Toshi MARUYAMA
8cfec7ddf5 gantt: code layout cleanup pdf_subject method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10350 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 00:08:32 +00:00
Toshi MARUYAMA
af177c3a59 gantt: code layout cleanup to_pdf method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10349 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-11 00:08:16 +00:00
Toshi MARUYAMA
25aeb4c3d3 gantt: use content_tag instead of html tag at subject gravatar
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10348 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-10 22:57:24 +00:00
Toshi MARUYAMA
b75afd49de gantt: code layout cleanup html_subject method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10347 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-10 22:56:56 +00:00
Toshi MARUYAMA
0cd08ed08c gantt: code layout cleanup line_for_issue method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10346 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-10 22:56:15 +00:00
Toshi MARUYAMA
ad71bffe34 gantt: code layout cleanup line_for_version method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10345 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-10 22:55:44 +00:00
Toshi MARUYAMA
a2edef9035 gantt: code layout cleanup render method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10344 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-10 22:55:13 +00:00
Toshi MARUYAMA
abcfbd9c75 gantt: code layout cleanup params* method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10343 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-10 11:55:13 +00:00
Toshi MARUYAMA
d0ca8eb703 gantt: code layout cleanup initialize method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10342 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-10 11:54:49 +00:00
Toshi MARUYAMA
e637c15660 gantt: remove redundant empty lines from lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10341 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-10 11:54:24 +00:00
Jean-Philippe Lang
f9d0b4776f Fixed TLS configuration in example (#11034).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10340 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 15:24:34 +00:00
Jean-Philippe Lang
3b5fd45fae Log current user on each request.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10339 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 14:54:22 +00:00
Jean-Philippe Lang
6b0e8fd82a Deep headings in TOC are too small.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10338 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 14:13:25 +00:00
Jean-Philippe Lang
972a991a92 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10337 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 11:34:35 +00:00
Jean-Philippe Lang
62d5b4c710 Issues assigned to a locked/closed version are now copied (#11207).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10336 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 11:04:55 +00:00
Jean-Philippe Lang
197a14a82e Fixed that the reminder email excludes issues assigned to groups (#11723).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10335 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 11:02:13 +00:00
Jean-Philippe Lang
ff86c37ed3 Fixed: Issues associated with a locked version are not copied when copying a project (#11207).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10334 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 10:11:49 +00:00
Jean-Philippe Lang
5e9320137b Fixed that target version is lost on project copy for issues that are assigned to a shared version from another project.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10333 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 10:01:03 +00:00
Jean-Philippe Lang
18ed4cf373 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10332 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-09 09:51:44 +00:00
Toshi MARUYAMA
8303e7c168 Bulgarian translation updated by Ivan Cenov (#11799)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10331 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 09:21:26 +00:00
Jean-Philippe Lang
eb58c62f26 Filling locales (#6965).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10330 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 06:18:55 +00:00
Jean-Philippe Lang
b72d40a429 Do not copy subtasks twice when copying an issue and its descendants (#6965).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10329 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 06:14:35 +00:00
Jean-Philippe Lang
6a37151b5c Adapt subtasks copy when copying a project (#6965).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10328 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 05:56:48 +00:00
Jean-Philippe Lang
5003927f13 Option to copy subtasks when copying issue(s) (#6965).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10327 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 05:34:07 +00:00
Toshi MARUYAMA
ffcf1925e3 gantt: code layout cleanup html days headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10326 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 03:21:55 +00:00
Toshi MARUYAMA
ad4ee1c8d8 gantt: code layout cleanup html weeks headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10325 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 03:21:17 +00:00
Toshi MARUYAMA
d4fc347a8a gantt: use content_tag instead of html tag at days headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10324 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 02:47:27 +00:00
Toshi MARUYAMA
c25d175623 gantt: use content_tag instead of html tag at gantt header outline
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10323 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 02:00:32 +00:00
Toshi MARUYAMA
47e375b271 gantt: code layout cleanup ruby code at head of show.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10322 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 02:00:17 +00:00
Toshi MARUYAMA
eeedd287ad gantt: code layout cleanup html months headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10321 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 00:59:42 +00:00
Toshi MARUYAMA
2edb8d597a gantt: use content_tag instead of html tag at gantt subject
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10320 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 00:59:08 +00:00
Toshi MARUYAMA
23eae0bf3c gantt: code cleanup html today red line
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10319 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 00:58:41 +00:00
Toshi MARUYAMA
822a627c44 gantt: fix code indents of html today red line
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10318 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-08 00:57:57 +00:00
Toshi MARUYAMA
3431b860ad gantt: use content_tag instead of html tag at gantt today red line
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10317 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 23:03:40 +00:00
Toshi MARUYAMA
3483938185 gantt: use content_tag instead of html tag at gantt weeks headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10316 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 23:03:16 +00:00
Toshi MARUYAMA
2af4bb6a86 gantt: use content_tag instead of html tag at gantt months headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10315 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 14:35:33 +00:00
Toshi MARUYAMA
b9586dd570 gantt: code layout cleanup html gantt days headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10314 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 14:35:20 +00:00
Toshi MARUYAMA
40df75243b code layout cleanup app/views/gantts/show.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10313 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 11:59:48 +00:00
Toshi MARUYAMA
0486ce9976 code layout cleanup gantt weeks headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10312 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 11:59:34 +00:00
Toshi MARUYAMA
621b15c923 code layout cleanup gantt months headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10311 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 11:59:19 +00:00
Toshi MARUYAMA
d1eb07dd8b fix code indent of gantt days headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10310 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 11:59:05 +00:00
Toshi MARUYAMA
9c5f339efb code layout cleanup app/views/gantts/show.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10309 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 01:36:16 +00:00
Toshi MARUYAMA
bbed770fa4 remove redundant empty lines from app/views/repositories/_revision_graph.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10308 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-07 01:35:18 +00:00
Jean-Philippe Lang
1f7a944d14 XML output broken with builder 3.0.1.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10306 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-06 22:34:21 +00:00
Jean-Philippe Lang
ef8c393290 Let plugin override mailer views (#11776).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10304 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-06 17:34:14 +00:00
Jean-Philippe Lang
bcb4c2cde4 Parse any heading level (#11789).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10294 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-06 17:03:13 +00:00
Toshi MARUYAMA
3dfef8a00d remove redundant empty lines from revision_graph.js
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10293 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-06 06:46:28 +00:00
Toshi MARUYAMA
ee2481a3b9 replace tab to space at revision_graph.js
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10292 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-06 06:46:13 +00:00
Toshi MARUYAMA
99913e80f0 show JQuery datepicker today button
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10291 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-05 17:22:08 +00:00
Toshi MARUYAMA
48ac467981 Traditional Chinese translation updated by ChunChang Lo (#11766)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10290 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-04 09:48:44 +00:00
Toshi MARUYAMA
6e21342c60 fix redmine_plugin generator output in USAGE
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10287 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-03 17:14:42 +00:00
Toshi MARUYAMA
3f63b5ea93 fix plugin generator script name of USAGE on Rails3
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10286 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-03 17:14:28 +00:00
Jean-Philippe Lang
ca7498c2d6 Create role by copy (#9258).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10285 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-03 17:04:28 +00:00
Jean-Philippe Lang
1b64e4be5e Set radio button when selecting a date with the date picker.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10284 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 17:24:29 +00:00
Jean-Philippe Lang
3a32edc3bd Adds a view for editing all trackers fields.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10283 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 16:55:16 +00:00
Jean-Philippe Lang
462c986452 Moved link to the contextual menu.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10282 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 15:13:40 +00:00
Jean-Philippe Lang
c3170e9264 Redmine.pm: Allow fallback to other Apache auth providers (#11475).
Contributed by Yasin Al Farhad.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10281 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 14:51:56 +00:00
Jean-Philippe Lang
2a9c001625 Doc update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10280 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 13:00:19 +00:00
Jean-Philippe Lang
94db7c0029 Redmine.pm: HEAD is not considered as a read-only method (#11749).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10279 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 12:59:27 +00:00
Toshi MARUYAMA
e1492f771c remove redundant empty lines from test/test_helper.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10278 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 11:09:56 +00:00
Toshi MARUYAMA
48b9b805b2 fix typo "MACROS_SUB_RE" (#11736)
Contributed by Anton Argirov.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10277 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 11:09:43 +00:00
Jean-Philippe Lang
8b72710d7e Fixed: New multi-line macros regexp is too eager (#11736).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10276 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 10:24:56 +00:00
Jean-Philippe Lang
265baa1b2c Upgrade to Rails 3.2.8 (#11758).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10275 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-02 10:08:51 +00:00
Toshi MARUYAMA
139ddd639f backout r10247
Gemfile: pin i18n gem version 0.6.0.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10265 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 05:33:58 +00:00
Toshi MARUYAMA
e4b7b7cc38 code cleanup test_with_a_start_date_attribute_* of unit IssuesHelperTest
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10264 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 05:33:43 +00:00
Toshi MARUYAMA
8eb39d682d replace shoulder "with a due_date attribute" context of unit IssuesHelperTest and use with_settings
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10263 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 05:33:28 +00:00
Toshi MARUYAMA
4bca584024 use date_format setting at unit IssuesHelperTest test_with_a_start_date_attribute_*
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10257 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 04:10:33 +00:00
Toshi MARUYAMA
935d8e594b add missing fixtures to test/unit/lib/redmine/hook_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10256 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 03:47:20 +00:00
Toshi MARUYAMA
374a0cc7cb add missing fixture to test/unit/lib/redmine/safe_attributes_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10255 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 02:55:13 +00:00
Toshi MARUYAMA
53dd8dc11a add unit query test of French label
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10254 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 02:37:20 +00:00
Toshi MARUYAMA
444987ce91 replace shoulder "with a start_date attribute" context of test/unit/helpers/issues_helper_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10253 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 02:23:59 +00:00
Toshi MARUYAMA
43add0d306 scm: git: use with_settings at test_diff_truncated of functional test (#11752)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10252 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 02:23:44 +00:00
Toshi MARUYAMA
3581782ec2 scm: git: use diff_max_lines_displayed setting at test_diff_with_rev_and_path of functional test (#11752)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10251 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 02:23:29 +00:00
Toshi MARUYAMA
8d4c0e5ecd set language en to test_label_for at test/unit/query_test.rb
Test on CI Server fails.

http://www.redmine.org/builds/logs/build_trunk_sqlite3_ruby-1.9.3-p194_581.html

<pre>
Failure:
  <"Assignee">("US-ASCII") expected but was
  <"Assigné à">("UTF-8").
test_label_for(QueryTest)
test/unit/query_test.rb:860:in `test_label_for'
</pre>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10249 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-09-01 01:29:48 +00:00
Toshi MARUYAMA
9a57cc18e3 Gemfile: pin i18n gem version 0.6.0
Tests on CI server fails.
http://www.redmine.org/builds/logs/build_trunk_sqlite3_ruby-1.9.3-p194_580.html

<pre>
Failure:
  <"Due date changed from 01 01 2010 to 31 01 2010"> expected to be =~
  </01\/31\/2010/>.
test: IssuesHelper#show_detail with a due_date attribute should format the current date. (IssuesHelperTest)
test/unit/helpers/issues_helper_test.rb:127:in `block (3 levels) in <class:IssuesHelperTest>'
</pre>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10247 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-31 23:44:35 +00:00
Toshi MARUYAMA
564de36c08 remove trailing white-space from app/controllers/wiki_controller.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10246 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-31 23:01:51 +00:00
Toshi MARUYAMA
6ea1bc725a scm: git: add functional test of diff with revision and path (#11752)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10245 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-31 22:22:26 +00:00
Jean-Philippe Lang
a7be337a4c Updates test for r10243.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10244 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-27 11:21:08 +00:00
Jean-Philippe Lang
3a77d543fd Code cleanup: removed the obsolete with_limit scope.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10243 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-27 10:54:01 +00:00
Jean-Philippe Lang
d33fa1f8c8 Do not build a projects_by_role Hash that gets updated when accessing a key that is not present (#11662).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10242 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-27 10:11:20 +00:00
Jean-Philippe Lang
50506ef621 Make sure we don't build an empty IN () statement (#11662).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10241 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-27 10:09:08 +00:00
Jean-Philippe Lang
c68ee7f545 Fixed that destroying a user from the edit page returns a 404 response (#11691).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10240 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-26 10:50:59 +00:00
Jean-Philippe Lang
ebc979e9b1 Do not use escaped back_url param (#11691).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10239 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-26 10:40:09 +00:00
Jean-Philippe Lang
3cc6d5e815 Reverted r10234 and r10235 that broke redirect after login (#11691).
Tests in account_controller_test.rb should not have been changed.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10238 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-26 09:29:48 +00:00
Jean-Philippe Lang
a2e59cc956 Don't use tag helper in layout (#11704).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10237 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-26 09:25:25 +00:00
Jean-Philippe Lang
5969df8142 MailHandler: Match assignee on the full display name (#11552).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10236 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-26 09:03:17 +00:00
Etienne Massip
2ed4364c8a Reverted changes made to tests for r1893 (#11691).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10235 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-24 21:41:52 +00:00
Etienne Massip
70226f1833 Use a back_url parameter instead of referrer to refresh the page after user deletion (#11691).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10234 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-24 21:23:10 +00:00
Toshi MARUYAMA
a1d8cab6c6 remove empty setup method from unit enumeration test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10232 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-22 16:31:26 +00:00
Toshi MARUYAMA
3478a21c2f add unit test that enumeration returns default in regardless of active or not
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10231 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-22 16:31:13 +00:00
Toshi MARUYAMA
44c15c7560 add check default document category is not defined on database in tests (#11665)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10230 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-22 16:18:01 +00:00
Toshi MARUYAMA
d1a52fd301 use Rails3 Active Record syntax in DocumentCategory model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10228 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-22 00:13:31 +00:00
Toshi MARUYAMA
377ef084ad add position to DocumentCategory in enumerations fixture (#11665)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10222 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-21 16:14:33 +00:00
Toshi MARUYAMA
665a331cc4 force set default document category if it is not set on database (#11665)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10221 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-21 13:45:53 +00:00
Toshi MARUYAMA
185ab2a020 add unit test to get default document category defined on database (#11665)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10220 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-21 13:45:40 +00:00
Toshi MARUYAMA
02fb4c3b2c add functional test to create non default document category (#11665)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10219 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-21 06:15:29 +00:00
Toshi MARUYAMA
8376311ee1 add missing fixtures to test/functional/documents_controller_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10216 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-21 04:49:22 +00:00
Toshi MARUYAMA
ac5e3c2036 add missing fixtures to test/unit/document_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10213 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-21 02:15:04 +00:00
Jean-Philippe Lang
a5c4fcc8f0 Updated macro documentation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10212 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-18 12:55:00 +00:00
Jean-Philippe Lang
29d54f5d50 Validate macro name and options.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10211 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-18 12:35:14 +00:00
Jean-Philippe Lang
fc3a09e49a Let macros optionally accept a block of text (#3061).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10210 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-18 08:25:22 +00:00
Jean-Philippe Lang
73aece0baf Macros processing overhaul (#3061, #11633).
* macro arguments are no longer parsed by text formatters
* macro output is escaped unless it's html safe

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10209 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-17 14:46:55 +00:00
Jean-Philippe Lang
af5a814f4c Prevents "Overwriting existing method Issue.open" warning (#11545).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10208 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-17 14:34:10 +00:00
Toshi MARUYAMA
91a09bd474 fix unit test fails on JRuby 1.6.7.2 (#11577)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10207 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-14 00:30:23 +00:00
Jean-Philippe Lang
3673fbd881 Fixed: Can't use non-latin anchor in wiki (#11577).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10206 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 19:36:00 +00:00
Jean-Philippe Lang
d79bcc4369 Fixed that text email templates are escaped (#11355).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10205 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 19:05:42 +00:00
Jean-Philippe Lang
327660eb7f Respond with 404 on ActionView::MissingTemplate (#11503).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10204 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 18:34:00 +00:00
Jean-Philippe Lang
49e80c2cea Adds .settings to svn:ignore and removes svk property.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10203 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 18:16:45 +00:00
Jean-Philippe Lang
3119d1996c Use abbr_day_name to get the first letter of the day name (#9839).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10202 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 18:13:10 +00:00
Jean-Philippe Lang
11d4d8177c Escape filter values using .text instead of .html.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10201 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 14:59:59 +00:00
Jean-Philippe Lang
861ca78179 Fixed that roadmap anchor links can be ambigous (#11540).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10200 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 14:41:53 +00:00
Jean-Philippe Lang
8fb1a7e3cc Fixed that open scope on Project#issues raises an error (#11545).
Patch by Petr Pospisil.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10199 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 14:23:33 +00:00
Jean-Philippe Lang
91c875437d Adds a title to the issue link in the flash message.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10198 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 14:04:00 +00:00
Jean-Philippe Lang
60574bfb9c Context menu style.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10197 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 13:48:20 +00:00
Jean-Philippe Lang
3e4cbec95e Custom JQueryUI theme.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10196 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 13:39:21 +00:00
Jean-Philippe Lang
dbf41dba68 Set application/javascript as javascript mime tpye (#11621).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10195 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-13 12:39:11 +00:00
Toshi MARUYAMA
163659d0a5 cherry-pick avatar test from reverted r10184
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10194 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-11 00:31:18 +00:00
Jean-Philippe Lang
ec02853141 Raised the max-height.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10193 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 18:49:30 +00:00
Jean-Philippe Lang
2118f3a1fd Adds a max-height to projects lists.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10192 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 18:48:53 +00:00
Jean-Philippe Lang
145e5997b2 Removed duplicated helper (#11539).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10191 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 18:41:24 +00:00
Jean-Philippe Lang
32fcdff69f Removed p around ul.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10190 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 18:39:49 +00:00
Jean-Philippe Lang
c0c491dd61 Display a projects tree instead of a flat list in notification preferences (#11539).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10189 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 17:30:35 +00:00
Jean-Philippe Lang
0a6c1d9c13 Extract code to render nested listed of projects in an helper (#11539).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10188 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 17:09:48 +00:00
Jean-Philippe Lang
e52219f09d Fixed that projects are not ordered alphabetically after renaming project (#11508).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10187 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 16:50:15 +00:00
Jean-Philippe Lang
02b2a61e15 Reverted r10184 (#9365).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10186 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 16:35:58 +00:00
Jean-Philippe Lang
8b12702ebe Fixed that search results are escaped twice.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10185 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-10 16:22:26 +00:00
Jean-Philippe Lang
cbfafcd5e2 Use SSL for gravatars according to the protocol in settings (#9365).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10184 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-09 18:04:54 +00:00
Jean-Philippe Lang
e06bf0c464 Don't show the project dropdown when logging time on an issue.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10183 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-09 17:12:24 +00:00
Jean-Philippe Lang
f1650b8ff4 Adds autocomplete to issue field on time logging form.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10182 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-09 16:58:36 +00:00
Jean-Philippe Lang
f82a7a35b0 Adds autocomplete to "Related issue" field on revision (#11102).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10181 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-09 16:46:13 +00:00
Jean-Philippe Lang
908b960e71 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10180 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-09 16:43:12 +00:00
Jean-Philippe Lang
0ce0b52342 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10179 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-08 21:28:07 +00:00
Jean-Philippe Lang
b907398788 Slight change to the macro regexp.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10178 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-08 18:54:01 +00:00
Jean-Philippe Lang
2e4f3d5a60 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10177 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-08 18:47:52 +00:00
Jean-Philippe Lang
e0faf5cf84 Headings style.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10176 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-08 16:50:06 +00:00
Jean-Philippe Lang
9553325ee3 Use the accessor.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10175 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-08 16:35:25 +00:00
Jean-Philippe Lang
e2d6f0af4e Adds an option to macro definition to disable arguments parsing (#11578).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10174 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-08 16:28:33 +00:00
Toshi MARUYAMA
405bcc10c0 fix plural form of the abbreviation for hours in Brazilian Portuguese (#11600)
Contributed by Mauricio Piacentini.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-08 00:00:14 +00:00
Toshi MARUYAMA
2e536a2c56 Gemfile: mocha version up 0.12.3
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10167 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 23:10:50 +00:00
Jean-Philippe Lang
b6be9bff35 Log successful authentications.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10166 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 19:50:18 +00:00
Jean-Philippe Lang
b418e27283 Filling locales.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10165 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 19:24:03 +00:00
Jean-Philippe Lang
3676783052 Ability to filter issues using project, author, assignee and target version custom fields (#8161).
Custom fields must be marked as "Used as filter" to show up in the filters list.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10164 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 19:17:59 +00:00
Jean-Philippe Lang
599736aca7 Update the new custom field form with remotely.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10163 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 16:58:51 +00:00
Jean-Philippe Lang
1749fbf3e6 Build issue filters using javascript.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10162 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 16:41:46 +00:00
Jean-Philippe Lang
e9de6c1415 Removed csshover for IE6.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10161 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 16:16:19 +00:00
Jean-Philippe Lang
962134ab4f Prevent "Overwriting existing method User.active" warning, scope is already defined on the base class (#11545).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10160 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 16:14:24 +00:00
Jean-Philippe Lang
2e35a6800f Prevents "Overwriting existing method Issue.open" warning (#11545).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10159 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-07 16:13:04 +00:00
Jean-Philippe Lang
0a5828ee4a Added SVG mime-type (#11595).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10158 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-06 21:18:24 +00:00
Jean-Philippe Lang
1949f61d0c Fixed: Custom fields of type version not proper handled in receiving e-mails (#11571).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10157 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-06 21:16:19 +00:00
Jean-Philippe Lang
3f1c35b71e Tests not running after upgrade to mocha 0.12.2.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10155 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-02 17:37:03 +00:00
Jean-Philippe Lang
1a38434d5f Error running tests with ruby 1.9.3p194 (2012-04-20) [i386-mingw32].
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10154 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-02 17:20:36 +00:00
Jean-Philippe Lang
f8183429a9 Adjust the comment.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10153 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-02 16:48:23 +00:00
Jean-Philippe Lang
2275f46138 Makes Version#<=> consistent with SQL sort.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10152 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-02 16:47:53 +00:00
Jean-Philippe Lang
34cdac1669 Sort issues by scheduled versions first then unscheduled versions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10151 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-02 16:47:06 +00:00
Toshi MARUYAMA
c7b712067e add translator name to Bulgarian yaml (#11561)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10150 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-01 12:59:00 +00:00
Toshi MARUYAMA
6ca1c117ab Bulgarian translation updated by Ivan Cenov (#11556)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10149 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 23:04:09 +00:00
Jean-Philippe Lang
b603aa74f9 Adds sharing attribute to the versions API (#11541).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10148 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 18:14:28 +00:00
Jean-Philippe Lang
c57a2974d1 Fixed that Mailer.with_synched_deliveries does not use delivery settings (#11550).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10147 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 18:09:33 +00:00
Jean-Philippe Lang
77d94818a4 Removed AuthSourceLdap.human_attribute_name.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10146 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 17:30:01 +00:00
Jean-Philippe Lang
a53894dd22 Set @previewed for rendering preview partial.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10145 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 17:22:17 +00:00
Jean-Philippe Lang
d99dbe9f0c Eager loading and no extra count query.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10144 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 17:21:14 +00:00
Jean-Philippe Lang
3f88fd44ef Filling locales.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10143 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 17:18:35 +00:00
Jean-Philippe Lang
bc153cb61d Support for subforums (#3831).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10142 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 17:17:52 +00:00
Jean-Philippe Lang
9554f0133f New edit icon.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10141 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 16:40:05 +00:00
Toshi MARUYAMA
f50da1593e Gemfile: prevent "rake db:migrate RAILS_ENV=test" causes exception on Ruby 1.9.3 (#10320, #10818)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10137 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-31 02:32:40 +00:00
Toshi MARUYAMA
96306f9dff replace tabs to spaces at app/views/repositories/_dir_list_content.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10136 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-30 01:32:31 +00:00
Jean-Baptiste Barth
8f0947e578 Fixed rake redmine:plugins:test:* not running some tests in subdirectories (#11533)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10135 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 18:27:13 +00:00
Jean-Baptiste Barth
d048d86c50 Invoke db:schema:dump after plugin migrations so that db/schema.rb stays up-to-date
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10134 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 18:01:13 +00:00
Jean-Philippe Lang
95457c434e Stylesheet cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10133 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 15:38:32 +00:00
Jean-Philippe Lang
42570c4426 Slight changes to syntax highlightment styles.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10132 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 15:30:47 +00:00
Jean-Philippe Lang
e4518af32a Removed line numbers from syntax highlightment.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10131 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 14:52:57 +00:00
Jean-Philippe Lang
08f200c487 Fixed legend tag position.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10130 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 12:13:47 +00:00
Jean-Philippe Lang
64f66daedd Duplicate ul tags.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10129 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 12:12:32 +00:00
Jean-Philippe Lang
0c72347d61 Fixed label with invalid for attribute.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10128 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 12:10:34 +00:00
Jean-Philippe Lang
15341bd844 Make labels clickable in Adminstration/Settings (#11496).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10127 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 12:08:10 +00:00
Jean-Philippe Lang
7a4c6d2a19 Add labels on SCMs.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10126 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 12:04:49 +00:00
Jean-Philippe Lang
1e6938a119 Removed duplicate ids.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10125 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 12:04:11 +00:00
Jean-Philippe Lang
9ef719f15e Add links to forums.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10124 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:52:50 +00:00
Jean-Philippe Lang
2175e4a901 Add links to repositories on repository list.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10123 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:51:09 +00:00
Jean-Philippe Lang
3692369584 html5 compliance.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10122 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:34:00 +00:00
Jean-Philippe Lang
75b0c01431 Typo.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10121 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:33:47 +00:00
Jean-Philippe Lang
d252848b2e Removed inline styles.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10120 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:32:24 +00:00
Jean-Philippe Lang
3a7207672e html5 compliance.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10119 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:30:43 +00:00
Jean-Philippe Lang
f8de723c46 Removed inline styles.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10118 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:28:22 +00:00
Jean-Philippe Lang
a0b2ab338e Removed inline styles.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10117 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:23:59 +00:00
Jean-Philippe Lang
308010c7c9 Fixed assertion.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10116 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:17:36 +00:00
Jean-Philippe Lang
6918a8974c Removed self closing a tags.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10115 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 11:16:19 +00:00
Jean-Philippe Lang
ba9f1c0388 html5 compliance.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10114 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 10:53:02 +00:00
Jean-Philippe Lang
45d9763090 Removed invalid html5 meta (Rails sets an equivalent response header natively) (#10128).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10113 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 10:46:04 +00:00
Jean-Philippe Lang
62d5b359c0 html5 compliance.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10112 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 10:21:27 +00:00
Jean-Philippe Lang
33d6f9e7a1 Label should be escaped.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10111 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 10:15:20 +00:00
Jean-Philippe Lang
c6106543e1 html5 compliance.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10110 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 10:12:26 +00:00
Jean-Philippe Lang
8ee2ae1846 html5 compliance.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10109 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-29 10:06:41 +00:00
Jean-Philippe Lang
a7caf3faf0 Use assert_select instead of assert_tag.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10108 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 18:41:08 +00:00
Jean-Philippe Lang
cc79feabe2 Adds assertions for subversion annotate.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10107 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 18:36:03 +00:00
Jean-Philippe Lang
71c5d6c8ee Use assert_select instead of assert_tag.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10106 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 18:16:55 +00:00
Jean-Philippe Lang
65524cc1cc Don't repeat revision on annotate view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10105 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 18:11:03 +00:00
Jean-Philippe Lang
138f6736b2 Restores bottom border on h4.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10104 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 17:05:42 +00:00
Jean-Philippe Lang
0880096162 Same heading on message edit/show views.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10103 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 17:00:45 +00:00
Jean-Philippe Lang
571d316b13 Removed bottom border on headings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10102 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 16:58:02 +00:00
Jean-Philippe Lang
93d9d459c5 Fixed broken assertion.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10101 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 16:54:21 +00:00
Jean-Philippe Lang
c544e9b9c6 Lighter blue for the header.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10100 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 16:46:26 +00:00
Jean-Philippe Lang
5565a078f3 Do not scroll to the preview.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10099 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 16:42:10 +00:00
Jean-Philippe Lang
7306c733bf HTML5 doctype.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10098 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 16:38:39 +00:00
Jean-Philippe Lang
969a5be7da New icons for the repository browser.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10097 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 16:25:02 +00:00
Jean-Philippe Lang
6851b0ca81 Lighter blue for links.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10096 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 16:07:51 +00:00
Jean-Philippe Lang
a7a0d47f2e Merged and minified jstoolbar.js and textile.js.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10095 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 15:58:54 +00:00
Jean-Philippe Lang
93a65c3c82 Moved syntax highlight styles to application.css.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10094 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 15:54:23 +00:00
Jean-Philippe Lang
1a088fb31e Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10093 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 15:45:36 +00:00
Jean-Philippe Lang
6e7507d580 Adds a replacement for deprecated link_to_function helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10092 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 15:26:45 +00:00
Jean-Philippe Lang
42fdc1d54d Fixed API key display on my account.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10091 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 15:14:56 +00:00
Jean-Philippe Lang
afc8239bf7 Fixed apply link on gantt.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10090 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 15:06:53 +00:00
Jean-Philippe Lang
8088749f10 Fixed tests broken by r10088.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10089 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-28 14:59:36 +00:00
Jean-Philippe Lang
3c3bdb8bb0 Adds JSONP support to the API (#11469).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10088 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-27 19:56:49 +00:00
Jean-Philippe Lang
9b4d29dc0d Do not propose non-assignable version (#11506).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10087 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-27 19:41:36 +00:00
Jean-Philippe Lang
9eb041fbc7 Versions that are not shared should not be assignable when selecting another project (#11506).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10086 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-27 19:36:53 +00:00
Jean-Philippe Lang
ed165f6716 Do not user user session for API requests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10085 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-27 18:24:42 +00:00
Toshi MARUYAMA
8ed4620bb9 fix confirmation page has broken HTML when a project folding sub project is deleted (#11511)
Contributed by Haruka Yoshihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10083 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-26 23:45:17 +00:00
Jean-Philippe Lang
8e1f7607ec Identifier is now frozen.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10082 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-26 18:41:44 +00:00
Jean-Philippe Lang
87f284dcb6 Repository Identifier should be frozen (#11109).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10081 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-26 17:41:47 +00:00
Jean-Philippe Lang
04f9a321b1 Adds a task to duplicate a string in locales.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10080 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-26 17:32:22 +00:00
Jean-Philippe Lang
f03e21fb45 Changed issues css class from priority-{position} to status-{id} (#2071).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10079 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-26 16:55:40 +00:00
Jean-Philippe Lang
88efd302a7 Changed issues css class from status-{position} to status-{id} (#11304).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10078 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-26 16:50:39 +00:00
Jean-Philippe Lang
28cdc8adfc Don't turn #nnn with leading zeros into link (#11494).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10077 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-24 21:51:10 +00:00
Jean-Philippe Lang
3209c4c5e4 Sort versions ascending when grouping issues by version (#11153).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10076 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-24 18:41:04 +00:00
Jean-Philippe Lang
8fa787719a Fixed broken test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10075 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-24 18:39:14 +00:00
Jean-Philippe Lang
bdd29295b4 In case the column is not found.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10074 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-24 17:42:45 +00:00
Jean-Philippe Lang
faab8678d4 Ability to group and sort the issue list by user/version custom field (#9419).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10073 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-24 17:39:30 +00:00
Jean-Philippe Lang
44fcc8919d Adds Version.fields_for_order_statement.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10072 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-24 16:32:39 +00:00
Jean-Philippe Lang
0b31c8ac85 Adds CustomField#group_statement.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10071 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-24 16:28:34 +00:00
Jean-Philippe Lang
46b1a49453 Use JQuery Dialog (#11445).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10070 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-22 15:42:29 +00:00
Jean-Philippe Lang
cd54e15a8d Use JQuery Datepicker (#11445).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10069 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-22 14:43:19 +00:00
Jean-Philippe Lang
6a2ca5e034 JQuery in, Prototype/Scriptaculous out (#11445).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10068 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-22 13:29:26 +00:00
Jean-Philippe Lang
387836f8aa Fixed that settings raises an error if not trackers exist (#11467).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10067 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 15:43:44 +00:00
Toshi MARUYAMA
1f84a8d83e code layout cleanup lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10066 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 13:03:29 +00:00
Toshi MARUYAMA
dc393cc480 replace tabs to spaces and fix indents at lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10065 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 12:53:06 +00:00
Toshi MARUYAMA
d41d493128 code layout cleanup app/views/gantts/show.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10064 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 11:00:59 +00:00
Toshi MARUYAMA
dadd294a25 code layout cleanup test/unit/lib/redmine/helpers/gantt_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10063 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 08:08:06 +00:00
Toshi MARUYAMA
bd85428b01 add copyright statement to test/functional/gantts_controller_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10062 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 07:12:18 +00:00
Toshi MARUYAMA
eb62603144 replace shoulda to Rails standard tests at functional gantts controller test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10061 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 07:03:36 +00:00
Jean-Philippe Lang
387f09d4f4 Removed -moz-border-radius styles.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10060 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 06:49:18 +00:00
Jean-Philippe Lang
47e496f049 Removes RJS from UsersController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10059 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 06:35:49 +00:00
Jean-Philippe Lang
d3bfbb800c Removes RJS from MembersController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10058 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-21 06:35:11 +00:00
Toshi MARUYAMA
9c3045eeda Russian translation for 1.4-stable and 2.0-stable updated by Александр Закревский (#11448)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10055 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-20 09:31:39 +00:00
Jean-Philippe Lang
3eaa998c28 Removes RJS from JournalsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10054 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 19:10:18 +00:00
Jean-Philippe Lang
e8469e2c5b Removes RJS from MessagesController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10053 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 18:23:45 +00:00
Jean-Philippe Lang
3386008491 Removes RJS from VersionsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10052 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 18:13:21 +00:00
Jean-Philippe Lang
dee586e9eb Removes RJS from WikisController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10051 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 18:13:08 +00:00
Jean-Philippe Lang
5b6732cfaf Removes RJS from IssuesController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10050 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 17:54:26 +00:00
Jean-Philippe Lang
b53f9c688b Fixed migration broken by r9977.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10049 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 17:34:37 +00:00
Jean-Philippe Lang
87da04c808 Removes RJS from RepositoriesController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10048 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 17:27:14 +00:00
Jean-Philippe Lang
38060a2cf0 Removes RJS from WatchersController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10047 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 17:17:10 +00:00
Jean-Philippe Lang
c178aded61 Test cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10046 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 17:07:43 +00:00
Jean-Philippe Lang
8553107016 Removes RJS from IssueRelationsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10045 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 17:06:30 +00:00
Jean-Philippe Lang
21ee2e2cf2 Removes RJS from GroupsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10044 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 16:57:59 +00:00
Jean-Philippe Lang
035805fbd0 Start removing the RJS stuff.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10043 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 16:43:33 +00:00
Jean-Philippe Lang
51d5a52029 Do not let is_private be required.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10042 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-19 16:21:28 +00:00
Jean-Philippe Lang
6668d7ebd1 Removed deprecated #labelled_tabular_form_for helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10041 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 19:14:35 +00:00
Jean-Philippe Lang
1c8d03c1e9 ApplicationHelper#labelled_remote_form_for deprecated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10040 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 19:13:30 +00:00
Jean-Philippe Lang
c790f1ca41 ApplicationHelper#link_to_remote_if_authorized deprecated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10039 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 19:10:08 +00:00
Jean-Philippe Lang
d4f7b4af6d Removes calls to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10038 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 19:09:52 +00:00
Jean-Philippe Lang
690b0fb08c Removes calls to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10037 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 18:54:19 +00:00
Jean-Philippe Lang
cc553764ba Removes a call to form_remote_tag.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10036 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 18:48:39 +00:00
Jean-Philippe Lang
705f96ccde Removes calls to remote_form_for.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10035 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 18:43:13 +00:00
Jean-Philippe Lang
cd39b12f2c Removes a call to form_remote_tag.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10034 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 18:35:25 +00:00
Jean-Philippe Lang
7e5bad993d Removes most of the ajax stuff on my page layout.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10033 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 18:26:10 +00:00
Jean-Philippe Lang
c9a46950de Removes calls to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10032 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 18:01:14 +00:00
Jean-Philippe Lang
ff68fff80e Adds a helper for preview links.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10031 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 17:47:19 +00:00
Jean-Philippe Lang
bb2af97dcf Removes calls to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10030 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 17:34:11 +00:00
Jean-Philippe Lang
ccc5f64a99 Removes calls to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10029 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 16:50:10 +00:00
Jean-Philippe Lang
6f3c339e5e Removes a call to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10028 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 16:47:30 +00:00
Jean-Philippe Lang
b0757bbdf6 Removes a call to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10027 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 16:36:08 +00:00
Jean-Philippe Lang
a49d50614f Removes a call to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10026 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 16:31:36 +00:00
Jean-Philippe Lang
7b3aaca83c Removes a call to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10025 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 16:28:07 +00:00
Jean-Philippe Lang
922f1d5243 Removes a call to link_to_remote.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10024 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 16:24:23 +00:00
Toshi MARUYAMA
ee3478f389 Traditional Chinese translation updated by ChunChang Lo (#11436)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10023 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-18 03:50:31 +00:00
Toshi MARUYAMA
07546b4943 remove trailing white-space from app/models/changeset.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10022 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-17 23:55:32 +00:00
Toshi MARUYAMA
2b642c0662 Bulgarian translation updated by Ivan Cenov (#11433)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10021 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-17 22:50:45 +00:00
Toshi MARUYAMA
3e3714c2d6 Japanese translation updated by Go MAEDA (#11427)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10020 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-17 14:47:31 +00:00
Toshi MARUYAMA
b5a4446f18 fix disordered use of long sound in Japanese "user" translation (#11411)
Contributed by Kenichi Maehashi.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10019 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-17 05:25:46 +00:00
Toshi MARUYAMA
4fdbeea686 Simplified Chinese translation updated by Steven Wong (#11417)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10018 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-17 04:59:06 +00:00
Toshi MARUYAMA
bbb14cb57c fix wrong Japanese "label_attachment" translation (#11419)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10017 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-17 04:58:36 +00:00
Toshi MARUYAMA
07ce80be2d fix unnatural Japanese message when users failed to login (#11412)
Contributed by Kenichi Maehashi.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10016 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-17 04:58:04 +00:00
Jean-Philippe Lang
c3c7f1f900 Removed debug message.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10015 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 17:56:08 +00:00
Jean-Philippe Lang
fe95692f10 Test if convert binary is available.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10014 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 17:37:24 +00:00
Jean-Philippe Lang
537be80be2 Adds a macro for inserting thumbnails in formatted text (#3510).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10013 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 17:15:40 +00:00
Jean-Philippe Lang
5c2de4dfc9 Adds Attachment#title.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10012 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 16:42:23 +00:00
Jean-Philippe Lang
570e1b1d62 Removed assertion that is susceptible to fail if test runs slowly.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10011 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 16:35:21 +00:00
Jean-Philippe Lang
7f1fb7ce81 Don't show "Required" option for standard/custom fields that are always required.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10010 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 16:33:27 +00:00
Toshi MARUYAMA
5ac4b6670f Japanese translation added for default role names by Kenichi Maehashi (#11402)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10009 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 14:47:04 +00:00
Toshi MARUYAMA
898873a22d Fix Japanese mistranslation for "button_submit" (#11401)
Contributed by Kenichi Maehashi.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10007 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 13:16:28 +00:00
Toshi MARUYAMA
74ee5c078f German translation updated by Hannes Meier (#11404)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10006 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 13:15:59 +00:00
Toshi MARUYAMA
185175c78e German translation for configurable session lifetime and timeout updated by Hannes Meier (#11406, #11404)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10005 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-16 13:15:27 +00:00
Jean-Philippe Lang
ba647689f4 Additional tests for custom field formats.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10004 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 19:30:47 +00:00
Jean-Philippe Lang
471f631dbd Use named routes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10003 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 19:14:23 +00:00
Jean-Philippe Lang
54d2b07bff Test for when group does not exist.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10002 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 19:05:34 +00:00
Jean-Philippe Lang
e23511076c No blank option for custom fields marked as required on workflow settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10001 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 16:57:04 +00:00
Jean-Philippe Lang
072475b8a5 Remember "Only display used statuses" checkbox value after update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9997 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:50:57 +00:00
Jean-Philippe Lang
071cf55fc8 Hard-coded strings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9996 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:46:53 +00:00
Jean-Philippe Lang
a7bdc5e0af Adds option for displaying all statuses on workflow permissions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9995 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:46:14 +00:00
Jean-Philippe Lang
712e5be29f Find role and tracker only when param is present.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9994 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:39:36 +00:00
Jean-Philippe Lang
5097f51784 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9993 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:37:49 +00:00
Jean-Philippe Lang
8a3126e175 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9992 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:36:45 +00:00
Jean-Philippe Lang
2f55caa1ba Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9991 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:35:02 +00:00
Jean-Philippe Lang
4c8c5e9187 Display all fields if tracker statuses are not yet set.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9990 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:34:44 +00:00
Jean-Philippe Lang
7946f4a696 Adds a sorted scope to IssueStatus model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9989 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:33:17 +00:00
Jean-Philippe Lang
cb09055d60 Colorize transitions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9988 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:25:26 +00:00
Jean-Philippe Lang
9e06942ef0 Moved code for replacing permissions to WorkflowPermission model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9987 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 15:05:34 +00:00
Jean-Philippe Lang
02e7025685 Adds tmp/thumbnails directory.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9986 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:56:38 +00:00
Jean-Philippe Lang
88e1ae892c ruby1.8 compatibility (#703, #3521).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9985 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:50:38 +00:00
Jean-Philippe Lang
7f0bb136ad Validate attachment description length (#11365).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9984 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:42:00 +00:00
Jean-Philippe Lang
391d9b14fb Rewrites assertions with assert_select.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9983 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:36:13 +00:00
Jean-Philippe Lang
e0fb60c6b5 Adds maxlength=255 attribute on attachment description input field (#11365).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9982 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:34:28 +00:00
Jean-Philippe Lang
6c1db9c3a8 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9981 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:28:18 +00:00
Jean-Philippe Lang
7c6582009a Fills locales (#703, #3521).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9980 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:19:42 +00:00
Jean-Philippe Lang
b636695631 Removed hard-coded strings (#703, #3521).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9979 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:19:01 +00:00
Jean-Philippe Lang
004a13b75c Routing tests for r9977.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9978 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:13:48 +00:00
Jean-Philippe Lang
d7b669e50b Workflow enhancement: editable and required fields configurable by role, tracker and status (#703, #3521).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9977 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-15 14:12:17 +00:00
Jean-Philippe Lang
54d55a360a Adds assertions on response status and body.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9976 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-14 08:31:45 +00:00
Jean-Philippe Lang
18f693f9f7 Fixed that 200 API responses have a body containing one space (#11388).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9975 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-14 08:13:55 +00:00
Etienne Massip
6bf60e8c20 Fixes transparency issue.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9974 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-11 00:17:45 +00:00
Etienne Massip
823ac010c5 File handling cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9973 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-11 00:14:56 +00:00
Etienne Massip
0dbe234226 Use tabs instead of spaces for consistency.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9972 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-10 20:27:06 +00:00
Etienne Massip
9c9b0a4150 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9971 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-10 20:23:49 +00:00
Etienne Massip
7502ac484e Make sure that file handle is freed when an error is raised to prevent access exception on subsequent deletion attempt.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9970 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-10 20:16:07 +00:00
Etienne Massip
e2851a8b2a Use 1.8.7 compatible @Pathname#to_s@ alias for @Pathname#to_path@.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9969 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-10 20:14:06 +00:00
Etienne Massip
c929ab5c16 Set temporary path cache variable as a String back again so that TCPDF handles error messages fine.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9968 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-10 19:53:03 +00:00
Jean-Philippe Lang
165c2be523 Fixed that link to the assignee is escaped twice on the issue view (#11352).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9967 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-09 16:46:22 +00:00
Toshi MARUYAMA
b9d7a02b51 Traditional Chinese translation updated by ChunChang Lo (#11350)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9966 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-09 09:59:38 +00:00
Toshi MARUYAMA
2984dc903c Bulgarian translation updated by Ivan Cenov (#11347)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9965 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-09 09:59:06 +00:00
Jean-Philippe Lang
5d90228866 Test failure.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9964 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 17:10:58 +00:00
Jean-Philippe Lang
2dbabde7f4 Adds Etags on attachments.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9963 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 15:26:40 +00:00
Jean-Philippe Lang
e74d4ecf5f Compute issue ids array only once.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9962 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 13:31:22 +00:00
Jean-Philippe Lang
23a1ef543f Show shared versions when editing issues from different projects with the context menu (#11345).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9961 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 13:19:46 +00:00
Jean-Philippe Lang
7acd04fb87 Tests should not change settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9949 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 12:23:47 +00:00
Jean-Philippe Lang
133ca59edb Removed unused helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9948 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 07:58:28 +00:00
Jean-Philippe Lang
1c825df549 Adds a scope for sorting groups.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9947 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 07:40:31 +00:00
Jean-Philippe Lang
c11f5a23fe Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9946 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 07:36:58 +00:00
Jean-Philippe Lang
ab96a29460 Fixed test failure.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9945 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-08 07:20:48 +00:00
Jean-Philippe Lang
c02594af96 Test failure.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9944 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 22:08:10 +00:00
Jean-Philippe Lang
193b571e67 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9943 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 18:27:34 +00:00
Jean-Philippe Lang
a1d0acd632 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9942 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 18:05:32 +00:00
Jean-Philippe Lang
6adf61fd02 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9941 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 17:55:54 +00:00
Jean-Philippe Lang
986ffb2434 Use named routes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9940 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 17:45:12 +00:00
Jean-Philippe Lang
efc6abea07 Fixed that deleting the last reply of a topic does not update last_reply_id.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9939 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 15:09:57 +00:00
Jean-Philippe Lang
851fbaf750 Use named routes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9938 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 14:39:29 +00:00
Jean-Philippe Lang
7b40767428 Deprecated :confirm => 'Text' option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9937 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 14:36:49 +00:00
Jean-Philippe Lang
56666a41b8 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9936 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 13:59:26 +00:00
Jean-Philippe Lang
7a529b24ee Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9935 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 13:53:38 +00:00
Jean-Philippe Lang
b379397d95 Fills locales (#1006).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9934 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 13:48:48 +00:00
Jean-Philippe Lang
a0c495b953 Displays thumbnails of attached images of the issue view (#1006).
This behaviour can be turned on/off in Settings -> Display (off by default). Thumbnail size can be configured there too.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9933 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 13:48:07 +00:00
Jean-Philippe Lang
b0bd506201 Fills locales (#8978).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9932 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 09:37:40 +00:00
Jean-Philippe Lang
3b207ee77c Adds a configurable timeout for LDAP authentication (#8978).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9931 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 09:36:04 +00:00
Jean-Philippe Lang
553066e804 Fixed test case name.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9930 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 09:26:26 +00:00
Jean-Philippe Lang
76a4b81cf3 Fixed: Openid registration form should not require user to enter password (#11331).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9929 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 06:22:35 +00:00
Jean-Philippe Lang
6086aa1be4 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9928 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 05:42:52 +00:00
Jean-Philippe Lang
8a080d8e53 Enable openid in test case setup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9927 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 05:41:58 +00:00
Jean-Philippe Lang
6351631ec6 Moved openid functional tests for their own test case.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9926 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 05:40:01 +00:00
Jean-Philippe Lang
5981aee06d Fixed: escaped link in conflict resolution form (#11341).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9925 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 05:23:52 +00:00
Jean-Philippe Lang
232edc6237 Ignore emails with "Auto-Submitted: auto-*" header (#11338).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9924 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-07 05:08:58 +00:00
Toshi MARUYAMA
d4dd35a78c Traditional Chinese translation updated by ChunChang Lo (#11336)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9923 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-06 13:08:14 +00:00
Toshi MARUYAMA
f4a2d1f342 Bulgarian translation updated by Ivan Cenov (#11335)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9922 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-06 13:07:36 +00:00
Toshi MARUYAMA
232d57450a sort files in locales:update rake task
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9921 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-06 13:06:48 +00:00
Jean-Philippe Lang
196f96fff1 Adds Private filter to the issue list (#8577).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9920 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 13:51:56 +00:00
Jean-Philippe Lang
1d7c0eb7c0 Makes Private column available on the issue list (#8577).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9919 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 13:29:07 +00:00
Jean-Philippe Lang
bd927eea88 Perf: don't load preferences for the anonymous user.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9917 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 13:05:11 +00:00
Jean-Philippe Lang
a1f17b982c Perf: use a custom decoder for Role#permissions instead of YAML.load.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9916 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 13:04:38 +00:00
Toshi MARUYAMA
cc2ee90f97 sort files in locales:check_interpolation and locales:check_parsing_by_psych rake tasks
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9915 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 12:52:28 +00:00
Toshi MARUYAMA
1eebd030ca generate translation files (#1091)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9914 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 12:52:06 +00:00
Jean-Philippe Lang
4cecc1beed Ability to disable standard fields on a per tracker basis (#1091).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9912 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 12:20:07 +00:00
Toshi MARUYAMA
51a1bf90dd fix Japanese mistranslation for 'label_language_based' (#11328)
Contributed by Go MAEDA.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9911 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-05 11:22:33 +00:00
Jean-Philippe Lang
ad68830a1b Fixed test failure.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9910 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-04 19:24:25 +00:00
Jean-Philippe Lang
1d1aef9d61 Fixed: unified diff link broken on specific file/revision diff (#11325).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9909 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-04 19:17:43 +00:00
Jean-Philippe Lang
d00ba6d2bb Fixed: Can't filter for negative numeric custom field (#11307).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9908 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-04 18:50:09 +00:00
Jean-Philippe Lang
86617fc437 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9907 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-04 18:28:05 +00:00
Jean-Philippe Lang
65b4515e1a Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9906 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-04 17:55:46 +00:00
Jean-Philippe Lang
a8e5ba0007 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9905 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-04 17:37:03 +00:00
Jean-Philippe Lang
df41255105 Perf: don't load parent message for generating a link.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9904 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-04 17:34:37 +00:00
Toshi MARUYAMA
bf69f9af9f Bulgarian translation updated by Ivan Cenov (#11272)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9903 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-27 13:01:03 +00:00
Toshi MARUYAMA
0c435ce630 Traditional Chinese translation updated by ChunChang Lo (#11268)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9902 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-27 13:00:37 +00:00
Jean-Philippe Lang
3e5dfed5d6 Typo in french locale.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9901 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 22:13:18 +00:00
Jean-Philippe Lang
a265e323ad Slight change to french locale.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9900 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 22:05:16 +00:00
Etienne Massip
56cf381357 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9899 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 17:36:29 +00:00
Jean-Philippe Lang
eb8f455c13 More specific flash message when creating a user account.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9898 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 17:14:44 +00:00
Jean-Philippe Lang
6c9401b624 Additional "Log time" link on project overview (#11181).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9897 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 17:05:02 +00:00
Jean-Philippe Lang
f9f5e9e7c6 Fixed: Link is escaped in wiki added/updated notification email (#11262).
Patch by Łukasz Jachymczyk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9896 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 17:03:08 +00:00
Jean-Philippe Lang
6529035ee1 Fixed that wiki diff may produce html (#11209).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9895 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 16:57:09 +00:00
Jean-Philippe Lang
7f6ac407ef Fixed that root projects are escaped twice in the project drop down (#11217).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9894 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 16:54:30 +00:00
Toshi MARUYAMA
0ecab46229 Japanese translation updated by Go MAEDA (#11260)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9892 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 10:55:04 +00:00
Toshi MARUYAMA
c38c3c9436 Simplified Chinese translation updated by Steven Wong (#11259)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9891 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 10:37:24 +00:00
Toshi MARUYAMA
2007543539 Simplified Chinese translation updated by Steven Wong (#11261)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9890 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 10:36:58 +00:00
Toshi MARUYAMA
72e5b638e9 Traditional Chinese translation added and changed by ChunChang Lo (#11256)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9889 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-26 03:26:58 +00:00
Toshi MARUYAMA
66390fd0e6 Bulgarian translation updated by Ivan Cenov (#11254)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9888 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-25 23:29:57 +00:00
Jean-Philippe Lang
21ac4a3d0e Makes Redmine.pm handle project status (#3640).
Repositories of archived projects are no longer accessible. Repositories of closed projects are read-only.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9887 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-25 20:08:49 +00:00
Jean-Philippe Lang
2ceb6b8230 Moved logic relative to project status from User to Project model (#3640).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9886 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-25 18:44:25 +00:00
Jean-Philippe Lang
7fb2ddefde Visual hint for closed projects on project list (#3640).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9885 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-25 18:39:23 +00:00
Jean-Philippe Lang
8334651c4d Fills locales (#3640).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9884 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-25 17:50:14 +00:00
Jean-Philippe Lang
ac56c0c99c Ability to close projects (read-only) (#3640).
A new permission (Close/reopen project) is available to give non-admin users the ability to close their projects.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9883 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-25 17:49:35 +00:00
Toshi MARUYAMA
5961a1e70d add missing fixture to test/unit/query_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9882 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-23 23:29:42 +00:00
Etienne Massip
1221b79e98 Removed test line committed accidently (#11073).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9881 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-23 16:51:54 +00:00
Etienne Massip
0cc817fba3 Use base class name as customized type to fix @UserCustomField#order_statement@.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9880 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-23 15:47:19 +00:00
Jean-Philippe Lang
7ed2c481d8 Reversed order of priorities on the issue summary page (#11205).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9879 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-20 19:24:58 +00:00
Jean-Philippe Lang
26e75568cf Makes repository url read-only after saving.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9878 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-20 18:45:51 +00:00
Toshi MARUYAMA
37cbbcea71 Korean translation updated by Kihyun Yun (#11201)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9877 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-20 08:27:26 +00:00
Jean-Philippe Lang
585d08765e Safe attributes for repositories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9876 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-19 19:47:54 +00:00
Jean-Philippe Lang
3b854bee59 Make repository identifier accept underscores (#11192).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9875 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-19 19:12:17 +00:00
Toshi MARUYAMA
6c6aae07a2 fix test_global_index of functional activities controller test fails around UTC 00:00
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9871 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-19 00:43:10 +00:00
Toshi MARUYAMA
9c060fe33a scm: git: fix unable to run unit lib test if git binary is not available on Windows
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9870 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-18 23:57:27 +00:00
Jean-Philippe Lang
d3aa9c6a7b Removed invalid nested p tags.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9869 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-18 21:40:16 +00:00
Jean-Philippe Lang
a787325ed2 Updates for 2.0.3 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9864 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-18 18:40:05 +00:00
Jean-Philippe Lang
2311f80c5d Fix: Unable to run unit and functional tests if git binary is not available.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9861 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-18 18:33:33 +00:00
Jean-Philippe Lang
f62507dae5 Fixed that deleting a project with subtasks may fail (#11185).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9858 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-18 17:16:13 +00:00
Toshi MARUYAMA
9e878a9384 Traditional Chinese translation updated by ChunChang Lo (#11186)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9856 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-18 03:45:52 +00:00
Toshi MARUYAMA
e3eab40ec4 fix PDF export tables problems (#10688)
Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9853 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-17 13:05:05 +00:00
Toshi MARUYAMA
b93e040bb8 fix unit test fails on Ruby 1.8 and JRuby (#2190)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9850 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-17 09:34:12 +00:00
Etienne Massip
dbdc9b9da7 Display dates using user's locale if available (#2190).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9838 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-16 21:45:47 +00:00
Jean-Philippe Lang
2c07b478bb Fixed that time entries should be sorted by date and created_on (#11178).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9837 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-16 20:09:12 +00:00
Jean-Philippe Lang
542b355210 Fixed that sticky messages are not displayed first (#11170).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9836 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-16 19:34:19 +00:00
Etienne Massip
897e83a556 Added missing local variable declaration.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9835 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-14 21:12:03 +00:00
Etienne Massip
768e36caf0 Added a min-width to revision graph holder style to fix its rendering in Chrome (#11061).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9832 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-14 20:57:28 +00:00
Jean-Philippe Lang
76eeb64d1a Fixed that time report raises a SQL error if there are multiple CustomValue for a time entry (#11160).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9831 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-14 10:47:04 +00:00
Jean-Philippe Lang
c804151780 Upgrade to Rails 3.2.6 (#11162).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9830 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-14 10:33:30 +00:00
Jean-Philippe Lang
e199c4b823 Adds support for Git's smart HTTP protocol to Redmine.pm (#4905).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9829 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-14 08:13:53 +00:00
Jean-Philippe Lang
9eef74f09a Additional tests for Redmine.pm.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9828 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-14 08:04:44 +00:00
Jean-Philippe Lang
48a557a79e Use a random filename.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9827 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-12 19:59:28 +00:00
Jean-Philippe Lang
4fda1f6cd1 Start implementing tests for Redmine.pm perl module.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9826 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-12 19:33:09 +00:00
Jean-Philippe Lang
12ea96066b Doc cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9825 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-12 19:14:06 +00:00
Jean-Philippe Lang
13dced9d76 Run only unit, functional then integration tests for coverage.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9824 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-12 19:04:24 +00:00
Jean-Philippe Lang
667693b32c Fixed that Subversion#load_entries_changesets raises an error if entries is nil.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9823 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-12 17:43:23 +00:00
Jean-Philippe Lang
965ef33192 Fixed that lines with spaces only before headings break wiki section extraction (#11133).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9822 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-11 17:51:14 +00:00
Toshi MARUYAMA
462d0ddfe8 Simplified Chinese translation updated (#11130)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9817 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-11 06:30:23 +00:00
Toshi MARUYAMA
9989ae5a06 Bulgarian translation updated by Ivan Cenov (#11129)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9816 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-11 06:29:59 +00:00
Toshi MARUYAMA
89feb8a3fb Japanese translation update by Go MAEDA (#11128)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9815 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-11 06:29:33 +00:00
Toshi MARUYAMA
fdd36ce713 fix test_user_index of activities controller test fails at Japanese morning and afternoon
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9814 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-11 04:42:54 +00:00
Toshi MARUYAMA
21dac7287b remove trailing white-spaces from config/settings.yml
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9813 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-11 01:25:45 +00:00
Toshi MARUYAMA
74a2c5a521 scm: mercurial: use Rails3 ActiveRecord syntax with same as git r9807 at find_changeset_by_name
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9812 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-11 00:18:24 +00:00
Toshi MARUYAMA
96f5d315ea add some avatar tests
* the default size was 50px
* class="gravatar"'
* some tests to test the default and option parsing

Contributed Felix Schäfer.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9811 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-11 00:18:09 +00:00
Jean-Philippe Lang
9b63117856 Extract code from view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9809 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 19:19:22 +00:00
Jean-Philippe Lang
888d284136 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9808 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 18:56:42 +00:00
Jean-Philippe Lang
f673027bc1 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9807 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 18:38:31 +00:00
Jean-Philippe Lang
8a491dbae9 Faster changesets loading for subversion.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9806 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 18:32:48 +00:00
Jean-Philippe Lang
7c105ec9e9 Adds a method to load changesets for repository entries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9805 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 18:32:09 +00:00
Jean-Philippe Lang
9b60214b3a Fixed that Repository#entries returns an Array.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9804 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 17:01:33 +00:00
Jean-Philippe Lang
4d12bea397 Make sure we look for a feeds token.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9801 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 13:29:47 +00:00
Jean-Philippe Lang
490bfc2934 Stringify tokens.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9800 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 13:27:51 +00:00
Jean-Philippe Lang
c47293edb1 Stringify User.try_to_login arguments.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9799 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 13:24:28 +00:00
Jean-Philippe Lang
be4ad60058 Make sure that #api_key_from_request returns a String.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9798 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 13:23:01 +00:00
Jean-Philippe Lang
74645eb017 Configurable session lifetime and timeout (#6597).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9797 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 13:16:56 +00:00
Jean-Philippe Lang
26ff9e1c26 Fixed: German umlauts in Subject get striped with ruby1.8 (#11065).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9796 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 08:15:22 +00:00
Jean-Philippe Lang
c73823cd0f Set human size precision to Rails' default which is now 3 (#11118).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9794 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-09 14:09:23 +00:00
Jean-Philippe Lang
8d4e528f22 Force rendering of activity view if activity items count changed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9787 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-09 10:53:17 +00:00
Jean-Philippe Lang
898a4164a0 Fixed that link to user is escaped in activity title (#11124).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9786 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-09 10:32:34 +00:00
Jean-Philippe Lang
d21bacb01d Fixed that content_for does not work in Hook.render_on (#11105).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9785 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-09 09:19:15 +00:00
Jean-Philippe Lang
8b381e3bd4 Restored KB instead of kB (#11118).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9784 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-09 07:57:38 +00:00
Jean-Philippe Lang
9f788310b1 Fixed that custom_fields property is ignored for time entries in REST API (#11112).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9783 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-09 07:55:26 +00:00
Jean-Philippe Lang
7fba8bc682 Change in Rails' for handling localized number precision (#11118).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9782 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-09 07:46:07 +00:00
Jean-Philippe Lang
2314e41474 Priorities have the same position and can't be reordered (#11098).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9781 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-09 07:27:43 +00:00
Jean-Philippe Lang
77bac4b14d Ability to set default column order in issue list (#11068).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9780 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-08 18:50:22 +00:00
Toshi MARUYAMA
b7a435f7a0 fix German "field_multiple" translation glitch by Andreas Deininger (#11113)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9777 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-08 07:45:39 +00:00
Jean-Philippe Lang
234e5d59ac Show repository images inline when clicking 'View' (#10362).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9776 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-07 17:00:29 +00:00
Jean-Philippe Lang
44ea32afba Updates for 2.0.2 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9770 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-05 17:19:00 +00:00
Jean-Philippe Lang
c8226509fd Fixed that wiki start page can't be changed (#11085).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9768 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 22:20:33 +00:00
Jean-Philippe Lang
327d5d2132 Makes users optional in GET /groups/:id (#8981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9765 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 13:32:14 +00:00
Jean-Philippe Lang
1c5b214056 Upgrade to Rails 3.2.5 (#11084).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9764 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 13:16:16 +00:00
Jean-Philippe Lang
5bfe80949c Rails 3.2.5 compatibility.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9763 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 12:29:21 +00:00
Jean-Philippe Lang
0523ac387b Test failure due to a regression in Rails 3.2.5.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9762 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 12:15:55 +00:00
Jean-Philippe Lang
ef01cada8b Fixed argument to repository_path that triggers an error with Rails 3.2.5.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9761 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 12:02:46 +00:00
Jean-Philippe Lang
182a215c7b Renamed #changes association to #ticket_changes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9760 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 11:47:26 +00:00
Jean-Philippe Lang
2cbf9c9cc4 Renamed #changes association to #filechanges (clash with AR::Base.changes that triggers errors with Rails 3.2.5).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9759 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 11:46:58 +00:00
Jean-Philippe Lang
dd9c2cafa7 REST Api for Groups (#8981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9758 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 10:40:32 +00:00
Jean-Philippe Lang
3142183b30 Fixed that Redmine.pm does not support "bind as user" ldap authentication (#11046).
Patch contributed by Adi Kriegisch.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9755 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 08:49:46 +00:00
Toshi MARUYAMA
ba25d27e3a scm: git: skip Latin-1 path tests on Git for Windows above 1.7.10
Git for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10.
http://code.google.com/p/msysgit/issues/detail?id=80

So, Latin-1 path tests fail on Japanese Windows

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9750 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-02 18:36:23 +00:00
Toshi MARUYAMA
69b46ab1be scm: mercurial: remove comment about Mercurial 0.9.5 compatibility from redminehelper.py
Redmine supports Mercurial 1.2 or higher from r7650.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9749 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-02 10:39:27 +00:00
Jean-Philippe Lang
dd1cb4a5bf Adds #find_group filter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9748 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-01 19:41:06 +00:00
Jean-Philippe Lang
d58e5a0a1e Removed auto-generated comments.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9747 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-01 19:07:22 +00:00
Jean-Philippe Lang
9f531a4380 Use safe_attributes in GroupsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9746 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-01 19:06:16 +00:00
Jean-Philippe Lang
733fef458c Replaced group[lastname] parameter with group[name].
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9745 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-01 18:24:33 +00:00
Etienne Massip
121ce2a390 Use time_zone_select specific helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9744 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-01 13:38:03 +00:00
Etienne Massip
fc7b790081 Get rid of ActiveSupport::Concern InstanceMethods deprecation warnings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9743 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-30 18:33:26 +00:00
Jean-Philippe Lang
d915a5e36d Adds missing require 'rubygems' (#11051).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9742 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-30 17:56:39 +00:00
Jean-Philippe Lang
4ee133e77e Fixed that project, issue and activity should be preserved when logging time with "Create and continue" (#11038).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9741 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-29 18:54:26 +00:00
Jean-Philippe Lang
53a0cee57a Fixed that logging time inside redirects at global time logging (#11038).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9740 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-29 17:07:07 +00:00
Jean-Philippe Lang
251d62c2bf Adds redmine:plugins:test rake tasks for running plugins tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9738 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-28 10:02:24 +00:00
Jean-Philippe Lang
afbff44fb4 Fixes test templates for plugins.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9737 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-28 09:00:21 +00:00
Jean-Philippe Lang
3ba6718805 Fixed test_helper template for plugins.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-28 08:40:20 +00:00
Toshi MARUYAMA
e1268faa4a code layout cleanup app/views/users/_mail_notifications.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9735 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-28 08:24:46 +00:00
Toshi MARUYAMA
cfaa0fc23e fix project list is not shown on Email notifications (#11032)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9734 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-28 08:24:31 +00:00
Jean-Philippe Lang
cfddd2ff48 Updates for 2.0.1 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9731 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-28 07:23:48 +00:00
Toshi MARUYAMA
87783362cf code layout cleanup test/functional/users_controller_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9730 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-28 07:07:00 +00:00
Jean-Philippe Lang
9aef7a3242 Fixed test failures on wiki_page updated_on eager loading (#10996).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9727 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-26 19:35:25 +00:00
Jean-Philippe Lang
189be55235 Fixed time zone issues introduced by r9719 (#10996).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9726 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-26 12:07:56 +00:00
Jean-Philippe Lang
84084b0168 Restores local time zone for timestamps for 1.x compatibility (#10996).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9719 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-26 09:12:04 +00:00
Jean-Philippe Lang
3a4a708d51 Fixed that plugin model generator does not generate the migration (#11024).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9718 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-26 08:50:32 +00:00
Jean-Philippe Lang
e4332ba35f Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9717 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 20:54:11 +00:00
Jean-Philippe Lang
d664fdcde9 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9716 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 20:51:43 +00:00
Jean-Philippe Lang
aa18cd54c7 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9715 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 20:43:18 +00:00
Jean-Philippe Lang
59cbc68dde Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9714 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 20:18:55 +00:00
Jean-Philippe Lang
221585c7b5 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9713 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 19:48:22 +00:00
Jean-Philippe Lang
e7b9a9c6ff Replace RAILS_DEFAULT_LOGGER with ::Rails.logger (#11013).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9712 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 16:54:23 +00:00
Jean-Philippe Lang
472d3a00a3 Fixed that some input fields are escaped on validation failures (#11027).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9711 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 16:50:25 +00:00
Jean-Philippe Lang
235238b583 Fixed that project identifier can always be updated (#11028).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9710 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 16:43:18 +00:00
Jean-Philippe Lang
73500a349b Fixed that the issue link is escaped on my page spent time (#10991).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9709 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 16:34:40 +00:00
Toshi MARUYAMA
b587f693ab Korean translation added and changed by jongyoon Choi (#10988)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9708 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-25 13:50:12 +00:00
Jean-Philippe Lang
c77370a9eb Use a modal form to create a category from the issue form.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9707 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-24 17:31:53 +00:00
Jean-Philippe Lang
6206c88dfa Fixed that updated_on is not updated when updating an issue (#10964).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9703 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-21 18:23:03 +00:00
Jean-Philippe Lang
1ab9e42b9b Fixed that columns selection in not displayed on the custom query form (#10972).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9702 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-21 16:55:48 +00:00
Etienne Massip
ae8830ed61 Added yard to development gems.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9701 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-18 13:52:49 +00:00
Jean-Philippe Lang
1996af104d Fixed that watchers delete links are escaped on the issue view (#10932).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9700 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-15 19:33:42 +00:00
Jean-Philippe Lang
e68043e13c Fixed that creating a new version from project settings does not redirect to versions tab (#10923).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9699 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-15 17:25:27 +00:00
Jean-Philippe Lang
05481fe96b Updates for 2.0.0 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9696 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-14 22:17:57 +00:00
Jean-Philippe Lang
034539c988 CHANGELOG updated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9691 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 19:08:25 +00:00
Jean-Philippe Lang
48c28f717d Removed delete_broken_cookies filter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9689 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 11:26:21 +00:00
Jean-Philippe Lang
23a06ec022 Restored List-Id header in email notifications (#10888).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9687 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 10:44:41 +00:00
Jean-Philippe Lang
4f0aa2432c Fixes custom_field_tag helper broken by r9682.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9686 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 10:21:24 +00:00
Jean-Philippe Lang
426b1d6fcd Fixed that option tags are escaped.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9683 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 09:00:26 +00:00
Jean-Philippe Lang
478a549356 Use content_tag helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9682 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 08:47:54 +00:00
Jean-Philippe Lang
69e55fb1ef Fixed that enumerations option tags are escaped.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9681 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 08:45:15 +00:00
Jean-Philippe Lang
46400e355e Use content_tag helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9680 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 08:42:19 +00:00
Jean-Philippe Lang
dc7569ecae Fixed that group filter is escaped on users index.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9679 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 08:38:35 +00:00
Jean-Philippe Lang
7c97832002 Redirect to referer when deleting a user (#10865).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9678 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-13 08:33:55 +00:00
Jean-Philippe Lang
46e48ad3f7 Updated INSTALL and UPGRADING docs with new rake task (#10891).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9677 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-12 13:14:53 +00:00
Jean-Philippe Lang
a59257dfb6 Fixed #set_scm in reposman (#10837).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9675 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-12 12:54:46 +00:00
Jean-Philippe Lang
9382d856b4 Adds script synopsis.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9674 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-12 12:50:15 +00:00
Jean-Philippe Lang
30d2bed1fe Fixed reposman arguments parsing (#10837).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9673 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-12 12:47:51 +00:00
Jean-Philippe Lang
a99c61b471 Adds all/none operators to text custom field filters (#9790).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9671 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-12 12:23:20 +00:00
Jean-Philippe Lang
1d677ac968 Restored :generate_session_store as a deprecated rake task (#10891).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9670 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-12 07:48:21 +00:00
Toshi MARUYAMA
1ccc975f3f set svn:eol-style native to Albanian translation files (#10875)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9667 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-11 04:33:01 +00:00
Toshi MARUYAMA
dca52d6729 Albanian translation added by Dimitri Toslluku (#10875)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9666 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-11 04:25:43 +00:00
Jean-Philippe Lang
1831861eac Tests for Setting.per_page_options_array.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9665 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-10 18:53:32 +00:00
Jean-Philippe Lang
5bd90548b0 Adaptive display of "Per page" links (#7720).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9664 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-10 18:51:11 +00:00
Toshi MARUYAMA
0bb937152b change mailer model method comments to Rails3 style
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9663 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-09 15:14:45 +00:00
Toshi MARUYAMA
804864beca replace Mailer deliver syntax to Rails3 style at reminders method of mailer model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9662 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-09 15:14:30 +00:00
Toshi MARUYAMA
2ed78d95f6 code layout cleanup app/views/wiki/edit.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9661 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-09 14:18:53 +00:00
Toshi MARUYAMA
678469cf09 additional comment at config/environments/test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9660 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-09 13:58:59 +00:00
Toshi MARUYAMA
11746c44f8 set svn:executable '*' to script/*
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9659 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-09 13:10:04 +00:00
Toshi MARUYAMA
411f0874ab replace comment "config/environment.rb" to "config/application.rb" at head of config/environments/*.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9658 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-09 12:04:10 +00:00
Toshi MARUYAMA
0ba0a7bcc9 remove commented out Rails2 including from lib/redmine/hook.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9657 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-09 10:50:10 +00:00
Jean-Philippe Lang
ddfb2315aa Replaced "Allow users to unsubscribe" with "Allow users to delete their own account" (#10787).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9654 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-08 11:03:45 +00:00
Jean-Philippe Lang
1ad003dcc7 Fixed that REST Uploads fail with fastcgi (#10832).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9652 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-08 10:11:09 +00:00
Jean-Philippe Lang
7b6d11ed6a Removed comments.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9651 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-07 17:24:20 +00:00
Jean-Philippe Lang
04fe0412e1 Use optparse instead rdoc/usage in rdm-mailhandler (#10837).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9650 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-07 17:23:30 +00:00
Jean-Philippe Lang
03e9c51776 Formatting.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9649 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-06 21:18:31 +00:00
Jean-Philippe Lang
3710bbfda1 Use optparse instead rdoc/usage in reposman (#10837).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9648 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-06 21:16:54 +00:00
Jean-Philippe Lang
df7ddf5c0e Use uppercase NAME and VERSION environment variables for plugin migration tasks (#10838).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9647 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-06 21:03:30 +00:00
Toshi MARUYAMA
31d2d1284a remove redundant code from app/models/mail_handler.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9646 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-06 13:50:30 +00:00
Jean-Philippe Lang
f6882cd69e Stub Mailer with mocha.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9645 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-06 08:43:44 +00:00
Jean-Philippe Lang
18852b765a Trackers should be sorted by position not by name.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9644 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 16:21:22 +00:00
Jean-Philippe Lang
ee8dcab9db Fixed that activities option tags on the time entry bulk edit form are escaped.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9643 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 16:09:27 +00:00
Toshi MARUYAMA
02f704bb01 add Copyright statement to test/integration/repositories_git_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9642 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 14:48:45 +00:00
Toshi MARUYAMA
f08b648cce fix error of AdminControllerTest test_test_email_failure_should_display_the_error
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9641 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 14:34:16 +00:00
Jean-Philippe Lang
19e56045dd Fixed deprecated render calls in Mailer.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9640 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 13:21:58 +00:00
Jean-Philippe Lang
6fc909a402 Adds a deprecation warning to Mailer.deliver_*.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9639 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 13:17:18 +00:00
Toshi MARUYAMA
7af8d7caf0 replace Mailer deliver syntax to Rails3 style
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9638 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 13:07:12 +00:00
Jean-Philippe Lang
e876d1bfc0 Changes RedMine to Redmine in copyright notices.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9637 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 13:02:45 +00:00
Jean-Philippe Lang
ba5a052c8c Copyright update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9636 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 12:56:53 +00:00
Toshi MARUYAMA
6e7eadf9fb move unit mailer test last_email method to the bottom and change to private
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9635 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 12:20:18 +00:00
Toshi MARUYAMA
5ce2987ea9 add missing fixture to test/unit/mailer_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9634 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 12:20:01 +00:00
Jean-Philippe Lang
a3c25c18d7 Code cleanup, reuse the visible scope.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9633 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 09:54:50 +00:00
Jean-Philippe Lang
61a1fa1b6e Do not trigger model validations when rebuilding the nested set (#10829).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9632 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 09:39:38 +00:00
Jean-Philippe Lang
1ab261dda6 Use Mail instead of TMail in MailHandler.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9630 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 09:19:23 +00:00
Toshi MARUYAMA
255a84878d svn propset "svn:eol-style" native test/integration/repositories_git_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9629 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 05:34:17 +00:00
Toshi MARUYAMA
6bcbdd44fc route: scm: fix diff of two revisions
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9628 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 05:29:58 +00:00
Toshi MARUYAMA
66d62504ef test: route: scm: move changes action tests to non revisions path tests
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9627 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 05:29:43 +00:00
Toshi MARUYAMA
17d19febc6 fix typo of integration users test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9626 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 05:29:28 +00:00
Toshi MARUYAMA
b0414ec1fb route: scm: split entry and raw actions
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9625 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 01:01:29 +00:00
Toshi MARUYAMA
569e1b37cc model: convert news finder to Rails3 syntax
Contributed by Felix Schäfer.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9624 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-04 23:35:29 +00:00
Toshi MARUYAMA
bef28f7dab test: switch to Rails3 Active Record syntax at test_destroy of unit/repository_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9623 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-04 23:07:10 +00:00
Toshi MARUYAMA
49fc255b48 test: switch to Rails3 Active Record syntax at unit/query_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9622 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-04 23:06:47 +00:00
Toshi MARUYAMA
6c6467879a scm: fix revision graph left padding
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9621 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-04 17:07:38 +00:00
Jean-Philippe Lang
9f396a6dfb Fixed undefined method `<=>' for nil:NilClass when sorting repositories with nil identifiers (#10827).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9619 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-04 16:57:15 +00:00
Toshi MARUYAMA
ad8193dcde fix label_for_field of LabelledFormBuilder always has class="error" in label tag
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9618 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-04 14:33:35 +00:00
Toshi MARUYAMA
b4350ca91a route: scm: fix git and mercurial changes action
If branch name has special character, "View revisions" link has route error.
For example, Redmine Mercurial hgsubversion mirror has "../sandbox/rails-3.2" named branch.

Git default branch of bare repository is defined at HEAD.
In most cases, it is *master*.
Mercurial GUI standard behavior is showing all revisions on top page.
So, Redmine default branch is *nil*.
Mercurial top page "View revisions" link has route error.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9617 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-03 14:49:29 +00:00
Toshi MARUYAMA
2c28d6b5d1 scm: git: fix creating and updating repository
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9616 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-03 11:48:33 +00:00
Jean-Philippe Lang
36ee2b24bd Load rake tasks from Redmine plugins (#10816).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9615 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-02 16:30:16 +00:00
Jean-Philippe Lang
d2278b63a1 Fixed path for loading plugin Gemfile (#10811).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9614 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-02 16:20:32 +00:00
Toshi MARUYAMA
d658ab22d6 scm: fix broken main repository 'root' link
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9613 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-02 15:58:03 +00:00
Toshi MARUYAMA
1446c9b7f0 scm: fix git and mercurial branch list box action
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9612 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-02 13:19:16 +00:00
Toshi MARUYAMA
9be6dfbe10 code layout clean up test/integration/routing/repositories_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9611 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-02 13:18:56 +00:00
Jean-Philippe Lang
38011c0fb1 Fixed error on commits per month graph (#10806).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9610 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 21:12:47 +00:00
Jean-Philippe Lang
d1372107e5 Updated test for r9608.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9609 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 18:01:21 +00:00
Jean-Philippe Lang
c085367bb6 Adds css class to custom field input tags.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9608 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 16:50:42 +00:00
Jean-Philippe Lang
bebe429472 Fixed the path displayed in error message.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9605 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 15:50:16 +00:00
Jean-Philippe Lang
0491488554 Updates dispatch.fcgi.example to work with Rails3 and removes CGI handlers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9604 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 15:48:46 +00:00
Jean-Philippe Lang
785825900a Adds environment information display to /admin/info.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9603 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 14:49:53 +00:00
Toshi MARUYAMA
017d974dd8 remove trailing white-spaces from test/unit/mailer_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9602 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 12:45:39 +00:00
Jean-Philippe Lang
5b680625c1 Adds a simple script/about.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9601 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 11:41:15 +00:00
Jean-Philippe Lang
6fca028905 Make sure we don't boot with plugins in vendor/plugins.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9600 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 10:42:25 +00:00
Jean-Philippe Lang
b097a1753e Let redmine:plugins:assets mirror a single plugin assets with name=.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9599 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 10:25:22 +00:00
Jean-Philippe Lang
f54ecfc55f Fixed that sidebar with hook content only should not be hidden.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9598 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 10:19:06 +00:00
Jean-Philippe Lang
45093230a9 Adds deprecated tasks for plugins migration.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9597 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 09:02:34 +00:00
Toshi MARUYAMA
f4b9d2a7ee route: remove duplicate repository committers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9596 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 05:08:07 +00:00
Toshi MARUYAMA
e1920cc9e4 recovery base.html.erb "call_hook :view_layouts_base_sidebar" changed in Rails3 r9528
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9595 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-01 03:58:53 +00:00
Jean-Philippe Lang
f10fed295a Fixed generated shebang in script/rails.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9594 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-30 18:52:19 +00:00
Toshi MARUYAMA
0fcc82482e Simplified Chinese translation updated (#10800)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9591 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-30 13:10:42 +00:00
Toshi MARUYAMA
ee4928d17c remove trailing white-spaces from lib/tasks/ciphering.rake
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9590 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 13:26:54 +00:00
Toshi MARUYAMA
8a67fe30af remove trailing white-spaces from lib/tasks/deprecated.rake
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9589 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 13:26:26 +00:00
Toshi MARUYAMA
db9a2c1c58 remove trailing white-spaces from lib/tasks/ci.rake
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9588 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 13:25:40 +00:00
Toshi MARUYAMA
767a057333 remove trailing white-spaces from lib/tasks/redmine.rake
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9587 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 13:25:07 +00:00
Toshi MARUYAMA
30ceec20a6 remove trailing white-spaces from lib/tasks/reminder.rake
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9586 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 13:24:34 +00:00
Toshi MARUYAMA
910cb8ff06 replace tabs to spaces at lib/tasks/migrate_from_mantis.rake
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9585 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 13:23:59 +00:00
Toshi MARUYAMA
6a1a4e006d remove trailing white-spaces from lib/tasks/migrate_from_mantis.rake
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9584 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 12:21:18 +00:00
Jean-Philippe Lang
d2378ea641 Don't send test email asynchronously.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9583 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 10:09:39 +00:00
Jean-Philippe Lang
8d17242b82 Fixed task redmine:email:test broken by r9080.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9582 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 10:04:25 +00:00
Jean-Philippe Lang
1e491c0bfd Makes migrate_from_mantis compatible with Rails3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9581 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 09:49:02 +00:00
Jean-Philippe Lang
fb8ca0d2f8 Makes migrate_from_trac compatible with Rails3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9580 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 09:19:08 +00:00
Jean-Philippe Lang
d8c70d7a11 Fixed openid redirect.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9579 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 08:48:50 +00:00
Jean-Philippe Lang
253b02bd22 Adds an id to the flash message divs (#9034).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9578 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 08:25:50 +00:00
Jean-Philippe Lang
99cfca6f83 Adds assertions for r9572.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9577 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 07:47:58 +00:00
Jean-Philippe Lang
6143d119fe Merged #merge! calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9576 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 07:42:48 +00:00
Jean-Philippe Lang
0162222bb2 Tests broken by r9573.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9575 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 07:34:57 +00:00
Toshi MARUYAMA
ab92280a7f view: labelled_remote_form_for: equals sign mandatory to print blocks and use :as
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9574 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 04:08:59 +00:00
Toshi MARUYAMA
c0891e8a78 helper: replace remote_form_for to form_for at labelled_remote_form_for
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9573 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 04:08:44 +00:00
Toshi MARUYAMA
f624d01fd8 view: labelled_form_for: equals sign mandatory to print blocks and use :as
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9572 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 02:47:36 +00:00
Toshi MARUYAMA
4b2fc90431 view: remote_form_for: equals sign mandatory to print blocks and replace to form_for and use :remote => true and :as
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9571 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-29 02:43:42 +00:00
Jean-Philippe Lang
49b28fca68 Clean up custom field format definition.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9570 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 16:19:32 +00:00
Jean-Philippe Lang
1e3e23d756 RecordNotFound exception still raised with Rails3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9569 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 13:00:16 +00:00
Jean-Philippe Lang
68d5af3dd8 Set the default session store.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9568 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 12:26:24 +00:00
Jean-Philippe Lang
bceaf8be94 Let the secret token be set in configuration.yml.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9567 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 12:00:45 +00:00
Jean-Philippe Lang
52986e8cd1 Displays an explicit message when trying to start Redmine with an old session_store.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9566 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 11:48:34 +00:00
Jean-Philippe Lang
10c0634413 Removed /vendor/plugins directory. Redmine plugins should be dropped in /plugins now.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9565 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 11:34:52 +00:00
Jean-Philippe Lang
e4a9ce6db0 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9564 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 11:20:13 +00:00
Jean-Philippe Lang
584fbc8f8b Fix no longer required with Rails 3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9563 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 11:14:16 +00:00
Jean-Philippe Lang
5985713335 Restores plugin assets mirroring on startup, but it can now be disabled in configuration.yml.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9561 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 11:07:59 +00:00
Jean-Philippe Lang
68f8470d4a Makes image_tag pick the image from the current theme if it exists.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9560 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 09:47:09 +00:00
Jean-Philippe Lang
da43f785be Adds support for :plugin option to image_tag helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9559 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 09:18:12 +00:00
Jean-Philippe Lang
03335d014c Restores support for :plugin support to stylesheet_link_tag and javascript_include_tag helpers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9558 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-28 09:10:46 +00:00
Jean-Philippe Lang
f12942ff40 Make sure that "today" does not change during tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9557 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 23:53:34 +00:00
Jean-Philippe Lang
c7d78ef094 Fixed gantt_test, Date.today and 0.day.from_now may not be the same depending on time and time zone.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9556 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 23:50:56 +00:00
Toshi MARUYAMA
5909b00a46 Gemfile: pin shoulda version
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9555 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 22:52:05 +00:00
Jean-Philippe Lang
ee0d4a12a3 Adds a message for when assertion fails.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9554 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 21:08:34 +00:00
Jean-Philippe Lang
705b6b16a5 Fixed that hr.yml and pt-BR.yml cannot be loaded with ruby-1.9.3-p194-i386-mingw32.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9553 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 21:07:57 +00:00
Jean-Philippe Lang
301e0386f5 Reverts r9547 that breaks 2 tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9552 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 17:04:37 +00:00
Jean-Philippe Lang
a97e2593af Added config/additional_environment.rb to svn:ignore (#10778).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9551 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 16:36:24 +00:00
Jean-Philippe Lang
f2ec23d80c set_table_name deprecated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9550 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 16:31:51 +00:00
Jean-Philippe Lang
d940797aa7 set_table_name and set_locking_column are deprecated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9549 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 16:28:35 +00:00
Toshi MARUYAMA
d2f779d6e8 remove trailing white-spaces from config/routes.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9548 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 16:17:31 +00:00
Toshi MARUYAMA
8047a8cd28 route: use constraints for repositories ":format => 'raw'" and :action
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9547 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 16:17:17 +00:00
Toshi MARUYAMA
dd23e07111 route: add constraints to repositories which are lost in Rails3 route
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9546 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 16:17:03 +00:00
Toshi MARUYAMA
d7e14cb7b7 Bulgarian translation (jstoolbar) updated by Ivan Cenov (#10785)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9543 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 11:44:38 +00:00
Toshi MARUYAMA
882d46661e Estonian translation updated by Heigo Toom (#10782)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9542 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 03:33:39 +00:00
Toshi MARUYAMA
6fcea5ef9d scm: git: fix test revision value of unit lib test
Hash value range is from 0 to 9 and a to f

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9541 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 01:33:04 +00:00
Toshi MARUYAMA
d19a7dee42 add fixtures to test/unit/lib/redmine/helpers/gantt_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9540 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-27 00:55:37 +00:00
Toshi MARUYAMA
6f8d7d6e76 remove Rails2 named_scope wrapper from config/initializers/10-patches.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9539 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 23:51:40 +00:00
Toshi MARUYAMA
bf4d779ea2 replace Rails2 "named_scope" to Rails3 "scope" at lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9538 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 23:51:25 +00:00
Toshi MARUYAMA
d0d01d4e70 model: replace Rails2 "named_scope" to Rails3 "scope"
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9537 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 23:51:10 +00:00
Jean-Philippe Lang
71649ba2f1 Removed #utf8nize! that is no longer used with Rails 3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9536 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 20:11:10 +00:00
Jean-Philippe Lang
79091382cc Removed tzinfo gem requirement.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9535 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 18:28:41 +00:00
Jean-Philippe Lang
cb16661d36 Removes the XML declaration that breaks the parser with JRuby.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9534 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 17:57:49 +00:00
Jean-Philippe Lang
8d73ddf73f Moved Rails plugins required by the core to lib/plugins.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9533 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 17:23:24 +00:00
Jean-Philippe Lang
26868d8b14 Port async delivery methods to Rails 3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9532 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 16:55:53 +00:00
Jean-Philippe Lang
abdcd7d705 Removed Rails 2.3 patch for ruby1.9.3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9531 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-26 16:31:50 +00:00
Jean-Philippe Lang
6d41de61a5 Do not sanitize escaped text in NullFormatter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9530 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-25 19:49:26 +00:00
Jean-Philippe Lang
d15ab86459 Manually generates the javascript that prototype_helper fails to do with ruby1.9.2.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9529 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-25 18:17:00 +00:00
Jean-Philippe Lang
5e57a1a9d9 Merged rails-3.2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-25 17:17:49 +00:00
Toshi MARUYAMA
34e20c4373 Swedish translation updated by Nicklas Holm (#10750)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9523 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-24 09:44:56 +00:00
Toshi MARUYAMA
70d98acf9a Japanese translation updated by Go MAEDA (#10745)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9520 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-24 07:27:58 +00:00
Toshi MARUYAMA
215f4adcd7 Traditional Chinese translation updated by ChunChang Lo (#10733)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9509 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-23 08:33:33 +00:00
Jean-Philippe Lang
ccf37f59a9 Methods moved.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9473 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 12:47:50 +00:00
Jean-Philippe Lang
0fad78f53f Removed Query.generate_default! helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9472 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 12:46:43 +00:00
Jean-Philippe Lang
2e3bf71e9a Removed #generate_with_protected helper methods.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9471 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 12:45:13 +00:00
Jean-Philippe Lang
95f9246a46 Renamed object_daddy_helper and removed exemplars.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9470 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 11:58:05 +00:00
Jean-Philippe Lang
b960470d78 Removed object_daddy dependency.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9469 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 11:56:47 +00:00
Jean-Philippe Lang
4a3f038595 Use create!.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9468 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 08:42:32 +00:00
Jean-Philippe Lang
1c31e32df7 No need to save journal details.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9467 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 08:26:45 +00:00
Jean-Philippe Lang
4598c64ebd Additional tests for IssuesHelper#show_detail.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9466 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 08:24:39 +00:00
Jean-Philippe Lang
9305c84093 Reverted r9464 that broke a test. Project identifiers or ids can be used as parameters.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9465 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 07:19:45 +00:00
Toshi MARUYAMA
72ab3e22b1 Rails3: use Project.visible.find_by_identifier instead of .find for adding watchers dialog on new issue
On Rails 3.0.12, find_project method returns render_404

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9464 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 04:01:04 +00:00
Toshi MARUYAMA
e95ab31983 Rails3: helper: html_safe for watchers_checkboxes in WatchersHelper
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9463 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-22 02:57:39 +00:00
Toshi MARUYAMA
fcbeee78c1 Rails3: view: html_safe for principals_options_for_select in ApplicationHelper
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9462 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-21 01:44:38 +00:00
Jean-Philippe Lang
306af1d017 Updates for 1.4.1 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9459 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-20 09:59:51 +00:00
Jean-Philippe Lang
5a35c5b2e2 Fixed that date range fields don't get enabled when using the calendar popup (#8574).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9452 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 12:26:19 +00:00
Jean-Philippe Lang
b3bddcd31f Load Gemfile.local with absolute path.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9450 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 09:22:55 +00:00
Jean-Philippe Lang
b0f35a3cde Fixed that users with different case logins cannot update their accounts (#10711).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9449 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 08:42:07 +00:00
Jean-Philippe Lang
62eb536e32 Additional test for MailHandler.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9448 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 08:26:53 +00:00
Jean-Philippe Lang
67f90df175 Additional test for memberships API.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9447 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 08:18:27 +00:00
Jean-Philippe Lang
c88fbfbdad Additional tests for Principal scopes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9446 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 08:01:28 +00:00
Jean-Philippe Lang
424a70978e Additional tests for the PDF export of an issue.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9445 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 07:58:02 +00:00
Jean-Philippe Lang
24e6dbc709 Updated ru and uk locales (#10664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9444 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 07:25:32 +00:00
Jean-Philippe Lang
d856e62ccf Fixed that "Create and continue" buttons are broken by r9391 (#10675).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9442 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-19 07:17:48 +00:00
Jean-Philippe Lang
143c29d8e1 Additional test for TrackersController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9441 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-18 19:49:10 +00:00
Jean-Philippe Lang
f79961f1c5 Additional tests for TimelogController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9440 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-18 19:42:18 +00:00
Jean-Philippe Lang
327a74b406 Additional test for Tracker model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9439 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-18 19:33:29 +00:00
Jean-Philippe Lang
864054c005 Additional test for MyController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9438 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-18 19:30:08 +00:00
Jean-Philippe Lang
6f71a508eb Additional tests for CustomFieldsController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9437 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-18 19:25:54 +00:00
Toshi MARUYAMA
7366fb23bb fix typo of German "text_account_destroy_confirmation" (#10693, #10664)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9433 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-18 13:15:56 +00:00
Jean-Philippe Lang
0a4a49992e Removed invalid css property.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9431 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-18 12:05:00 +00:00
Jean-Philippe Lang
2cc294aa27 Fixed that textile nested lists are not properly closed in output (#10642).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9430 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-18 12:00:54 +00:00
Toshi MARUYAMA
ee559c6820 German translation changed by Hannes Meier (#10693)
* mail_body_account_information_external
* label_overall_activity
* label_send_information

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9427 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-17 23:47:38 +00:00
Toshi MARUYAMA
2581d00c69 German translation for #10664 updated by Hannes Meier (#10693)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9426 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-17 23:47:06 +00:00
Toshi MARUYAMA
41b986db06 German translation for 1.4.0 updated by Hannes Meier (#10693)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9425 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-17 23:46:43 +00:00
Toshi MARUYAMA
b949d49ed3 Bulgarian translation updated by Ivan Cenov (#10671, #10664)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9424 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-16 08:05:18 +00:00
Jean-Philippe Lang
f529cdddb3 Cleanup in rake scripts.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9423 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 15:57:35 +00:00
Jean-Philippe Lang
147f717c86 Adds a rake task to remove expired tokens: redmine:tokens:prune.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9422 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 15:56:58 +00:00
Jean-Philippe Lang
0cb633c688 Adds new strings to locales.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9421 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 15:47:25 +00:00
Jean-Philippe Lang
c7149f4184 Fixed that Token.destroy_expired destroys API tokens.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9420 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 15:44:51 +00:00
Jean-Philippe Lang
24c361eb0a Fixed that rss key is generated twice when user is not reloaded (#10668).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9419 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 15:34:14 +00:00
Jean-Philippe Lang
9817e1d744 Additional test for Watcher.prune.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9418 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 15:13:28 +00:00
Jean-Philippe Lang
28f0c4f131 Adds the ability for users to delete their own account (#10664). Can be disabled in application settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9417 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-15 14:31:54 +00:00
Jean-Philippe Lang
638583012a French local update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9412 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 08:07:56 +00:00
Jean-Philippe Lang
55ea557fe8 Note about the mysql2 adapter in database.yml.example.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9409 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 06:51:16 +00:00
Jean-Philippe Lang
552ed9693e Updated trunk CHANGELOG.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9406 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 06:31:33 +00:00
Jean-Philippe Lang
231282ddcb Fixed MissingFeatureException: let user choose to copy attachments or not when bulk copying issues.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9405 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 06:21:03 +00:00
Jean-Philippe Lang
09375960d6 When copying issues, let the status be changed to default or left unchanged.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9404 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 05:45:16 +00:00
Jean-Philippe Lang
354e09811b Removed deprecated accept_key_auth methods.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9392 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-13 19:40:18 +00:00
Jean-Philippe Lang
43c677b489 Disable submit buttons when submitting a form (#6555).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9391 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-13 17:01:46 +00:00
Jean-Philippe Lang
4edc30d157 Ignore emails with Auto-Submitted: auto-replied header (#10607).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9390 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-13 16:55:04 +00:00
Etienne Massip
dd8d8e0560 Updated CodeRay to 1.0.6.
Fixed multiline comments highlighting issue in file view (#7495).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9389 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-12 17:54:55 +00:00
Jean-Philippe Lang
de0689d4f4 Makes time syntax case insensitive (#10635).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9387 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-11 17:37:13 +00:00
Jean-Philippe Lang
1511b1435a Additional assertions on creation of relations.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9385 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-11 17:27:11 +00:00
Jean-Philippe Lang
12b71ebc8e Strip issue id when adding a relation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9384 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-11 17:25:05 +00:00
Jean-Philippe Lang
04e7b18869 Fixed that export links include page parameter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9382 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-11 17:02:21 +00:00
Jean-Philippe Lang
d88ffd11e2 CSV export breaks custom columns (#10168).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9381 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-09 21:32:54 +00:00
Jean-Philippe Lang
e4ba838c6b Fixed that rake redmine:send_reminders fails if an issue is assigned to a group (#10555).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9380 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-09 20:23:36 +00:00
Jean-Philippe Lang
269e9057dd Fixed that "Default administrator account changed" is always true (#10622).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9379 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-09 15:53:48 +00:00
Jean-Philippe Lang
ea307619be Fixed that improper statuses are proposed when changing status before tracker on the issue form (#10619).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9378 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-09 09:39:27 +00:00
Jean-Philippe Lang
6d62ab64e6 Upgrade required pg gem (#6941).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9374 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-08 21:10:02 +00:00
Jean-Philippe Lang
78dd564a82 Disable IE 8 compatibility mode (#10128).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9372 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-08 20:13:38 +00:00
Jean-Philippe Lang
d2cb9d5289 Adds missing route to project search.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9371 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-08 20:06:53 +00:00
Jean-Philippe Lang
d427d8e567 Reverted r9368.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9370 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-08 19:29:26 +00:00
Jean-Philippe Lang
e436285b6f Slight changes to the plain text issue notification.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9369 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-08 19:25:26 +00:00
Jean-Philippe Lang
1334cbf78c Adds double quotes around issue change details in plain text notifications (#10603).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9368 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-08 17:30:08 +00:00
Jean-Philippe Lang
fde9c7315a Fixed: reminder mails are not sent when delivery_method is :async_smtp (#5058).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9367 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 18:57:05 +00:00
Jean-Philippe Lang
cfb06a2607 Additional test for gzipped wiki history.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9366 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 17:53:25 +00:00
Jean-Philippe Lang
5e4bb16a7f Additional tests for WatchersController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9365 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 16:55:53 +00:00
Jean-Philippe Lang
2e240103f3 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9364 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 16:53:12 +00:00
Jean-Philippe Lang
18270ee587 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9363 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 16:51:10 +00:00
Jean-Philippe Lang
eabbab6e2b Adds assertions on the content of a versioned wiki page export (#6941).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9362 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 15:31:06 +00:00
Jean-Philippe Lang
d25defe276 Adds assertions on the content of a wiki page export (#6941).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9361 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 14:09:15 +00:00
Jean-Philippe Lang
ab28a55b4e Fixed test_show_with_permission_should_display_the_new_message_form broken by r9351.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9359 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 13:51:16 +00:00
Jean-Philippe Lang
dd1163b58a Makes the mail handler ignore out-of-office emails (#10607).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9358 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 13:24:30 +00:00
Toshi MARUYAMA
051794dffc remove 1.3-stable merged issues from CHANGELOG 1.4.0 list
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9355 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 12:57:39 +00:00
Jean-Philippe Lang
54bb145c76 Removed permissions logic from view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9351 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 12:21:45 +00:00
Jean-Philippe Lang
a7bacf70fb Fixed: Unable to change locked, sticky flags and board when editing a message (#10564).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9350 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 12:20:47 +00:00
Jean-Philippe Lang
07d20cc5f7 Let non required list/user/version custom fields to be set to blank when bulk editing (#10605).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9349 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 11:56:30 +00:00
Jean-Philippe Lang
dee17f4677 Adds a note about Gemfile.local in the INSTALL doc.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9347 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 11:16:58 +00:00
Jean-Philippe Lang
2658730302 Load Gemfile.local if present.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9346 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 11:12:50 +00:00
Toshi MARUYAMA
e06b60d1b9 Simplified Chinese translation updated by fangzheng (#10611)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9343 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 10:41:16 +00:00
Jean-Philippe Lang
7d458e0b27 Do not install rmagick gem with jruby.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9341 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 10:26:55 +00:00
Jean-Philippe Lang
725ff27c37 Typo in database rake task.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9339 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-06 10:24:36 +00:00
1353 changed files with 22979 additions and 29833 deletions

2
.gitignore vendored
View File

@@ -5,6 +5,7 @@
/config/database.yml
/config/email.yml
/config/initializers/session_store.rb
/config/initializers/secret_token.rb
/coverage
/db/*.db
/db/*.sqlite3
@@ -18,6 +19,7 @@
/public/plugin_assets
/tmp/*
/tmp/cache/*
/tmp/pdf/*
/tmp/sessions/*
/tmp/sockets/*
/tmp/test/*

View File

@@ -7,6 +7,7 @@ config/configuration.yml
config/database.yml
config/email.yml
config/initializers/session_store.rb
config/initializers/secret_token.rb
coverage
db/*.db
db/*.sqlite3
@@ -20,6 +21,7 @@ public/dispatch.*
public/plugin_assets
tmp/*
tmp/cache/*
tmp/pdf/*
tmp/sessions/*
tmp/sockets/*
tmp/test/*

48
Gemfile
View File

@@ -1,10 +1,11 @@
source :rubygems
source 'http://rubygems.org'
gem "rails", "2.3.14"
gem "i18n", "~> 0.4.2"
gem "coderay", "~> 1.0.0"
gem 'rails', '3.2.8'
gem "jquery-rails", "~> 2.0.2"
gem "i18n", "~> 0.6.0"
gem "coderay", "~> 1.0.6"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "tzinfo", "~> 0.3.31"
gem "builder", "3.0.0"
# Optional gem for LDAP authentication
group :ldap do
@@ -14,20 +15,23 @@ end
# Optional gem for OpenID authentication
group :openid do
gem "ruby-openid", "~> 2.1.4", :require => "openid"
gem "rack-openid"
end
# Optional gem for exporting the gantt to a PNG file
group :rmagick do
# RMagick 2 supports ruby 1.9
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
# different requirements for the same gem on different platforms
gem "rmagick", ">= 2.0.0"
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
platforms :mri, :mingw do
group :rmagick do
# RMagick 2 supports ruby 1.9
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
# different requirements for the same gem on different platforms
gem "rmagick", ">= 2.0.0"
end
end
# Database gems
platforms :mri, :mingw do
group :postgresql do
gem "pg", "~> 0.9.0"
gem "pg", ">= 0.11.0"
end
group :sqlite do
@@ -37,13 +41,13 @@ end
platforms :mri_18, :mingw_18 do
group :mysql do
gem "mysql"
gem "mysql", "~> 2.8.1"
end
end
platforms :mri_19, :mingw_19 do
group :mysql do
gem "mysql2", "~> 0.2.7"
gem "mysql2", "~> 0.3.11"
end
end
@@ -65,16 +69,24 @@ end
group :development do
gem "rdoc", ">= 2.4.2"
gem "yard"
end
group :test do
gem "shoulda", "~> 2.10.3"
gem "edavis10-object_daddy", :require => "object_daddy"
gem "mocha"
gem "shoulda", "~> 2.11"
# Shoulda does not work nice on Ruby 1.9.3 and seems to need test-unit explicitely.
gem "test-unit", :platforms => [:mri_19]
gem "mocha", "0.12.3"
end
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(local_gemfile)
end
# Load plugins' Gemfiles
Dir.glob File.expand_path("../vendor/plugins/*/Gemfile", __FILE__) do |file|
Dir.glob File.expand_path("../plugins/*/Gemfile", __FILE__) do |file|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
end

View File

@@ -1,15 +1,7 @@
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
require File.expand_path('../config/application', __FILE__)
require 'rake'
require 'rake/testtask'
begin
require 'rdoc/task'
rescue LoadError
# RDoc is not available
end
require 'tasks/rails'
RedmineApp::Application.load_tasks

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -40,19 +40,26 @@ class AccountController < ApplicationController
redirect_to home_url
end
# Enable user to choose a new password
# Lets user choose a new password
def lost_password
redirect_to(home_url) && return unless Setting.lost_password?
if params[:token]
@token = Token.find_by_action_and_value("recovery", params[:token])
redirect_to(home_url) && return unless @token and !@token.expired?
@token = Token.find_by_action_and_value("recovery", params[:token].to_s)
if @token.nil? || @token.expired?
redirect_to home_url
return
end
@user = @token.user
unless @user && @user.active?
redirect_to home_url
return
end
if request.post?
@user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
if @user.save
@token.destroy
flash[:notice] = l(:notice_account_password_updated)
redirect_to :action => 'login'
redirect_to signin_path
return
end
end
@@ -60,17 +67,23 @@ class AccountController < ApplicationController
return
else
if request.post?
user = User.find_by_mail(params[:mail])
# user not found in db
(flash.now[:error] = l(:notice_account_unknown_email); return) unless user
# user uses an external authentification
(flash.now[:error] = l(:notice_can_t_change_password); return) if user.auth_source_id
user = User.find_by_mail(params[:mail].to_s)
# user not found or not active
unless user && user.active?
flash.now[:error] = l(:notice_account_unknown_email)
return
end
# user cannot change its password
unless user.change_password_allowed?
flash.now[:error] = l(:notice_can_t_change_password)
return
end
# create a new token for password recovery
token = Token.new(:user => user, :action => "recovery")
if token.save
Mailer.deliver_lost_password(token)
Mailer.lost_password(token).deliver
flash[:notice] = l(:notice_account_lost_email_sent)
redirect_to :action => 'login'
redirect_to signin_path
return
end
end
@@ -84,8 +97,9 @@ class AccountController < ApplicationController
session[:auth_source_registration] = nil
@user = User.new(:language => Setting.default_language)
else
user_params = params[:user] || {}
@user = User.new
@user.safe_attributes = params[:user]
@user.safe_attributes = user_params
@user.admin = false
@user.register
if session[:auth_source_registration]
@@ -100,7 +114,9 @@ class AccountController < ApplicationController
end
else
@user.login = params[:user][:login]
@user.password, @user.password_confirmation = params[:user][:password], params[:user][:password_confirmation]
unless user_params[:identity_url].present? && user_params[:password].blank? && user_params[:password_confirmation].blank?
@user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation]
end
case Setting.self_registration
when '1'
@@ -126,19 +142,11 @@ class AccountController < ApplicationController
token.destroy
flash[:notice] = l(:notice_account_activated)
end
redirect_to :action => 'login'
redirect_to signin_path
end
private
def logout_user
if User.current.logged?
cookies.delete :autologin
Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
self.logged_user = nil
end
end
def authenticate_user
if Setting.openid? && using_open_id?
open_id_authenticate(params[:openid_url])
@@ -161,7 +169,7 @@ class AccountController < ApplicationController
end
def open_id_authenticate(openid_url)
authenticate_with_open_id(openid_url, :required => [:nickname, :fullname, :email], :return_to => signin_url) do |result, identity_url, registration|
authenticate_with_open_id(openid_url, :required => [:nickname, :fullname, :email], :return_to => signin_url, :method => :post) do |result, identity_url, registration|
if result.successful?
user = User.find_or_initialize_by_identity_url(identity_url)
if user.new_record?
@@ -202,6 +210,7 @@ class AccountController < ApplicationController
end
def successful_authentication(user)
logger.info "Successful authentication for '#{user.login}' from #{request.remote_ip} at #{Time.now.utc}"
# Valid user
self.logged_user = user
# generate a key and set cookie if autologin
@@ -243,9 +252,9 @@ class AccountController < ApplicationController
def register_by_email_activation(user, &block)
token = Token.new(:user => user, :action => "register")
if user.save and token.save
Mailer.deliver_register(token)
Mailer.register(token).deliver
flash[:notice] = l(:notice_account_register_done)
redirect_to :action => 'login'
redirect_to signin_path
else
yield if block_given?
end
@@ -273,7 +282,7 @@ class AccountController < ApplicationController
def register_manually_by_administrator(user, &block)
if user.save
# Sends an email to the administrators
Mailer.deliver_account_activation_request(user)
Mailer.account_activation_request(user).deliver
account_pending
else
yield if block_given?
@@ -282,6 +291,6 @@ class AccountController < ApplicationController
def account_pending
flash[:notice] = l(:notice_account_pending)
redirect_to :action => 'login'
redirect_to signin_path
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -40,10 +40,10 @@ class ActivitiesController < ApplicationController
events = @activity.events(@date_from, @date_to)
if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, User.current, current_language])
if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, events.size, User.current, current_language])
respond_to do |format|
format.html {
@events_by_day = events.group_by(&:event_date)
@events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)}
render :layout => false if request.xhr?
}
format.atom {

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -63,7 +63,7 @@ class AdminController < ApplicationController
# Force ActionMailer to raise delivery errors so we can catch it
ActionMailer::Base.raise_delivery_errors = true
begin
@test = Mailer.deliver_test_email(User.current)
@test = Mailer.test_email(User.current).deliver
flash[:notice] = l(:notice_email_sent, User.current.mail)
rescue Exception => e
flash[:error] = l(:notice_email_error, e.message)
@@ -75,9 +75,7 @@ class AdminController < ApplicationController
def info
@db_adapter_name = ActiveRecord::Base.connection.adapter_name
@checklist = [
[:text_default_administrator_account_changed,
User.find(:first,
:conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?],
[:text_default_administrator_account_changed, User.default_admin_account_changed?],
[:text_file_repository_writable, File.writable?(Attachment.storage_path)],
[:text_plugin_assets_writable, File.writable?(Redmine::Plugin.public_directory)],
[:text_rmagick_available, Object.const_defined?(:Magick)]

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -22,63 +22,59 @@ class Unauthorized < Exception; end
class ApplicationController < ActionController::Base
include Redmine::I18n
class_attribute :accept_api_auth_actions
class_attribute :accept_rss_auth_actions
class_attribute :model_object
layout 'base'
exempt_from_layout 'builder', 'rsb'
protect_from_forgery
def handle_unverified_request
super
cookies.delete(:autologin)
end
# Remove broken cookie after upgrade from 0.8.x (#4292)
# See https://rails.lighthouseapp.com/projects/8994/tickets/3360
# TODO: remove it when Rails is fixed
before_filter :delete_broken_cookies
def delete_broken_cookies
if cookies['_redmine_session'] && cookies['_redmine_session'] !~ /--/
cookies.delete '_redmine_session'
redirect_to home_path
return false
end
end
# FIXME: Remove this when all of Rack and Rails have learned how to
# properly use encodings
before_filter :params_filter
def params_filter
if RUBY_VERSION >= '1.9' && defined?(Rails) && Rails::VERSION::MAJOR < 3
self.utf8nize!(params)
end
end
def utf8nize!(obj)
if obj.frozen?
obj
elsif obj.is_a? String
obj.respond_to?(:force_encoding) ? obj.force_encoding("UTF-8") : obj
elsif obj.is_a? Hash
obj.each {|k, v| obj[k] = self.utf8nize!(v)}
elsif obj.is_a? Array
obj.each {|v| self.utf8nize!(v)}
else
obj
end
end
before_filter :user_setup, :check_if_login_required, :set_localization
filter_parameter_logging :password
before_filter :session_expiration, :user_setup, :check_if_login_required, :set_localization
rescue_from ActionController::InvalidAuthenticityToken, :with => :invalid_authenticity_token
rescue_from ::Unauthorized, :with => :deny_access
rescue_from ::ActionView::MissingTemplate, :with => :missing_template
include Redmine::Search::Controller
include Redmine::MenuManager::MenuController
helper Redmine::MenuManager::MenuHelper
Redmine::Scm::Base.all.each do |scm|
require_dependency "repository/#{scm.underscore}"
def session_expiration
if session[:user_id]
if session_expired? && !try_to_autologin
reset_session
flash[:error] = l(:error_session_expired)
redirect_to signin_url
else
session[:atime] = Time.now.utc.to_i
end
end
end
def session_expired?
if Setting.session_lifetime?
unless session[:ctime] && (Time.now.utc.to_i - session[:ctime].to_i <= Setting.session_lifetime.to_i * 60)
return true
end
end
if Setting.session_timeout?
unless session[:atime] && (Time.now.utc.to_i - session[:atime].to_i <= Setting.session_timeout.to_i * 60)
return true
end
end
false
end
def start_user_session(user)
session[:user_id] = user.id
session[:ctime] = Time.now.utc.to_i
session[:atime] = Time.now.utc.to_i
end
def user_setup
@@ -86,33 +82,48 @@ class ApplicationController < ActionController::Base
Setting.check_cache
# Find the current user
User.current = find_current_user
logger.info(" Current user: " + (User.current.logged? ? "#{User.current.login} (id=#{User.current.id})" : "anonymous")) if logger
end
# Returns the current user or nil if no user is logged in
# and starts a session if needed
def find_current_user
if session[:user_id]
# existing session
(User.active.find(session[:user_id]) rescue nil)
elsif cookies[:autologin] && Setting.autologin?
# auto-login feature starts a new session
user = User.try_to_autologin(cookies[:autologin])
session[:user_id] = user.id if user
user
elsif params[:format] == 'atom' && params[:key] && request.get? && accept_rss_auth?
# RSS key authentication does not start a session
User.find_by_rss_key(params[:key])
elsif Setting.rest_api_enabled? && accept_api_auth?
user = nil
unless api_request?
if session[:user_id]
# existing session
user = (User.active.find(session[:user_id]) rescue nil)
elsif autologin_user = try_to_autologin
user = autologin_user
elsif params[:format] == 'atom' && params[:key] && request.get? && accept_rss_auth?
# RSS key authentication does not start a session
user = User.find_by_rss_key(params[:key])
end
end
if user.nil? && Setting.rest_api_enabled? && accept_api_auth?
if (key = api_key_from_request)
# Use API key
User.find_by_api_key(key)
user = User.find_by_api_key(key)
else
# HTTP Basic, either username/password or API key/random
authenticate_with_http_basic do |username, password|
User.try_to_login(username, password) || User.find_by_api_key(username)
user = User.try_to_login(username, password) || User.find_by_api_key(username)
end
end
end
user
end
def try_to_autologin
if cookies[:autologin] && Setting.autologin?
# auto-login feature starts a new session
user = User.try_to_autologin(cookies[:autologin])
if user
reset_session
start_user_session(user)
end
user
end
end
# Sets the logged in user
@@ -120,12 +131,21 @@ class ApplicationController < ActionController::Base
reset_session
if user && user.is_a?(User)
User.current = user
session[:user_id] = user.id
start_user_session(user)
else
User.current = User.anonymous
end
end
# Logs out current user
def logout_user
if User.current.logged?
cookies.delete :autologin
Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
self.logged_user = nil
end
end
# check if login is globally required to access the application
def check_if_login_required
# no check needed if user is already logged in
@@ -233,7 +253,7 @@ class ApplicationController < ActionController::Base
end
def find_model_object
model = self.class.read_inheritable_attribute('model_object')
model = self.class.model_object
if model
@object = model.find(params[:id])
self.instance_variable_set('@' + controller_name.singularize, @object) if @object
@@ -243,7 +263,7 @@ class ApplicationController < ActionController::Base
end
def self.model_object(model)
write_inheritable_attribute('model_object', model)
self.model_object = model
end
# Filter for bulk issue operations
@@ -263,7 +283,7 @@ class ApplicationController < ActionController::Base
# make sure that the user is a member of the project (or admin) if project is private
# used as a before_filter for actions that do not require any particular permission on the project
def check_project_privacy
if @project && @project.active?
if @project && !@project.archived?
if @project.visible?
true
else
@@ -277,12 +297,16 @@ class ApplicationController < ActionController::Base
end
def back_url
params[:back_url] || request.env['HTTP_REFERER']
url = params[:back_url]
if url.nil? && referer = request.env['HTTP_REFERER']
url = CGI.unescape(referer.to_s)
end
url
end
def redirect_back_or_default(default)
back_url = CGI.unescape(params[:back_url].to_s)
if !back_url.blank?
back_url = params[:back_url].to_s
if back_url.present?
begin
uri = URI.parse(back_url)
# do not redirect user to another host or to the login or register page
@@ -291,6 +315,7 @@ class ApplicationController < ActionController::Base
return
end
rescue URI::InvalidURIError
logger.warn("Could not redirect to invalid URL #{back_url}")
# redirect to default
end
end
@@ -298,6 +323,19 @@ class ApplicationController < ActionController::Base
false
end
# Redirects to the request referer if present, redirects to args or call block otherwise.
def redirect_to_referer_or(*args, &block)
redirect_to :back
rescue ::ActionController::RedirectBackError
if args.any?
redirect_to *args
elsif block_given?
block.call
else
raise "#redirect_to_referer_or takes arguments or a block"
end
end
def render_403(options={})
@project = nil
render_error({:message => :notice_not_authorized, :status => 403}.merge(options))
@@ -321,13 +359,17 @@ class ApplicationController < ActionController::Base
format.html {
render :template => 'common/error', :layout => use_layout, :status => @status
}
format.atom { head @status }
format.xml { head @status }
format.js { head @status }
format.json { head @status }
format.any { head @status }
end
end
# Handler for ActionView::MissingTemplate exception
def missing_template
logger.warn "Missing template, responding with 404"
@project = nil
render_404
end
# Filter for actions that provide an API response
# but have no HTML representation for non admin users
def require_admin_or_api_request
@@ -364,23 +406,11 @@ class ApplicationController < ActionController::Base
:content_type => 'application/atom+xml'
end
# TODO: remove in Redmine 1.4
def self.accept_key_auth(*actions)
ActiveSupport::Deprecation.warn "ApplicationController.accept_key_auth is deprecated and will be removed in Redmine 1.4. Use accept_rss_auth (or accept_api_auth) instead."
accept_rss_auth(*actions)
end
# TODO: remove in Redmine 1.4
def accept_key_auth_actions
ActiveSupport::Deprecation.warn "ApplicationController.accept_key_auth_actions is deprecated and will be removed in Redmine 1.4. Use accept_rss_auth (or accept_api_auth) instead."
self.class.accept_rss_auth
end
def self.accept_rss_auth(*actions)
if actions.any?
write_inheritable_attribute('accept_rss_auth_actions', actions)
self.accept_rss_auth_actions = actions
else
read_inheritable_attribute('accept_rss_auth_actions') || []
self.accept_rss_auth_actions || []
end
end
@@ -390,9 +420,9 @@ class ApplicationController < ActionController::Base
def self.accept_api_auth(*actions)
if actions.any?
write_inheritable_attribute('accept_api_auth_actions', actions)
self.accept_api_auth_actions = actions
else
read_inheritable_attribute('accept_api_auth_actions') || []
self.accept_api_auth_actions || []
end
end
@@ -472,9 +502,9 @@ class ApplicationController < ActionController::Base
# Returns the API key present in the request
def api_key_from_request
if params[:key].present?
params[:key]
params[:key].to_s
elsif request.headers["X-Redmine-API-Key"].present?
request.headers["X-Redmine-API-Key"]
request.headers["X-Redmine-API-Key"].to_s
end
end
@@ -506,6 +536,12 @@ class ApplicationController < ActionController::Base
render_error "An error occurred while executing the query and has been logged. Please report this error to your Redmine administrator."
end
# Renders a 200 response for successfull updates or deletions via the API
def render_api_ok
# head :ok would return a response body with one space
render :text => '', :status => :ok, :layout => nil
end
# Renders API response on validation failure
def render_validation_errors(objects)
if objects.is_a?(Array)
@@ -513,26 +549,12 @@ class ApplicationController < ActionController::Base
else
@error_messages = objects.errors.full_messages
end
render :template => 'common/error_messages.api', :status => :unprocessable_entity, :layout => false
render :template => 'common/error_messages.api', :status => :unprocessable_entity, :layout => nil
end
# Overrides #default_template so that the api template
# is used automatically if it exists
def default_template(action_name = self.action_name)
if api_request?
begin
return self.view_paths.find_template(default_template_name(action_name), 'api')
rescue ::ActionView::MissingTemplate
# the api template was not found
# fallback to the default behaviour
end
end
super
end
# Overrides #pick_layout so that #render with no arguments
# Overrides #_include_layout? so that #render with no arguments
# doesn't use the layout for api requests
def pick_layout(*args)
api_request? ? nil : super
def _include_layout?(*args)
api_request? ? false : super
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -17,7 +17,7 @@
class AttachmentsController < ApplicationController
before_filter :find_project, :except => :upload
before_filter :file_readable, :read_authorize, :only => [:show, :download]
before_filter :file_readable, :read_authorize, :only => [:show, :download, :thumbnail]
before_filter :delete_authorize, :only => :destroy
before_filter :authorize_global, :only => :upload
@@ -52,11 +52,26 @@ class AttachmentsController < ApplicationController
@attachment.increment_download
end
# images are sent inline
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
:disposition => (@attachment.image? ? 'inline' : 'attachment')
if stale?(:etag => @attachment.digest)
# images are sent inline
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
:disposition => (@attachment.image? ? 'inline' : 'attachment')
end
end
def thumbnail
if @attachment.thumbnailable? && thumbnail = @attachment.thumbnail(:size => params[:size])
if stale?(:etag => thumbnail)
send_file thumbnail,
:filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
:disposition => 'inline'
end
else
# No thumbnail for the attachment or thumbnail could not be created
render :nothing => true, :status => 404
end
end
def upload
@@ -67,7 +82,7 @@ class AttachmentsController < ApplicationController
return
end
@attachment = Attachment.new(:file => request.body)
@attachment = Attachment.new(:file => request.raw_post)
@attachment.author = User.current
@attachment.filename = Redmine::Utils.random_hex(16)
@@ -88,9 +103,7 @@ class AttachmentsController < ApplicationController
end
# Make sure association callbacks are called
@attachment.container.attachments.delete(@attachment)
redirect_to :back
rescue ::ActionController::RedirectBackError
redirect_to :controller => 'projects', :action => 'show', :id => @project
redirect_to_referer_or project_path(@project)
end
private

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,27 +1,44 @@
# Redmine - project management software
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class AutoCompletesController < ApplicationController
before_filter :find_project
def issues
@issues = []
q = params[:q].to_s
query = (params[:scope] == "all" && Setting.cross_project_issue_relations?) ? Issue : @project.issues
if q.match(/^\d+$/)
@issues << query.visible.find_by_id(q.to_i)
q = (params[:q] || params[:term]).to_s.strip
if q.present?
scope = (params[:scope] == "all" || @project.nil? ? Issue : @project.issues).visible
if q.match(/^\d+$/)
@issues << scope.find_by_id(q.to_i)
end
@issues += scope.where("LOWER(#{Issue.table_name}.subject) LIKE ?", "%#{q.downcase}%").order("#{Issue.table_name}.id DESC").limit(10).all
@issues.compact!
end
unless q.blank?
@issues += query.visible.find(:all, :conditions => ["LOWER(#{Issue.table_name}.subject) LIKE ?", "%#{q.downcase}%"], :limit => 10)
end
@issues.compact!
render :layout => false
end
private
def find_project
project_id = (params[:issue] && params[:issue][:project_id]) || params[:project_id]
@project = Project.find(project_id)
if params[:project_id].present?
@project = Project.find(params[:project_id])
end
rescue ActiveRecord::RecordNotFound
render_404
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -25,7 +25,7 @@ class BoardsController < ApplicationController
helper :watchers
def index
@boards = @project.boards
@boards = @project.boards.includes(:last_message => :author).all
# show the board if there is only one
if @boards.size == 1
@board = @boards.first
@@ -43,11 +43,11 @@ class BoardsController < ApplicationController
@topic_count = @board.topics.count
@topic_pages = Paginator.new self, @topic_count, per_page_option, params['page']
@topics = @board.topics.find :all, :order => ["#{Message.table_name}.sticky DESC", sort_clause].compact.join(', '),
@topics = @board.topics.reorder("#{Message.table_name}.sticky DESC").order(sort_clause).all(
:include => [:author, {:last_reply => :author}],
:limit => @topic_pages.items_per_page,
:offset => @topic_pages.current.offset
@message = Message.new
:offset => @topic_pages.current.offset)
@message = Message.new(:board => @board)
render :action => 'show', :layout => !request.xhr?
}
format.atom {

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,3 +1,20 @@
# Redmine - project management software
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class ContextMenusController < ApplicationController
helper :watchers
helper :issues
@@ -7,6 +24,7 @@ class ContextMenusController < ApplicationController
if (@issues.size == 1)
@issue = @issues.first
end
@issue_ids = @issues.map(&:id).sort
@allowed_statuses = @issues.map(&:new_statuses_allowed_to).reduce(:&)
@projects = @issues.collect(&:project).compact.uniq
@@ -31,6 +49,7 @@ class ContextMenusController < ApplicationController
@assignables = @projects.map(&:assignable_users).reduce(:&)
@trackers = @projects.map(&:trackers).reduce(:&)
end
@versions = @projects.map {|p| p.shared_versions.open}.reduce(:&)
@priorities = IssuePriority.active.reverse
@back = back_url
@@ -48,6 +67,7 @@ class ContextMenusController < ApplicationController
end
end
@safe_attributes = @issues.map(&:safe_attribute_names).reduce(:&)
render :layout => false
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -86,7 +86,9 @@ class DocumentsController < ApplicationController
attachments = Attachment.attach_files(@document, params[:attachments])
render_attachment_warning_if_needed(@document)
Mailer.deliver_attachments_added(attachments[:files]) if attachments.present? && attachments[:files].present? && Setting.notified_events.include?('document_added')
if attachments.present? && attachments[:files].present? && Setting.notified_events.include?('document_added')
Mailer.attachments_added(attachments[:files]).deliver
end
redirect_to :action => 'show', :id => @document
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,3 +1,20 @@
# Redmine - project management software
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class FilesController < ApplicationController
menu_item :files
@@ -29,7 +46,7 @@ class FilesController < ApplicationController
render_attachment_warning_if_needed(container)
if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added')
Mailer.deliver_attachments_added(attachments[:files])
Mailer.attachments_added(attachments[:files]).deliver
end
redirect_to project_files_path(@project)
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -19,51 +19,34 @@ class GroupsController < ApplicationController
layout 'admin'
before_filter :require_admin
before_filter :find_group, :except => [:index, :new, :create]
accept_api_auth :index, :show, :create, :update, :destroy, :add_users, :remove_user
helper :custom_fields
# GET /groups
# GET /groups.xml
def index
@groups = Group.find(:all, :order => 'lastname')
@groups = Group.sorted.all
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @groups }
format.html
format.api
end
end
# GET /groups/1
# GET /groups/1.xml
def show
@group = Group.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @group }
format.html
format.api
end
end
# GET /groups/new
# GET /groups/new.xml
def new
@group = Group.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @group }
end
end
# GET /groups/1/edit
def edit
@group = Group.find(params[:id], :include => :projects)
end
# POST /groups
# POST /groups.xml
def create
@group = Group.new(params[:group])
@group = Group.new
@group.safe_attributes = params[:group]
respond_to do |format|
if @group.save
@@ -71,102 +54,87 @@ class GroupsController < ApplicationController
flash[:notice] = l(:notice_successful_create)
redirect_to(params[:continue] ? new_group_path : groups_path)
}
format.xml { render :xml => @group, :status => :created, :location => @group }
format.api { render :action => 'show', :status => :created, :location => group_url(@group) }
else
format.html { render :action => "new" }
format.xml { render :xml => @group.errors, :status => :unprocessable_entity }
format.api { render_validation_errors(@group) }
end
end
end
# PUT /groups/1
# PUT /groups/1.xml
def edit
end
def update
@group = Group.find(params[:id])
@group.safe_attributes = params[:group]
respond_to do |format|
if @group.update_attributes(params[:group])
if @group.save
flash[:notice] = l(:notice_successful_update)
format.html { redirect_to(groups_path) }
format.xml { head :ok }
format.api { render_api_ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @group.errors, :status => :unprocessable_entity }
format.api { render_validation_errors(@group) }
end
end
end
# DELETE /groups/1
# DELETE /groups/1.xml
def destroy
@group = Group.find(params[:id])
@group.destroy
respond_to do |format|
format.html { redirect_to(groups_url) }
format.xml { head :ok }
format.api { render_api_ok }
end
end
def add_users
@group = Group.find(params[:id])
users = User.find_all_by_id(params[:user_ids])
@group.users << users if request.post?
@users = User.find_all_by_id(params[:user_id] || params[:user_ids])
@group.users << @users if request.post?
respond_to do |format|
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
format.js {
render(:update) {|page|
page.replace_html "tab-content-users", :partial => 'groups/users'
users.each {|user| page.visual_effect(:highlight, "user-#{user.id}") }
}
}
format.js
format.api { render_api_ok }
end
end
def remove_user
@group = Group.find(params[:id])
@group.users.delete(User.find(params[:user_id])) if request.delete?
respond_to do |format|
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
format.js { render(:update) {|page| page.replace_html "tab-content-users", :partial => 'groups/users'} }
format.js
format.api { render_api_ok }
end
end
def autocomplete_for_user
@group = Group.find(params[:id])
@users = User.active.not_in_group(@group).like(params[:q]).all(:limit => 100)
render :layout => false
end
def edit_membership
@group = Group.find(params[:id])
@membership = Member.edit_membership(params[:membership_id], params[:membership], @group)
@membership.save if request.post?
respond_to do |format|
if @membership.valid?
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
format.js {
render(:update) {|page|
page.replace_html "tab-content-memberships", :partial => 'groups/memberships'
page.visual_effect(:highlight, "member-#{@membership.id}")
}
}
else
format.js {
render(:update) {|page|
page.alert(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')))
}
}
end
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
format.js
end
end
def destroy_membership
@group = Group.find(params[:id])
Member.find(params[:membership_id]).destroy if request.post?
respond_to do |format|
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
format.js { render(:update) {|page| page.replace_html "tab-content-memberships", :partial => 'groups/memberships'} }
format.js
end
end
private
def find_group
@group = Group.find(params[:id])
rescue ActiveRecord::RecordNotFound
render_404
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -41,6 +41,11 @@ class IssueCategoriesController < ApplicationController
def new
@category = @project.issue_categories.build
@category.safe_attributes = params[:issue_category]
respond_to do |format|
format.html
format.js
end
end
def create
@@ -52,20 +57,13 @@ class IssueCategoriesController < ApplicationController
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
end
format.js do
# IE doesn't support the replace_html rjs method for select box options
render(:update) {|page| page.replace "issue_category_id",
content_tag('select', content_tag('option') + options_from_collection_for_select(@project.issue_categories, 'id', 'name', @category.id), :id => 'issue_category_id', :name => 'issue[category_id]')
}
end
format.js
format.api { render :action => 'show', :status => :created, :location => issue_category_path(@category) }
end
else
respond_to do |format|
format.html { render :action => 'new'}
format.js do
render(:update) {|page| page.alert(@category.errors.full_messages.join('\n')) }
end
format.js { render :action => 'new'}
format.api { render_validation_errors(@category) }
end
end
@@ -82,7 +80,7 @@ class IssueCategoriesController < ApplicationController
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
}
format.api { head :ok }
format.api { render_api_ok }
end
else
respond_to do |format|
@@ -102,7 +100,7 @@ class IssueCategoriesController < ApplicationController
@category.destroy(reassign_to)
respond_to do |format|
format.html { redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories' }
format.api { head :ok }
format.api { render_api_ok }
end
return
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -42,23 +42,16 @@ class IssueRelationsController < ApplicationController
def create
@relation = IssueRelation.new(params[:relation])
@relation.issue_from = @issue
if params[:relation] && m = params[:relation][:issue_to_id].to_s.match(/^#?(\d+)$/)
if params[:relation] && m = params[:relation][:issue_to_id].to_s.strip.match(/^#?(\d+)$/)
@relation.issue_to = Issue.visible.find_by_id(m[1].to_i)
end
saved = @relation.save
respond_to do |format|
format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue }
format.js do
format.js {
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
render :update do |page|
page.replace_html "relations", :partial => 'issues/relations'
if @relation.errors.empty?
page << "$('relation_delay').value = ''"
page << "$('relation_issue_to_id').value = ''"
end
end
end
}
format.api {
if saved
render :action => 'show', :status => :created, :location => relation_url(@relation)
@@ -75,8 +68,8 @@ class IssueRelationsController < ApplicationController
respond_to do |format|
format.html { redirect_to issue_path } # TODO : does this really work since @issue is always nil? What is it useful to?
format.js { render(:update) {|page| page.remove "relation-#{@relation.id}"} }
format.api { head :ok }
format.js
format.api { render_api_ok }
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -50,7 +50,6 @@ class IssuesController < ApplicationController
include SortHelper
include IssuesHelper
helper :timelog
helper :gantt
include Redmine::Export::PDF
def index
@@ -128,17 +127,7 @@ class IssuesController < ApplicationController
def new
respond_to do |format|
format.html { render :action => 'new', :layout => !request.xhr? }
format.js {
render(:update) { |page|
if params[:project_change]
page.replace_html 'all_attributes', :partial => 'form'
else
page.replace_html 'attributes', :partial => 'attributes'
end
m = User.current.allowed_to?(:log_time, @issue.project) ? 'show' : 'hide'
page << "if ($('log_time')) {Element.#{m}('log_time');}"
}
}
format.js { render :partial => 'update_form' }
end
end
@@ -150,7 +139,7 @@ class IssuesController < ApplicationController
respond_to do |format|
format.html {
render_attachment_warning_if_needed(@issue)
flash[:notice] = l(:notice_issue_successful_create, :id => "<a href='#{issue_path(@issue)}'>##{@issue.id}</a>")
flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue), :title => @issue.subject))
redirect_to(params[:continue] ? { :action => 'new', :project_id => @issue.project, :issue => {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} } :
{ :action => 'show', :id => @issue })
}
@@ -183,12 +172,7 @@ class IssuesController < ApplicationController
rescue ActiveRecord::StaleObjectError
@conflict = true
if params[:last_journal_id]
if params[:last_journal_id].present?
last_journal_id = params[:last_journal_id].to_i
@conflict_journals = @issue.journals.all(:conditions => ["#{Journal.table_name}.id > ?", last_journal_id])
else
@conflict_journals = @issue.journals.all
end
@conflict_journals = @issue.journals_after(params[:last_journal_id]).all
end
end
@@ -198,7 +182,7 @@ class IssuesController < ApplicationController
respond_to do |format|
format.html { redirect_back_or_default({:action => 'show', :id => @issue}) }
format.api { head :ok }
format.api { render_api_ok }
end
else
respond_to do |format|
@@ -225,12 +209,20 @@ class IssuesController < ApplicationController
end
target_projects ||= @projects
@available_statuses = @issues.map(&:new_statuses_allowed_to).reduce(:&)
if @copy
@available_statuses = [IssueStatus.default]
else
@available_statuses = @issues.map(&:new_statuses_allowed_to).reduce(:&)
end
@custom_fields = target_projects.map{|p|p.all_issue_custom_fields}.reduce(:&)
@assignables = target_projects.map(&:assignable_users).reduce(:&)
@trackers = target_projects.map(&:trackers).reduce(:&)
@versions = target_projects.map {|p| p.shared_versions.open}.reduce(:&)
@categories = target_projects.map {|p| p.issue_categories}.reduce(:&)
if @copy
@attachments_present = @issues.detect {|i| i.attachments.any?}.present?
@subtasks_present = @issues.detect {|i| !i.leaf?}.present?
end
@safe_attributes = @issues.map(&:safe_attribute_names).reduce(:&)
render :layout => false if request.xhr?
@@ -243,10 +235,20 @@ class IssuesController < ApplicationController
unsaved_issue_ids = []
moved_issues = []
if @copy && params[:copy_subtasks].present?
# Descendant issues will be copied with the parent task
# Don't copy them twice
@issues.reject! {|issue| @issues.detect {|other| issue.is_descendant_of?(other)}}
end
@issues.each do |issue|
issue.reload
if @copy
issue = issue.copy
issue = issue.copy({},
:attachments => params[:copy_attachments].present?,
:subtasks => params[:copy_subtasks].present?
)
end
journal = issue.init_journal(User.current, params[:notes])
issue.safe_attributes = attributes
@@ -301,7 +303,7 @@ class IssuesController < ApplicationController
end
respond_to do |format|
format.html { redirect_back_or_default(:action => 'index', :project_id => @project) }
format.api { head :ok }
format.api { render_api_ok }
end
end
@@ -348,8 +350,6 @@ private
# from the params
# TODO: Refactor, not everything in here is needed by #edit
def update_issue_from_params
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@priorities = IssuePriority.active
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
@time_entry.attributes = params[:time_entry]
@@ -371,6 +371,8 @@ private
end
end
@issue.safe_attributes = issue_attributes
@priorities = IssuePriority.active
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
true
end
@@ -383,7 +385,8 @@ private
begin
@copy_from = Issue.visible.find(params[:copy_from])
@copy_attachments = params[:copy_attachments].present? || request.get?
@issue.copy_from(@copy_from, :attachments => @copy_attachments)
@copy_subtasks = params[:copy_subtasks].present? || request.get?
@issue.copy_from(@copy_from, :attachments => @copy_attachments, :subtasks => @copy_subtasks)
rescue ActiveRecord::RecordNotFound
render_404
return
@@ -395,7 +398,7 @@ private
end
@issue.project = @project
@issue.author = User.current
@issue.author ||= User.current
# Tracker must be set before custom field values
@issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first)
if @issue.tracker.nil?
@@ -420,7 +423,16 @@ private
def parse_params_for_bulk_issue_attributes(params)
attributes = (params[:issue] || {}).reject {|k,v| v.blank?}
attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'}
attributes[:custom_field_values].reject! {|k,v| v.blank?} if attributes[:custom_field_values]
if custom = attributes[:custom_field_values]
custom.reject! {|k,v| v.blank?}
custom.keys.each do |k|
if custom[k].is_a?(Array)
custom[k] << '' if custom[k].delete('__none__')
else
custom[k] = '' if custom[k] == '__none__'
end
end
end
attributes
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -67,16 +67,8 @@ class JournalsController < ApplicationController
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;"
}
@content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> "
@content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
end
def edit

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -63,31 +63,16 @@ class MembersController < ApplicationController
end
respond_to do |format|
if members.present? && members.all? {|m| m.valid? }
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
format.js {
render(:update) {|page|
page.replace_html "tab-content-members", :partial => 'projects/settings/members'
page << 'hideOnLoad()'
members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") }
}
}
format.api {
@member = members.first
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
format.js { @members = members }
format.api {
@member = members.first
if @member.valid?
render :action => 'show', :status => :created, :location => membership_url(@member)
}
else
format.js {
render(:update) {|page|
errors = members.collect {|m|
m.errors.full_messages
}.flatten.uniq
page.alert(l(:notice_failed_to_save_members, :errors => errors.join(', ')))
}
}
format.api { render_validation_errors(members.first) }
end
else
render_validation_errors(@member)
end
}
end
end
@@ -98,16 +83,10 @@ class MembersController < ApplicationController
saved = @member.save
respond_to do |format|
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
format.js {
render(:update) {|page|
page.replace_html "tab-content-members", :partial => 'projects/settings/members'
page << 'hideOnLoad()'
page.visual_effect(:highlight, "member-#{@member.id}")
}
}
format.js
format.api {
if saved
head :ok
render_api_ok
else
render_validation_errors(@member)
end
@@ -121,14 +100,10 @@ class MembersController < ApplicationController
end
respond_to do |format|
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
format.js { render(:update) {|page|
page.replace_html "tab-content-members", :partial => 'projects/settings/members'
page << 'hideOnLoad()'
}
}
format.js
format.api {
if @member.destroyed?
head :ok
render_api_ok
else
head :unprocessable_entity
end
@@ -140,5 +115,4 @@ class MembersController < ApplicationController
@principals = Principal.active.not_member_of(@project).like(params[:q]).all(:limit => 100)
render :layout => false
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -22,6 +22,7 @@ class MessagesController < ApplicationController
before_filter :find_message, :except => [:new, :preview]
before_filter :authorize, :except => [:preview, :edit, :destroy]
helper :boards
helper :watchers
helper :attachments
include AttachmentsHelper
@@ -59,7 +60,7 @@ class MessagesController < ApplicationController
if @message.save
call_hook(:controller_messages_new_after_save, { :params => params, :message => @message})
render_attachment_warning_if_needed(@message)
redirect_to :action => 'show', :id => @message
redirect_to board_message_path(@board, @message)
end
end
end
@@ -76,7 +77,7 @@ class MessagesController < ApplicationController
attachments = Attachment.attach_files(@reply, params[:attachments])
render_attachment_warning_if_needed(@reply)
end
redirect_to :action => 'show', :id => @topic, :r => @reply
redirect_to board_message_path(@board, @topic, :r => @reply)
end
# Edit a message
@@ -88,40 +89,35 @@ class MessagesController < ApplicationController
render_attachment_warning_if_needed(@message)
flash[:notice] = l(:notice_successful_update)
@message.reload
redirect_to :action => 'show', :board_id => @message.board, :id => @message.root, :r => (@message.parent_id && @message.id)
redirect_to board_message_path(@message.board, @message.root, :r => (@message.parent_id && @message.id))
end
end
# Delete a messages
def destroy
(render_403; return false) unless @message.destroyable_by?(User.current)
r = @message.to_param
@message.destroy
redirect_to @message.parent.nil? ?
{ :controller => 'boards', :action => 'show', :project_id => @project, :id => @board } :
{ :action => 'show', :id => @message.parent, :r => @message }
if @message.parent
redirect_to board_message_path(@board, @message.parent, :r => r)
else
redirect_to project_board_path(@project, @board)
end
end
def quote
user = @message.author
text = @message.content
subject = @message.subject.gsub('"', '\"')
subject = "RE: #{subject}" unless subject.starts_with?('RE:')
content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> "
content << text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\\n> ") + "\\n\\n"
render(:update) { |page|
page << "$('message_subject').value = \"#{subject}\";"
page.<< "$('message_content').value = \"#{content}\";"
page.show 'reply'
page << "Form.Element.focus('message_content');"
page << "Element.scrollTo('reply');"
page << "$('message_content').scrollTop = $('message_content').scrollHeight - $('message_content').clientHeight;"
}
@subject = @message.subject
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
end
def preview
message = @board.messages.find_by_id(params[:id])
@attachements = message.attachments if message
@text = (params[:message] || params[:reply])[:content]
@previewed = message
render :partial => 'common/preview'
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -65,6 +65,24 @@ class MyController < ApplicationController
end
end
# Destroys user's account
def destroy
@user = User.current
unless @user.own_account_deletable?
redirect_to :action => 'account'
return
end
if request.post? && params[:confirm]
@user.destroy
if @user.destroyed?
logout_user
flash[:notice] = l(:notice_account_deleted)
end
redirect_to home_path
end
end
# Manage user's password
def password
@user = User.current
@@ -117,7 +135,11 @@ class MyController < ApplicationController
@user = User.current
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT.dup
@block_options = []
BLOCKS.each {|k, v| @block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]}
BLOCKS.each do |k, v|
unless %w(top left right).detect {|f| (@blocks[f] ||= []).include?(k)}
@block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]
end
end
end
# Add a block to user's page
@@ -134,7 +156,7 @@ class MyController < ApplicationController
layout['top'].unshift block
@user.pref[:my_page_layout] = layout
@user.pref.save
render :partial => "block", :locals => {:user => @user, :block_name => block}
redirect_to :action => 'page_layout'
end
# Remove a block to user's page
@@ -147,7 +169,7 @@ class MyController < ApplicationController
%w(top left right).each {|f| (layout[f] ||= []).delete block }
@user.pref[:my_page_layout] = layout
@user.pref.save
render :nothing => true
redirect_to :action => 'page_layout'
end
# Change blocks order on user's page
@@ -157,7 +179,8 @@ class MyController < ApplicationController
group = params[:group]
@user = User.current
if group.is_a?(String)
group_items = (params["list-#{group}"] || []).collect(&:underscore)
group_items = (params["blocks"] || []).collect(&:underscore)
group_items.each {|s| s.sub!(/^block_/, '')}
if group_items and group_items.is_a? Array
layout = @user.pref[:my_page_layout] || {}
# remove group blocks if they are presents in other groups

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -26,7 +26,8 @@ class PreviewsController < ApplicationController
if @description && @description.gsub(/(\r?\n|\n\r?)/, "\n") == @issue.description.to_s.gsub(/(\r?\n|\n\r?)/, "\n")
@description = nil
end
@notes = params[:notes]
# params[:notes] is useful for preview of notes in issue history
@notes = params[:notes] || (params[:issue] ? params[:issue][:notes] : nil)
else
@description = (params[:issue] ? params[:issue][:description] : nil)
end

View File

@@ -1,3 +1,20 @@
# Redmine - project management software
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class ProjectEnumerationsController < ApplicationController
before_filter :find_project_by_project_id
before_filter :authorize

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -48,7 +48,11 @@ class ProjectsController < ApplicationController
def index
respond_to do |format|
format.html {
@projects = Project.visible.find(:all, :order => 'lft')
scope = Project
unless params[:closed]
scope = scope.active
end
@projects = scope.visible.order('lft').all
}
format.api {
@offset, @limit = api_offset_and_limit
@@ -65,14 +69,14 @@ class ProjectsController < ApplicationController
def new
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
@trackers = Tracker.all
@trackers = Tracker.sorted.all
@project = Project.new
@project.safe_attributes = params[:project]
end
def create
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
@trackers = Tracker.all
@trackers = Tracker.sorted.all
@project = Project.new
@project.safe_attributes = params[:project]
@@ -105,7 +109,7 @@ class ProjectsController < ApplicationController
def copy
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
@trackers = Tracker.all
@trackers = Tracker.sorted.all
@root_projects = Project.find(:all,
:conditions => "parent_id IS NULL AND status = #{Project::STATUS_ACTIVE}",
:order => 'name')
@@ -152,12 +156,8 @@ class ProjectsController < ApplicationController
cond = @project.project_condition(Setting.display_subprojects_issues?)
@open_issues_by_tracker = Issue.visible.count(:group => :tracker,
:include => [:project, :status, :tracker],
:conditions => ["(#{cond}) AND #{IssueStatus.table_name}.is_closed=?", false])
@total_issues_by_tracker = Issue.visible.count(:group => :tracker,
:include => [:project, :status, :tracker],
:conditions => cond)
@open_issues_by_tracker = Issue.visible.open.where(cond).count(:group => :tracker)
@total_issues_by_tracker = Issue.visible.where(cond).count(:group => :tracker)
if User.current.allowed_to?(:view_time_entries, @project)
@total_hours = TimeEntry.visible.sum(:hours, :include => :project, :conditions => cond).to_f
@@ -175,7 +175,7 @@ class ProjectsController < ApplicationController
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
@issue_category ||= IssueCategory.new
@member ||= @project.members.new
@trackers = Tracker.all
@trackers = Tracker.sorted.all
@wiki ||= @project.wiki
end
@@ -191,7 +191,7 @@ class ProjectsController < ApplicationController
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'settings', :id => @project
}
format.api { head :ok }
format.api { render_api_ok }
end
else
respond_to do |format|
@@ -224,6 +224,16 @@ class ProjectsController < ApplicationController
redirect_to(url_for(:controller => 'admin', :action => 'projects', :status => params[:status]))
end
def close
@project.close
redirect_to project_path(@project)
end
def reopen
@project.reopen
redirect_to project_path(@project)
end
# Delete @project
def destroy
@project_to_destroy = @project
@@ -231,7 +241,7 @@ class ProjectsController < ApplicationController
@project_to_destroy.destroy
respond_to do |format|
format.html { redirect_to :controller => 'admin', :action => 'projects' }
format.api { head :ok }
format.api { render_api_ok }
end
end
# hide project in layout

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -22,7 +22,7 @@ class ReportsController < ApplicationController
def issue_report
@trackers = @project.trackers
@versions = @project.shared_versions.sort
@priorities = IssuePriority.all
@priorities = IssuePriority.all.reverse
@categories = @project.issue_categories
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
@authors = @project.users.sort
@@ -53,7 +53,7 @@ class ReportsController < ApplicationController
@report_title = l(:field_version)
when "priority"
@field = "priority_id"
@rows = IssuePriority.all
@rows = IssuePriority.all.reverse
@data = Issue.by_priority(@project)
@report_title = l(:field_priority)
when "category"

View File

@@ -18,6 +18,7 @@
require 'SVG/Graph/Bar'
require 'SVG/Graph/BarHorizontal'
require 'digest/sha1'
require 'redmine/scm/adapters/abstract_adapter'
class ChangesetNotFound < Exception; end
class InvalidRevisionParam < Exception; end
@@ -41,11 +42,15 @@ class RepositoriesController < ApplicationController
@repository = Repository.factory(scm)
@repository.is_default = @project.repository.nil?
@repository.project = @project
render :layout => !request.xhr?
end
def create
@repository = Repository.factory(params[:repository_scm], params[:repository])
attrs = pickup_extra_info
@repository = Repository.factory(params[:repository_scm])
@repository.safe_attributes = params[:repository]
if attrs[:attrs_extra].keys.any?
@repository.merge_extra_info(attrs[:attrs_extra])
end
@repository.project = @project
if request.post? && @repository.save
redirect_to settings_project_path(@project, :tab => 'repositories')
@@ -58,7 +63,11 @@ class RepositoriesController < ApplicationController
end
def update
@repository.attributes = params[:repository]
attrs = pickup_extra_info
@repository.safe_attributes = attrs[:attrs]
if attrs[:attrs_extra].keys.any?
@repository.merge_extra_info(attrs[:attrs_extra])
end
@repository.project = @project
if request.put? && @repository.save
redirect_to settings_project_path(@project, :tab => 'repositories')
@@ -67,6 +76,20 @@ class RepositoriesController < ApplicationController
end
end
def pickup_extra_info
p = {}
p_extra = {}
params[:repository].each do |k, v|
if k =~ /^extra_/
p_extra[k] = v
else
p[k] = v
end
end
{:attrs => p, :attrs_extra => p_extra}
end
private :pickup_extra_info
def committers
@committers = @repository.committers
@users = @project.users
@@ -129,7 +152,15 @@ class RepositoriesController < ApplicationController
end
end
def raw
entry_and_raw(true)
end
def entry
entry_and_raw(false)
end
def entry_and_raw(is_raw)
@entry = @repository.entry(@path, @rev)
(show_error_not_found; return) unless @entry
@@ -138,13 +169,14 @@ class RepositoriesController < ApplicationController
@content = @repository.cat(@path, @rev)
(show_error_not_found; return) unless @content
if 'raw' == params[:format] ||
if is_raw ||
(@content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte) ||
! is_entry_text_data?(@content, @path)
# Force the download
send_opt = { :filename => filename_for_content_disposition(@path.split('/').last) }
send_type = Redmine::MimeType.of(@path)
send_opt[:type] = send_type.to_s if send_type
send_opt[:disposition] = (Redmine::MimeType.is_type?('image', @path) && !is_raw ? 'inline' : 'attachment')
send_data @content, send_opt
else
# Prevent empty lines when displaying a file with Windows style eol
@@ -154,6 +186,7 @@ class RepositoriesController < ApplicationController
@changeset = @repository.find_changeset_by_name(@rev)
end
end
private :entry_and_raw
def is_entry_text_data?(ent, path)
# UTF-16 contains "\x00".
@@ -202,22 +235,6 @@ class RepositoriesController < ApplicationController
if @issue
@changeset.issues << @issue
respond_to do |format|
format.js {
render :update do |page|
page.replace_html "related-issues", :partial => "related_issues"
page.visual_effect :highlight, "related-issue-#{@issue.id}"
end
}
end
else
respond_to do |format|
format.js {
render :update do |page|
page.alert(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid'))
end
}
end
end
end
@@ -228,14 +245,6 @@ class RepositoriesController < ApplicationController
if @issue
@changeset.issues.delete(@issue)
end
respond_to do |format|
format.js {
render :update do |page|
page.remove "related-issue-#{@issue.id}"
end if @issue
}
end
end
def diff
@@ -307,8 +316,7 @@ class RepositoriesController < ApplicationController
@repository = @project.repository
end
(render_404; return false) unless @repository
@path = params[:path].join('/') unless params[:path].nil?
@path ||= ''
@path = params[:path].is_a?(Array) ? params[:path].join('/') : params[:path].to_s
@rev = params[:rev].blank? ? @repository.default_branch : params[:rev].to_s.strip
@rev_to = params[:rev_to]
@@ -343,17 +351,17 @@ class RepositoriesController < ApplicationController
@date_to = Date.today
@date_from = @date_to << 11
@date_from = Date.civil(@date_from.year, @date_from.month, 1)
commits_by_day = repository.changesets.count(
commits_by_day = Changeset.count(
:all, :group => :commit_date,
:conditions => ["commit_date BETWEEN ? AND ?", @date_from, @date_to])
:conditions => ["repository_id = ? AND commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
commits_by_month = [0] * 12
commits_by_day.each {|c| commits_by_month[c.first.to_date.months_ago] += c.last }
commits_by_day.each {|c| commits_by_month[(@date_to.month - c.first.to_date.month) % 12] += c.last }
changes_by_day = repository.changes.count(
:all, :group => :commit_date,
:conditions => ["commit_date BETWEEN ? AND ?", @date_from, @date_to])
changes_by_day = Change.count(
:all, :group => :commit_date, :include => :changeset,
:conditions => ["#{Changeset.table_name}.repository_id = ? AND #{Changeset.table_name}.commit_date BETWEEN ? AND ?", repository.id, @date_from, @date_to])
changes_by_month = [0] * 12
changes_by_day.each {|c| changes_by_month[c.first.to_date.months_ago] += c.last }
changes_by_day.each {|c| changes_by_month[(@date_to.month - c.first.to_date.month) % 12] += c.last }
fields = []
12.times {|m| fields << month_name(((Date.today.month - 1 - m) % 12) + 1)}
@@ -384,10 +392,10 @@ class RepositoriesController < ApplicationController
end
def graph_commits_per_author(repository)
commits_by_author = repository.changesets.count(:all, :group => :committer)
commits_by_author = Changeset.count(:all, :group => :committer, :conditions => ["repository_id = ?", repository.id])
commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}
changes_by_author = repository.changes.count(:all, :group => :committer)
changes_by_author = Change.count(:all, :group => :committer, :include => :changeset, :conditions => ["#{Changeset.table_name}.repository_id = ?", repository.id])
h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o}
fields = commits_by_author.collect {|r| r.first}
@@ -423,4 +431,3 @@ class RepositoriesController < ApplicationController
graph.burn
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -36,8 +36,11 @@ class RolesController < ApplicationController
end
def new
# Prefills the form with 'Non member' role permissions
# Prefills the form with 'Non member' role permissions by default
@role = Role.new(params[:role] || {:permissions => Role.non_member.permissions})
if params[:copy].present? && @copy_from = Role.find_by_id(params[:copy])
@role.copy_from(@copy_from)
end
@roles = Role.sorted.all
end
@@ -46,7 +49,7 @@ class RolesController < ApplicationController
if request.post? && @role.save
# workflow copy
if !params[:copy_workflow_from].blank? && (copy_from = Role.find_by_id(params[:copy_workflow_from]))
@role.workflows.copy(copy_from)
@role.workflow_rules.copy(copy_from)
end
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'index'

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,12 +18,13 @@
class TimelogController < ApplicationController
menu_item :issues
before_filter :find_project, :only => [:create]
before_filter :find_project_for_new_time_entry, :only => [:create]
before_filter :find_time_entry, :only => [:show, :edit, :update]
before_filter :find_time_entries, :only => [:bulk_edit, :bulk_update, :destroy]
before_filter :authorize, :except => [:new, :index, :report]
before_filter :find_optional_project, :only => [:new, :index, :report]
before_filter :find_optional_project, :only => [:index, :report]
before_filter :find_optional_project_for_new_time_entry, :only => [:new]
before_filter :authorize_global, :only => [:new, :index, :report]
accept_rss_auth :index
@@ -38,7 +39,7 @@ class TimelogController < ApplicationController
def index
sort_init 'spent_on', 'desc'
sort_update 'spent_on' => 'spent_on',
sort_update 'spent_on' => ['spent_on', "#{TimeEntry.table_name}.created_on"],
'user' => 'user_id',
'activity' => 'activity_id',
'project' => "#{Project.table_name}.name",
@@ -133,9 +134,13 @@ class TimelogController < ApplicationController
flash[:notice] = l(:notice_successful_create)
if params[:continue]
if params[:project_id]
redirect_to :action => 'new', :project_id => @time_entry.project, :issue_id => @time_entry.issue, :back_url => params[:back_url]
redirect_to :action => 'new', :project_id => @time_entry.project, :issue_id => @time_entry.issue,
:time_entry => {:issue_id => @time_entry.issue_id, :activity_id => @time_entry.activity_id},
:back_url => params[:back_url]
else
redirect_to :action => 'new', :back_url => params[:back_url]
redirect_to :action => 'new',
:time_entry => {:project_id => @time_entry.project_id, :issue_id => @time_entry.issue_id, :activity_id => @time_entry.activity_id},
:back_url => params[:back_url]
end
else
redirect_back_or_default :action => 'index', :project_id => @time_entry.project
@@ -166,7 +171,7 @@ class TimelogController < ApplicationController
flash[:notice] = l(:notice_successful_update)
redirect_back_or_default :action => 'index', :project_id => @time_entry.project
}
format.api { head :ok }
format.api { render_api_ok }
end
else
respond_to do |format|
@@ -218,7 +223,7 @@ class TimelogController < ApplicationController
}
format.api {
if destroyed
head :ok
render_api_ok
else
render_validation_errors(@time_entries)
end
@@ -258,7 +263,7 @@ private
end
end
def find_project
def find_optional_project_for_new_time_entry
if (project_id = (params[:project_id] || params[:time_entry] && params[:time_entry][:project_id])).present?
@project = Project.find(project_id)
end
@@ -266,14 +271,17 @@ private
@issue = Issue.find(issue_id)
@project ||= @issue.project
end
if @project.nil?
render_404
return false
end
rescue ActiveRecord::RecordNotFound
render_404
end
def find_project_for_new_time_entry
find_optional_project_for_new_time_entry
if @project.nil?
render_404
end
end
def find_optional_project
if !params[:issue_id].blank?
@issue = Issue.find(params[:issue_id])

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -29,7 +29,7 @@ class TrackersController < ApplicationController
render :action => "index", :layout => false if request.xhr?
}
format.api {
@trackers = Tracker.all
@trackers = Tracker.sorted.all
}
end
end
@@ -45,7 +45,7 @@ class TrackersController < ApplicationController
if request.post? and @tracker.save
# workflow copy
if !params[:copy_workflow_from].blank? && (copy_from = Tracker.find_by_id(params[:copy_workflow_from]))
@tracker.workflows.copy(copy_from)
@tracker.workflow_rules.copy(copy_from)
end
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'index'
@@ -80,4 +80,22 @@ class TrackersController < ApplicationController
end
redirect_to :action => 'index'
end
def fields
if request.post? && params[:trackers]
params[:trackers].each do |tracker_id, tracker_params|
tracker = Tracker.find_by_id(tracker_id)
if tracker
tracker.core_fields = tracker_params[:core_fields]
tracker.custom_field_ids = tracker_params[:custom_field_ids]
tracker.save
end
end
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'fields'
return
end
@trackers = Tracker.sorted.all
@custom_fields = IssueCustomField.all.sort
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -99,11 +99,11 @@ class UsersController < ApplicationController
@user.pref.save
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
Mailer.deliver_account_information(@user, params[:user][:password]) if params[:send_information]
Mailer.account_information(@user, params[:user][:password]).deliver if params[:send_information]
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_create)
flash[:notice] = l(:notice_user_successful_create, :id => view_context.link_to(@user.login, user_path(@user)))
redirect_to(params[:continue] ?
{:controller => 'users', :action => 'new'} :
{:controller => 'users', :action => 'edit', :id => @user}
@@ -146,17 +146,17 @@ class UsersController < ApplicationController
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
if was_activated
Mailer.deliver_account_activated(@user)
Mailer.account_activated(@user).deliver
elsif @user.active? && params[:send_information] && !params[:user][:password].blank? && @user.auth_source_id.nil?
Mailer.deliver_account_information(@user, params[:user][:password])
Mailer.account_information(@user, params[:user][:password]).deliver
end
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_update)
redirect_to :back
redirect_to_referer_or edit_user_path(@user)
}
format.api { head :ok }
format.api { render_api_ok }
end
else
@auth_sources = AuthSource.find(:all)
@@ -169,15 +169,13 @@ class UsersController < ApplicationController
format.api { render_validation_errors(@user) }
end
end
rescue ::ActionController::RedirectBackError
redirect_to :controller => 'users', :action => 'edit', :id => @user
end
def destroy
@user.destroy
respond_to do |format|
format.html { redirect_to(users_url) }
format.api { head :ok }
format.html { redirect_back_or_default(users_url) }
format.api { render_api_ok }
end
end
@@ -185,21 +183,8 @@ class UsersController < ApplicationController
@membership = Member.edit_membership(params[:membership_id], params[:membership], @user)
@membership.save
respond_to do |format|
if @membership.valid?
format.html { redirect_to :controller => 'users', :action => 'edit', :id => @user, :tab => 'memberships' }
format.js {
render(:update) {|page|
page.replace_html "tab-content-memberships", :partial => 'users/memberships'
page.visual_effect(:highlight, "member-#{@membership.id}")
}
}
else
format.js {
render(:update) {|page|
page.alert(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')))
}
}
end
format.html { redirect_to :controller => 'users', :action => 'edit', :id => @user, :tab => 'memberships' }
format.js
end
end
@@ -210,7 +195,7 @@ class UsersController < ApplicationController
end
respond_to do |format|
format.html { redirect_to :controller => 'users', :action => 'edit', :id => @user, :tab => 'memberships' }
format.js { render(:update) {|page| page.replace_html "tab-content-memberships", :partial => 'users/memberships'} }
format.js
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -78,13 +78,7 @@ class VersionsController < ApplicationController
respond_to do |format|
format.html
format.js do
render :update do |page|
page.replace_html 'ajax-modal', :partial => 'versions/new_modal'
page << "showModal('ajax-modal', '600px');"
page << "Form.Element.focus('version_name');"
end
end
format.js
end
end
@@ -103,14 +97,7 @@ class VersionsController < ApplicationController
flash[:notice] = l(:notice_successful_create)
redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
end
format.js do
render(:update) {|page|
page << 'hideModal();'
# IE doesn't support the replace_html rjs method for select box options
page.replace "issue_fixed_version_id",
content_tag('select', content_tag('option') + version_options_for_select(@project.shared_versions.open, @version), :id => 'issue_fixed_version_id', :name => 'issue[fixed_version_id]')
}
end
format.js
format.api do
render :action => 'show', :status => :created, :location => version_url(@version)
end
@@ -118,12 +105,7 @@ class VersionsController < ApplicationController
else
respond_to do |format|
format.html { render :action => 'new' }
format.js do
render :update do |page|
page.replace_html 'ajax-modal', :partial => 'versions/new_modal'
page << "Form.Element.focus('version_name');"
end
end
format.js { render :action => 'new' }
format.api { render_validation_errors(@version) }
end
end
@@ -144,7 +126,7 @@ class VersionsController < ApplicationController
flash[:notice] = l(:notice_successful_update)
redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
}
format.api { head :ok }
format.api { render_api_ok }
end
else
respond_to do |format|
@@ -167,7 +149,7 @@ class VersionsController < ApplicationController
@version.destroy
respond_to do |format|
format.html { redirect_back_or_default :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project }
format.api { head :ok }
format.api { render_api_ok }
end
else
respond_to do |format|
@@ -183,7 +165,7 @@ class VersionsController < ApplicationController
def status_by
respond_to do |format|
format.html { render :action => 'show' }
format.js { render(:update) {|page| page.replace_html 'status_by', render_issue_status_by(@version, params[:status_by])} }
format.js
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -33,15 +33,6 @@ class WatchersController < ApplicationController
end
def new
respond_to do |format|
format.js do
render :update do |page|
page.replace_html 'ajax-modal', :partial => 'watchers/new', :locals => {:watched => @watched}
page << "showModal('ajax-modal', '400px');"
page << "$('ajax-modal').addClassName('new-watcher');"
end
end
end
end
def create
@@ -52,34 +43,15 @@ class WatchersController < ApplicationController
end
end
respond_to do |format|
format.html { redirect_to :back }
format.js do
render :update do |page|
page.replace_html 'ajax-modal', :partial => 'watchers/new', :locals => {:watched => @watched}
page.replace_html 'watchers', :partial => 'watchers/watchers', :locals => {:watched => @watched}
end
end
format.html { redirect_to_referer_or {render :text => 'Watcher added.', :layout => true}}
format.js
end
rescue ::ActionController::RedirectBackError
render :text => 'Watcher added.', :layout => true
end
def append
if params[:watcher].is_a?(Hash)
user_ids = params[:watcher][:user_ids] || [params[:watcher][:user_id]]
users = User.active.find_all_by_id(user_ids)
respond_to do |format|
format.js do
render :update do |page|
users.each do |user|
page.select("#issue_watcher_user_ids_#{user.id}").each do |item|
page.remove item
end
end
page.insert_html :bottom, 'watchers_inputs', :text => watchers_checkboxes(nil, users, true)
end
end
end
@users = User.active.find_all_by_id(user_ids)
end
end
@@ -87,11 +59,7 @@ class WatchersController < ApplicationController
@watched.set_watcher(User.find(params[:user_id]), false) if request.post?
respond_to do |format|
format.html { redirect_to :back }
format.js do
render :update do |page|
page.replace_html 'watchers', :partial => 'watchers/watchers', :locals => {:watched => @watched}
end
end
format.js
end
end
@@ -111,7 +79,7 @@ private
@watched = klass.find(params[:object_id])
@project = @watched.project
elsif params[:project_id]
@project = Project.visible.find(params[:project_id])
@project = Project.visible.find_by_param(params[:project_id])
end
rescue
render_404
@@ -120,17 +88,8 @@ private
def set_watcher(user, watching)
@watched.set_watcher(user, watching)
respond_to do |format|
format.html { redirect_to :back }
format.js do
render(:update) do |page|
c = watcher_css(@watched)
page.select(".#{c}").each do |item|
page.replace_html item, watcher_link(@watched, user)
end
end
end
format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => user, :watched => @watched} }
end
rescue ::ActionController::RedirectBackError
render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -109,7 +109,7 @@ class WikiController < ApplicationController
# To prevent StaleObjectError exception when reverting to a previous version
@content.version = @page.content.version
@text = @content.text
if params[:section].present? && Redmine::WikiFormatting.supports_section_edit?
@section = params[:section].to_i
@@ -163,6 +163,8 @@ class WikiController < ApplicationController
# Optimistic locking exception
flash.now[:error] = l(:notice_locking_conflict)
render :action => 'edit'
rescue ActiveRecord::RecordNotSaved
render :action => 'edit'
end
# rename a page
@@ -237,7 +239,7 @@ class WikiController < ApplicationController
# Export wiki to a single pdf or html file
def export
@pages = @wiki.pages.all(:order => 'title', :include => [:content, :attachments], :limit => 75)
@pages = @wiki.pages.all(:order => 'title', :include => [:content, :attachments])
respond_to do |format|
format.html {
export = render_to_string :action => 'export_multiple', :layout => false

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -24,7 +24,6 @@ class WikisController < ApplicationController
@wiki = @project.wiki || Wiki.new(:project => @project)
@wiki.safe_attributes = params[:wiki]
@wiki.save if request.post?
render(:update) {|page| page.replace_html "tab-content-wiki", :partial => 'projects/settings/wiki'}
end
# Delete a project's wiki

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,30 +18,27 @@
class WorkflowsController < ApplicationController
layout 'admin'
before_filter :require_admin
before_filter :find_roles
before_filter :find_trackers
before_filter :require_admin, :find_roles, :find_trackers
def index
@workflow_counts = Workflow.count_by_tracker_and_role
@workflow_counts = WorkflowTransition.count_by_tracker_and_role
end
def edit
@role = Role.find_by_id(params[:role_id])
@tracker = Tracker.find_by_id(params[:tracker_id])
@role = Role.find_by_id(params[:role_id]) if params[:role_id]
@tracker = Tracker.find_by_id(params[:tracker_id]) if params[:tracker_id]
if request.post?
Workflow.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id])
WorkflowTransition.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id])
(params[:issue_status] || []).each { |status_id, transitions|
transitions.each { |new_status_id, options|
author = options.is_a?(Array) && options.include?('author') && !options.include?('always')
assignee = options.is_a?(Array) && options.include?('assignee') && !options.include?('always')
@role.workflows.build(:tracker_id => @tracker.id, :old_status_id => status_id, :new_status_id => new_status_id, :author => author, :assignee => assignee)
WorkflowTransition.create(:role_id => @role.id, :tracker_id => @tracker.id, :old_status_id => status_id, :new_status_id => new_status_id, :author => author, :assignee => assignee)
}
}
if @role.save
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker
redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only]
return
end
end
@@ -50,10 +47,10 @@ class WorkflowsController < ApplicationController
if @tracker && @used_statuses_only && @tracker.issue_statuses.any?
@statuses = @tracker.issue_statuses
end
@statuses ||= IssueStatus.find(:all, :order => 'position')
@statuses ||= IssueStatus.sorted.all
if @tracker && @role && @statuses.any?
workflows = Workflow.all(:conditions => {:role_id => @role.id, :tracker_id => @tracker.id})
workflows = WorkflowTransition.where(:role_id => @role.id, :tracker_id => @tracker.id).all
@workflows = {}
@workflows['always'] = workflows.select {|w| !w.author && !w.assignee}
@workflows['author'] = workflows.select {|w| w.author}
@@ -61,6 +58,35 @@ class WorkflowsController < ApplicationController
end
end
def permissions
@role = Role.find_by_id(params[:role_id]) if params[:role_id]
@tracker = Tracker.find_by_id(params[:tracker_id]) if params[:tracker_id]
if request.post? && @role && @tracker
WorkflowPermission.replace_permissions(@tracker, @role, params[:permissions] || {})
redirect_to :action => 'permissions', :role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only]
return
end
@used_statuses_only = (params[:used_statuses_only] == '0' ? false : true)
if @tracker && @used_statuses_only && @tracker.issue_statuses.any?
@statuses = @tracker.issue_statuses
end
@statuses ||= IssueStatus.sorted.all
if @role && @tracker
@fields = (Tracker::CORE_FIELDS_ALL - @tracker.disabled_core_fields).map {|field| [field, l("field_"+field.sub(/_id$/, ''))]}
@custom_fields = @tracker.custom_fields
@permissions = WorkflowPermission.where(:tracker_id => @tracker.id, :role_id => @role.id).all.inject({}) do |h, w|
h[w.old_status_id] ||= {}
h[w.old_status_id][w.field_name] = w.rule
h
end
@statuses.each {|status| @permissions[status.id] ||= {}}
end
end
def copy
if params[:source_tracker_id].blank? || params[:source_tracker_id] == 'any'
@@ -83,7 +109,7 @@ class WorkflowsController < ApplicationController
elsif @target_trackers.nil? || @target_roles.nil?
flash.now[:error] = l(:error_workflow_copy_target)
else
Workflow.copy(@source_tracker, @source_role, @target_trackers, @target_roles)
WorkflowRule.copy(@source_tracker, @source_role, @target_trackers, @target_roles)
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'copy', :source_tracker_id => @source_tracker, :source_role_id => @source_role
end
@@ -93,10 +119,10 @@ class WorkflowsController < ApplicationController
private
def find_roles
@roles = Role.find(:all, :order => 'builtin, position')
@roles = Role.sorted.all
end
def find_trackers
@trackers = Tracker.find(:all, :order => 'position')
@trackers = Tracker.sorted.all
end
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -20,6 +20,8 @@
module AdminHelper
def project_status_options_for_select(selected)
options_for_select([[l(:label_all), ''],
[l(:status_active), '1']], selected.to_s)
[l(:project_status_active), '1'],
[l(:project_status_closed), '5'],
[l(:project_status_archived), '9']], selected.to_s)
end
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -43,12 +43,6 @@ module ApplicationHelper
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller] || params[:controller], options[:action])
end
# Display a link to remote if user is authorized
def link_to_remote_if_authorized(name, options = {}, html_options = nil)
url = options[:url] || {}
link_to_remote(name, options, html_options) if authorize_for(url[:controller] || params[:controller], url[:action])
end
# Displays a link to user's account page if active
def link_to_user(user, options={})
if user.is_a?(User)
@@ -128,7 +122,7 @@ module ApplicationHelper
h(truncate(message.subject, :length => 60)),
{ :controller => 'messages', :action => 'show',
:board_id => message.board_id,
:id => message.root,
:id => (message.parent_id || message.id),
:r => (message.parent_id && message.id),
:anchor => (message.parent_id ? "message-#{message.id}" : nil)
}.merge(options),
@@ -145,17 +139,23 @@ module ApplicationHelper
# link_to_project(project, {}, :class => "project") # => html options with default url (project overview)
#
def link_to_project(project, options={}, html_options = nil)
if project.active?
if project.archived?
h(project)
else
url = {:controller => 'projects', :action => 'show', :id => project}.merge(options)
link_to(h(project), url, html_options)
else
h(project)
end
end
def thumbnail_tag(attachment)
link_to image_tag(url_for(:controller => 'attachments', :action => 'thumbnail', :id => attachment)),
{:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename},
:title => attachment.filename
end
def toggle_link(name, id, options={})
onclick = "Element.toggle('#{id}'); "
onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
onclick = "$('##{id}').toggle(); "
onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ")
onclick << "return false;"
link_to(name, "#", :onclick => onclick)
end
@@ -168,17 +168,12 @@ module ApplicationHelper
}))
end
def prompt_to_remote(name, text, param, url, html_options = {})
html_options[:onclick] = "promptToRemote('#{text}', '#{param}', '#{url_for(url)}'); return false;"
link_to name, {}, html_options
end
def format_activity_title(text)
h(truncate_single_line(text, :length => 100))
end
def format_activity_day(date)
date == Date.today ? l(:label_today).titleize : format_date(date)
date == User.current.today ? l(:label_today).titleize : format_date(date)
end
def format_activity_description(text)
@@ -200,6 +195,39 @@ module ApplicationHelper
end
end
# Renders a tree of projects as a nested set of unordered lists
# The given collection may be a subset of the whole project tree
# (eg. some intermediate nodes are private and can not be seen)
def render_project_nested_lists(projects)
s = ''
if projects.any?
ancestors = []
original_project = @project
projects.sort_by(&:lft).each do |project|
# set the project environment to please macros.
@project = project
if (ancestors.empty? || project.is_descendant_of?(ancestors.last))
s << "<ul class='projects #{ ancestors.empty? ? 'root' : nil}'>\n"
else
ancestors.pop
s << "</li>"
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
ancestors.pop
s << "</ul></li>\n"
end
end
classes = (ancestors.empty? ? 'root' : 'child')
s << "<li class='#{classes}'><div class='#{classes}'>"
s << h(block_given? ? yield(project) : project.name)
s << "</div>\n"
ancestors << project
end
s << ("</li></ul>\n" * ancestors.size)
@project = original_project
end
s.html_safe
end
def render_page_hierarchy(pages, node=nil, options={})
content = ''
if pages[node]
@@ -220,7 +248,7 @@ module ApplicationHelper
def render_flash_messages
s = ''
flash.each do |k,v|
s << (content_tag('div', v.html_safe, :class => "flash #{k}"))
s << content_tag('div', v.html_safe, :class => "flash #{k}", :id => "flash_#{k}")
end
s.html_safe
end
@@ -237,23 +265,24 @@ module ApplicationHelper
# Renders the project quick-jump box
def render_project_jump_box
return unless User.current.logged?
projects = User.current.memberships.collect(&:project).compact.uniq
projects = User.current.memberships.collect(&:project).compact.select(&:active?).uniq
if projects.any?
s = '<select onchange="if (this.value != \'\') { window.location = this.value; }">' +
"<option value=''>#{ l(:label_jump_to_a_project) }</option>" +
'<option value="" disabled="disabled">---</option>'
s << project_tree_options_for_select(projects, :selected => @project) do |p|
{ :value => url_for(:controller => 'projects', :action => 'show', :id => p, :jump => current_menu_item) }
options =
("<option value=''>#{ l(:label_jump_to_a_project) }</option>" +
'<option value="" disabled="disabled">---</option>').html_safe
options << project_tree_options_for_select(projects, :selected => @project) do |p|
{ :value => project_path(:id => p, :jump => current_menu_item) }
end
s << '</select>'
s.html_safe
select_tag('project_quick_jump_box', options, :onchange => 'if (this.value != \'\') { window.location = this.value; }')
end
end
def project_tree_options_for_select(projects, options = {})
s = ''
project_tree(projects) do |project, level|
name_prefix = (level > 0 ? ('&nbsp;' * 2 * level + '&#187; ').html_safe : '')
name_prefix = (level > 0 ? '&nbsp;' * 2 * level + '&#187; ' : '').html_safe
tag_options = {:value => project.id}
if project == options[:selected] || (options[:selected].respond_to?(:include?) && options[:selected].include?(project))
tag_options[:selected] = 'selected'
@@ -273,30 +302,6 @@ module ApplicationHelper
Project.project_tree(projects, &block)
end
def project_nested_ul(projects, &block)
s = ''
if projects.any?
ancestors = []
projects.sort_by(&:lft).each do |project|
if (ancestors.empty? || project.is_descendant_of?(ancestors.last))
s << "<ul>\n"
else
ancestors.pop
s << "</li>"
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
ancestors.pop
s << "</ul></li>\n"
end
end
s << "<li>"
s << yield(project).to_s
ancestors << project
end
s << ("</li></ul>\n" * ancestors.size)
end
s.html_safe
end
def principals_check_box_tags(name, principals)
s = ''
principals.sort.each do |principal|
@@ -309,7 +314,7 @@ module ApplicationHelper
def principals_options_for_select(collection, selected=nil)
s = ''
if collection.include?(User.current)
s << content_tag('option', "<< #{l(:label_me)} >>".html_safe, :value => User.current.id)
s << content_tag('option', "<< #{l(:label_me)} >>", :value => User.current.id)
end
groups = ''
collection.sort.each do |element|
@@ -319,7 +324,7 @@ module ApplicationHelper
unless groups.empty?
s << %(<optgroup label="#{h(l(:label_group_plural))}">#{groups}</optgroup>)
end
s
s.html_safe
end
# Truncates and returns the string as a single line
@@ -352,7 +357,7 @@ module ApplicationHelper
def time_tag(time)
text = distance_of_time_in_words(Time.now, time)
if @project
link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => time.to_date}, :title => format_time(time))
link_to(text, {:controller => 'activities', :action => 'index', :id => @project, :from => User.current.time_to_date(time)}, :title => format_time(time))
else
content_tag('acronym', text, :title => format_time(time))
end
@@ -369,7 +374,8 @@ module ApplicationHelper
end
def to_path_param(path)
path.to_s.split(%r{[/\\]}).select {|p| !p.blank?}
str = path.to_s.split(%r{[/\\]}).select{|p| !p.blank?}.join("/")
str.blank? ? nil : str
end
def pagination_links_full(paginator, count=nil, options={})
@@ -398,7 +404,7 @@ module ApplicationHelper
unless count.nil?
html << " (#{paginator.current.first_item}-#{paginator.current.last_item}/#{count})"
if per_page_links != false && links = per_page_links(paginator.items_per_page)
if per_page_links != false && links = per_page_links(paginator.items_per_page, count)
html << " | #{links}"
end
end
@@ -406,11 +412,23 @@ module ApplicationHelper
html.html_safe
end
def per_page_links(selected=nil)
links = Setting.per_page_options_array.collect do |n|
def per_page_links(selected=nil, item_count=nil)
values = Setting.per_page_options_array
if item_count && values.any?
if item_count > values.first
max = values.detect {|value| value >= item_count} || item_count
else
max = item_count
end
values = values.select {|value| value <= max || value == selected}
end
if values.empty? || (values.size == 1 && values.first == selected)
return nil
end
links = values.collect do |n|
n == selected ? n : link_to_content_update(n, params.merge(:per_page => n))
end
links.size > 1 ? l(:label_display_per_page, links.join(', ')) : nil
l(:label_display_per_page, links.join(', '))
end
def reorder_links(name, url, method = :post)
@@ -509,6 +527,8 @@ module ApplicationHelper
project = options[:project] || @project || (obj && obj.respond_to?(:project) ? obj.project : nil)
only_path = options.delete(:only_path) == false ? false : true
text = text.dup
macros = catch_macros(text)
text = Redmine::WikiFormatting.to_html(Setting.text_formatting, text, :object => obj, :attribute => attr)
@parsed_headings = []
@@ -516,8 +536,8 @@ module ApplicationHelper
@current_section = 0 if options[:edit_section_links]
parse_sections(text, project, obj, attr, only_path, options)
text = parse_non_pre_blocks(text) do |text|
[:parse_inline_attachments, :parse_wiki_links, :parse_redmine_links, :parse_macros].each do |method_name|
text = parse_non_pre_blocks(text, obj, macros) do |text|
[:parse_inline_attachments, :parse_wiki_links, :parse_redmine_links].each do |method_name|
send method_name, text, project, obj, attr, only_path, options
end
end
@@ -530,7 +550,7 @@ module ApplicationHelper
text.html_safe
end
def parse_non_pre_blocks(text)
def parse_non_pre_blocks(text, obj, macros)
s = StringScanner.new(text)
tags = []
parsed = ''
@@ -539,6 +559,9 @@ module ApplicationHelper
text, full_tag, closing, tag = s[1], s[2], s[3], s[4]
if tags.empty?
yield text
inject_macros(text, obj, macros) if macros.any?
else
inject_macros(text, obj, macros, false) if macros.any?
end
parsed << text
if tag
@@ -694,7 +717,7 @@ module ApplicationHelper
oid = identifier.to_i
case prefix
when nil
if issue = Issue.visible.find_by_id(oid, :include => :status)
if oid.to_s == identifier && issue = Issue.visible.find_by_id(oid, :include => :status)
anchor = comment_id ? "note-#{comment_id}" : nil
link = link_to("##{oid}", {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor},
:class => issue.css_classes,
@@ -772,11 +795,10 @@ module ApplicationHelper
if repository && User.current.allowed_to?(:browse_repository, project)
name =~ %r{^[/\\]*(.*?)(@([0-9a-f]+))?(#(L\d+))?$}
path, rev, anchor = $1, $3, $5
link = link_to h("#{project_prefix}#{prefix}:#{repo_prefix}#{name}"), {:controller => 'repositories', :action => 'entry', :id => project, :repository_id => repository.identifier_param,
link = link_to h("#{project_prefix}#{prefix}:#{repo_prefix}#{name}"), {:controller => 'repositories', :action => (prefix == 'export' ? 'raw' : 'entry'), :id => project, :repository_id => repository.identifier_param,
:path => to_path_param(path),
:rev => rev,
:anchor => anchor,
:format => (prefix == 'export' ? 'raw' : nil)},
:anchor => anchor},
:class => (prefix == 'export' ? 'source download' : 'source')
end
end
@@ -799,7 +821,7 @@ module ApplicationHelper
end
end
HEADING_RE = /(<h(1|2|3|4)( [^>]+)?>(.+?)<\/h(1|2|3|4)>)/i unless const_defined?(:HEADING_RE)
HEADING_RE = /(<h(\d)( [^>]+)?>(.+?)<\/h(\d)>)/i unless const_defined?(:HEADING_RE)
def parse_sections(text, project, obj, attr, only_path, options)
return unless options[:edit_section_links]
@@ -838,31 +860,57 @@ module ApplicationHelper
end
end
MACROS_RE = /
MACROS_RE = /(
(!)? # escaping
(
\{\{ # opening tag
([\w]+) # macro name
(\(([^\}]*)\))? # optional arguments
(\(([^\n\r]*?)\))? # optional arguments
([\n\r].*?[\n\r])? # optional block of text
\}\} # closing tag
)
/x unless const_defined?(:MACROS_RE)
)/mx unless const_defined?(:MACROS_RE)
# Macros substitution
def parse_macros(text, project, obj, attr, only_path, options)
MACRO_SUB_RE = /(
\{\{
macro\((\d+)\)
\}\}
)/x unless const_defined?(:MACRO_SUB_RE)
# Extracts macros from text
def catch_macros(text)
macros = {}
text.gsub!(MACROS_RE) do
esc, all, macro = $1, $2, $3.downcase
args = ($5 || '').split(',').each(&:strip)
if esc.nil?
begin
exec_macro(macro, obj, args)
rescue => e
"<div class=\"flash error\">Error executing the <strong>#{macro}</strong> macro (#{e})</div>"
end || all
all, macro = $1, $4.downcase
if macro_exists?(macro) || all =~ MACRO_SUB_RE
index = macros.size
macros[index] = all
"{{macro(#{index})}}"
else
all
end
end
macros
end
# Executes and replaces macros in text
def inject_macros(text, obj, macros, execute=true)
text.gsub!(MACRO_SUB_RE) do
all, index = $1, $2.to_i
orig = macros.delete(index)
if execute && orig && orig =~ MACROS_RE
esc, all, macro, args, block = $2, $3, $4.downcase, $6.to_s, $7.try(:strip)
if esc.nil?
h(exec_macro(macro, obj, args, block) || all)
else
h(all)
end
elsif orig
h(orig)
else
h(all)
end
end
end
TOC_RE = /<p>\{\{([<>]?)toc\}\}<\/p>/i unless const_defined?(:TOC_RE)
@@ -870,6 +918,8 @@ module ApplicationHelper
# Renders the TOC with given headings
def replace_toc(text, headings)
text.gsub!(TOC_RE) do
# Keep only the 4 first levels
headings = headings.select{|level, anchor, item| level <= 4}
if headings.empty?
''
else
@@ -917,19 +967,12 @@ module ApplicationHelper
content_tag("label", label_text)
end
def labelled_tabular_form_for(*args, &proc)
ActiveSupport::Deprecation.warn "ApplicationHelper#labelled_tabular_form_for is deprecated and will be removed in Redmine 1.5. Use #labelled_form_for instead."
args << {} unless args.last.is_a?(Hash)
options = args.last
options[:html] ||= {}
options[:html][:class] = 'tabular' unless options[:html].has_key?(:class)
options.merge!({:builder => Redmine::Views::LabelledFormBuilder})
form_for(*args, &proc)
end
def labelled_form_for(*args, &proc)
args << {} unless args.last.is_a?(Hash)
options = args.last
if args.first.is_a?(Symbol)
options.merge!(:as => args.shift)
end
options.merge!({:builder => Redmine::Views::LabelledFormBuilder})
form_for(*args, &proc)
end
@@ -942,10 +985,11 @@ module ApplicationHelper
end
def labelled_remote_form_for(*args, &proc)
ActiveSupport::Deprecation.warn "ApplicationHelper#labelled_remote_form_for is deprecated and will be removed in Redmine 2.2."
args << {} unless args.last.is_a?(Hash)
options = args.last
options.merge!({:builder => Redmine::Views::LabelledFormBuilder})
remote_form_for(*args, &proc)
options.merge!({:builder => Redmine::Views::LabelledFormBuilder, :remote => true})
form_for(*args, &proc)
end
def error_messages_for(*objects)
@@ -962,10 +1006,44 @@ module ApplicationHelper
html.html_safe
end
def delete_link(url, options={})
options = {
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'icon icon-del'
}.merge(options)
link_to l(:button_delete), url, options
end
def preview_link(url, form, target='preview', options={})
content_tag 'a', l(:label_preview), {
:href => "#",
:onclick => %|submitPreview("#{escape_javascript url_for(url)}", "#{escape_javascript form}", "#{escape_javascript target}"); return false;|,
:accesskey => accesskey(:preview)
}.merge(options)
end
def link_to_function(name, function, html_options={})
content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(html_options))
end
# Helper to render JSON in views
def raw_json(arg)
arg.to_json.to_s.gsub('/', '\/').html_safe
end
def back_url
url = params[:back_url]
if url.nil? && referer = request.env['HTTP_REFERER']
url = CGI.unescape(referer.to_s)
end
url
end
def back_url_hidden_field_tag
back_url = params[:back_url] || request.env['HTTP_REFERER']
back_url = CGI.unescape(back_url.to_s)
hidden_field_tag('back_url', CGI.escape(back_url), :id => nil) unless back_url.blank?
url = back_url
hidden_field_tag('back_url', url, :id => nil) unless url.blank?
end
def check_all_links(form_name)
@@ -1009,39 +1087,91 @@ module ApplicationHelper
end
@context_menu_included = true
end
javascript_tag "new ContextMenu('#{ url_for(url) }')"
javascript_tag "contextMenuInit('#{ url_for(url) }')"
end
def calendar_for(field_id)
include_calendar_headers_tags
image_tag("calendar.png", {:id => "#{field_id}_trigger",:class => "calendar-trigger"}) +
javascript_tag("Calendar.setup({inputField : '#{field_id}', ifFormat : '%Y-%m-%d', button : '#{field_id}_trigger' });")
javascript_tag("$(function() { $('##{field_id}').datepicker(datepickerOptions); });")
end
def include_calendar_headers_tags
unless @calendar_headers_tags_included
@calendar_headers_tags_included = true
content_for :header_tags do
start_of_week = case Setting.start_of_week.to_i
when 1
'Calendar._FD = 1;' # Monday
when 7
'Calendar._FD = 0;' # Sunday
when 6
'Calendar._FD = 6;' # Saturday
else
'' # use language
end
start_of_week = Setting.start_of_week
start_of_week = l(:general_first_day_of_week, :default => '1') if start_of_week.blank?
# Redmine uses 1..7 (monday..sunday) in settings and locales
# JQuery uses 0..6 (sunday..saturday), 7 needs to be changed to 0
start_of_week = start_of_week.to_i % 7
javascript_include_tag('calendar/calendar') +
javascript_include_tag("calendar/lang/calendar-#{current_language.to_s.downcase}.js") +
javascript_tag(start_of_week) +
javascript_include_tag('calendar/calendar-setup') +
stylesheet_link_tag('calendar')
tags = javascript_tag(
"var datepickerOptions={dateFormat: 'yy-mm-dd', firstDay: #{start_of_week}, " +
"showOn: 'button', buttonImageOnly: true, buttonImage: '" +
path_to_image('/images/calendar.png') +
"', showButtonPanel: true};")
jquery_locale = l('jquery.locale', :default => current_language.to_s)
unless jquery_locale == 'en'
tags << javascript_include_tag("i18n/jquery.ui.datepicker-#{jquery_locale}.js")
end
tags
end
end
end
# Overrides Rails' stylesheet_link_tag with themes and plugins support.
# Examples:
# stylesheet_link_tag('styles') # => picks styles.css from the current theme or defaults
# stylesheet_link_tag('styles', :plugin => 'foo) # => picks styles.css from plugin's assets
#
def stylesheet_link_tag(*sources)
options = sources.last.is_a?(Hash) ? sources.pop : {}
plugin = options.delete(:plugin)
sources = sources.map do |source|
if plugin
"/plugin_assets/#{plugin}/stylesheets/#{source}"
elsif current_theme && current_theme.stylesheets.include?(source)
current_theme.stylesheet_path(source)
else
source
end
end
super sources, options
end
# Overrides Rails' image_tag with themes and plugins support.
# Examples:
# image_tag('image.png') # => picks image.png from the current theme or defaults
# image_tag('image.png', :plugin => 'foo) # => picks image.png from plugin's assets
#
def image_tag(source, options={})
if plugin = options.delete(:plugin)
source = "/plugin_assets/#{plugin}/images/#{source}"
elsif current_theme && current_theme.images.include?(source)
source = current_theme.image_path(source)
end
super source, options
end
# Overrides Rails' javascript_include_tag with plugins support
# Examples:
# javascript_include_tag('scripts') # => picks scripts.js from defaults
# javascript_include_tag('scripts', :plugin => 'foo) # => picks scripts.js from plugin's assets
#
def javascript_include_tag(*sources)
options = sources.last.is_a?(Hash) ? sources.pop : {}
if plugin = options.delete(:plugin)
sources = sources.map do |source|
if plugin
"/plugin_assets/#{plugin}/javascripts/#{source}"
else
source
end
end
end
super sources, options
end
def content_for(name, content = nil, &block)
@has_content ||= {}
@has_content[name] = true
@@ -1052,6 +1182,14 @@ module ApplicationHelper
(@has_content && @has_content[name]) || false
end
def sidebar_content?
has_content?(:sidebar) || view_layouts_base_sidebar_hook_response.present?
end
def view_layouts_base_sidebar_hook_response
@view_layouts_base_sidebar_hook_response ||= call_hook(:view_layouts_base_sidebar)
end
def email_delivery_enabled?
!!ActionMailer::Base.perform_deliveries
end
@@ -1060,7 +1198,7 @@ module ApplicationHelper
# +user+ can be a User or a string that will be scanned for an email address (eg. 'joe <joe@foo.bar>')
def avatar(user, options = { })
if Setting.gravatar_enabled?
options.merge!({:ssl => (defined?(request) && request.ssl?), :default => Setting.gravatar_default})
options.merge!({:ssl => (request && request.ssl?), :default => Setting.gravatar_default})
email = nil
if user.respond_to?(:mail)
email = user.mail
@@ -1074,14 +1212,19 @@ module ApplicationHelper
end
def sanitize_anchor_name(anchor)
anchor.gsub(%r{[^\w\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
if ''.respond_to?(:encoding) || RUBY_PLATFORM == 'java'
anchor.gsub(%r{[^\p{Word}\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
else
# TODO: remove when ruby1.8 is no longer supported
anchor.gsub(%r{[^\w\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
end
end
# Returns the javascript tags that are included in the html layout head
def javascript_heads
tags = javascript_include_tag(:defaults)
tags = javascript_include_tag('jquery-1.7.2-ui-1.8.21-ujs-2.0.3', 'application')
unless User.current.pref.warn_on_leaving_unsaved == '0'
tags << "\n".html_safe + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end
tags
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -21,12 +21,14 @@ module AttachmentsHelper
# Displays view/delete links to the attachments of the given object
# Options:
# :author -- author names are not displayed if set to false
# :thumbails -- display thumbnails if enabled in settings
def link_to_attachments(container, options = {})
options.assert_valid_keys(:author)
options.assert_valid_keys(:author, :thumbnails)
if container.attachments.any?
options = {:deletable => container.attachments_deletable?, :author => true}.merge(options)
render :partial => 'attachments/links', :locals => {:attachments => container.attachments, :options => options}
render :partial => 'attachments/links',
:locals => {:attachments => container.attachments, :options => options, :thumbnails => (options[:thumbnails] && Setting.thumbnails_enabled?)}
end
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,4 +18,24 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module BoardsHelper
def board_breadcrumb(item)
board = item.is_a?(Message) ? item.board : item
links = [link_to(l(:label_board_plural), project_boards_path(item.project))]
boards = board.ancestors.reverse
if item.is_a?(Message)
boards << board
end
links += boards.map {|ancestor| link_to(h(ancestor.name), project_board_path(ancestor.project, ancestor))}
breadcrumb links
end
def boards_options_for_select(boards)
options = []
Board.board_tree(boards) do |board, level|
label = (level > 0 ? '&nbsp;' * 2 * level + '&#187; ' : '').html_safe
label << board.name
options << [label, board.id]
end
options
end
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -26,8 +26,8 @@ module ContextMenusHelper
end
if options.delete(:disabled)
options.delete(:method)
options.delete(:confirm)
options.delete(:onclick)
options.delete(:data)
options[:onclick] = 'return false;'
options[:class] << ' disabled'
url = '#'
end
@@ -36,7 +36,7 @@ module ContextMenusHelper
def bulk_update_custom_field_context_menu_link(field, text, value)
context_menu_link h(text),
{:controller => 'issues', :action => 'bulk_update', :ids => @issues.collect(&:id), :issue => {'custom_field_values' => {field.id => value}}, :back_url => @back},
{:controller => 'issues', :action => 'bulk_update', :ids => @issue_ids, :issue => {'custom_field_values' => {field.id => value}}, :back_url => @back},
:method => :post,
:selected => (@issue && @issue.custom_field_value(field) == value)
end

View File

@@ -39,72 +39,79 @@ module CustomFieldsHelper
field_name << "[]" if custom_field.multiple?
field_id = "#{name}_custom_field_values_#{custom_field.id}"
tag_options = {:id => field_id, :class => "#{custom_field.field_format}_cf"}
field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
case field_format.try(:edit_as)
when "date"
text_field_tag(field_name, custom_value.value, :id => field_id, :size => 10) +
text_field_tag(field_name, custom_value.value, tag_options.merge(:size => 10)) +
calendar_for(field_id)
when "text"
text_area_tag(field_name, custom_value.value, :id => field_id, :rows => 3, :style => 'width:90%')
text_area_tag(field_name, custom_value.value, tag_options.merge(:rows => 3))
when "bool"
hidden_field_tag(field_name, '0') + check_box_tag(field_name, '1', custom_value.true?, :id => field_id)
hidden_field_tag(field_name, '0') + check_box_tag(field_name, '1', custom_value.true?, tag_options)
when "list"
blank_option = ''
blank_option = ''.html_safe
unless custom_field.multiple?
if custom_field.is_required?
unless custom_field.default_value.present?
blank_option = "<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>"
blank_option = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '')
end
else
blank_option = '<option></option>'
blank_option = content_tag('option')
end
end
s = select_tag(field_name, blank_option.html_safe + options_for_select(custom_field.possible_values_options(custom_value.customized), custom_value.value),
:id => field_id, :multiple => custom_field.multiple?)
s = select_tag(field_name, blank_option + options_for_select(custom_field.possible_values_options(custom_value.customized), custom_value.value),
tag_options.merge(:multiple => custom_field.multiple?))
if custom_field.multiple?
s << hidden_field_tag(field_name, '')
end
s
else
text_field_tag(field_name, custom_value.value, :id => field_id)
text_field_tag(field_name, custom_value.value, tag_options)
end
end
# Return custom field label tag
def custom_field_label_tag(name, custom_value)
def custom_field_label_tag(name, custom_value, options={})
required = options[:required] || custom_value.custom_field.is_required?
content_tag "label", h(custom_value.custom_field.name) +
(custom_value.custom_field.is_required? ? " <span class=\"required\">*</span>".html_safe : ""),
:for => "#{name}_custom_field_values_#{custom_value.custom_field.id}"
(required ? " <span class=\"required\">*</span>".html_safe : ""),
:for => "#{name}_custom_field_values_#{custom_value.custom_field.id}"
end
# Return custom field tag with its label tag
def custom_field_tag_with_label(name, custom_value)
custom_field_label_tag(name, custom_value) + custom_field_tag(name, custom_value)
def custom_field_tag_with_label(name, custom_value, options={})
custom_field_label_tag(name, custom_value, options) + custom_field_tag(name, custom_value)
end
def custom_field_tag_for_bulk_edit(name, custom_field, projects=nil)
field_name = "#{name}[custom_field_values][#{custom_field.id}]"
field_name << "[]" if custom_field.multiple?
field_id = "#{name}_custom_field_values_#{custom_field.id}"
tag_options = {:id => field_id, :class => "#{custom_field.field_format}_cf"}
field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
case field_format.try(:edit_as)
when "date"
text_field_tag(field_name, '', :id => field_id, :size => 10) +
text_field_tag(field_name, '', tag_options.merge(:size => 10)) +
calendar_for(field_id)
when "text"
text_area_tag(field_name, '', :id => field_id, :rows => 3, :style => 'width:90%')
text_area_tag(field_name, '', tag_options.merge(:rows => 3))
when "bool"
select_tag(field_name, options_for_select([[l(:label_no_change_option), ''],
[l(:general_text_yes), '1'],
[l(:general_text_no), '0']]), :id => field_id)
[l(:general_text_no), '0']]), tag_options)
when "list"
options = []
options << [l(:label_no_change_option), ''] unless custom_field.multiple?
options << [l(:label_none), '__none__'] unless custom_field.is_required?
options += custom_field.possible_values_options(projects)
select_tag(field_name, options_for_select(options),
:id => field_id, :multiple => custom_field.multiple?)
select_tag(field_name, options_for_select(options), tag_options.merge(:multiple => custom_field.multiple?))
else
text_field_tag(field_name, '', :id => field_id)
text_field_tag(field_name, '', tag_options)
end
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -92,6 +92,48 @@ module IssuesHelper
s.html_safe
end
class IssueFieldsRows
include ActionView::Helpers::TagHelper
def initialize
@left = []
@right = []
end
def left(*args)
args.any? ? @left << cells(*args) : @left
end
def right(*args)
args.any? ? @right << cells(*args) : @right
end
def size
@left.size > @right.size ? @left.size : @right.size
end
def to_html
html = ''.html_safe
blank = content_tag('th', '') + content_tag('td', '')
size.times do |i|
left = @left[i] || blank
right = @right[i] || blank
html << content_tag('tr', left + right)
end
html
end
def cells(label, text, options={})
content_tag('th', "#{label}:", options) + content_tag('td', text, options)
end
end
def issue_fields_rows
r = IssueFieldsRows.new
yield r
r.to_html
end
def render_custom_fields_rows(issue)
return if issue.custom_field_values.empty?
ordered_values = []
@@ -248,7 +290,7 @@ module IssuesHelper
unless no_html
label = content_tag('strong', label)
old_value = content_tag("i", h(old_value)) if detail.old_value
old_value = content_tag("strike", old_value) if detail.old_value and detail.value.blank?
old_value = content_tag("del", old_value) if detail.old_value and detail.value.blank?
if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key)
# Link to the attachment if it has not been removed
value = link_to_attachment(atta, :download => true, :only_path => options[:only_path])
@@ -332,7 +374,7 @@ module IssuesHelper
cv = issue.custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id}
show_value(cv)
else
value = issue.send(column.name)
value = column.value(issue)
if value.is_a?(Date)
format_date(value)
elsif value.is_a?(Time)

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -23,11 +23,13 @@ module JournalsHelper
editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project)))
links = []
if !journal.notes.blank?
links << link_to_remote(image_tag('comment.png'),
{ :url => {:controller => 'journals', :action => 'new', :id => issue, :journal_id => journal} },
:title => l(:button_quote)) if options[:reply_links]
links << link_to(image_tag('comment.png'),
{:controller => 'journals', :action => 'new', :id => issue, :journal_id => journal},
:remote => true,
:method => 'post',
:title => l(:button_quote)) if options[:reply_links]
links << link_to_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes",
{ :controller => 'journals', :action => 'edit', :id => journal },
{ :controller => 'journals', :action => 'edit', :id => journal, :format => 'js' },
:title => l(:button_edit)) if editable
end
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty?
@@ -38,7 +40,7 @@ module JournalsHelper
end
def link_to_in_place_notes_editor(text, field_id, url, options={})
onclick = "new Ajax.Request('#{url_for(url)}', {asynchronous:true, evalScripts:true, method:'get'}); return false;"
onclick = "$.ajax({url: '#{url_for(url)}', type: 'get'}); return false;"
link_to text, '#', options.merge(:onclick => onclick)
end
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -51,38 +51,15 @@ module ProjectsHelper
content_tag('select', options.html_safe, :name => 'project[parent_id]', :id => 'project_parent_id')
end
# Renders a tree of projects as a nested set of unordered lists
# The given collection may be a subset of the whole project tree
# (eg. some intermediate nodes are private and can not be seen)
# Renders the projects index
def render_project_hierarchy(projects)
s = ''
if projects.any?
ancestors = []
original_project = @project
projects.each do |project|
# set the project environment to please macros.
@project = project
if (ancestors.empty? || project.is_descendant_of?(ancestors.last))
s << "<ul class='projects #{ ancestors.empty? ? 'root' : nil}'>\n"
else
ancestors.pop
s << "</li>"
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
ancestors.pop
s << "</ul></li>\n"
end
end
classes = (ancestors.empty? ? 'root' : 'child')
s << "<li class='#{classes}'><div class='#{classes}'>" +
link_to_project(project, {}, :class => "project #{User.current.member_of?(project) ? 'my-project' : nil}")
s << "<div class='wiki description'>#{textilizable(project.short_description, :project => project)}</div>" unless project.description.blank?
s << "</div>\n"
ancestors << project
render_project_nested_lists(projects) do |project|
s = link_to_project(project, {}, :class => "#{project.css_classes} #{User.current.member_of?(project) ? 'my-project' : nil}")
if project.description.present?
s << content_tag('div', textilizable(project.short_description, :project => project), :class => 'wiki description')
end
s << ("</li></ul>\n" * ancestors.size)
@project = original_project
s
end
s.html_safe
end
# Returns a set of options for a select field, grouped by project.
@@ -91,10 +68,6 @@ module ProjectsHelper
versions.each do |version|
grouped[version.project.name] << [version.name, version.id]
end
# Add in the selected
if selected && !versions.include?(selected)
grouped[selected.project.name] << [selected.name, selected.id]
end
if grouped.keys.size > 1
grouped_options_for_select(grouped, selected && selected.id)

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,9 +18,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module QueriesHelper
def operators_for_select(filter_type)
Query.operators_by_filter_type[filter_type].collect {|o| [l(Query.operators[o]), o]}
def filters_options_for_select(query)
options = [[]]
options += query.available_filters.sort {|a,b| a[1][:order] <=> b[1][:order]}.map do |field, field_options|
[field_options[:name], field]
end
options_for_select(options)
end
def column_header(column)

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -46,17 +46,17 @@ module RepositoriesHelper
end
def render_changeset_changes
changes = @changeset.changes.find(:all, :limit => 1000, :order => 'path').collect do |change|
changes = @changeset.filechanges.find(:all, :limit => 1000, :order => 'path').collect do |change|
case change.action
when 'A'
# Detects moved/copied files
if !change.from_path.blank?
change.action =
@changeset.changes.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
@changeset.filechanges.detect {|c| c.action == 'D' && c.path == change.from_path} ? 'R' : 'C'
end
change
when 'D'
@changeset.changes.detect {|c| c.from_path == change.path} ? nil : change
@changeset.filechanges.detect {|c| c.from_path == change.path} ? nil : change
else
change
end
@@ -141,12 +141,7 @@ module RepositoriesHelper
select_tag('repository_scm',
options_for_select(scm_options, repository.class.name.demodulize),
:disabled => (repository && !repository.new_record?),
:onchange => remote_function(
:url => new_project_repository_path(@project),
:method => :get,
:update => 'content',
:with => "Form.serialize(this.form)")
)
:data => {:remote => true, :method => 'get'})
end
def with_leading_slash(path)
@@ -159,7 +154,7 @@ module RepositoriesHelper
def subversion_field_tags(form, repository)
content_tag('p', form.text_field(:url, :size => 60, :required => true,
:disabled => (repository && !repository.root_url.blank?)) +
:disabled => !repository.safe_attribute?('url')) +
'<br />'.html_safe +
'(file:///, http://, https://, svn://, svn+[tunnelscheme]://)') +
content_tag('p', form.text_field(:login, :size => 30)) +
@@ -174,7 +169,7 @@ module RepositoriesHelper
content_tag('p', form.text_field(
:url, :label => l(:field_path_to_repository),
:size => 60, :required => true,
:disabled => (repository && !repository.new_record?))) +
:disabled => !repository.safe_attribute?('url'))) +
content_tag('p', form.select(
:log_encoding, [nil] + Setting::ENCODINGS,
:label => l(:field_commit_logs_encoding), :required => true))
@@ -184,7 +179,7 @@ module RepositoriesHelper
content_tag('p', form.text_field(
:url, :label => l(:field_path_to_repository),
:size => 60, :required => true,
:disabled => (repository && !repository.root_url.blank?)
:disabled => !repository.safe_attribute?('url')
) +
'<br />'.html_safe + l(:text_mercurial_repository_note)) +
content_tag('p', form.select(
@@ -198,7 +193,7 @@ module RepositoriesHelper
content_tag('p', form.text_field(
:url, :label => l(:field_path_to_repository),
:size => 60, :required => true,
:disabled => (repository && !repository.root_url.blank?)
:disabled => !repository.safe_attribute?('url')
) +
'<br />'.html_safe +
l(:text_git_repository_note)) +
@@ -218,12 +213,12 @@ module RepositoriesHelper
:root_url,
:label => l(:field_cvsroot),
:size => 60, :required => true,
:disabled => !repository.new_record?)) +
:disabled => !repository.safe_attribute?('root_url'))) +
content_tag('p', form.text_field(
:url,
:label => l(:field_cvs_module),
:size => 30, :required => true,
:disabled => !repository.new_record?)) +
:disabled => !repository.safe_attribute?('url'))) +
content_tag('p', form.select(
:log_encoding, [nil] + Setting::ENCODINGS,
:label => l(:field_commit_logs_encoding), :required => true)) +
@@ -238,7 +233,7 @@ module RepositoriesHelper
content_tag('p', form.text_field(
:url, :label => l(:field_path_to_repository),
:size => 60, :required => true,
:disabled => (repository && !repository.new_record?))) +
:disabled => !repository.safe_attribute?('url'))) +
content_tag('p', form.select(
:log_encoding, [nil] + Setting::ENCODINGS,
:label => l(:field_commit_logs_encoding), :required => true))
@@ -248,7 +243,7 @@ module RepositoriesHelper
content_tag('p', form.text_field(
:url, :label => l(:field_root_directory),
:size => 60, :required => true,
:disabled => (repository && !repository.root_url.blank?))) +
:disabled => !repository.safe_attribute?('url'))) +
content_tag('p', form.select(
:path_encoding, [nil] + Setting::ENCODINGS,
:label => l(:field_scm_path_encoding)

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -44,7 +44,7 @@ module SettingsHelper
setting_values = Setting.send(setting)
setting_values = [] unless setting_values.is_a?(Array)
setting_label(setting, options).html_safe +
content_tag("label", l(options[:label] || "setting_#{setting}")) +
hidden_field_tag("settings[#{setting}][]", '').html_safe +
choices.collect do |choice|
text, value = (choice.is_a?(Array) ? choice : [choice, choice])
@@ -53,7 +53,8 @@ module SettingsHelper
check_box_tag(
"settings[#{setting}][]",
value,
Setting.send(setting).include?(value)
Setting.send(setting).include?(value),
:id => nil
) + text.to_s,
:class => 'block'
)
@@ -72,13 +73,13 @@ module SettingsHelper
def setting_check_box(setting, options={})
setting_label(setting, options).html_safe +
hidden_field_tag("settings[#{setting}]", 0).html_safe +
hidden_field_tag("settings[#{setting}]", 0, :id => nil).html_safe +
check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options).html_safe
end
def setting_label(setting, options={})
label = options.delete(:label)
label != false ? content_tag("label", l(label || "setting_#{setting}")).html_safe : ''
label != false ? label_tag("settings_#{setting}", l(label || "setting_#{setting}")).html_safe : ''
end
# Renders a notification field for a Redmine::Notifiable option
@@ -86,7 +87,7 @@ module SettingsHelper
return content_tag(:label,
check_box_tag('settings[notified_events][]',
notifiable.name,
Setting.notified_events.include?(notifiable.name)).html_safe +
Setting.notified_events.include?(notifiable.name), :id => nil).html_safe +
l_or_humanize(notifiable.name, :prefix => 'label_').html_safe,
:class => notifiable.parent.present? ? "parent" : '').html_safe
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -19,10 +19,18 @@
module VersionsHelper
STATUS_BY_CRITERIAS = %w(category tracker status priority author assigned_to)
def version_anchor(version)
if @project == version.project
anchor version.name
else
anchor "#{version.project.try(:identifier)}-#{version.name}"
end
end
STATUS_BY_CRITERIAS = %w(tracker status priority author assigned_to category)
def render_issue_status_by(version, criteria)
criteria = 'category' unless STATUS_BY_CRITERIAS.include?(criteria)
criteria = 'tracker' unless STATUS_BY_CRITERIAS.include?(criteria)
h = Hash.new {|k,v| k[v] = [0, 0]}
begin

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -30,10 +30,8 @@ module WatchersHelper
:action => (watched ? 'unwatch' : 'watch'),
:object_type => object.class.to_s.underscore,
:object_id => object.id}
link_to_remote((watched ? l(:button_unwatch) : l(:button_watch)),
{:url => url},
:href => url_for(url),
:class => (watched ? 'icon icon-fav' : 'icon icon-fav-off'))
link_to((watched ? l(:button_unwatch) : l(:button_watch)), url,
:remote => true, :method => 'post', :class => (watched ? 'icon icon-fav' : 'icon icon-fav-off'))
end
@@ -45,30 +43,33 @@ module WatchersHelper
# Returns a comma separated list of users watching the given object
def watchers_list(object)
remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".to_sym, object.project)
content = ''.html_safe
lis = object.watcher_users.collect do |user|
s = avatar(user, :size => "16").to_s + link_to_user(user, :class => 'user').to_s
s = ''.html_safe
s << avatar(user, :size => "16").to_s
s << link_to_user(user, :class => 'user')
if remove_allowed
url = {:controller => 'watchers',
:action => 'destroy',
:object_type => object.class.to_s.underscore,
:object_id => object.id,
:user_id => user}
s += ' ' + link_to_remote(image_tag('delete.png'),
{:url => url},
:href => url_for(url),
:style => "vertical-align: middle",
:class => "delete")
s << ' '
s << link_to(image_tag('delete.png'), url,
:remote => true, :method => 'post', :style => "vertical-align: middle", :class => "delete")
end
content_tag :li, s.html_safe
content << content_tag('li', s)
end
(lis.empty? ? "" : "<ul>#{ lis.join("\n") }</ul>").html_safe
content.present? ? content_tag('ul', content) : content
end
def watchers_checkboxes(object, users, checked=nil)
users.map do |user|
c = checked.nil? ? object.watched_by?(user) : checked
tag = check_box_tag 'issue[watcher_user_ids][]', user.id, c, :id => nil
content_tag 'label', "#{tag} #{h(user)}", :id => "issue_watcher_user_ids_#{user.id}", :class => "floating"
end.join
content_tag 'label', "#{tag} #{h(user)}".html_safe,
:id => "issue_watcher_user_ids_#{user.id}",
:class => "floating"
end.join.html_safe
end
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -21,14 +21,14 @@ module WikiHelper
def wiki_page_options_for_select(pages, selected = nil, parent = nil, level = 0)
pages = pages.group_by(&:parent) unless pages.is_a?(Hash)
s = ''
s = ''.html_safe
if pages.has_key?(parent)
pages[parent].each do |page|
attrs = "value='#{page.id}'"
attrs << " selected='selected'" if selected == page
indent = (level > 0) ? ('&nbsp;' * level * 2 + '&#187; ') : nil
indent = (level > 0) ? ('&nbsp;' * level * 2 + '&#187; ') : ''
s << "<option #{attrs}>#{indent}#{h page.pretty_title}</option>\n" +
s << content_tag('option', (indent + h(page.pretty_title)).html_safe, :value => page.id.to_s, :selected => selected == page) +
wiki_page_options_for_select(pages, selected, page, level + 1)
end
end

View File

@@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,4 +18,15 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module WorkflowsHelper
def field_required?(field)
field.is_a?(CustomField) ? field.is_required? : %w(project_id tracker_id subject priority_id is_private).include?(field)
end
def field_permission_tag(permissions, status, field)
name = field.is_a?(CustomField) ? field.id.to_s : field
options = [["", ""], [l(:label_readonly), "readonly"]]
options << [l(:label_required), "required"] unless field_required?(field)
select_tag("permissions[#{name}][#{status.id}]", options_for_select(options, permissions[status.id][name]))
end
end

View File

@@ -24,6 +24,7 @@ class Attachment < ActiveRecord::Base
validates_presence_of :filename, :author
validates_length_of :filename, :maximum => 255
validates_length_of :disk_filename, :maximum => 255
validates_length_of :description, :maximum => 255
validate :validate_max_file_size
acts_as_event :title => :filename,
@@ -44,20 +45,14 @@ class Attachment < ActiveRecord::Base
"LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
cattr_accessor :storage_path
@@storage_path = Redmine::Configuration['attachments_storage_path'] || "#{Rails.root}/files"
@@storage_path = Redmine::Configuration['attachments_storage_path'] || File.join(Rails.root, "files")
cattr_accessor :thumbnails_storage_path
@@thumbnails_storage_path = File.join(Rails.root, "tmp", "thumbnails")
before_save :files_to_final_location
after_destroy :delete_from_disk
def container_with_blank_type_check
if container_type.blank?
nil
else
container_without_blank_type_check
end
end
alias_method_chain :container, :blank_type_check unless method_defined?(:container_without_blank_type_check)
# Returns an unsaved copy of the attachment
def copy(attributes=nil)
copy = self.class.new
@@ -110,10 +105,15 @@ class Attachment < ActiveRecord::Base
logger.info("Saving attachment '#{self.diskfile}' (#{@temp_file.size} bytes)")
md5 = Digest::MD5.new
File.open(diskfile, "wb") do |f|
buffer = ""
while (buffer = @temp_file.read(8192))
f.write(buffer)
md5.update(buffer)
if @temp_file.respond_to?(:read)
buffer = ""
while (buffer = @temp_file.read(8192))
f.write(buffer)
md5.update(buffer)
end
else
f.write(@temp_file)
md5.update(@temp_file)
end
end
self.digest = md5.hexdigest
@@ -127,14 +127,22 @@ class Attachment < ActiveRecord::Base
# Deletes the file from the file system if it's not referenced by other attachments
def delete_from_disk
if Attachment.first(:conditions => ["disk_filename = ? AND id <> ?", disk_filename, id]).nil?
if Attachment.where("disk_filename = ? AND id <> ?", disk_filename, id).empty?
delete_from_disk!
end
end
# Returns file's location on disk
def diskfile
"#{@@storage_path}/#{self.disk_filename}"
File.join(self.class.storage_path, disk_filename.to_s)
end
def title
title = filename.to_s
if description.present?
title << " (#{description})"
end
title
end
def increment_download
@@ -154,7 +162,43 @@ class Attachment < ActiveRecord::Base
end
def image?
self.filename =~ /\.(bmp|gif|jpg|jpe|jpeg|png)$/i
!!(self.filename =~ /\.(bmp|gif|jpg|jpe|jpeg|png)$/i)
end
def thumbnailable?
image?
end
# Returns the full path the attachment thumbnail, or nil
# if the thumbnail cannot be generated.
def thumbnail(options={})
if thumbnailable? && readable?
size = options[:size].to_i
if size > 0
# Limit the number of thumbnails per image
size = (size / 50) * 50
# Maximum thumbnail size
size = 800 if size > 800
else
size = Setting.thumbnails_size.to_i
end
size = 100 unless size > 0
target = File.join(self.class.thumbnails_storage_path, "#{id}_#{digest}_#{size}.thumb")
begin
Redmine::Thumbnail.generate(self.diskfile, target, size)
rescue => e
logger.error "An error occured while generating thumbnail for #{disk_filename} to #{target}\nException was: #{e.message}" if logger
return nil
end
end
end
# Deletes all thumbnails
def self.clear_thumbnails
Dir.glob(File.join(thumbnails_storage_path, "*.thumb")).each do |file|
File.delete file
end
end
def is_text?
@@ -179,7 +223,7 @@ class Attachment < ActiveRecord::Base
def self.find_by_token(token)
if token.to_s =~ /^(\d+)\.([0-9a-f]+)$/
attachment_id, attachment_digest = $1, $2
attachment = Attachment.first(:conditions => {:id => attachment_id, :digest => attachment_digest})
attachment = Attachment.where(:id => attachment_id, :digest => attachment_digest).first
if attachment && attachment.container.nil?
attachment
end
@@ -204,8 +248,7 @@ class Attachment < ActiveRecord::Base
end
def self.prune(age=1.day)
attachments = Attachment.all(:conditions => ["created_on < ? AND (container_type IS NULL OR container_type = '')", Time.now - age])
attachments.each(&:destroy)
Attachment.where("created_on < ? AND (container_type IS NULL OR container_type = '')", Time.now - age).destroy_all
end
private

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,6 +18,7 @@
# Generic exception for when the AuthSource can not be reached
# (eg. can not connect to the LDAP)
class AuthSourceException < Exception; end
class AuthSourceTimeoutException < AuthSourceException; end
class AuthSource < ActiveRecord::Base
include Redmine::SubclassFactory
@@ -58,7 +59,7 @@ class AuthSource < ActiveRecord::Base
# Try to authenticate a user not yet registered against available sources
def self.authenticate(login, password)
AuthSource.find(:all, :conditions => ["onthefly_register=?", true]).each do |source|
AuthSource.where(:onthefly_register => true).all.each do |source|
begin
logger.debug "Authenticating '#{login}' against '#{source.name}'" if logger && logger.debug?
attrs = source.authenticate(login, password)

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,6 +18,7 @@
require 'iconv'
require 'net/ldap'
require 'net/ldap/dn'
require 'timeout'
class AuthSourceLdap < AuthSource
validates_presence_of :host, :port, :attr_login
@@ -25,18 +26,11 @@ class AuthSourceLdap < AuthSource
validates_length_of :account, :account_password, :base_dn, :filter, :maximum => 255, :allow_blank => true
validates_length_of :attr_login, :attr_firstname, :attr_lastname, :attr_mail, :maximum => 30, :allow_nil => true
validates_numericality_of :port, :only_integer => true
validates_numericality_of :timeout, :only_integer => true, :allow_blank => true
validate :validate_filter
before_validation :strip_ldap_attributes
def self.human_attribute_name(attribute_key_name, *args)
attr_name = attribute_key_name.to_s
if attr_name == "filter"
attr_name = "ldap_filter"
end
super(attr_name, *args)
end
def initialize(attributes=nil, *args)
super
self.port = 389 if self.port == 0
@@ -44,22 +38,26 @@ class AuthSourceLdap < AuthSource
def authenticate(login, password)
return nil if login.blank? || password.blank?
attrs = get_user_dn(login, password)
if attrs && attrs[:dn] && authenticate_dn(attrs[:dn], password)
logger.debug "Authentication successful for '#{login}'" if logger && logger.debug?
return attrs.except(:dn)
with_timeout do
attrs = get_user_dn(login, password)
if attrs && attrs[:dn] && authenticate_dn(attrs[:dn], password)
logger.debug "Authentication successful for '#{login}'" if logger && logger.debug?
return attrs.except(:dn)
end
end
rescue Net::LDAP::LdapError => e
rescue Net::LDAP::LdapError => e
raise AuthSourceException.new(e.message)
end
# test the connection to the LDAP
def test_connection
ldap_con = initialize_ldap_con(self.account, self.account_password)
ldap_con.open { }
rescue Net::LDAP::LdapError => e
raise "LdapError: " + e.message
with_timeout do
ldap_con = initialize_ldap_con(self.account, self.account_password)
ldap_con.open { }
end
rescue Net::LDAP::LdapError => e
raise AuthSourceException.new(e.message)
end
def auth_method_name
@@ -68,6 +66,16 @@ class AuthSourceLdap < AuthSource
private
def with_timeout(&block)
timeout = self.timeout
timeout = 20 unless timeout && timeout > 0
Timeout.timeout(timeout) do
return yield
end
rescue Timeout::Error => e
raise AuthSourceTimeoutException.new(e.message)
end
def ldap_filter
if filter.present?
Net::LDAP::Filter.construct(filter)

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -21,26 +21,37 @@ class Board < ActiveRecord::Base
has_many :topics, :class_name => 'Message', :conditions => "#{Message.table_name}.parent_id IS NULL", :order => "#{Message.table_name}.created_on DESC"
has_many :messages, :dependent => :destroy, :order => "#{Message.table_name}.created_on DESC"
belongs_to :last_message, :class_name => 'Message', :foreign_key => :last_message_id
acts_as_list :scope => :project_id
acts_as_tree :dependent => :nullify
acts_as_list :scope => '(project_id = #{project_id} AND parent_id #{parent_id ? "= #{parent_id}" : "IS NULL"})'
acts_as_watchable
validates_presence_of :name, :description
validates_length_of :name, :maximum => 30
validates_length_of :description, :maximum => 255
validate :validate_board
named_scope :visible, lambda {|*args| { :include => :project,
scope :visible, lambda {|*args| { :include => :project,
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_messages, *args) } }
safe_attributes 'name', 'description', 'move_to'
safe_attributes 'name', 'description', 'parent_id', 'move_to'
def visible?(user=User.current)
!user.nil? && user.allowed_to?(:view_messages, project)
end
def reload(*args)
@valid_parents = nil
super
end
def to_s
name
end
def valid_parents
@valid_parents ||= project.boards - self_and_descendants
end
def reset_counters!
self.class.reset_counters!(id)
end
@@ -53,4 +64,26 @@ class Board < ActiveRecord::Base
" last_message_id = (SELECT MAX(id) FROM #{Message.table_name} WHERE board_id=#{board_id})",
["id = ?", board_id])
end
def self.board_tree(boards, parent_id=nil, level=0)
tree = []
boards.select {|board| board.parent_id == parent_id}.sort_by(&:position).each do |board|
tree << [board, level]
tree += board_tree(boards, board.id, level+1)
end
if block_given?
tree.each do |board, level|
yield board, level
end
end
tree
end
protected
def validate_board
if parent_id && parent_id_changed?
errors.add(:parent_id, :invalid) unless valid_parents.include?(parent)
end
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -20,7 +20,7 @@ require 'iconv'
class Changeset < ActiveRecord::Base
belongs_to :repository
belongs_to :user
has_many :changes, :dependent => :delete_all
has_many :filechanges, :class_name => 'Change', :dependent => :delete_all
has_and_belongs_to_many :issues
has_and_belongs_to_many :parents,
:class_name => "Changeset",
@@ -49,7 +49,8 @@ class Changeset < ActiveRecord::Base
validates_uniqueness_of :revision, :scope => :repository_id
validates_uniqueness_of :scmid, :scope => :repository_id, :allow_nil => true
named_scope :visible, lambda {|*args| { :include => {:repository => :project},
scope :visible,
lambda {|*args| { :include => {:repository => :project},
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_changesets, *args) } }
after_create :scan_for_issues
@@ -161,7 +162,7 @@ class Changeset < ActiveRecord::Base
tag = "#{repository.identifier}|#{tag}"
end
if ref_project && project && ref_project != project
tag = "#{project.identifier}:#{tag}"
tag = "#{project.identifier}:#{tag}"
end
tag
end
@@ -175,18 +176,12 @@ class Changeset < ActiveRecord::Base
# Returns the previous changeset
def previous
@previous ||= Changeset.find(:first,
:conditions => ['id < ? AND repository_id = ?',
self.id, self.repository_id],
:order => 'id DESC')
@previous ||= Changeset.where(["id < ? AND repository_id = ?", id, repository_id]).order('id DESC').first
end
# Returns the next changeset
def next
@next ||= Changeset.find(:first,
:conditions => ['id > ? AND repository_id = ?',
self.id, self.repository_id],
:order => 'id ASC')
@next ||= Changeset.where(["id > ? AND repository_id = ?", id, repository_id]).order('id ASC').first
end
# Creates a new Change from it's common parameters

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
class CommentObserver < ActiveRecord::Observer
def after_create(comment)
if comment.commented.is_a?(News) && Setting.notified_events.include?('news_comment_added')
Mailer.deliver_news_comment_added(comment)
Mailer.news_comment_added(comment).deliver
end
end
end

View File

@@ -30,11 +30,6 @@ class CustomField < ActiveRecord::Base
validate :validate_custom_field
before_validation :set_searchable
def initialize(attributes=nil, *args)
super
self.possible_values ||= []
end
def set_searchable
# make sure these fields are not searchable
self.searchable = false if %w(int float date bool).include?(field_format)
@@ -80,7 +75,7 @@ class CustomField < ActiveRecord::Base
when 'bool'
[[l(:general_text_Yes), '1'], [l(:general_text_No), '0']]
else
read_possible_values_utf8_encoded || []
possible_values || []
end
end
@@ -91,14 +86,20 @@ class CustomField < ActiveRecord::Base
when 'bool'
['1', '0']
else
read_possible_values_utf8_encoded
values = super()
if values.is_a?(Array)
values.each do |value|
value.force_encoding('UTF-8') if value.respond_to?(:force_encoding)
end
end
values || []
end
end
# Makes possible_values accept a multiline string
def possible_values=(arg)
if arg.is_a?(Array)
write_attribute(:possible_values, arg.compact.collect(&:strip).select {|v| !v.blank?})
super(arg.compact.collect(&:strip).select {|v| !v.blank?})
else
self.possible_values = arg.to_s.split(/[\n\r]+/)
end
@@ -125,16 +126,32 @@ class CustomField < ActiveRecord::Base
casted
end
def value_from_keyword(keyword, customized)
possible_values_options = possible_values_options(customized)
if possible_values_options.present?
keyword = keyword.to_s.downcase
if v = possible_values_options.detect {|text, id| text.downcase == keyword}
if v.is_a?(Array)
v.last
else
v
end
end
else
keyword
end
end
# Returns a ORDER BY clause that can used to sort customized
# objects by their value of the custom field.
# Returns false, if the custom field can not be used for sorting.
# Returns nil if the custom field can not be used for sorting.
def order_statement
return nil if multiple?
case field_format
when 'string', 'text', 'list', 'date', 'bool'
# COALESCE is here to make sure that blank and NULL values are sorted equally
"COALESCE((SELECT cv_sort.value FROM #{CustomValue.table_name} cv_sort" +
" WHERE cv_sort.customized_type='#{self.class.customized_class.name}'" +
" WHERE cv_sort.customized_type='#{self.class.customized_class.base_class.name}'" +
" AND cv_sort.customized_id=#{self.class.customized_class.table_name}.id" +
" AND cv_sort.custom_field_id=#{id} LIMIT 1), '')"
when 'int', 'float'
@@ -142,18 +159,74 @@ class CustomField < ActiveRecord::Base
# Postgresql will raise an error if a value can not be casted!
# CustomValue validations should ensure that it doesn't occur
"(SELECT CAST(cv_sort.value AS decimal(60,3)) FROM #{CustomValue.table_name} cv_sort" +
" WHERE cv_sort.customized_type='#{self.class.customized_class.name}'" +
" WHERE cv_sort.customized_type='#{self.class.customized_class.base_class.name}'" +
" AND cv_sort.customized_id=#{self.class.customized_class.table_name}.id" +
" AND cv_sort.custom_field_id=#{id} AND cv_sort.value <> '' AND cv_sort.value IS NOT NULL LIMIT 1)"
when 'user', 'version'
value_class.fields_for_order_statement(value_join_alias)
else
nil
end
end
# Returns a GROUP BY clause that can used to group by custom value
# Returns nil if the custom field can not be used for grouping.
def group_statement
return nil if multiple?
case field_format
when 'list', 'date', 'bool', 'int'
order_statement
when 'user', 'version'
"COALESCE((SELECT cv_sort.value FROM #{CustomValue.table_name} cv_sort" +
" WHERE cv_sort.customized_type='#{self.class.customized_class.base_class.name}'" +
" AND cv_sort.customized_id=#{self.class.customized_class.table_name}.id" +
" AND cv_sort.custom_field_id=#{id} LIMIT 1), '')"
else
nil
end
end
def join_for_order_statement
case field_format
when 'user', 'version'
"LEFT OUTER JOIN #{CustomValue.table_name} #{join_alias}" +
" ON #{join_alias}.customized_type = '#{self.class.customized_class.base_class.name}'" +
" AND #{join_alias}.customized_id = #{self.class.customized_class.table_name}.id" +
" AND #{join_alias}.custom_field_id = #{id}" +
" AND #{join_alias}.value <> ''" +
" AND #{join_alias}.id = (SELECT max(#{join_alias}_2.id) FROM #{CustomValue.table_name} #{join_alias}_2" +
" WHERE #{join_alias}_2.customized_type = #{join_alias}.customized_type" +
" AND #{join_alias}_2.customized_id = #{join_alias}.customized_id" +
" AND #{join_alias}_2.custom_field_id = #{join_alias}.custom_field_id)" +
" LEFT OUTER JOIN #{value_class.table_name} #{value_join_alias}" +
" ON CAST(#{join_alias}.value as decimal(60,0)) = #{value_join_alias}.id"
else
nil
end
end
def join_alias
"cf_#{id}"
end
def value_join_alias
join_alias + "_" + field_format
end
def <=>(field)
position <=> field.position
end
# Returns the class that values represent
def value_class
case field_format
when 'user', 'version'
field_format.classify.constantize
else
nil
end
end
def self.customized_class
self.name =~ /^(.+)CustomField$/
begin; $1.constantize; rescue nil; end
@@ -194,6 +267,10 @@ class CustomField < ActiveRecord::Base
validate_field_value(value).empty?
end
def format_in?(*args)
args.include?(field_format)
end
protected
# Returns the error message for the given value regarding its format
@@ -218,14 +295,4 @@ class CustomField < ActiveRecord::Base
end
errs
end
def read_possible_values_utf8_encoded
values = read_attribute(:possible_values)
if values.is_a?(Array)
values.each do |value|
value.force_encoding('UTF-8') if value.respond_to?(:force_encoding)
end
end
values
end
end

View File

@@ -1,5 +1,5 @@
# RedMine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Redmine - project management software
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -30,7 +30,7 @@ class Document < ActiveRecord::Base
validates_presence_of :project, :title, :category
validates_length_of :title, :maximum => 60
named_scope :visible, lambda {|*args| { :include => :project,
scope :visible, lambda {|*args| { :include => :project,
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_documents, *args) } }
safe_attributes 'category_id', 'title', 'description'

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -31,4 +31,10 @@ class DocumentCategory < Enumeration
def transfer_relations(to)
documents.update_all("category_id = #{to.id}")
end
def self.default
d = super
d = first if d.nil?
d
end
end

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
# Copyright (C) 2006-2012 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -17,6 +17,6 @@
class DocumentObserver < ActiveRecord::Observer
def after_create(document)
Mailer.deliver_document_added(document) if Setting.notified_events.include?('document_added')
Mailer.document_added(document).deliver if Setting.notified_events.include?('document_added')
end
end

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