Compare commits

...

1676 Commits

Author SHA1 Message Date
Felix Schäfer dfb77852cf Split up Travis tests to avoid hitting the hard Travis timeout 2013-03-19 23:40:33 +01:00
Holger Just 93de0ba668 Bump version to 3.8.0 2013-03-19 22:36:48 +01:00
Holger Just fdc9c245ac Update changelog for 3.8.0 2013-03-19 22:36:06 +01:00
Holger Just d7b23acea0 Don't test Darcs on Travis. It breaks there :( 2013-03-19 22:24:22 +01:00
Holger Just f9babbbbc3 Use RubyGems 1.8.25 on Travis as 2.0.x fails with Rails 2.3 2013-03-19 22:23:56 +01:00
Toshi MARUYAMA 90a05668a0 fix db migrate #1164 2013-03-19 21:30:48 +01:00
Holger Just e4b814e167 Bump Rails to 2.3.18 #1252 2013-03-19 21:30:48 +01:00
Felix Schäfer 304155122d Use SSL communications to rubygems.org 2013-03-19 21:24:55 +01:00
Felix Schäfer 1e2a029099 Explicitely set js calendar until complete switch to jQuery #1121 2013-03-19 21:19:33 +01:00
Holger Just 68e6d171b1 Manually apply basic before_filters in case of routing error #1248 2013-03-15 15:15:10 +01:00
Gregor Schmidt d6e5c9e1fa Fixing HTML in groups index view 2013-03-12 16:57:59 +01:00
Holger Just 63976e6522 Bump the version to v3.7.0 2013-02-13 16:03:00 +01:00
Holger Just 31ad2ef6c3 Update changelog for 3.7.0 release 2013-02-13 16:02:54 +01:00
Holger Just 595e60fb9c Fix stupidity in last filter of liquid #1235 2013-02-13 15:46:08 +01:00
Holger Just 8b357a118d Remove monkey patch which is already included in Rails 2.3.17 #1233 2013-02-13 15:18:17 +01:00
Holger Just 6d3dc6e619 Bump json gem to a safe version for CVE-2013-0269, CVE-2013-0333 2013-02-13 15:18:17 +01:00
Holger Just 0b567641bc Don't set YAML on serialized fields #1233 2013-02-13 15:18:17 +01:00
Holger Just fd306095c6 Bump Rails to 2.3.17 #1233 2013-02-13 15:18:17 +01:00
Holger Just 430b6bb442 Improve on broken MySQL handling of login tokens #1234 2013-02-13 15:18:09 +01:00
Felix Schäfer 3f9007b909 Merge branch 'release-v3.6.0' into stable 2013-01-29 22:37:23 +01:00
Felix Schäfer 6bef9c26ab Bump version to v3.6.0 2013-01-29 22:33:42 +01:00
Felix Schäfer 6744e23ed2 Update Changelog for v3.6.0 2013-01-29 21:46:27 +01:00
Felix Schäfer 065542c7d1 Remove Rails patches which are already included in Rails 2.3.16 #1219 2013-01-29 21:44:15 +01:00
Felix Schäfer dc66e8f831 Bump Rails version to 2.3.16 #1219 2013-01-29 21:24:25 +01:00
Felix Schäfer 6e30b3d3fc Get notified about other watched things than issues #1216
When I select "only for things I watch or am involved in" as my Email
notifications setting, I want to get notified about everyhing I watch,
not just issues. The previous setting would only notify me about issues
I'm involved in, now I will additionally be notified about everything I watch.
2013-01-25 15:30:32 +01:00
Holger Just 2854524ba9 Merge branch 'release-v3.5.1' into stable 2013-01-16 23:26:41 +01:00
Holger Just eb41df17d2 Bump version to v3.5.1 2013-01-16 23:26:13 +01:00
Holger Just 7f7a06706f Update Changelog for v3.5.1 2013-01-16 23:25:47 +01:00
Holger Just db3087b318 Fix for CVE-2013-0155 in Rails 2013-01-16 23:24:15 +01:00
Holger Just d8536ced55 Merge branch 'release-v3.5.0' into stable 2013-01-09 14:06:00 +01:00
Holger Just 908391d54e Bump version to v3.5.0 2013-01-09 14:05:02 +01:00
Holger Just 93b2a1daf9 Update Changelog for v3.5.0 2013-01-09 14:04:56 +01:00
Holger Just c69a005353 Remove Rails patches which are already included in Rails 2.3.15 #1200 2013-01-09 13:56:52 +01:00
Holger Just bf4ed9b37b Bump Rails version to 2.3.15 #1200 2013-01-09 13:56:43 +01:00
Holger Just 90a94d75c3 Merge branch 'release-v3.4.0' into stable 2013-01-06 23:47:42 +01:00
Holger Just 2243c8dfd0 Bump version to v3.4.0 2013-01-06 23:43:44 +01:00
Holger Just cee98d306b Update Changelog for v3.4.0 2013-01-06 23:43:04 +01:00
Holger Just 0dac4ecb53 Ensure UTF-8 source encoding 2013-01-06 23:42:41 +01:00
Holger Just c65779bbc1 Update Copyright for 2013
We programmers have a nice new years tradition: We revisit all of
our projects and add 1 to a small number near a "(c)".

-- Volker Dusch
https://twitter.com/__edorian/status/153801913442373633
2013-01-06 23:42:27 +01:00
Holger Just 0261b16b3e Update locales 2013-01-06 23:20:08 +01:00
Holger Just c80591fe57 Adapt tests for escaping of ' introduced in 8e417fd 2013-01-06 21:17:19 +01:00
Felix Schäfer cdad6f752a Links to new/not existing wikipages are italic #1197 2013-01-06 21:13:34 +01:00
Felix Schäfer 335da86b55 Correctly save the subprojects setting when editing queries #1188 2013-01-06 20:32:53 +01:00
Holger Just 8e417fd5c4 Fix XSS vulnerabilities in Rails (CVE-2012-3464, CVE-2012-3465) #1113 #1114 2013-01-06 20:32:53 +01:00
Holger Just 07e54eda9e SQL Injection Vulnerability in Ruby on Rails (CVE-2012-5664) #1195 2013-01-06 20:32:53 +01:00
Holger Just a93a3af895 Consider HEAD a readonly method in Redmine.pm #1134 2013-01-06 20:32:53 +01:00
Holger Just 5156fbbfc4 Make the WikiContentJournal class available during migration #1194 2013-01-06 20:32:53 +01:00
Felix Schäfer 4d4efa482e Use capybara < 2 as capybara 2 drops ruby 1.8 support 2013-01-02 16:36:49 +01:00
Holger Just c734c6506d Install Darcs 2.3 on Travis CI #1142
Our tests break on Darcs >=2.5 as Darcs changed the repository
format and the command API.
2013-01-02 16:16:39 +01:00
Toshi MARUYAMA e7ef06a926 add travis build status to README.rdoc 2012-12-09 18:24:13 +01:00
Felix Schäfer 0dfa793abc Add a CONTRIBUTING guide. #1192 2012-12-09 18:10:11 +01:00
C-Moreira ce5524ba4d Add localized translation for Time entry menu. #1118 2012-11-22 11:54:11 +01:00
Holger Just 003fc93b15 Make the commented configuration.yml.example more approachable #1144 2012-09-14 22:27:49 +02:00
Holger Just da4641442f Update package list before installing packages on Travis 2012-09-12 21:39:09 +02:00
Web Siduction 0e1a622a6a wiki-text monospaced 11px 2012-08-20 20:18:17 +02:00
Holger Just d63d2d2e81 Display sidebar queries outside of a project #1090 2012-08-20 18:48:28 +02:00
Holger Just 7a4b664577 Set default category_id instead of the object #1087
Rails 2.3 still has issues with synchronizing the association_id
and association attributes of an object. That means, if you set the
association with an object first and then just set the id afterwards, the object wins and the setting of the id gets lost.

This is not an issue in Rails >= 3.1 anymore.
2012-08-20 18:26:32 +02:00
Felix Schäfer d24d4ce6b6 Stick with a working version of mocha
mocha 0.12.2 is known not to work with test/unit:
https://github.com/freerange/mocha/issues/94

Pinning the version of mocha until this is resolved
2012-08-06 10:34:41 +02:00
jplang a2f8557f23 Correctly copy advanced workflow settings #904
Original commit message:
Fixed: Workflow copy does not copy advanced workflow settings

git-svn-id: svn://rubyforge.org/var/svn/redmine/trunk@6148 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-08-06 08:20:58 +02:00
Holger Just 080c5b63ca Merge branch 'release-v3.3.0' into stable 2012-07-15 20:26:01 +02:00
Holger Just 22204d588d Merge branch 'master' into stable 2012-07-15 18:46:48 +02:00
Holger Just 19dd488298 Bump version to 3.3.0 2012-07-15 18:45:49 +02:00
Holger Just 12cedb1e91 Update Changelog for v3.3.0 2012-07-15 18:44:41 +02:00
Holger Just 27f24a78db Add copyright statement 2012-07-15 18:43:00 +02:00
Andrew Smith 4838c4ede8 Replace the progress bars with a copied jQuery version. Fixes #1056 2012-07-15 18:28:23 +02:00
Holger Just f2e4c71b27 Add gravatar no-op library.
This helps to not break on plugins having require "gravatar"
in their init.rb. This statement is not needed anymore in any
supported version of ChiliProject (or Redmine for that matter) and
should thus be removed from all plugins.
2012-07-15 17:48:43 +02:00
Andrew Smith ff94716791 Replace the JS calendar with a jQueryUI version. 2012-07-15 15:25:13 +02:00
Felix Schäfer cb9ac281d9 Add date_field and date_field_tag form helpers #817 2012-07-15 15:19:02 +02:00
Felix Schäfer a642a1fdc4 Bump net-ldap #1078 2012-07-14 21:16:16 +02:00
Holger Just f89c003847 Make list style for ul and ol elements more specific. #1075 2012-07-13 23:27:53 +02:00
Andrew Smith d6eb87508c Update jQuery/UI to 1.7.2/1.8.21. Fixes #1076 2012-07-11 14:41:56 +02:00
Romano Licker 1e96ac9e06 [#935] Setting improperly set up for default values
having a fixed call order resolves a problem where
'value=' was called before 'name=' resulting in no
serialization
2012-07-11 12:56:58 +02:00
Holger Just 9fde11f950 Load rake tasks from plugins in chiliproject_plugins #1074 2012-07-10 14:39:32 +02:00
Felix Schäfer d41c7f1e8c Fix migrating from Redmine 1.4 #1067
Contributed by Steffen Schüssler
2012-07-09 20:41:17 +02:00
Andrew Smith e3dc444b9c Losslessly recompress all the image files. Fixes #1070 2012-07-09 18:28:14 +02:00
Felix Schäfer 37385642fa Don't show the search field when it's not needed #979
Contributed by Harald Klimach
2012-07-09 18:11:04 +02:00
Felix Schäfer 12b2d3c182 Show the register link everywhere it's needed #979
Contributed by Harald Klimach
2012-07-09 18:06:32 +02:00
Andrew Smith 37c762b997 Force the hover colour so that even rows highlight. Fixes #1063 2012-07-06 20:06:03 +02:00
Holger Just 17793c87e3 Format date in user's prefered format by default 2012-07-02 21:10:55 +02:00
Holger Just eea550e639 Fix the Strainer patch to enforce a filter array
Up until now, the patch used to be a no-op. While the filters class
attribute was set correctly, the methods using it were not actually
overridden as they are only included above the existing methods in
the module chain.

This resulted in an arbitrary load order of filters on Ruby 1.8. As
such, our overridden standard filters might not have actually
overridden anything.

Still, the patch can be completely removed once we either require
Ruby 1.9 (as we have ordered ahshes by default then) or once
https://github.com/Shopify/liquid/pull/87 was merged and released
upstream.
2012-07-02 21:10:55 +02:00
Holger Just 760df0ae35 Define today variable for liquid #1055 2012-07-02 21:10:55 +02:00
Andrew Smith a4fbb15f6c Include a minimal Modernizr JS build. Fixes #1054 2012-07-02 20:28:00 +02:00
Andrew Smith 6fa46e5136 Set the users language on the HTML tag. Fixes #1051 2012-06-28 10:03:08 +02:00
Andrew Smith cf83e274d7 Change to an HTML5 doctype #1018 2012-06-26 22:19:37 +02:00
Jan Vlnas 29af3ec964 Correct engine tests to work on Ruby 1.9 #952 #944 2012-06-23 21:23:50 +02:00
Holger Just 6932070752 Require bundler 1.0.14 to use the rbx platform in Gemfile 2012-06-22 17:34:28 +02:00
Holger Just cd4efd2e0d Set $KCODE to UTF-8 on Ruby 1.8 to mimic Rails 3 behavior 2012-06-22 17:31:51 +02:00
Felix Schäfer 2f21522458 Enable project-specific css #1017 2012-06-21 10:28:44 +02:00
Holger Just d3d6a93a45 Fix failing tests for Ruby 1.9 #1046 2012-06-20 18:00:34 +02:00
Holger Just e4386f61da Add "me" to user custom fields filters #1046
Adapted from
28f9605fe2
by Jean-Philippe Lang
2012-06-20 16:07:09 +02:00
Holger Just 59e2a2fdde Merge branch 'release-v3.2.2' into stable 2012-06-13 11:04:48 +02:00
Holger Just 5c7a3a53c2 Bump version to 3.2.2 2012-06-13 10:26:48 +02:00
Holger Just 4d9060964f Update changelog for v3.2.2 2012-06-13 10:25:18 +02:00
Holger Just 16e266e7e5 Fix SQL injection via nested hashes in conditions. CVE-2012-2695 #1037 2012-06-13 10:12:10 +02:00
Holger Just d629209364 Fix SQL injection via nested hashes in conditions (CVE-2012-2694) #1036 2012-06-13 10:10:03 +02:00
Holger Just 221a2e73ce Merge branch 'release-v3.2.1' into stable 2012-06-10 20:38:18 +02:00
Holger Just c9d141061d Bump version to v3.2.1 2012-06-10 20:36:34 +02:00
Holger Just 8e41daf92a Update changelog for v3.2.1 2012-06-10 20:36:34 +02:00
Felix Schäfer caceb58947 Restore the default class for gravatars #1034 2012-06-10 20:34:23 +02:00
Felix Schäfer 5ef63ec4bb Fix option parsing for gravatars #1034
In addition to that:
* the default size was 50px in the old lib, this has been restored
* some tests to test the default and option parsing
2012-06-10 19:54:46 +02:00
Holger Just e6e057d10d Merge branch 'release-v3.2.0' into stable 2012-06-09 19:07:06 +02:00
Felix Schäfer f8ec89b999 Test stable- and release- branches on Travis too 2012-06-09 19:02:18 +02:00
Holger Just bd132c5607 Bump version to 3.2.0 2012-06-09 17:59:06 +02:00
Holger Just bcb02a4634 Update Changelog for v3.2.0 2012-06-09 17:56:21 +02:00
Holger Just d11e074748 Fix trailing whitespace 2012-06-09 17:52:37 +02:00
Felix Schäfer 1f91054244 Switch from vendored gravatar lib to gravatarify gem #1033 2012-06-09 17:39:22 +02:00
Felix Schäfer 32e1cc2dee Don't test transaction-based features on SQLite
SQLite doesn't support nested transactions, thus we can't test
transaction-based features inside a test wrapped in a transaction.
2012-06-09 17:35:49 +02:00
Felix Schäfer 3997220a45 Add IRC notifications to the Travis config 2012-06-09 12:02:54 +02:00
Felix Schäfer 69656422a1 Test ChiliProject on rubinius on Travis
rubinius 1.9-mode won't load liquid currently:
https://github.com/Shopify/liquid/pull/107
2012-06-07 14:30:45 +02:00
Felix Schäfer d6ad07ee97 Refine some apt-get commands in Travis
* Remove the update, the Travis VMs should be up-to-date enough for us
* Remove the quiets so we can see errors if needed
2012-06-05 16:00:09 +02:00
Justin Geibel 1722e96bb0 Change default branch behaviour for git repos #749
If git repository HEAD points to a branch, use that as the default branch.
Otherwise fall back to previous method.
2012-06-05 15:33:04 +02:00
Andrew Smith 4956e9ca93 Limit the size of the projects dropdown menu. #1016 2012-06-05 15:15:48 +02:00
Andrew Smith 7c1b17509f Clear the document selection when selecting multiple rows. 2012-06-05 15:05:35 +02:00
Andrew Smith c8be011a93 Correct major logic issues when selecting multiple rows.
The rows were being incorrectly selected (because the class name had a
missing '.').

jQuery items can't be directly compared to each other so we need to get
the HTML element to test if they are the same.
2012-06-05 15:05:35 +02:00
Holger Just 8ab42473d9 [#1025] Fix Rails vulnerability (CVE-2012-2660) 2012-06-01 20:56:09 +02:00
Felix Schäfer a43c06ff77 Don't depend on DB ordering in journal_test
And add all fixtures needed to run the test on its own.
2012-05-25 13:37:11 +02:00
Andrew Smith f983b451ad Reformat CSS to use the coding standard. #947
Formatting was done mostly by hand using the following as a guide
http://gnuvince.wordpress.com/2007/02/26/reformatting-a-css-file-with-vim/

" Replace all sequences of white spaces with one space
:%s/[ \t\n]\+/ /g

" Go to the end of the command, then forward one character and insert
" a newline
]/lr^M

" Make sure there is a semi-colon before each closing bracket
:%s/\([^; ]\) *}/\1;}/g

" Add a newline after every semi-colon
:%s/;/;^M/g

" Add a newline after every opening brace and make put one space
" between it and the preceeding text
:%s/\([^ ]*\) *{/\1 {^M/g

" Add two newlines after every closing brace
:%s/}/}^M^M/g

" Remove 'trailing' spaces in front of the semi-colons
:%s/ *;/;/g

" Make sure there is only one space after a colon
:%s/: */: /g

" Make the text before the colon lowercase
:%s/\(.\{-}\):/\L\1:/g

" Remove all trailing spaces at the beginning of lines
:%s/^ \+/g

" Indent the whole file
gg=G

" Split each rule onto its own line (This also matched some
" property/value combos so needed confirming
:%s/\([a-z0-9]\+\), \+/\1,^M/gc
2012-05-21 13:45:39 +02:00
Andrew Smith 61c00779d0 Set the X-CSRF-Token header for AJAX requests with jQuery. #950 2012-05-20 20:41:02 +02:00
Dereckson 375045a82b Improving French translation #967 2012-05-20 20:35:33 +02:00
Felix Schäfer 2e18840f12 Disable autocomplete on registragion form #844 2012-05-20 10:30:34 +02:00
Felix Schäfer 20448c7efb Load all required fixtures on issue unit test #863
Contributed by Toshi MARUYAMA
2012-05-20 10:18:00 +02:00
Andrew Smith 9cd14ca152 Fix a typo when calculating the menu X position. #1007 2012-05-19 11:52:51 +02:00
Felix Schäfer 87f68e58ad Recalculate last reply of thread on message deletion #968 2012-05-19 11:38:40 +02:00
Andrew Smith 43723385c6 Handle the '(Un)Check all' link. #994 2012-05-19 10:37:17 +02:00
Felix Schäfer 93abdcf487 Fix comments missing in wiki add/update mails #986 2012-05-19 00:00:16 +02:00
Felix Schäfer 1d3cdf1fa9 Correct email sending on attachment to document #1008 2012-05-18 22:45:52 +02:00
Felix Schäfer 3e84c4817b Updated czech localization by Radek Tříška 2012-05-18 22:02:40 +02:00
Felix Schäfer 7930e8fa66 Also test stable and unstable branches on TravisCI 2012-05-14 14:18:52 +02:00
Felix Schäfer d4f0542e74 Don't rely on ordering in news_test
The tests would fail because not all storage backends have a default
ordering
2012-05-14 12:39:17 +02:00
tmaruyama 6a26543887 scm: mercurial: fix unit adapter annotate test fails on Windows Mercurial 1.8.4+29-e597ef52a7c2.
git-svn-id: svn://rubyforge.org/var/svn/redmine/trunk@6042 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-14 10:54:17 +02:00
Felix Schäfer 03dfae0529 ChiliProject on Travis <3 <3 <3 2012-05-14 10:45:50 +02:00
Eric Davis 75bb38df08 Require WikiContent directly so WikiContentJournal is loaded before it's patched.
Error: uninitialized constant MergeWikiVersionsWithJournals::WikiContentJournal
2012-04-16 09:25:35 -07:00
Jean-Philippe Lang 16947dc016 [984] Allow to change locked and sticky status and the board of messages 2012-04-14 15:02:07 +02:00
unknown e7d96825b2 [#988] Improving Swedish translation 2012-04-13 16:07:42 +02:00
Holger Just 2bcd8787d3 Remove cookie cleaning method as it is not required anymore 2012-04-13 13:44:16 +02:00
jwalkerbg 6a4559e6af [#983] Translated several keys to Bulgarian language. 2012-04-13 09:45:08 +02:00
Gabriel Mazetto 859a9cb9d2 Some translation fixes and more missing translations for pt-BR 2012-04-12 08:20:02 +02:00
Holger Just 33260d885d Ensure array order for repeatable success of tests 2012-04-11 23:15:33 +02:00
Holger Just 277815ec96 Don't render cusom queries in the sidebar anymore
The queries are now part of the issues menu and are thus redundant in the
sidebar.
2012-04-11 20:50:42 +02:00
Holger Just 01c386b3c6 [#970] Cap too long menu entries with an ellipsis 2012-04-11 20:48:30 +02:00
Holger Just a6071c75ec [#975] Add test for editing version start date 2012-04-11 00:07:42 +02:00
Spenser Jones e6c79ddef4 [#975] Validate and enable editing of Version start date 2012-04-11 00:07:32 +02:00
Holger Just c3fc106355 [#974] Force the issue new link in the sidebar to the new action 2012-04-10 23:35:12 +02:00
Holger Just b169f02377 REMEMBER: ALWAYS RUN THE TESTS! 2012-04-09 15:46:06 +02:00
Holger Just 1f4baaa27b Take the password salt into account when checking for admin account change 2012-04-09 15:43:51 +02:00
Felix Schäfer 8f06b77ccb correct 'edit own issue notes' permission #966 2012-04-07 15:59:51 +02:00
Holger Just b8a29c288b Add the project_id to board URLs in the menu to generate valid URLs 2012-04-05 20:49:47 +02:00
Holger Just aca166271b Update German translation 2012-04-05 16:18:32 +02:00
Holger Just d61ad01308 Merge branch 'release-v3.1.0' into stable 2012-04-04 14:26:46 +02:00
Holger Just f681ed8c13 Bump version to 3.1.0 2012-04-04 14:21:43 +02:00
Holger Just eb62f4f7ec Update changelog for v3.1.0 2012-04-04 14:21:42 +02:00
Holger Just 4aed677908 Fix trailing whitespace 2012-04-04 14:21:42 +02:00
Holger Just 6f055664f1 Add copyright statement 2012-04-04 14:21:42 +02:00
Holger Just bb4340eb6d Update locales with new keys 2012-04-04 14:21:42 +02:00
Jean-Philippe Lang 3183aa55ed Set user_id as a protected attribute (#922). 2012-04-04 14:21:41 +02:00
Jean-Philippe Lang 275163ead2 Prevent mass-assignment vulnerability when adding/updating a wiki (#922). 2012-04-04 14:21:41 +02:00
Jean-Philippe Lang fc5dfd5813 Prevent mass-assignment vulnerability when adding/updating a version (#922). 2012-04-04 14:21:41 +02:00
Jean-Philippe Lang a3f6b30e99 Prevent mass-assignment vulnerability when adding/updating a time entry (#922). 2012-04-04 14:21:41 +02:00
Jean-Philippe Lang 5de377c5ee Use safe_attributes= just like in #create. (#922) 2012-04-04 14:21:41 +02:00
Jean-Philippe Lang 305df19ab7 Prevent mass-assignment vulnerability when adding/updating a news (#922). 2012-04-04 14:21:40 +02:00
Jean-Philippe Lang c3ca5813d5 Prevent mass-assignment vulnerability when adding/updating a forum message (#922). 2012-04-04 14:21:40 +02:00
Jean-Philippe Lang 384890c5ad Prevent mass-assignment vulnerability when adding a project member (#922). 2012-04-04 14:21:40 +02:00
Jean-Philippe Lang e77cb6133d Prevent mass-assignment vulnerability when adding/updating an issue category (#922). 2012-04-04 14:21:39 +02:00
Jean-Philippe Lang 7505cb2ff0 Prevent mass-assignment vulnerability when adding/updating a document (#922). 2012-04-04 14:21:39 +02:00
Jean-Philippe Lang 2eeb4b13a6 Prevent mass-assignment vulnerability when adding a news comment (#922). 2012-04-04 14:21:39 +02:00
Felix Schäfer 0a7c6e6774 Correct handling of @Rational#to_s@ on ruby 1.9 #887
Contributed by Martin S
2012-04-04 09:36:58 +02:00
Felix Schäfer 6f064d3856 Activity: use default filter only on first request #861 2012-03-28 20:31:20 +02:00
Robert Mitwicki c6af5c7982 Correct error message on group name #873 2012-03-28 08:56:06 +02:00
Jean-Philippe Lang 20a79124f7 Set format for activeresource client in reposman.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7955 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-27 12:51:43 +02:00
Felix Schäfer e6ec8ab30c Remove length limits on some user fields #928 2012-03-25 09:40:56 +02:00
Felix Schäfer dafe09ee32 Adapt test to new jQuery context menu
jQuery context menu introduced in 1b7ddb3cd7
2012-03-23 12:34:53 +01:00
Andrew Smith 7b3280e5ad Replace tables that were using the 'width' attribute with inline styles (should be replaced with an ID/class). 2012-03-23 11:22:58 +01:00
Andrew Smith fd250726ce Remove some inline styling and some depreciated table cell attributes and replace them with proper class names. 2012-03-23 11:22:57 +01:00
Andrew Smith 1cfd20e7e7 Fix missing cells and incorrect close order 2012-03-23 11:22:57 +01:00
Andrew Smith b15e6d8305 Fix duplicated 'back_url' IDs
Various hidden input fields are used to hold a URL to send the user back
to the correct page after submitting a form, however, they all use the
same ID which isn't allowed in HTML. Passing in 'id' as nil stops the
'hidden_field_tag' from adding an ID attribute to the tag.
2012-03-23 11:22:57 +01:00
Andrew Smith 2a70e2704f HTML corrections 2012-03-23 11:22:57 +01:00
Andrew Smith 23a857bf75 Remove hard-coded div on issue page 2012-03-21 21:07:21 +01:00
Andrew Smith a510f0a85f Updates the plugin so that it can support multiple instances.
Multiple instances need to be applied to different elements in the DOM
otherwise multiple menus will be called for each click/right click.

e.g.

jQuery(document).ContextMenu(url);

would work for any form on a page. Using this would mean that multiple
instances couldn't be used though

jQuery('#content form').eq(0).ContextMenu(url);
jQuery('#content form').eq(3).ContextMenu(url);

Using the above 2 menus will be created for the first and 4th forms on
the page. Any of forms won't response to menu clicks.

jQuery(docuemnt).ContextMenu(url);
jQuery('#content form').eq(0).ContextMenu(url);

With the above any form on the page will respond to menu clicks but the
first form will send 2 requests for the context menu.
2012-03-21 21:07:21 +01:00
Andrew Smith 2b640f76ec Simple wrapper for backwards compatibility 2012-03-21 21:06:58 +01:00
Andrew Smith 1b7ddb3cd7 jQuery version of the issue context menu 2012-03-21 21:06:58 +01:00
Andrew Smith 27160b76f5 The jQuery ajaxStart/Stop functions are being called at the wrong time.
The ajaxStart/ajaxStop functions were being called before the document
was ready and the 'ajax-indicator' element existed. This meant that they
would never be called when an ajax event happened.
2012-03-20 22:54:20 +01:00
Gregor Schmidt c9a403a4b5 [#939] Update documentation for GMail setup
It now matches the current guide in ChiliProject Wiki at https://www.chiliproject.org/projects/chiliproject/wiki/Email_Delivery#SMTP-server-using-TLS-GMail
2012-03-20 22:49:37 +01:00
Felix Schäfer 565aeabc79 Issue hierarchy on issue show view #906 2012-03-20 09:25:54 +01:00
Holger Just 68efc3de32 [#903] Require updated tzinfo with fix for Ruby 1.9.3 2012-03-18 18:15:08 +01:00
Felix Schäfer efac256a6b Design fix
The lower would only show if you have the permission to see/add related issues
2012-03-17 15:31:26 +01:00
Felix Schäfer f01194856f Use the news description as event description #933 2012-03-17 13:55:36 +01:00
Felix Schäfer df66e9b915 aaj: default to don't force notes as event descriptions #933 2012-03-17 13:53:29 +01:00
Felix Schäfer 20eed68421 [#739] Convert relative links to full links in textile
Textile doesn't "understand" :only_path => false and thus doesn't convert links of the form

<pre>"foo":/bar</pre>

to full URLs, this is done in a subsequent method akin to the wiki_lins and so on
2012-03-16 00:47:18 +01:00
Felix Schäfer 26c847a4ca More specific CSS #911 2012-03-16 00:30:20 +01:00
Felix Schäfer 1bc182405e Correct truncated styles on journal entries #914 2012-03-09 18:44:04 +01:00
Michaël Rigart 23864d99b5 Fix progress bar css #868 2012-03-09 18:36:32 +01:00
Felix Schäfer ef5dddf4db Switch to GitAdapter for quoting #891
Fixes problems with paths containing quotes (sic)
2012-03-05 18:21:28 +01:00
Felix Schäfer 2c76240544 Fix edit issue notes permission #888 2012-03-05 18:13:59 +01:00
Holger Just 724bd48494 Remove unused code
Since Rails 2.3.11, protect_from_forgery exclusively calls
handle_unverified_request which defaults to resetting the session. The old
code to handle an invalid CSRF token is not used anymore and is thus
removed to un-confuse people.
2012-03-05 12:50:44 +01:00
Felix Schäfer 900eda7a23 Don't require a specific pg gem version #915
pg was locked to ~> 0.9.0 as it was the last version to support ruby 1.8.6, we don't support it officially anymore, thus we can remove the version requirement.

Contributed by Dies Koper.
2012-03-01 12:56:31 +01:00
Felix Schäfer 4b5271f487 Correct quotation #891
The Windows shell doesn't seem to support single quotes…

Contributed by Dies Koper, Luke Carrier
2012-03-01 00:40:23 +01:00
Felix Schäfer 4a3f10317f Correct (wrongly) assumed ordering in test #892
Contributed by Luke Carrier.
2012-02-29 22:28:47 +01:00
Eric Davis b9b2c8c0d7 [#559] Group menus and add some dynamic menus 2012-02-26 22:37:34 -08:00
Felix Schäfer fbc71a80f8 Fix issue option list orientation #869
Contributed by Alf Gaida.
2012-02-24 16:36:04 +01:00
Felix Schäfer f327298f88 Fix missing submenu hint on issue context menu #882
Contributed by Andrew Smith
2012-02-24 15:56:29 +01:00
Michaël Rigart e678612d75 gitignore intellij project files 2012-02-24 15:45:22 +01:00
Michaël Rigart cbcce70400 Fix requiring SCM classes in dev mode #828
Change require to require_dependency so SCM classes get loaded on each request in dev mode
2012-02-24 15:44:02 +01:00
Felix Schäfer fda1dfa96d Merge pull request #153 from dfeyer/master
Fixes for Activity list column alignment
2012-02-22 13:53:13 -08:00
Dominique Feyer f561c54356 Fixes activity list column alignment 2012-02-12 23:08:37 +01:00
Holger Just 11e93ff36a Merge branch 'release-v3.0.0' into stable 2012-02-07 00:09:59 +01:00
Holger Just 3ecace901b Bump version to 3.0.0 2012-02-06 23:58:16 +01:00
Holger Just 2e7050ef79 Update Changelog for 3.0.0 release 2012-02-06 23:58:16 +01:00
Holger Just e0eb21b48b [#826] Position the .button-large as any other title-bar element 2012-02-06 23:58:16 +01:00
Holger Just 1eefd4b40d Merge branch 'master' into unstable
Conflicts:
	app/models/journal_observer.rb
	lib/chili_project/version.rb
	test/unit/principal_drop_test.rb
2012-02-06 23:57:10 +01:00
Holger Just ad996d7839 Merge branch 'release-v2.7.0' into stable 2012-02-06 23:40:10 +01:00
Holger Just 608fd61138 Bump version to 2.7.0 2012-02-06 23:36:58 +01:00
Holger Just a059cb4892 Update changelog for 2.7.0 release 2012-02-06 23:36:29 +01:00
Holger Just aa5be5132d [#593] Generate wiki content notifications in the JournalObserver - backported for 2.7
This will prevent the usage of the wrong wiki_content status.

The code is not overly pretty and deserves a thorough refactoring, but at
least it solves the problem at hand.
2012-02-06 22:54:53 +01:00
Holger Just 6fd9bc490f [#849 #789] Remove config.ru - Backport for 2.7
Rails 2.3 doesn't work well as a rack-only app
2012-02-06 22:50:38 +01:00
Holger Just f417996ff0 [#839] Remove ruby-debug dependency - Backport for 2.7
It completely breaks on Ruby 1.9.3-p0. This is a stopper for people installing all groups. For the rest it is rarely used at all. Developers and testers requiring it can include it into their Gemfile.local
2012-02-06 22:50:10 +01:00
Holger Just 0fd499afca Merge branch 'master' into unstable 2012-02-06 22:47:35 +01:00
Holger Just aa3ab990d0 [#593] Generate wiki content notifications in the JournalObserver
This will prevent the usage of the wrong wiki_content status.

The code is not overly pretty and deserves a thorough refactoring, but at
least it solves the problem at hand.
2012-02-06 22:44:44 +01:00
Holger Just 43afcde38d [#875] Fix typo 2012-02-01 17:26:07 +01:00
Holger Just 58435c82e4 [#775] Remove noisy journals on Attachments and Messages 2012-01-31 16:03:01 +01:00
Holger Just 01fefe8d3b [#775] Don't create a new journal on parent message on reply 2012-01-31 16:02:56 +01:00
Holger Just fb595ec7f9 [#775] Don't create a new journal on Attachment#increment_download 2012-01-31 16:02:49 +01:00
Holger Just 3f99ee63ff Always display our custom 404 page 2012-01-30 21:28:57 +01:00
Holger Just be4d679d54 [#849 #789] Remove config.ru as Rails 2.3 doesn work well as a rack-only app 2012-01-29 21:47:05 +01:00
Holger Just 3f126bdeaf [#843] Add config/setup_load_paths.rb to .gitignore 2012-01-29 19:55:32 +01:00
Holger Just 8e85cbdc11 [#839] Remove ruby-debug dependency.
It completely breaks on Ruby 1.9.3-p0. This is a stopper for people installing all groups. For the rest it is rarely used at all. Developers and testers requiring it can include it into their Gemfile.local
2012-01-29 19:55:32 +01:00
Holger Just 21f70fc86c Bump version to 3.0.0beta2 2012-01-18 19:48:06 +01:00
Holger Just f4c87b92e2 Update changelog for 3.0.0beta1 2012-01-18 19:31:11 +01:00
Holger Just b692d4a671 Fix source encoding 2012-01-18 19:26:56 +01:00
Holger Just 185edcd283 Fix trailing whitespace 2012-01-18 19:26:03 +01:00
Holger Just 19f2ccd496 Update copyright for 2012 2012-01-18 19:25:13 +01:00
Holger Just 91f6e79f4d Update locales with new strings 2012-01-18 19:23:56 +01:00
Holger Just e85947c7d4 Merge branch 'master' into unstable 2012-01-18 19:18:27 +01:00
Holger Just a0a2776f95 Make the strainer monkey patch more conservative and compatible 2012-01-18 10:19:04 +01:00
Holger Just 3c9e9764b0 [#807] Re-add details class to maintain backwarts-compatible lasses 2012-01-17 23:43:28 +01:00
Holger Just 3f325243ce Merge branch 'pulls/783/remove-new-issue-link-if-unauthorized' of https://github.com/finnlabs/chiliproject into unstable 2012-01-17 20:14:25 +01:00
Holger Just c313ed2d25 Remove unloadable from the monkey patches for Liquid.
It turns out in this case or core patches, unloadable actually breaks in
development mode. Did I already mention that I hate the Rails reloader?
2012-01-17 19:38:28 +01:00
Holger Just e1ecae83b3 [#774 #815 #807] Fix styles used for gravatars in issues
Gravatars now generally have a border and are displayed equally.
The Issue history formatting is cleaned up with much of the positioning
magic removed in favor or a simple float.
2012-01-17 19:34:33 +01:00
Holger Just 323b5bebc8 [#774] Move gravatar of issue author into the author tag 2012-01-17 19:31:02 +01:00
Holger Just 91c04f335d [#807] Move gravatar into the journal div 2012-01-17 19:25:53 +01:00
Holger Just 31620d0c0a Override first and last filters to allow simple array slicing 2012-01-17 13:47:13 +01:00
Holger Just 9967b5cdf2 Patch Liquid to include filters in a predictable order
This brings us a reliable filter override until
https://github.com/Shopify/liquid/pull/87 is accepted and
released upstream.
2012-01-16 20:49:39 +01:00
Holger Just e91a1e010f [#778] Properly cache Liquid markup
This commit moves the markup caching into Liquid rendering. As
Liquid allows to return different results depending on the environment
(variables, logged user, ...) we only cache the page if it contains
no active content.

Unfortunetely, active content currently also includes the TOC
in wiki pages.
2012-01-16 17:08:52 +01:00
Holger Just 637ca24aed Completely disable the Rails cache for tests
Settings extension to handle cache behaviour by Gregor Schmidt.
2012-01-16 15:54:05 +01:00
Holger Just a938d582b1 [#780] Clarify deprecation of Setting.clear_cache 2012-01-16 14:53:51 +01:00
Holger Just 33a8baf347 Merge branch 'pulls/780/setting-cache' of https://github.com/finnlabs/chiliproject into unstable 2012-01-16 14:50:34 +01:00
Holger Just d7ebffb7ad [#795] Generate error flash on Liquid syntax error 2012-01-16 14:10:45 +01:00
Holger Just 61a65d4624 [#827] Add status group in time entries report.
Patch provided by Jérôme BATAILLE.
Test from Jean-Philippe Lang.
2012-01-16 13:48:06 +01:00
Holger Just d9a0ac37eb Move Redmine::Info to ChiliProject::Info 2012-01-16 13:28:43 +01:00
Holger Just dbbc0b4919 [#558] Reduce version info in help link 2012-01-16 13:08:25 +01:00
Eric Davis 0407abbd56 Hide the More menu if there are no items to show 2012-01-12 15:00:23 -08:00
Eric Davis 4ce3b88473 Add a menu to view all projects since the main click event is blocked 2012-01-12 14:58:15 -08:00
Holger Just 11b441f745 Load Gemfiles from vendor/chiliproject_plugins 2012-01-11 12:02:25 +01:00
Holger Just cd0ea44ff8 [#822] Provide a default log_encoding even if the db column is not present yet 2012-01-10 18:32:38 +01:00
Holger Just 4c0b195380 [#819] set RAILS_ENV if only RACK_ENV is provided 2012-01-06 00:56:57 +01:00
Holger Just b080ad14ef [#790] Test the lazy variables 2012-01-05 23:36:30 +01:00
Holger Just f1324e6af4 [#790] Replace TagList and VariableList tags with variables 2012-01-05 23:36:30 +01:00
Holger Just 446f943968 [#790] Add filter to output an array into an unordered list 2012-01-05 23:36:30 +01:00
Holger Just 3c3eb2f7e7 [#790] Register variables with an API 2012-01-05 23:36:29 +01:00
Holger Just dc5fd8bc10 Actually focus username in login dropdown 2012-01-04 18:31:05 +01:00
Holger Just 0c87f611e9 Merge branch 'master' into unstable
Conflicts:
	config/locales/bg.yml
	config/locales/bs.yml
	config/locales/ca.yml
	config/locales/cs.yml
	config/locales/da.yml
	config/locales/de.yml
	config/locales/el.yml
	config/locales/en-GB.yml
	config/locales/es.yml
	config/locales/eu.yml
	config/locales/fa.yml
	config/locales/fi.yml
	config/locales/fr.yml
	config/locales/gl.yml
	config/locales/he.yml
	config/locales/hr.yml
	config/locales/hu.yml
	config/locales/id.yml
	config/locales/it.yml
	config/locales/ja.yml
	config/locales/ko.yml
	config/locales/lt.yml
	config/locales/lv.yml
	config/locales/mk.yml
	config/locales/mn.yml
	config/locales/nl.yml
	config/locales/no.yml
	config/locales/pl.yml
	config/locales/pt-BR.yml
	config/locales/pt.yml
	config/locales/ro.yml
	config/locales/ru.yml
	config/locales/sk.yml
	config/locales/sl.yml
	config/locales/sr-YU.yml
	config/locales/sr.yml
	config/locales/sv.yml
	config/locales/th.yml
	config/locales/tr.yml
	config/locales/uk.yml
	config/locales/vi.yml
	config/locales/zh-TW.yml
	config/locales/zh.yml
	db/migrate/20100217010520_add_custom_filter_to_auth_sources.rb
	lib/chili_project/version.rb
2012-01-04 16:41:10 +01:00
Holger Just ec9352dffe Merge branch 'release-v2.6.0' into stable 2012-01-03 20:48:31 +01:00
Holger Just 939fd0b9fa Bump version to 2.6.0 2012-01-03 20:46:58 +01:00
Holger Just 4d4b5b6642 Update changelog for 2.6.0 release 2012-01-03 20:45:16 +01:00
Holger Just 7ef1c41aa0 Force source encoding to UTF-8 2012-01-03 20:43:42 +01:00
Holger Just 4577e54f04 Fix trailing whitespace 2012-01-03 20:43:08 +01:00
Holger Just e95b4992e4 Update copyright for 2012
We programmers have a nice new years tradition: We revisit all of our
projects and add 1 to a small number near a "(c)".

-- Volker Dusch
https://twitter.com/__edorian/status/153801913442373633
2012-01-03 20:36:40 +01:00
Holger Just f90d0fd775 Update locales 2012-01-03 20:29:25 +01:00
Holger Just 0f0e42448a Overwrite compact on child class of Array to not return an instance of Array
This is necessary because in Ruby 1.9.3, the behavior of an internal dup of
the array (rb_ary_dup) was changed to always return an array instance, not
an instance of the actual class which it was working on.

Why can't people just stick to what works but instead try to have special
snowflakes everywhere? </rant>
2012-01-03 19:45:38 +01:00
Holger Just 49cd6f87aa [#789] Add config.ru for Rack-only servers 2012-01-03 16:31:22 +01:00
Holger Just 1bd8ea6ce7 [#812] Change all references of Redmine to ChiliProject in translations 2012-01-03 15:58:06 +01:00
Eric Davis b8a7f2923a Remove arbitrary limit on the Time Entry Report columns
Appears it was put in place to prevent wide reports but was actually
limiting the data, especially when putting a day in each column.
2011-12-29 15:24:03 -08:00
Eric Davis e4554a6d7b [#792] Fix tests from merge 2011-12-29 11:50:48 -08:00
Eric Davis 00df832126 Merge branch 'ticket/unstable/792-confirmation-emails' into unstable 2011-12-29 10:28:47 -08:00
Eric Davis 66fe8287ce [#809] Fixed a nil object error in params. 2011-12-29 10:08:03 -08:00
Eric Davis a3b1127ef8 Merge branch 'ticket/unstable/809-add-multiple-projects' into unstable 2011-12-29 09:58:34 -08:00
Eric Davis c51d339512 [#809] Multiple projects can now be assigned to a group or user.
* Added a Javascript autocomplete for searching Projects
* Updated the Users and Groups controllers' #edit_membership method to
  create/update multiple Member records
2011-12-29 09:30:32 -08:00
Eric Davis af00598e5e [#809] Refactored a duplicate form to a partial. 2011-12-29 09:30:32 -08:00
Eric Davis f835420383 Merge branch 'ticket/unstable/808-issue-description-diff' into unstable 2011-12-29 08:36:46 -08:00
Eric Davis 38d0d530b0 [#808] Show issue description diffs in the lightbox popup 2011-12-29 08:35:51 -08:00
Eric Davis 4acee9e989 Add a reusable dialog-window for lightbox style popups 2011-12-29 08:35:51 -08:00
Eric Davis aafec2c50f Add some nice defaults for jQuery ajax 2011-12-29 08:35:51 -08:00
Eric Davis 08454ab7fa [#808] Truncate and show a link to the full journal diff in the issue history 2011-12-29 08:35:51 -08:00
Eric Davis 5ad97a4ea3 [#808] Add JournalsController#diff to diff a single field 2011-12-29 08:35:45 -08:00
Eric Davis e045306a5c [#808] Add routing for journal diffs 2011-12-29 08:35:37 -08:00
Eric Davis 8100ce0ce5 Optimize: Remove per-language assertions for Mailer tests
I can't find any real reason they are needed at all and were taking
a lot of time to run. Results for the test class

Before: 56 seconds
After: 23 seconds
2011-12-28 12:20:45 -08:00
Eric Davis 84cc8ab215 Guard against nil author or author emails in the Mailer. 2011-12-28 11:31:05 -08:00
Eric Davis ef00061568 [#798] Fixed the sidebar design by moving #sidebar out of #main-menu
The #main-menu was used as the entire left column but was having styles
applied to it for the menu which were leaking onto the #sidebar. By
wrapping the column in a unique div the menu styles were isolated from
the sidebar styles.
2011-12-28 11:14:38 -08:00
Eric Davis 15428fc092 [#806] Add Board and Message watcher management 2011-12-28 11:03:24 -08:00
Eric Davis a8d28e4593 Merge branch 'ticket/unstable/805-wiki-watching' into unstable 2011-12-28 10:23:26 -08:00
Eric Davis ce0c32ea02 Refactor: create the permission name dynamically to support other classes 2011-12-28 10:22:06 -08:00
Eric Davis 97fe88f8d9 [#805] Add the Watchers sidebar to Wiki Pages 2011-12-28 10:22:06 -08:00
Eric Davis 3df729e47d Replace puts and !!! messages with pending tests when the test SCMs are missing 2011-12-27 18:23:14 -08:00
Eric Davis 7bce7f7b07 Merge branch 'ticket/unstable/802-group-watchers' into unstable 2011-12-27 18:09:25 -08:00
Eric Davis 04db42f537 Fix another broken test that can't run by itself due to missing fixtures 2011-12-27 17:38:38 -08:00
Eric Davis 16943d04f7 [#802] Use the group.png icon as a Group avatar 2011-12-27 17:38:34 -08:00
Eric Davis 8e3d4da376 [#802] Show groups in the watchers partial and users autocomplete 2011-12-27 17:38:30 -08:00
Eric Davis 65e7995682 [#802] Change WatchersController to allow groups 2011-12-27 17:38:25 -08:00
Eric Davis e6e6a06fff [#802] Allow Groups to be added as a Watcher 2011-12-27 17:38:20 -08:00
Eric Davis 10054cfd8f [#802] Move methods from User so other Principals can use them 2011-12-27 17:38:14 -08:00
Eric Davis 8b3207a893 Fix test that doesn't run alone due to missing fixtures 2011-12-27 17:16:16 -08:00
Eric Davis 037d915d7b Merge branch 'ticket/unstable/800-non-member-watch' into unstable 2011-12-27 17:14:57 -08:00
Eric Davis c3555b1728 [#800 #801] Exclude users already watching the issue 2011-12-27 17:09:29 -08:00
Eric Davis 8160cd02bd [#800 #801] Add Javascript search to bulk add watchers to issues. 2011-12-27 17:09:24 -08:00
Eric Davis 5deae7ebe3 [#800 #801] Refactor AutoCompletesController#users to not be coupled to Groups 2011-12-27 17:09:19 -08:00
Eric Davis a110f1041d [#800 #801] Refactor the user auto complete method to the AutoCompletesController 2011-12-27 17:09:18 -08:00
Eric Davis 111c7f47f7 [#800 #801] Test that non-member watchers aren't removed if they still have access 2011-12-27 17:08:48 -08:00
Eric Davis df5b2198e9 Merge branch 'ticket/unstable/799-document-watching' into unstable 2011-12-27 13:50:47 -08:00
Eric Davis 3af5544dbc [LSS#4190] Add watching to documents 2011-12-27 13:16:52 -08:00
Eric Davis 61a21f4990 [#797] Fix wiki page hierarchy 2011-12-27 13:05:21 -08:00
Eric Davis 72eadcc6ea [#796] Adds date range filter.
Based on r6226 from Redmine by Jean-Philippe Lang
2011-12-27 13:02:46 -08:00
Eric Davis dc541597ec [#792] Send email from mail_handler for emails which are missing required information 2011-12-26 17:39:29 -08:00
Eric Davis 1dd07471ca [#792] Send email from mail_handler for emails missing a project 2011-12-26 17:38:26 -08:00
Eric Davis 4ff670f5fa [#792] Send email from mail_handler for unauthorized actions 2011-12-26 17:38:25 -08:00
Eric Davis 9f4683d71b [#792] Send email when mail_handler gets an email from an unknown user 2011-12-26 17:38:25 -08:00
Eric Davis 331ecb4c4f [#792] Add confirmation emails for successful forum replies 2011-12-26 17:38:25 -08:00
Eric Davis 7c7aca4f0c [#792] Add confirmation emails for successful issue replies 2011-12-26 17:38:25 -08:00
Eric Davis d53c4e9aae [#792] Add confirmation emails for successful issue creation 2011-12-26 17:38:24 -08:00
Eric Davis 9d8fc86b8e [#792] Add settings for confirmation emails are sent for incoming mail 2011-12-26 17:38:19 -08:00
Eric Davis 260e8b84f8 [#674] Convert outbound mail to be sent per-recipient
Instead of a single email that is sent out with all the recipients as CC/BCC,
each recipient will be delivered their own email. This will let emails to be
customized per user based on their permissions, without exposing private data.
2011-12-26 16:58:43 -08:00
Eric Davis 21685caf5f [#791] Add support for pop3s (SSL) to redmine📧receive_pop3 2011-12-26 12:45:30 -08:00
Enderson Maia 896fa80784 [#785] pt-BR translation updates 2011-12-26 17:06:49 +01:00
Gregor Schmidt 69ccbafaf4 [#783] Removing link to new issue when missing permissions 2011-12-20 10:13:01 +01:00
Gregor Schmidt 10e16e9a56 [#780] Clearing (Settings) cache to make the tests pass again 2011-12-19 17:30:19 +01:00
Gregor Schmidt 6273891ae7 [#780] Remove non-functional call to Setting.check_cache 2011-12-19 17:30:13 +01:00
Gregor Schmidt 92b6d43150 [#780] using a changing cache key to avoid the need for explicit cache invalidation
This should work on all cache stores, since only the basic cache operations fetch and delete are used. The methods clear_cache and check_cache can no longer be supported. To sweep the whole cache Rails.cache.clear may be used. To invalidate the Settings only, you may use Setting.first.try(:touch).
2011-12-19 17:30:08 +01:00
Holger Just 6f17ec6fd0 Bump version to 3.0.0beta1 2011-12-18 21:51:43 +01:00
Holger Just d5f4bec112 Update changelog for 3.0.0-beta1 2011-12-18 21:40:21 +01:00
Holger Just 745f889e92 Enforce UTF-8 source encoding 2011-12-18 21:40:14 +01:00
Holger Just ceac1bb419 Update missing keys in i18n locales 2011-12-18 21:40:14 +01:00
Holger Just e1ac469cfb Fix trailing whitespace 2011-12-18 21:40:01 +01:00
Holger Just d24e8186b4 Merge remote-tracking branch 'chiliproject/master' into unstable 2011-12-18 21:33:05 +01:00
Felix Schäfer 1ebec832af [#486] More menu items on the wiki annotate view. 2011-12-18 21:21:21 +01:00
Felix Schäfer d71a74bcbe Explicit name for the example slapd config ldif. 2011-12-18 20:45:01 +01:00
Felix Schäfer 44cf67032f Merge pull request #142 from elm/custom-ldap-filter
[#388] Custom LDAP filter
2011-12-18 11:13:55 -08:00
Tom Rochette b135162c5b Login should redirect to welcome/home page if already logged in. 2011-12-18 19:49:35 +01:00
Holger Just bde0f6a862 Fix line endings from \r\n to \n 2011-12-18 19:30:46 +01:00
Holger Just 6c690814c9 [#463] Pass through Basic Auth in an FCGI setup 2011-12-18 19:30:37 +01:00
Holger Just 81f6635878 Remove debug code. Sorry for that... 2011-12-18 15:58:42 +01:00
Holger Just ba6fcfeca9 Override some filters of Liquid core.
These filters change the implemntation of sub and gsub to use the block method.
This prevents the evaluation of backreferences in the replacement text. See
https://gist.github.com/1491437 for examples.

Also, it allows split to be called without arguments to split strings on
whitespace.
2011-12-18 15:54:09 +01:00
Holger Just 2733e5173f Fix trailing whitespace 2011-12-18 15:49:18 +01:00
Holger Just 6b725c32e6 Add wiki formatting for h4 2011-12-18 15:49:00 +01:00
Holger Just 0049f82182 Redirect back to where I came from when loggin in via the menu form 2011-12-18 12:28:32 +01:00
Holger Just 58a7182e2d Use the correct subject id for quoting 2011-12-18 12:04:13 +01:00
Eric Davis 2f0d13149d Copyright header update 2011-12-17 15:50:52 -08:00
Eric Davis d583c94b5f Update locales 2011-12-17 15:49:28 -08:00
Eric Davis 3a16f3f5b1 Merge remote-tracking branch 'upstream/master' into unstable 2011-12-17 15:20:58 -08:00
Holger Just 04eb115da7 Add identity tag which just returns whatever was entered as input 2011-12-17 23:49:25 +01:00
Holger Just 34fef9d8fc Fix display of floatable TOCs in wikis 2011-12-17 22:14:19 +01:00
Holger Just e2c57fd12d Make floated TOCs in wikis compatible with the Liquid engine
The floated tags (>toc and <toc) are invalid syntax because of the < and >
characters. We transform them to toc_left and toc_right instead.
2011-12-17 22:14:19 +01:00
Holger Just 7458bca34b Don't create arguments for legacy tags if there aren't any 2011-12-17 22:14:19 +01:00
Holger Just 60deeb5306 Move definiton of liquid legacy tags into the Legacy module.
This is required to retaiun the definition in development mode as the module
is stragely reloaded.
2011-12-17 22:01:20 +01:00
Holger Just 4656cf1c57 Escape raw input if there is a Liquid syntax error 2011-12-17 21:57:01 +01:00
Jean-Philippe Lang 0d69fa6bb1 Patch for ruby1.9.3 compatibility.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8234 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-16 14:34:22 +01:00
Holger Just 611889f3f7 [#748] Use SCM commands to detect the revision 2011-12-15 22:08:18 +01:00
elm 48737b0c6f Add OpenLDAP config ldif for redmine database 2011-12-13 20:56:43 +01:00
elm bf7bcec1da Remove internal LDAP entries to make the ldif importable. 2011-12-13 20:56:43 +01:00
elm 532c9cc55b Use consistent naming to fix translation in error message 2011-12-13 20:56:43 +01:00
Eric Davis 0f8a040d28 [#3619] Validate the AuthSourceLdap#custom_filter
Conflicts:

	app/models/auth_source_ldap.rb
	test/unit/auth_source_ldap_test.rb
2011-12-13 20:56:31 +01:00
Eric Davis 1318ac204e [#3619] Allow defining a custom ldap filter for AuthSourceLdap.
Conflicts:

	app/models/auth_source_ldap.rb
	config/locales/en.yml
	test/unit/auth_source_ldap_test.rb
2011-12-12 13:43:21 +01:00
Eric Davis b2998c3972 Merge pull request #132 from mbreit/feature/733-issue-due-today
[#733] Add Issue#due_today? and add due-today css class
2011-12-10 13:29:27 -08:00
Eric Davis d2ccdc88fa [#760] Extract quick search to a partial.
Contributed by Peer Allan
2011-12-10 12:28:53 -08:00
Eric Davis d32480753b [#692] Update the style of the issue show page to be cleaner 2011-12-10 12:22:38 -08:00
Eric Davis 9f0bd25523 [#692] i18n English string in view 2011-12-10 12:21:34 -08:00
Eric Davis 100faf94f7 [#692] Add some style to issue action menus 2011-12-10 12:16:54 -08:00
Eric Davis f6d0932bff [#692] Use i18n label for the More menu 2011-12-10 11:35:12 -08:00
Eric Davis 2a74699196 [#692] Make breadcrumbs larger and not completely underlined 2011-12-10 11:30:38 -08:00
Eric Davis ee48a8da4f Merge branch 'ticket/unstable/692-final-design' into unstable 2011-12-10 10:40:09 -08:00
Felix Schäfer 05092b2737 Merge pull request #139 from esmarkowski/patch-1
[#761] Fix quotation of since date in git adapter
2011-12-10 02:31:05 -08:00
Eric Davis 52ab42b5b0 [#692] Add missing closing tag 2011-12-09 19:26:21 -08:00
Eric Davis e8b8841717 [#692] Fix image names 2011-12-09 19:04:20 -08:00
Eric Davis f9a2e30b9f [#692] Fix issue history styles 2011-12-09 19:04:20 -08:00
Eric Davis f76c922dd8 [#692] Fix the context menu styles
It was conflicting with S&P theme styles due to the CSS load order,
reset them back to the pre-S&P theme style.
2011-12-09 19:04:20 -08:00
Eric Davis 8e6ccceb28 [#692] Remove selected gradient from context menu tables 2011-12-09 19:04:19 -08:00
Eric Davis a73c23ae9b [#692] Use text based logo 2011-12-09 19:04:19 -08:00
Eric Davis 0385979d5e [#692] Add register link back into the top menu 2011-12-09 19:04:19 -08:00
Eric Davis 612f2f98e4 [#692] Fix and simplify the top menu open/closing
* Remove bunch of extra code from choosen
* Fix awkward indention
* Add admin menu items to the Modules menu
* Turn off bold on menu item hover, was causing jumping in width
* Fix color on opened top menus
* Fix a bunch of edge cases in the menu clicks.
* Remove gross 'html' binding in favor of a one time only one
2011-12-09 19:04:08 -08:00
Eric Davis b312bf387a [#692] Cleanup layout structure from rebase 2011-12-09 18:06:19 -08:00
Eric Davis 971277b507 [#692] Fix failing test due to design changes 2011-12-09 18:06:19 -08:00
Eric Davis c33227ffe3 [#692] Update CSS by reviewing pre and post-merge diff 2011-12-09 18:06:18 -08:00
Eric Davis 32fa8cb522 [#692] Fix syntax errors and undefined methods in layout from merge 2011-12-09 18:06:18 -08:00
Romano Licker 83f8f63640 [#692] implemented widget design for mypage
- background gradient image missing
- made icon grey in order to keep it visible
- raised icon margin to position it directly inside the
  widget when in personalize mode
- added a background image to display the gradient
2011-12-09 18:06:18 -08:00
jwollert a1500a49b5 [#692] remove duplicate header from the bottom of the ticket show view 2011-12-09 18:06:18 -08:00
Romano Licker d22afea284 [#692] header-menu subentries closer together
2 columns instead of 3 for issue detail
2011-12-09 18:06:17 -08:00
Romano Licker e371bcad24 [#692] fixes admin-menu
new design on ticket view
filter / options / attachments fieldset redesign
2011-12-09 18:06:12 -08:00
Romano Licker 0eeeb04c31 [#692] removes div#admin-menu - now content of main menu 2011-12-09 14:04:02 -08:00
Romano Licker 729e801c9f [#692] renamed div#account to div#header cleanup 2011-12-09 14:03:59 -08:00
jwollert 7e287d6e5a [#692] fixes IE7 overflow bug in project search results 2011-12-09 13:57:24 -08:00
Eric Davis 94f7bef2c6 Merge branch 'ticket/master/298-separate-plugin-path' 2011-12-09 13:43:21 -08:00
Felix Schäfer ba0ded88c3 Merge pull request #125 from finnlabs/pulls/708/journal_class_name_in_attribute
Bug #708: AAJ does not create journals, when models are created using sub classes
2011-12-09 13:36:40 -08:00
Eric Davis 7d1c0374e4 Merge branch 'ticket/unstable/747-capybara' into unstable 2011-12-09 13:28:33 -08:00
Felix Schäfer fbde6859d1 Merge branch 'rubychan-coderay-1.0' into unstable 2011-12-09 16:58:24 +01:00
Felix Schäfer 1c84fc0f4d Text corrections. 2011-12-09 16:57:48 +01:00
Felix Schäfer 8671006b70 [#649] Prevent the extra wiki styles from interfering with code highlighting. 2011-12-09 16:57:16 +01:00
Felix Schäfer aa88fe8e39 Merge branch 'coderay-1.0' of https://github.com/rubychan/chiliproject into rubychan-coderay-1.0 2011-12-09 16:50:20 +01:00
Spencer Markowski b264a8ee3f Encloses since date in single quotes. This was causing git to respond with fatal: Unknown Object and preventing revisions from being updated. 2011-12-08 23:51:15 -05:00
Felix Schäfer d943efd0eb [#748] Make ChiliProject::Version.revision more resilient
* Won't output errors when the ChiliProject git repo isn't there anymore,
* Works even if not invoked from the ChiliProject root directory,
* Moved the formatting logic to the git call.
2011-12-03 17:39:52 +01:00
Felix Schäfer 6a616a5f13 [#740] Fix faulty assignment 2011-12-03 16:32:29 +01:00
Eric Davis b32fc97314 [#747] Add some capybara helper methods 2011-12-01 18:13:27 -08:00
Eric Davis a2feb14c83 [#747] Include capybara for integration tests 2011-12-01 16:46:50 -08:00
Eric Davis 4b5d4307d2 Merge branch 'ticket/unstable/720-tagging' into unstable 2011-12-01 15:58:29 -08:00
Eric Davis f179fea7bf [#720] Use = to show the explicit dependency 2011-12-01 15:58:05 -08:00
Holger Just 579061c794 Move shebang of rdm-mailhandler.rb back to the top. 2011-12-01 20:58:14 +01:00
Felix Schäfer 1d21cab2e4 Merge branch 'master' into unstable
Conflicts:
	app/views/projects/index.rhtml
	lib/chili_project/compatibility.rb
2011-12-01 17:46:05 +01:00
Holger Just 6df18f0a7b Merge branch 'release-v2.5.0' 2011-11-30 20:45:19 +01:00
Holger Just a4f117fe60 Merge branch 'release-v2.5.0' into stable 2011-11-30 20:44:39 +01:00
Holger Just 7104a24593 Bump version to 2.5.0 2011-11-30 20:43:08 +01:00
Holger Just 6e46c5e945 Update changelog for 2.5.0 release 2011-11-30 20:42:04 +01:00
Holger Just c2edd624a6 Fix trailing whitespace 2011-11-30 20:29:59 +01:00
Holger Just 5e171001bc [#709] Fix cache poisoning vector if credential caching is enabled.
The cache did not distinguish between cached credentials for read and write
access. As it does not check permissions again if there is a cache hit, users
with authorization for either reading or writing could poison the cache and
subsequently authorize themselves for both access types.

Original fix is by Jean-Philippe Lang, http://www.redmine.org/issues/9567
2011-11-30 20:29:58 +01:00
Holger Just 24538a4af2 [#735] Log time form on issue update should only be displayed with log_time permission
Based on a patch by Jean-Philippe Lang.
2011-11-30 20:28:20 +01:00
Holger Just 59dc103492 [#735] Don't allow time entry creation with only edit permission
Based on a patch by Jean-Philippe Lang.
2011-11-30 20:27:59 +01:00
Holger Just c5b83b8709 [#735] Don't allow time entry edits with only log_time permission
Based on a patch by Jean-Philippe Lang.
2011-11-30 20:27:59 +01:00
Felix Schäfer 42363c32f7 Better checks for previous commit. 2011-11-30 18:08:36 +01:00
Felix Schäfer f333f43a57 [#736] force recipients/cc to arrays in the Mailer
String#delete might break on 1.9 with dashes in the author's email address. Furthermore, String#delete doesn't do what the original author thought it does.
2011-11-30 18:04:09 +01:00
Felix Schäfer add0bf4d0a Don't double-escape project names in base layout. 2011-11-27 17:01:46 +01:00
Holger Just 5bf27de92a [604] Add compatibility check for Liquid 2011-11-26 22:24:51 +01:00
Holger Just 8c26dea72d Add catch-all compatibility check, defaults to false 2011-11-26 22:21:48 +01:00
Holger Just 0b952a1edd [#263] Fix test error on Ruby 1.9
TreeNode#to_s (from the rubytree gem) is broken. It is implicitly called by
Shoulda on 1.9 only. As we don't actually need it, we just remove the method.

The bug is reported at http://rubyforge.org/tracker/index.php?func=detail&aid=29435&group_id=1215&atid=4793
2011-11-26 20:36:56 +01:00
Holger Just 9f4d12ffdf [#734] Don't modify text inline.
This is not only a wee bit faster (yay!) but also allows use to deal with
frozen strings and doesn't change content which might inadvertently be saved
later on. And it fixes some broken tests on Ruby 1.9 :)
2011-11-26 16:10:24 +01:00
Holger Just 28ce07b1dd [#734] Force instance_variables to string for Ruby 1.9 compatibility 2011-11-26 16:09:08 +01:00
Holger Just ce5ffed6a3 Require bundler 1.0.6.
Only that version introduced the mingw platforms we use in our Gemfile.
2011-11-26 12:26:11 +01:00
Eric Davis 01e43f2e6b Merge pull request #134 from schmidt/pulls/725/unstable
[#725] Compatibility check for jQuery availability (unstable)
2011-11-25 12:50:25 -08:00
Eric Davis 261aca658c Merge pull request #133 from schmidt/pulls/725/master
[#725] Compatibility check for jQuery availability (master)
2011-11-25 12:50:08 -08:00
Moritz Breit ed0e92b1f6 [#733] Add Issue#due_today? and add due-today css class 2011-11-25 21:06:29 +01:00
Felix Schäfer 166d65b26d [#258] Unvendor net-ldap 2011-11-25 20:54:23 +01:00
Eric Davis 1322fbbad0 Merge pull request #129 from jwalkerbg/master
Added Bulgarian translation of several strings
2011-11-25 11:28:45 -08:00
Gregor Schmidt 3577550cfa [#725] Chili-core now loads jQuery by default
This was added to unstable with ab2856b53 and will be released with Chili 3.0
2011-11-25 20:24:06 +01:00
Eric Davis 8fc2b72740 [#720] Add acts-as-taggable-on gem and migration for tag support
As per the gem docs, 2.1.0 is the last Rails 2.x compatable version
2011-11-25 11:23:34 -08:00
Gregor Schmidt 13da5e0445 [#725] Add compatibility check for jQuery availability
In the current master a.k.a. ChiliProject 2.x, there is
no jQuery loaded by core.
2011-11-25 20:19:58 +01:00
Gregor Schmidt be44bbe597 [#725] Add compatibility check for jQuery availability
In the current master a.k.a. ChiliProject 2.x, there is
no jQuery loaded by core.
2011-11-25 20:18:10 +01:00
Felix Schäfer 574419bbb1 Merge pull request #126 from mbreit/bugfix/711-tabular_form_builder_ruby19
[#711] Fix TabularFormBuilder on Ruby 1.9

This is actually a bug in rails 2.3.14 on ruby 1.9 -- Felix
2011-11-25 11:04:35 -08:00
jwalkerbg d8daeffa7b Added Bulgarian translation of several strings. 2011-11-25 20:32:27 +02:00
Felix Schäfer 8b7ee93f90 Merge pull request #124 from mbreit/bugfix/707-wiki-diff-encoding-error-ruby19
[#707] Fix encoding error on wiki diffs on Ruby 1.9
2011-11-25 09:48:52 -08:00
Felix Schäfer 03d956c360 Merge pull request #90 from meineerde/issues/master/124-delete-registered-users
[124] delete registered users
2011-11-25 09:47:12 -08:00
Felix Schäfer a80f822481 Merge pull request #123 from mbreit/bugfix/698-issue-query-ruby19
[#698] Fix single-value query atoms in issue queries on Ruby 1.9
2011-11-25 09:45:49 -08:00
Eric Davis a0d95a87e9 [#706] Add plugin hooks to projects/index
Contributed by David O
2011-11-25 02:21:11 -08:00
Eric Davis e6fe1fc776 Merge remote-tracking branch 'meineerde/issues/unstable/604-liquid-rebased' into unstable 2011-11-25 01:44:19 -08:00
Eric Davis b1d9667335 Fix test so it runs in isolation 2011-11-20 02:49:22 +01:00
Holger Just a31a4a8852 [#604] Adapt fixtures for new liquid syntax 2011-11-20 02:49:22 +01:00
Eric Davis dedf696666 [#604] Add missing test for Liquid 2011-11-20 02:49:22 +01:00
Holger Just 464dafc1e7 [#604] We don't support the old escape style anymore 2011-11-20 02:49:22 +01:00
Holger Just f6805303fb [#604] Remove the leading newline from Liquid blocks for easier formatting 2011-11-20 02:49:21 +01:00
Holger Just 994132a51a [#604] Add nicer error formatting, similar to the old style 2011-11-20 02:49:21 +01:00
Holger Just fe6a79ac17 [#604] Add some handy filters 2011-11-20 02:49:21 +01:00
Holger Just cc0526cb27 [#604] Introduce compatibility layer for third party macros.
This be removed with complete macro removal.
2011-11-20 02:49:21 +01:00
Holger Just 862c9e0fde [#604] Adapt the upstream include mechanism to work with Wiki pages 2011-11-20 02:49:20 +01:00
Eric Davis 71ecdb57ed [#604] Port the child_pages to Liquid tag 2011-11-20 02:49:20 +01:00
Eric Davis 1e7dfe545e [#604] Port the macro_list to Liquid: variable_list and tag_list 2011-11-20 02:49:20 +01:00
Eric Davis 7778ff2f83 [#604] Port hello_world macro to liquid 2011-11-20 02:49:20 +01:00
Holger Just 29fe856916 [#604] Add base tag 2011-11-20 02:49:19 +01:00
Eric Davis 81ca15c52c [#604] Add ability to support legacy macros 2011-11-20 02:49:19 +01:00
Holger Just 82432f3f99 [#604] Evaluate Liquid before Textile-to-HTML transformation.
This changes how the liquid integration works. It now integrates the Textile
conversion step. This was necessary because if you first convert the snippets
inside of loops and conditionals from Textile to HTML, you loose some
important context information which is required to e.g. build proper lists in
textile.

We expect the standard case that Liquid tags return Textile markup instead
of HTML. Thus, we can convert the final textile markup to HTML as a very last
step.

To allow existing and new macros (or tags) to return HTML for advanced usage,
we save their respective output into the context and put a placeholder string
into the generated markup. After the transformation to HTML, we insert the
previously generated HTML into the string using search+replace in
lib/chili_project/liquid/template.rb. Tags have to be registered using
:html => true for this special treatment.
2011-11-20 02:49:19 +01:00
Eric Davis 72fa3ff920 [#604] Run the output of the WikiFormatted text into Liquid
The current view's instance variables are sent to liquid dynamically
2011-11-20 02:49:19 +01:00
Eric Davis 981143f78f [#604] Disable classic ChiliProject wiki macros 2011-11-20 02:49:18 +01:00
Eric Davis 7906afe6b9 [#604] Add an IssueDrop with custom field support 2011-11-20 02:49:12 +01:00
Eric Davis 6f8d8c4105 [#604] Add basic WikiPageDrop 2011-11-19 23:34:52 +01:00
Eric Davis 91914cb877 [#604] Add simple Liquid drops for Projects and Principals 2011-11-19 23:33:36 +01:00
Holger Just 7261622196 [#604] Add base drop 2011-11-19 23:31:58 +01:00
Eric Davis 4289559b5f [#604] Require the liquid gem 2011-11-19 23:31:05 +01:00
Moritz Breit d15c851bb3 [#711] Fix TabularFormBuilder on Ruby 1.9.2 2011-11-17 11:32:13 +01:00
Gregor Schmidt fb7f109ac6 [#708] Adding tests exposing the erroneous behavior 2011-11-17 11:17:11 +01:00
Gregor Schmidt e2938d26f3 [#708] Using instance var to store journal class name
this way journal classes are only created for classes with
calls to acts_as_journalized. You may now subclass journaled models to extend them with helper methods in plugins w/o interfering with aaj.
2011-11-17 11:16:48 +01:00
Moritz Breit 60db868470 [#707] Fix encoding error on wiki diffs on Ruby 1.9
WikiDiff#to_html returns a string with ASCII encoding if
the WikiJournal content has been Zlib compressed because
Zlib::Inflate.inflate returns strings with ASCII encoding.
Forcing the encoding to be UTF8 fixes this bug.
2011-11-16 17:39:26 +01:00
Moritz Breit c3df17585d [#698] Fix issue queries on Ruby 1.9 2011-11-16 14:22:43 +01:00
Eric Davis 1e41ec912b Guard against a LocalJumpError in Project#project_tree 2011-11-14 19:23:49 -08:00
Eric Davis af9572d985 Confirm before deleting issue categories 2011-11-14 19:10:13 -08:00
Eric Davis 5f3c6b87e4 Show email notification options in a project tree 2011-11-14 18:55:39 -08:00
Felix Schäfer b1671e46f0 Merge pull request #111 from edavis10/ticket/unstable/672-query-subprojects
#672 Allow queries to include subproject issues
2011-11-13 12:11:52 -08:00
jwollert edce16c89a [#692] enable jump to project box to take options (projects and html) 2011-11-12 16:22:31 -08:00
Romano Licker 977f74e11a [#692] Main design changes for new theme 2011-11-12 16:22:25 -08:00
Romano Licker c16cfd8ff1 [#692] images for new design 2011-11-12 16:22:24 -08:00
Romano Licker 734da91b4b [#692] login slidedown implemented with tabindex and focus fix 2011-11-12 16:22:24 -08:00
jwollert fecfbaf908 [#692] change project navigation arrow on hover
- fix project navigation arrows
2011-11-12 16:22:24 -08:00
Holger Just 0462fa973b [#688] Truncate garbage from the end of the changelog. 2011-11-08 11:40:27 +01:00
Eric Davis 1897459b76 [#263] Refactor: move top menu logic to ApplicationHelper 2011-11-06 19:49:23 -08:00
Eric Davis 3e87af38d4 [#263] Make issue description the full width 2011-11-06 19:38:44 -08:00
Eric Davis 3409f5b620 [#658] Include jQuery v1.7, jquery ui 1.8.16, and smoothness theme 2011-11-06 19:21:56 -08:00
Eric Davis ab2856b53f [#263] Add new layout and theme
Merge branch 'ticket/unstable/263-new-layout-ready' into unstable
2011-11-06 18:18:35 -08:00
Eric Davis 7bc11f8de0 [#263] Tests require one theme being present 2011-11-06 17:46:55 -08:00
Eric Davis f10412ef71 [#263] Update tests for views in the new layout 2011-11-06 17:46:31 -08:00
Eric Davis a911d83889 [#263] Fix theme tests that changed singleton data 2011-11-06 16:39:28 -08:00
Eric Davis 5620488727 [#263] Removed and tweaks the design based on feedback 2011-11-06 16:39:15 -08:00
Felix Schäfer af50984023 Better decide if journal implements the method itself. #554 2011-11-06 13:25:31 +01:00
Eric Davis b160217299 Use full paths to test_helper.rb for metric_fu/rcov to pick up 2011-11-03 19:43:20 -07:00
Holger Just 9c8380667c Merge branch 'master' into unstable 2011-10-31 18:18:44 +01:00
Holger Just 8eb72a3c74 Merge branch 'release-v2.4.0' 2011-10-31 18:17:54 +01:00
Holger Just ee543489f1 Merge branch 'release-v2.4.0' into stable 2011-10-31 18:16:07 +01:00
Holger Just 9e9b6e786e Bump version to 2.4.0 2011-10-31 17:35:19 +01:00
Holger Just cb0d4725ad Only allow the mysql database adapter on Ruby 1.8 2011-10-31 17:33:51 +01:00
Holger Just 29ab88c7f3 Update changelog for 2.4.0 release 2011-10-31 17:28:34 +01:00
Holger Just ba93eb24c4 Fix trailing whitespace 2011-10-31 17:26:14 +01:00
Holger Just 09b1545c37 Update i18n labels 2011-10-31 17:25:19 +01:00
Holger Just cb2086f652 [#647] Fix XSS in textile image syntax.
Image URLs are not properly escaped in the bundled RedCloth3 library.
It thus allowed an XSS vector.

The patch was adapted from r7570 from Redmine by Etiene Massip. See also
http://www.redmine.org/issues/9245.
2011-10-31 17:22:34 +01:00
Holger Just 21a45b4e52 [#676] Enforce UTF-8 encodings on the params hash
Contributed by Toshi MARUYAMA
2011-10-30 11:25:56 +01:00
Holger Just 2f4afeeb38 [#615] Generate project identifier automatically with JavaScript
Also let the user know that the identifier must start with a lower case letter.

Contributed by Jan Schulz-Hofen.
2011-10-30 10:33:20 +01:00
Holger Just 667c4d157f [#591] Merge branch 'issues/master/591-ruby-19-compatibility' from 'meineerde' 2011-10-29 21:22:35 +02:00
Felix Schäfer 6fcb1de63a Graciously handle deleted custom fields on issue history view. 2011-10-29 18:29:18 +02:00
Felix Schäfer 92dd2934ae Merge pull request #106 from finnlabs/pulls/652/fixes_redirect_containing_umlaute
[#652] fixes wrong redirect after login
2011-10-29 08:47:02 -07:00
Holger Just 91070236db Set source encoding to UTF-8 2011-10-29 14:48:03 +02:00
Holger Just 0befef718f Add rake task to set magic comments for source encoding 2011-10-29 14:47:56 +02:00
Holger Just 0ed5cb3f05 Set internal and external encoding to UTF-8 2011-10-29 14:47:56 +02:00
Holger Just 3cc95353cd Merge commit '873b2b69064d7724c6fc804813fb9e65c14558dc'
Conflicts:
	config/locales/nl.yml
2011-10-29 14:40:16 +02:00
Holger Just 917c36c27f Update missing i18n strings 2011-10-29 14:35:29 +02:00
Holger Just ec6221b7fe Use class instead of redundant id 2011-10-29 14:28:51 +02:00
Holger Just fd3d67937c Fix typo 2011-10-29 14:23:22 +02:00
Kornelius Kalnbach aa8237c546 fix application_helper_test 2011-10-29 13:44:47 +02:00
Kornelius Kalnbach 260a6bb1da fixed wiki syntaxhl issue 2011-10-29 12:20:11 +02:00
Kornelius Kalnbach 7b1a263d1d trying to fix wiki syntaxhl issue 2011-10-29 12:10:18 +02:00
Kornelius Kalnbach 65af1e4436 #649 update to CodeRay 1.0 according to Etienne's r7618 in Redmine 2011-10-29 11:35:16 +02:00
Eric Davis a2514ecc54 [#263] Remove Shane and Peter theme 2011-10-28 15:22:20 -07:00
Eric Davis f31f44f4af [#263] Remove dead context menu code 2011-10-28 15:21:37 -07:00
Eric Davis cce496b011 [#263] Remove placeholder thumbnail images 2011-10-28 15:20:09 -07:00
Eric Davis e51f067f12 Merge branch 'ticket/unstable/263-new-layout' into unstable 2011-10-28 15:12:59 -07:00
Eric Davis 8d10daa68f [#263] Add additional wiki styles 2011-10-28 14:58:50 -07:00
Eric Davis b968d260fd [#263] Remove DOM hacks to reposition elements 2011-10-28 14:54:09 -07:00
Eric Davis 34ffbc8e46 [#263] Remove dead code, was unbound in later JS 2011-10-28 14:53:49 -07:00
Eric Davis cbb99f81a1 Merge multiple jquery ready blocks 2011-10-28 14:48:38 -07:00
Eric Davis 923cdf3ff3 Refactor duplicated and abbreviated animationRate variable 2011-10-28 14:45:30 -07:00
Eric Davis a592f024cb [#263] Remove new issue lightbox (dead code) 2011-10-28 14:43:47 -07:00
Eric Davis dc682eaddc [#263] Remove issue tooltip javascript 2011-10-28 14:41:20 -07:00
Eric Davis aed2b4f661 [#263] Update jquery load order and embed noConflict in the HTML head directly 2011-10-28 14:36:10 -07:00
Eric Davis d99bc8a066 [#263] Replace image background with a theme-able css3 background 2011-10-28 14:35:36 -07:00
Eric Davis 5e2d633ebb [#263] Merge common.js into application.js 2011-10-28 14:26:14 -07:00
Eric Davis ca3eeedfff [#263] Remove profile popups, never finished 2011-10-28 14:21:41 -07:00
Eric Davis 155e1ba2a7 [#263] Remove thickbox 2011-10-28 14:18:53 -07:00
Holger Just f1a8373d49 Remove non-break space 2011-10-28 17:46:24 +02:00
Holger Just e48327893f [#667] Label all input field and control tags 2011-10-28 17:10:39 +02:00
Romano Licker 5036478017 [#667] improved code readability 2011-10-28 17:05:36 +02:00
Romano Licker e8a42c9337 [667] corrected spelling error for mail notification 2011-10-28 17:05:33 +02:00
Romano Licker fed98990dd [667] corrected german translation for 'notes' 2011-10-28 17:05:29 +02:00
Romano Licker 73484677a4 [667] corrected labels for projects 2011-10-28 17:05:24 +02:00
Romano Licker f31999061d [667] corrected labels and translations for reassign forms 2011-10-28 17:05:09 +02:00
Romano Licker 3bd6aa3578 [#667] made labels visible as this is an accessibility issue
even for sighted users
2011-10-28 17:03:38 +02:00
Romano Licker fdf660e1fd [#667] linked labels to their elements 2011-10-28 17:03:38 +02:00
Romano Licker 2b472d876d [#667] linked label to its element 2011-10-28 17:03:38 +02:00
Romano Licker 6f5fda2248 [#667] set ids, created invisible labels and linked them 2011-10-28 17:03:38 +02:00
Romano Licker 4747cdce5b [#667] linked labels to their element 2011-10-28 17:03:37 +02:00
Romano Licker c77f3a0fe7 [#667] link label to element 2011-10-28 17:03:37 +02:00
Romano Licker 71271e6ff6 [#667] added invisible label 2011-10-28 17:03:37 +02:00
Romano Licker 297294362b [#667] added invisible label 2011-10-28 17:03:37 +02:00
Romano Licker 3c04b30834 [#667] added invisible label for mail notification,
linked label where possible
2011-10-28 17:03:37 +02:00
Romano Licker 26a7ea468a [#667] linked label to its element 2011-10-28 17:03:37 +02:00
Romano Licker ecf6a9636a [#667] linked labels to their elements 2011-10-28 17:03:37 +02:00
Romano Licker 2c0fcd3bca [#667] added invisible labels for reassign select-tag on destroy views 2011-10-28 17:03:37 +02:00
Romano Licker 2f5cf020f3 [#667] set unique id for each checkbox and linked it
added "no-css" class to overwrite the current label style
2011-10-28 17:03:36 +02:00
Romano Licker 207af21553 [#667] set id for message_subject and linked it to label,
added invisible label
2011-10-28 17:03:36 +02:00
Romano Licker 4717a242cb [#667] link label to element 2011-10-28 17:03:36 +02:00
Romano Licker 2e688efa70 [#667] link label to element 2011-10-28 17:03:36 +02:00
Romano Licker 0f5d38ca4b [#667] linked labels to their elements 2011-10-28 17:03:35 +02:00
Romano Licker bf23c06d93 [#667] added invisible labels for queries 2011-10-28 17:03:35 +02:00
Romano Licker cd7b30dac6 [#667] added invisible search label 2011-10-28 17:03:35 +02:00
Romano Licker 5ab9ed889c [#667] added invisible project scope label 2011-10-28 17:03:35 +02:00
Romano Licker bf8de58548 [#667] added 'for' to link them 2011-10-28 17:03:35 +02:00
Romano Licker af94d24951 [#667] added style to hide content from sighted users 2011-10-28 17:03:35 +02:00
Holger Just 35c96b5085 Fix typo... 2011-10-26 22:18:33 +02:00
Holger Just 82debeef8b Specify rmagick versions and update distribution list
For ChiliProject 3.0 we will strictly require rmagick >= 2.0. If you need it,
you might have to update your distribution or install ImageMagick from
alternative sources.
2011-10-26 22:11:44 +02:00
Felix Schäfer a17ae46187 Don't require a very old rmagick by default.
There's a hint in the Gemfile for people with older distress.
2011-10-26 18:55:17 +02:00
Pieter Nicolai 873b2b6906 Dutch locale update 2011-10-26 18:20:49 +02:00
Holger Just 8315cd73f3 Prevent database migration from consuming all the RAM on the server
Prevent large production databases from consuming all the RAM on the server
and causing the migration to take forever. With this patch, objects are read
in batches from the database. This removes the need to hold ruby
objects for all rows for a type in memory at once.
2011-10-26 17:01:39 +02:00
Eric Davis 981e74f822 [#668] Remove duplicate module fields when copying projects 2011-10-25 18:23:37 -07:00
Eric Davis 2b7a221dee [#672] Allow each Query to control if subprojects are included or not 2011-10-25 18:13:32 -07:00
Eric Davis 79073734a1 [#221 Use git rev-parse to get the current sha for the version string 2011-10-25 15:55:10 -07:00
Eric Davis 5603103295 [#240] Add link to all News on the Project list page 2011-10-25 15:49:32 -07:00
Eric Davis b9d186e676 [#277] Show avatars on the News list 2011-10-25 15:49:31 -07:00
Greg Mefford b44dd085ac Prevent large production databases from consuming all the RAM on the server and causing the migration to take forever. On a database with a large SVN repo, the Changesets ran for over two days before I gave up and cancelled it. After this change, the migration ran in under 10 minutes. 2011-10-20 23:43:48 -03:00
Holger Just a107202a04 Fix race-condition in test_utc_time_format 2011-10-16 20:46:57 +02:00
Holger Just 61b9939be3 Add basic tests for the Null Formatter 2011-10-16 20:03:23 +02:00
Holger Just 8ee8ef02fe Extract the NullFormatter into its own files 2011-10-16 20:02:55 +02:00
Eric Davis a8e997dbf6 Fully qualify column names 2011-10-14 17:09:46 -07:00
Eric Davis 061beb4967 Merge remote-tracking branch 'finnlabs/pulls/653/move-query-models-into-separate-files' into unstable 2011-10-14 16:40:08 -07:00
Eric Davis 13250b7223 [#298] Add vendor/chiliproject_plugins to the load path
Contributed by Holger Just
2011-10-14 14:29:52 -07:00
Gregor Schmidt c1ecadbff7 Moving query related models into separate files
This should enable easier overwriting/reloading in plugins, since now the autoloader is able to find the models.
2011-10-12 11:35:26 +02:00
Romano Licker 34dc06a85f [#652] fixes wrong redirect after login
when url contains umlaute
2011-10-11 18:16:43 +02:00
Holger Just c87738daf2 Merge branch 'stable' into unstable 2011-10-04 17:37:14 +02:00
Holger Just 489566a39e Merge branch 'stable' 2011-10-04 17:36:34 +02:00
Holger Just 9bcf57586c Merge branch 'release-v2.3.0' into stable 2011-10-04 17:31:05 +02:00
Holger Just 9af56d078b Bump version to 2.3.0 2011-10-04 17:28:04 +02:00
Holger Just 0912e0dec4 Update changelog for 2.3.0 release 2011-10-04 17:27:13 +02:00
Holger Just 2e10441e2c Update locales for 2.3.0 release 2011-10-04 17:22:57 +02:00
Holger Just 8fb8cd0ee5 [#619] Restrict anonymous read access with Redmine.pm
Redmine.pm now also checks for public projects whether the anonymous
user has the browse_repository right for a read operation.
2011-10-04 17:17:31 +02:00
Holger Just e7f69d4236 [#633] Fix mock of WikiContent::Version for Ruby 1.9 2011-10-04 11:12:33 +02:00
Holger Just d467f79214 Merge remote-tracking branch 'refs/remotes/thegcat/feature/566-more_watchers_to_filter_by' 2011-10-04 10:28:39 +02:00
Gregor Schmidt 3fd809f059 [#633] WikiPages may have no author - but should have
Chili 1.x did not enforce the presence of an author for wiki pages, but Chili 2.x does. This migrations fails, if there are WikiPages or Versions without author. By updating the migration, we may ensure, that the erroneous pages are correctly updated.

Signed-off-by: Holger Just <h.just@finn.de>
2011-10-04 10:27:12 +02:00
Felix Schäfer 0d306a8bfc Merge pull request #93 from peelman/form-attribute-changes
Adding Check All / Uncheck All on New Project form. #644
2011-10-03 01:18:59 -07:00
Felix Schäfer b47a90b424 Allow to filter watchers by more than just "me". #566 2011-10-03 09:52:00 +02:00
Felix Schäfer aac42afdaa Add setting to set today as the start date for new issues. #355
Patch contributed by Bruno Medeiros on http://www.redmine.org/issues/2277
2011-10-02 22:02:29 +02:00
Holger Just 48796c90dc [#617] Include database gems for mingw (Ruby on Windows) 2011-09-23 21:27:44 +02:00
Holger Just b43bf1865b Update Russian localization.
Contributed by Igor Zubkov, extracted from Redmine.
2011-09-20 12:10:45 +02:00
Felix Schäfer 225a1587a6 Show the correct authors in wiki diff view.
#author doesn't show the author of the journal but of the journaled object.
2011-09-10 09:21:45 +02:00
Holger Just 2a3e12927f Merge branch 'stable' into unstable 2011-08-27 18:56:51 +02:00
Holger Just 296de66847 Merge branch 'release-v2.2.0' into stable 2011-08-27 18:53:47 +02:00
Holger Just 9272876fe9 Bump version to 2.2.0 2011-08-27 18:51:47 +02:00
Holger Just 49498f465b Extend copyright timespan to 2010-2011 2011-08-27 18:36:51 +02:00
Holger Just 50930dea79 Update changelog 2011-08-27 18:35:19 +02:00
Holger Just 139dedfd5f Add copyright header 2011-08-27 18:28:54 +02:00
Holger Just 35b69d2a31 fastercsv is not in lib anymore but a dependency 2011-08-27 18:28:10 +02:00
Holger Just c57c598204 Fix trailing whitespace 2011-08-27 18:26:12 +02:00
Holger Just 7eeeaa7d22 Add missing i18n strings 2011-08-27 18:22:08 +02:00
Felix Schäfer a24a24eb19 Add deferred loading for plugins which's requirements aren't all met yet #256 2011-08-25 18:46:53 +02:00
Felix Schäfer 2753973ffe Make TabularFormBuilder behave with subforms #586 2011-08-22 22:10:07 +02:00
Felix Schäfer ec4b42f24f Bump rails to 2.3.14 #584 2011-08-22 22:07:38 +02:00
Felix Schäfer 9dae76d564 This should fix it once and for all… #517
(Sorry for the commit-noise)
2011-08-21 23:36:03 +02:00
Felix Schäfer d8ce7564ce So let's try to hit all "ruby 1.8"s the hard way. 2011-08-21 23:12:21 +02:00
Felix Schäfer 57ecf525f0 Merge pull request #100 from thegcat/feature/517-put_faster_csv_in_the_gemfile
Rip faster_csv out of lib into the Gemfile. #517
2011-08-21 10:58:00 -07:00
Felix Schäfer 0b57e936f5 Rip faster_csv out of lib into the Gemfile. #517 2011-08-21 19:26:43 +02:00
Felix Schäfer 3d03a3eda5 Merge pull request #96 from finnlabs/pulls/573/fix_aas_in_wiki_content
[#573] acts_as_searchable definition in WikiPage may be insufficient and cause SQL errors
2011-08-21 08:56:21 -07:00
Holger Just eae5c9af68 [#275] Use ChiliProject::VERSION for new code 2011-08-21 15:16:34 +02:00
Holger Just 5300120461 Move Redmine::VERSION to ChiliProject::VERSION and add a compatibility interface 2011-08-21 14:48:53 +02:00
Holger Just 1796fddd2b [#275] Add requires_chiliproject. We now use the rubygems dependency syntax. 2011-08-21 14:47:31 +02:00
Felix Schäfer 8f4439e0d4 Fix issue pdf export #561
The pdf export tried to export the initial journal, which it shouldn't.
2011-08-21 12:56:27 +02:00
Felix Schäfer 9e12deda97 Merge pull request #97 from finnlabs/pulls/577/invalid-watcher-user-fix
Invalid watcher user error when adding an invalid user as watcher #577
2011-08-21 03:51:39 -07:00
Jean-Philippe Lang 5d7bc5c94c [#577] Avoid validating users when creating watcher relation
Taken from Redmine r5880
Committed by Jean Philippe Lang
2011-08-15 16:05:37 +02:00
Gregor Schmidt 962b35e11a [#573] Being more explicit about search fields to make sure, that AR joins all tables properly 2011-08-11 10:05:34 +02:00
Nick Peelman 2bb19b3e31 Adding check all links to new project form.
Makes bulk changes that much faster...
2011-08-08 19:53:33 -04:00
Nick Peelman b8d0aa0b85 Adding id attribute to modules field set on project form. 2011-08-08 19:53:22 -04:00
Eric Davis 27fd103132 [#263] Override some defaults in the sap theme 2011-08-05 12:12:39 -07:00
Eric Davis a9d6518a5d [#263] Set up default styles 2011-08-05 12:09:16 -07:00
Eric Davis d8023e6949 [#263] Remove duplicated favicon 2011-08-05 11:36:55 -07:00
Eric Davis 667f85f9a5 [#263] Extract custom S&P images 2011-08-05 11:35:05 -07:00
Eric Davis 7f06e7394c [#263] Update SAP theme 2011-08-05 11:32:21 -07:00
Eric Davis d94f7f7f9b [#263] Remove old themes 2011-08-05 11:29:13 -07:00
Eric Davis 949d229629 [#263] Extract custom colors to color.css 2011-08-05 11:21:29 -07:00
Eric Davis ccad72ba85 [#263] Move the fugue images into the main images/ directory 2011-08-05 10:50:08 -07:00
Eric Davis 4b8f4c3b83 [#263] Allow setting the page header title 2011-08-05 10:45:48 -07:00
Eric Davis d63cb35e82 [#263] Add icons to the main menu 2011-08-05 10:41:29 -07:00
Eric Davis cfed74579d [#263] Cleaning up admin menus 2011-08-05 10:22:54 -07:00
Eric Davis 9bb8f80d7e [#263] Merging css
* Append main.css to the bottom of application.css
* Remove main.css
* Move print styles out to print.css
* Move the CSS reset to be loaded first
* Port some colors to color.css
2011-08-05 09:56:13 -07:00
Eric Davis b4804f4ce4 [#263] Merged redmine-reset.css into application.css 2011-08-05 09:28:52 -07:00
Eric Davis adffd044d7 [#263] Fix the missing line on the top menu 2011-08-05 09:05:52 -07:00
Eric Davis ffa2d5f319 [#263] Remove the tree of parent issues from the issue title 2011-08-05 09:01:03 -07:00
Eric Davis 156cdf316e [#263] Remove duplicated updated label 2011-08-05 08:56:28 -07:00
Eric Davis a7ab39dd31 [#557] Fix link_to_month to not escape the HTML arrow characters 2011-08-05 08:49:22 -07:00
Eric Davis 4d48a6b675 Merge remote-tracking branch 'tomzx/b552_hardcoded_english_string'
Conflicts:
	app/helpers/repositories_helper.rb
2011-08-05 08:30:21 -07:00
Eric Davis 30e81bed5c Merge remote-tracking branch 'tomzx/b551_hardcoded_french_string'
Conflicts:
	app/views/wiki/annotate.rhtml
	app/views/wiki/diff.rhtml
	app/views/wiki/show.rhtml
2011-08-05 08:27:49 -07:00
Holger Just 54b4fdf1aa [#124] Allow to delete users with STATE_REGISTERED 2011-08-02 02:27:37 +02:00
Holger Just fc84783de1 [#124] Validate user status changes 2011-08-02 02:26:55 +02:00
Eric Davis aed0a6d5c3 Merge branch 'stable' into unstable 2011-08-01 16:57:22 -07:00
Eric Davis eded447079 Merge branch 'stable' 2011-08-01 16:56:59 -07:00
Eric Davis 3dc373eea4 Merge branch 'release-v2.1.1' into stable 2011-08-01 16:53:13 -07:00
Eric Davis da9c4a16a9 Bump version to 2.1.1 2011-08-01 16:52:33 -07:00
Eric Davis 46ba84ead2 Update Changelog for 2.1.1 2011-08-01 16:13:52 -07:00
Eric Davis 8b99047123 Merge branch 'stable' 2011-08-01 16:12:23 -07:00
Eric Davis 2c46411678 [#547] Security audit 2011-08-01 16:00:23 -07:00
Tom Rochette 552cd8dc57 Replace hardcoded string "diff" in Wiki#show and Repositories_Helper. 2011-07-31 09:27:13 -04:00
Tom Rochette aa6bf25b39 Replaced french word "anonyme" with label_user_anonymous. 2011-07-31 08:57:58 -04:00
Eric Davis bf13b0f409 Check for journal_user, then updated_by, and finally User.current when creating Journals 2011-07-30 21:51:26 -07:00
Eric Davis 68526f6f2d Clear @extra_journal_attributes also after saving a Journal 2011-07-30 21:50:47 -07:00
Eric Davis 635923f90d [#263] Fix admin menu sidebar styling 2011-07-29 15:33:59 -07:00
Eric Davis 8f45e780ce [#263] Fix issue subject style 2011-07-29 15:33:43 -07:00
Eric Davis 124c98d4ba [#263] Fix for changes to the admin_menu 2011-07-29 15:06:09 -07:00
Eric Davis 8c183dda2e [#263] Fix XSS regression from merge 2011-07-29 15:04:22 -07:00
Eric Davis e7e4557009 [#263] Fix journal formatting 2011-07-29 15:04:03 -07:00
Eric Davis 5cedd5cdcb [#263] Don't output heads_for_wiki_formatter 2011-07-29 14:46:39 -07:00
Eric Davis cf40447356 Fix the thickbox loading image path 2011-07-29 14:43:33 -07:00
Eric Davis 61847d831a CSS cleanup for the sidebar 2011-07-29 14:43:33 -07:00
Eric Davis 6c9c85134a Fix the issue action bar CSS 2011-07-29 14:43:33 -07:00
Eric Davis 6435905132 Port issue show view 2011-07-29 14:43:33 -07:00
Eric Davis ce973429fe Move the Add link next to the Related issues label 2011-07-29 14:37:24 -07:00
Eric Davis cff91d8cf0 Port id selectors to the main issues list 2011-07-29 14:37:24 -07:00
Eric Davis 13f57032c1 Add the new issue button partial 2011-07-29 14:37:24 -07:00
Eric Davis 7485858da2 Cleanup styles in the issue filter section 2011-07-29 14:37:24 -07:00
Eric Davis 2dc0e100c3 Port the issue filter section on the issues list 2011-07-29 14:37:24 -07:00
Eric Davis 5949f8de91 Port issue history changes 2011-07-29 14:37:24 -07:00
Eric Davis ec21b4c075 Merge issue context menu changes 2011-07-29 14:32:53 -07:00
Eric Davis 84ef979c47 Add welcome text to the project list 2011-07-29 14:31:27 -07:00
Eric Davis 6d522a9acd Remove the list of versions from sidebar, will be moved to menu 2011-07-29 14:31:26 -07:00
Eric Davis 48675d63a5 Clean up footer 2011-07-29 14:31:26 -07:00
Eric Davis bfa57e5e6c Fix hardcoded image path 2011-07-29 14:31:26 -07:00
Eric Davis ac48b91864 Add images 2011-07-29 14:31:26 -07:00
Eric Davis d3392c6d0d Add JavaScript 2011-07-29 14:31:26 -07:00
Eric Davis a0c777ee79 Add the CSS, including resets 2011-07-29 14:31:26 -07:00
Eric Davis c23f73e9fe Port ApplicationHelper patches 2011-07-29 14:31:26 -07:00
Eric Davis 484ed29fa2 Port main layout 2011-07-29 14:29:23 -07:00
Eric Davis 1f57eb01b1 Merge HTML head section 2011-07-29 14:25:35 -07:00
Eric Davis 74cfd7b5ca Merge branch 'stable' into unstable 2011-07-29 13:54:27 -07:00
Eric Davis 30285ce67f Merge branch 'release-v2.1.0' into stable 2011-07-29 10:47:59 -07:00
Eric Davis 2d67c2f2b3 Bump version to 2.1.0 2011-07-29 10:29:52 -07:00
Eric Davis 1af4c30a6c Update changelog for 2.1.0 release 2011-07-29 10:29:00 -07:00
Eric Davis 70c3e1c8f9 [#544] html_escape issue fields 2011-07-29 09:25:13 -07:00
Felix Schäfer 4bc5bc9fa6 Avoid touching journaled objects on backdated journal creation. 2011-07-29 18:21:04 +02:00
Felix Schäfer 5015ca4878 Merge branch 'master' of github.com:chiliproject/chiliproject 2011-07-29 18:19:46 +02:00
Eric Davis 25b7b42c55 Fix for encoding errors on 1.9.2 with the mysql gem 2011-07-29 09:09:02 -07:00
Felix Schäfer ff6d75ca74 Only build initial journals for core classes. #542 2011-07-29 18:00:19 +02:00
Holger Just d7a9adf880 move protect_from_forgery to the beginning of the before_filter chain as per the recommended rails practices 2011-07-29 17:23:13 +02:00
Felix Schäfer 531653596d Touch journaled objects on journal creation only. #543 2011-07-29 15:12:06 +02:00
Felix Schäfer 55f9ecbe23 Remove double initial WikiContentJournals. #542 2011-07-29 15:00:31 +02:00
Felix Schäfer 894911f5dc Correct deflation of gzipped wiki text. #523 2011-07-29 10:19:43 +02:00
Holger Just 76490fcda5 Merge remote-tracking branch 'finnlabs/pulls/539/cleanup-issue_helper-show_detail' 2011-07-27 16:03:14 +02:00
Gregor Schmidt e2d16e1397 [#540] compatibility layer to reenable API from Chili 1.x 2011-07-27 15:52:28 +02:00
Holger Just 06076e5ac1 Remove db:migrate_plugins task.
Use the equivalent db:migrate:plugins instead that is provided by the
engines plugin directly.
2011-07-27 15:23:26 +02:00
Gregor Schmidt 008a29dcbc [#539] removing helper method from tests, adding TODO 2011-07-26 23:00:51 +02:00
Gregor Schmidt 8c9034f41e [#539] removing dead code - this went into JournalFormatter 2011-07-26 23:00:47 +02:00
Holger Just c63954a4c7 Add ruby-debug as test dependency to debug failing tests 2011-07-25 21:22:57 +02:00
Holger Just f0d271bee3 Fix failing tests because of missing journal fixtures and indeterministic behaviour of .find(:first) 2011-07-25 21:22:13 +02:00
Holger Just a1748cd221 [#526] Update Bulgarian translation
Contributed by Ivan Cenov.
2011-07-25 19:22:06 +02:00
Holger Just d62a4f1d28 Consider user's timezone for default issue start date
Contributed by Jan Schulz-Hofen
2011-07-25 19:16:15 +02:00
Gregor Schmidt bf14f35223 [#537] version of new WikiContents should be 0 2011-07-25 19:07:05 +02:00
Eric Davis a35d61bfb7 [#506] Read Gemfile.local for local gem inclusions.
Contributed by Holger Just
2011-07-22 14:48:04 -07:00
Eric Davis 9c47208efa [#511] Fix string encodings coming from sqlite3 in MRI 1.9.x 2011-07-22 14:35:02 -07:00
Eric Davis 4b3bd797b0 Fix errors when trying to check for binary SCM strings in 1.9.2
1.9.2 removed String#is_binary_data?
2011-07-22 14:35:01 -07:00
Eric Davis 2d98a486d6 Fix failing test due to invalid HTML and missing initial journal 2011-07-22 11:52:55 -07:00
Eric Davis c0d26da34e Refactor: move method to recreate the initial journals out of migration 2011-07-22 11:42:40 -07:00
Eric Davis bbb4f63ae4 Brute force fix for Change#path #from_path on Ruby 1.9.2
Some database adapters are returning strings unencoded correctly (sqlite3-ruby)
2011-07-22 10:41:34 -07:00
Eric Davis d2724ef89c Brute force fix for Changeset#committer encoding on 1.9.2 2011-07-22 10:10:23 -07:00
Eric Davis 477a5f3702 Refactor: replace comment with extracted utility method 2011-07-19 12:14:16 -07:00
Eric Davis c62e16b6cc Refactor: replace comment with utility method 2011-07-19 12:14:08 -07:00
Eric Davis a2eeb4ae20 Refactor: extract setup to before_filter 2011-07-19 12:14:02 -07:00
Eric Davis 9771e20462 Refactor: use the new utility method to load ivars for settings 2011-07-19 12:13:53 -07:00
Eric Davis 1d3d7ff10c Refactor: extract method to prepare to reuse 2011-07-19 12:13:46 -07:00
Eric Davis db7bc2bb82 Refactor: extract method with before_filter 2011-07-19 12:13:39 -07:00
Eric Davis 075f4e49df Refactor: remove unused instance variable 2011-07-19 12:13:33 -07:00
Eric Davis e04928c5b1 Refactor: change large :except before_filter to :only 2011-07-19 12:13:15 -07:00
Eric Davis 2918437f34 Refactor: audit and remove unknown actions 2011-07-19 12:13:08 -07:00
Eric Davis dd6d9d1c68 [#513] Fix links to attachments in the issue history 2011-07-11 18:33:32 -07:00
Eric Davis df0c75c050 Fix a problem loading ARCondition in development on second request. 2011-07-11 18:02:01 -07:00
Eric Davis 3b9980b449 Fix aaj to allow setting the journal user, note, and attributes directly.
This will allow the Journaled object to reliability set the fields on the Journal
without calling init_journal (which is a before_save hook and shouldn't be called
directly).
2011-07-11 16:55:28 -07:00
Eric Davis 067ab21309 Update Journal exemplar for aaj 2011-07-11 16:51:22 -07:00
Eric Davis 8ca03f3a2a Add ChiliProject::Compatibility to help upgrade third party code 2011-07-11 09:51:08 -07:00
Eric Davis a76ef2a43e Updated yardoc static files 2011-07-11 09:51:01 -07:00
Eric Davis 79152e4a24 Typo in method comment 2011-07-11 09:50:53 -07:00
Eric Davis b646a731fb Merge branch 'ticket/master/191-next-prev-search-results' 2011-07-08 15:23:48 -07:00
Eric Davis 38b7ec5726 [#191] Add pagination links above the search results 2011-07-08 15:11:53 -07:00
Eric Davis 839654fc85 [#191] Refactor: extract search pagination to partial 2011-07-08 15:09:57 -07:00
Eric Davis 0b042903ca [#191] Refactor HTML style to CSS 2011-07-08 15:04:11 -07:00
Eric Davis 97dd339bbb [#191] Refactor: extract methods to helper 2011-07-08 14:59:23 -07:00
Eric Davis 4a3e32b0f4 [#514] Fix forum notifications, only one email per created Message 2011-07-08 14:49:39 -07:00
Felix Schäfer 1bfe6715c6 Put empty start_dates in the future too. #499 2011-07-08 23:20:17 +02:00
Felix Schäfer 7222345ba8 Put issues with an empty due date in the future. #499 2011-07-08 23:09:11 +02:00
Eric Davis 86b30810a4 Fix test so it will run in isolation 2011-07-08 12:44:42 -07:00
Eric Davis 1fae552c8f [#467] Fix Journal#journaled to prevent uninitialized constant Journal::Journaled 2011-07-08 12:43:03 -07:00
Felix Schäfer 7c4abeb8d3 Correct filters for int,float custom fields. #498 2011-07-08 21:39:36 +02:00
Holger Just 63d8264320 Make links in exported wiki HTML files absolute 2011-07-08 21:18:47 +02:00
Holger Just 9e35b24bcd [#512] Fix Copyright 2011-07-08 21:17:34 +02:00
Eric Davis ddeb1a2a0f Merge branch 'stable' into unstable 2011-07-01 22:16:58 -07:00
Eric Davis 729697e33f Merge branch 'stable' 2011-07-01 22:16:30 -07:00
Eric Davis effcd726a3 Merge branch 'release-v2.0.0' into stable 2011-07-01 22:13:36 -07:00
Eric Davis 6a2772d75c Bump version to 2.0.0 (final) 2011-07-01 21:54:52 -07:00
Eric Davis cf789d4fa8 Update CHANGELOG for 2.0.0 2011-07-01 21:54:40 -07:00
Eric Davis 30bcd6c66b Merge branch 'master' into release-v2.0.0
Conflicts:
	doc/CHANGELOG.rdoc
	lib/redmine/version.rb
2011-07-01 21:46:38 -07:00
Eric Davis 2fab2de517 Workaround a test timing bug in CI for the release 2011-07-01 16:28:13 -07:00
Gary Verhaegen 0d81314664 Solves #503: parsing translations with psych in ruby 1.9 2011-07-01 16:01:59 -07:00
Eric Davis 2bb42e90a1 [#493] Force loading the classes of activity provider
This will cause the class to run acts_as_journal which will create the
Journal sub-classes and prevent uninitialized constants since the sub-classes
are created on the fly.
2011-07-01 15:27:12 -07:00
Eric Davis 6017e2712e Add rescues to the aaj migrations for unsaved records.
If the Journal or the Journaled object don't save successfully,
put out the reasons why instead of aborting the migrations. Journaled
objects might failure from the :touch update, which are safe to ignore.
2011-07-01 15:16:07 -07:00
Eric Davis 32f92a5058 [#501] Ugly patch to stop creating journals when only line endings change 2011-07-01 12:25:07 -07:00
Eric Davis 39be3ac130 Merge branch 'release-v1.5.0' 2011-06-27 15:45:46 -07:00
Eric Davis c8a6f8043e Merge branch 'release-v1.5.0' into stable 2011-06-27 15:44:22 -07:00
Eric Davis 967d0e6baa Bump version to 1.5.0 2011-06-27 15:42:55 -07:00
Eric Davis 86c2ee6f5d Update CHANGELOG for v1.5.0 release 2011-06-27 15:41:57 -07:00
Eric Davis 66c4db8669 [#490] Escape AuthSources in the list.
Contributed by MAEDA, Go
2011-06-27 15:38:45 -07:00
Eric Davis a75eab1adb [#490] Escape AuthSources in the list.
Contributed by MAEDA, Go
2011-06-27 15:20:15 -07:00
Felix Schäfer 308852e21c Merge pull request #78 from tomkersten/488_wiki_show_format_hook
Added view hook for additional wiki formats [refs #488]
2011-06-22 13:51:10 -07:00
Tom Kersten ffc1db8a54 Added hook for additional wiki formats [refs #488]
* Allows plugins to add to the list of supported export formats at the
  bottom of the Wiki#show view template
2011-06-20 22:32:47 -05:00
Eric Davis 3e924ce6be Bump version to 2.0.0RC3 2011-06-17 15:25:11 -07:00
Eric Davis cd121fe7af Update CHANGELOG for release 2011-06-17 15:24:33 -07:00
Eric Davis 9de3fcbc3f [#397] Remove FIXME, there is only one activity per Model 2011-06-17 14:48:13 -07:00
Eric Davis c034d5e548 [#398] Remove helpers from IssuesController 2011-06-17 14:46:09 -07:00
Enderson Maia 713d0aea8c Better translation to keep a pattern in translations. 2011-06-17 14:43:55 -07:00
Eric Davis 8698b40974 Merge branch 'ticket/release-v2.0.0/350-remove-freeze-from-settings' into release-v2.0.0 2011-06-17 14:42:26 -07:00
Eric Davis 9f2c412fa6 [#383] Fix for undefined_method 'to_utf8'
Contributed by Artem Naluzhnyy
2011-06-17 14:36:46 -07:00
Eric Davis 7c751b350d Merge branch 'ticket/release-v2.0.0/474-changeset-journals' into release-v2.0.0 2011-06-17 13:06:30 -07:00
Eric Davis 2f3657502f [#474] aaj should use the Model's activity options for timestamp and author_key
Some models (Changeset) require custom options passed to
acts_as_activity_provider but acts_as_journalized wasn't accepting these
for :timestamp or :author_key
2011-06-17 12:39:07 -07:00
Eric Davis 1cf08ee300 [#474] Changesets should use the author method for events
This will let them pick up the committer string if user is nil
2011-06-17 12:29:04 -07:00
Eric Davis 3d164f1da0 [#480] Fix replying to IssueJournals through email 2011-06-17 12:10:23 -07:00
Eric Davis 0daa081d19 [#475] Set the activity_type on the initial journals 2011-06-17 10:50:11 -07:00
Eric Davis 67dbd0160d Document#category should be displayed as a required field 2011-06-17 10:25:56 -07:00
Eric Davis 2ff9711fc7 Migrate existing journals so version 1 is open for the initial journal 2011-06-17 10:18:56 -07:00
Eric Davis 8b13992c0a Print any errors when saving the initial journal instead of aborting 2011-06-17 10:09:10 -07:00
Eric Davis 52b83da8dd [#479] Split GeneralizeJournals into separate, incremental migrations 2011-06-17 09:49:24 -07:00
Eric Davis 498d3909cc Merge branch 'ticket/release-v2.0.0/467-journal-migration-sti-callback-bug' into release-v2.0.0 2011-06-17 09:42:03 -07:00
Eric Davis 47c7e0774a [#467] Fix bug with Journal subclasses having caches columns 2011-06-17 09:41:14 -07:00
Eric Davis b52d2b2238 [#467] Fix uninitialized constant Journal::Journaled error
Was due to Journals touching the parent record but the Journal
not having it's STI class correct during the type update.
2011-06-17 09:13:05 -07:00
Felix Schäfer 0c03142832 Fix an apache perl module error. #466
Contributed by Artem Naluzhnyy.
2011-06-16 21:12:36 +02:00
Felix Schäfer 2ceffca3e3 Don't loose the time of the wiki_edits. #468
Contributed by Artem Naluzhnyy.
2011-06-16 21:01:38 +02:00
Felix Schäfer 85c3d38d24 Fix the wiki links in the activity view. #469
Contributed by Artem Naluzhnyy.
2011-06-16 20:56:48 +02:00
Felix Schäfer 9ce7fd4230 Merge pull request #76 from schmidt/b/477-rake-rdoctask
Getting rid of "rake/rdoctask is deprecated." warning. #477
2011-06-16 10:08:16 -07:00
Gregor Schmidt 2630a84e10 [#477] Not using deprecated rake/rdoctask but rdoc/task instead
works with all rdoc versions since 2.4.2
see https://github.com/rdoc/rdoc/blob/master/History.txt
2011-06-16 11:29:25 +02:00
Eric Davis 9ccb172c81 Bump version to 2.0.0RC2 2011-06-10 13:35:12 -07:00
Eric Davis 3112062bde Update CHANGELOG for 2.0.0RC2 2011-06-10 13:20:46 -07:00
Eric Davis 3c53d1a63c Added rake release[version] task based on the release process
https://www.chiliproject.org/projects/chiliproject/wiki/HowTo_Release
2011-06-10 13:15:52 -07:00
Rodrigo Rosenfeld Rosas 80c9df5e6b Update pt-BR translations 2011-06-10 13:03:54 -07:00
Eric Davis a99ccc5d7c Merge remote-tracking branch 'schmidt/f/419-update-js-libs/unstable' into release-v2.0.0 2011-06-10 12:58:25 -07:00
Eric Davis f47821db0c [#350] Remove freeze from Settings so the values can be modified later 2011-06-10 11:44:44 -07:00
Eric Davis ee9b129382 Merge branch 'ticket/release-v2.0.0/441-journal-touch' into release-v2.0.0
Conflicts:
	test/unit/journal_test.rb
2011-06-10 11:41:52 -07:00
Eric Davis 1e68bed997 [#442] Handle nil changes in Atom feed 2011-06-10 11:21:07 -07:00
Eric Davis e7883b876a Merge branch 'ticket/release-v2.0.0/445-initial-journal-tracking' into release-v2.0.0 2011-06-10 10:45:48 -07:00
Eric Davis 731de487e4 [#453] Upgrade to Rails 2.3.12 2011-06-10 10:43:12 -07:00
Eric Davis 95b19953a4 Add plugin hooks to Users#show view 2011-06-07 14:51:19 -07:00
Eric Davis bfba5e2151 [#441] Journals should touch their journaled to update updated_on/at fields 2011-06-05 11:49:40 -07:00
Eric Davis 0f35c7d1c2 Fix test on 1.9.2 postgres.
Multiple records were found and postgres was returning them in a different
order than what the test assumed.
2011-06-03 14:30:48 -07:00
Eric Davis 85c7cfd0a7 Fix test on 1.9.2 postgres.
Multiple records were found and postgres was returning them in a different
order than what the test assumed.
2011-06-03 14:11:08 -07:00
Eric Davis 33e3a71341 [#445] Track initial object attributes on the initial journal
So the initial journal would have the changes from an Object#new
to the created version of the Object. Also includes a change to the
database migration in order to create these initial journals for
all journaled Objects.
2011-06-03 13:01:56 -07:00
Eric Davis 3a0a7d93b1 Merge branch 'release-v2.0.0' into unstable
Merging during the release to make sure everything is passing in CI,
which isn't set up to test release branches.
2011-06-03 11:09:06 -07:00
Eric Davis 3b64c60bc0 Merge branch 'ticket/release-v2.0.0/444-scm-encoding' into release-v2.0.0 2011-06-03 11:01:21 -07:00
Eric Davis ba3ddee99d [#444] Remove extra variable 2011-06-03 10:50:16 -07:00
Eric Davis f518251d5f [#444] Fix Changeset#to_utf8 coding standards 2011-06-03 10:46:46 -07:00
Jean-Philippe Lang 0f7ae9b658 Fixed: Update of Subversion changesets broken by r3466 under Solaris (#5255).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3635 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-03 10:15:13 -07:00
Toshi MARUYAMA 6efba7b05d scm: use upcase to compare encoding name "UTF-8" in log converting.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5375 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-03 10:14:05 -07:00
Toshi MARUYAMA e19c56d61a scm: replace invalid utf-8 sequences in comments instead of stripping on Ruby 1.8.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5373 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-03 10:13:48 -07:00
Toshi MARUYAMA 0adf1a87b1 scm: code clean up app/models/changeset.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5371 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-03 10:12:38 -07:00
Toshi MARUYAMA 5511155674 scm: fix log converting error in Ruby 1.9 and add more tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5370 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-03 10:12:23 -07:00
Toshi MARUYAMA 60b34ea29b scm: set empty log encoding UTF-8 in Ruby 1.9 and add tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5368 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-03 10:12:09 -07:00
Toshi MARUYAMA 81bdbd77f7 scm: not use Iconv for log converting in Ruby 1.9 and fix tests fails in Ruby 1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5367 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-03 10:11:49 -07:00
Eric Davis 7eb98dbd34 [#443] Fix failing tests on 1.9.2 due to an invalid fixture 2011-06-03 09:55:44 -07:00
Eric Davis 76c9a6682f Remove duplicated test 2011-06-03 09:15:46 -07:00
Eric Davis aa07982daa Fix an edge-edge case bug in journal_attributes_for_user with different users
In one case in a plugin (not able to reproduce in core) journal_attributes_for_user
would set the :user to something different than what's in updated_by thus assigning
the Journal to the wrong user.
2011-06-01 22:00:02 -07:00
Holger Just db3480bdb6 [#436] Fix test relying on trailing whitespace. 2011-05-31 09:59:19 +02:00
Eric Davis f0987c8238 [#437] Move the encoding to the top of pdf.rb for Ruby 1.9 2011-05-30 15:11:08 -07:00
Eric Davis a428fa6068 Bumping version to 2.0.0RC1 2011-05-30 14:22:31 -07:00
Eric Davis 821d9f5ca4 [#437] Move the encoding to the top of pdf.rb for Ruby 1.9 2011-05-30 14:20:20 -07:00
Eric Davis 790bb362c5 Fix the merge conflict from 6b8897db5f 2011-05-30 14:05:40 -07:00
Holger Just 6b8897db5f Merge branch 'unstable' into release-v2.0.0 2011-05-30 21:25:11 +02:00
Holger Just 12e29be604 Merge branch 'issues/unstable/436-trailing-whitespace' into unstable 2011-05-30 21:18:48 +02:00
Holger Just 07185fb169 [#436] Remove trailing whitespace 2011-05-30 20:52:25 +02:00
Holger Just b72785b274 [#436] Adapt rake task to also clean trailing whitespace 2011-05-30 20:49:58 +02:00
Holger Just 40ce66d05d [#197] Better regex and no trailing whitespace. 2011-05-30 19:58:54 +02:00
Eric Davis 37f6b75749 Added VERSION.special to handle special version releases (RC, distributions, etc) 2011-05-29 17:59:51 -07:00
Eric Davis e68a869d2d Update RUNNING_TESTS.rdoc to point to a wiki page 2011-05-29 17:42:49 -07:00
Eric Davis cfe2483e13 Update CHANGELOG for 2.0.0 2011-05-29 17:40:45 -07:00
Eric Davis ec3717e644 Merge branch 'ticket/unstable/197-copyright' into unstable 2011-05-29 13:44:34 -07:00
Eric Davis 99507a0391 [#197] Upgrade the copyright in the code files 2011-05-29 13:11:52 -07:00
Eric Davis f18090891f [#197] Add a rake task to update the copyright in code files 2011-05-29 13:11:37 -07:00
Eric Davis e131c3b531 [#197] Remove old copyrights 2011-05-29 12:50:08 -07:00
Eric Davis 36f34887f3 [#197] Fix up main copyright files 2011-05-29 12:10:31 -07:00
Eric Davis 96298eac64 Merge branch 'ticket/unstable/262-line-endings' into unstable 2011-05-29 12:00:33 -07:00
Eric Davis a85b6780d2 [#262] Convert line endings to UNIX 2011-05-29 12:00:18 -07:00
Eric Davis 05a4c4616f [#262] Add a rake task to convert line endings to UNIX 2011-05-29 11:59:57 -07:00
Eric Davis bc249871a6 [#407] Remove deferred Journal#visible tests 2011-05-29 11:11:26 -07:00
Eric Davis 8b06e26059 [#350] Force clearing the cache before each test 2011-05-27 15:52:24 -07:00
Eric Davis 5a9ffe9627 Merge branch 'feature/350-use_rails_cache_for_settings_cache' into unstable 2011-05-27 15:00:08 -07:00
Eric Davis e4fac8d40f [#350] Refactor: extract method 2011-05-27 14:59:42 -07:00
Eric Davis 9e1b6c14c8 [#345] Remove BigDecimal patch since Rails 2.3.11 includes a mitigation 2011-05-27 14:37:10 -07:00
Eric Davis 9baa310486 Fixed test by replacing assert_tag with assert_select 2011-05-27 14:16:38 -07:00
Eric Davis b95c526151 Fix failing test: RepositoryMercurialTest#test_activities 2011-05-27 14:08:18 -07:00
Eric Davis cd64d11e17 Merge branch 'master' into unstable
Conflicts:
	app/controllers/watchers_controller.rb
	app/views/issues/_action_menu.rhtml
	config/locales/pt-BR.yml
	doc/CHANGELOG.rdoc
	lib/redmine/export/pdf.rb
	lib/redmine/wiki_formatting/textile/helper.rb
2011-05-27 12:20:04 -07:00
Eric Davis 44b1bcfa37 Merge branch 'release-v1.4.0' 2011-05-27 11:41:22 -07:00
Eric Davis aae1abde5c Merge branch 'release-v1.4.0' into stable 2011-05-27 11:39:08 -07:00
Eric Davis 0e31482de9 Bump version to 1.4.0 2011-05-27 11:37:03 -07:00
Eric Davis f6454629f2 Update Changelog for release 1.4.0 2011-05-27 11:22:49 -07:00
Eric Davis 46f66add1f Merge remote-tracking branch 'schmidt/f/416-redo-watcher-links-unstable' into unstable 2011-05-27 10:42:53 -07:00
Tom Kersten ce8bb652c6 [#423] Removed explicit render in WikiController#show
* Allows for format extensions in plugins w/o giving a double-render
  error
* Updated Wiki#show template to specify 'wiki/sidebar' explicitly
  (vs. just 'sidebar')
2011-05-27 10:20:45 -07:00
Eric Davis 762cc04b70 Port 784bbccf's custom value test back into aaj 2011-05-27 10:16:47 -07:00
Eric Davis f883758c95 Fix test: Search results are showing this as an issue-edit event 2011-05-27 10:15:49 -07:00
Eric Davis e9676954be Fix tpyo in the example 2011-05-27 09:28:45 -07:00
Eric Davis b8904ce7a2 Handle a nil user when testin email.
undefined method `logged?' for nil:NilClass
2011-05-27 09:27:05 -07:00
Eric Davis 5cbf188032 Merge remote-tracking branch 'schmidt/b/425-avoid-deprec-notation-for-rake-tasks/master' 2011-05-27 09:26:07 -07:00
Eric Davis c4658bd271 [#202] Add the theme used on chiliproject.org
Using 3c2ef2757165e23b65fd from
https://github.com/edavis10/squeejee_theme/tree/chiliproject.org
2011-05-27 09:18:48 -07:00
Emilio Carlos da Palma 7796ae89ff Fix the issue #424. 2011-05-26 21:09:21 -03:00
Felix Schäfer c51a32ac23 Use Rails.cache to cache application settings. #350 2011-05-25 17:11:16 +02:00
Felix Schäfer 5c8e04db55 Fix SearchController tests.
The "dd" the removed assert_tag part was supposed to find should never show up on the page in the first place (it's in a journal, not in the issue itself).
2011-05-25 16:40:34 +02:00
Gregor Schmidt 20a5e41538 [#425] Avoid deprecated API to define rake tasks with parameters
This should avoid deprecation warnings when using ChiliProject with Rake 0.9
2011-05-24 17:02:30 +02:00
Gregor Schmidt ae84fff8a2 [#419] Fixing broken multi-select serialization in prototype 1.7
See https://prototype.lighthouseapp.com/projects/8886/tickets/1180 for details.

Contributed by Ben Gunter.
2011-05-23 17:23:50 +02:00
Gregor Schmidt 3a14bff746 [#419] Updating to Prototype 1.7 and script.aculo.us 1.9.0 2011-05-23 09:53:41 +02:00
Holger Just 35a38086e3 [#112] Fix tests for jruby 2011-05-22 19:46:31 +02:00
Holger Just 18247a6c58 [112] Detect SQLite3 version on JRuby 2011-05-22 19:02:53 +02:00
Felix Schäfer 79ed4920cf Merge branch 'unstable' of github.com:chiliproject/chiliproject into unstable 2011-05-21 02:03:10 +02:00
Felix Schäfer 6f809b826e Replace a call to changes with its code from AR::Dirty. #422
acts_as_journalized called changes as per ActiveRecord::Dirty 
(see http://ar.rubyonrails.org/classes/ActiveRecord/Dirty.html#M000291), 
the journalized model Changeset :has_many changes though, which 
made the call return a list of associated objects instead of the 
intended list of changed attributes. Replaced changes with the code
from AR::Dirty to work around that.
2011-05-21 02:02:52 +02:00
Holger Just 1d5d73afe3 Fix RepositoriesFilesystemControllerTest for jRuby
Iconv on jRuby does not accept an empty string as "from" encoding.
Use the default behavior from the controller instead to leave it
unspecified and thuse use UTF-8.
2011-05-21 01:17:17 +02:00
Eric Davis c83c1d9aea Merge branch 'ticket/unstable/406-journals-controller-aaj' into unstable 2011-05-20 15:45:54 -07:00
Eric Davis 8994a0b58d [#406] Added missing and removed unused code for Journals
acts_as_journalized changed the interfaces and didn't include all of
the recent changes to the Journals system.

* removed Journal diffs, acts_as_journalized handles them differently
* fixed the Journal atom feed
* added the journal preview back in
* added missing tests
2011-05-20 15:37:53 -07:00
Holger Just c04ff93f8f [#112] Properly stub SQLite3 for version tests 2011-05-20 23:34:18 +02:00
Eric Davis 6e105a765a Merge branch 'ticket/unstable/400-activity-event-types' into unstable 2011-05-20 14:24:07 -07:00
Eric Davis 078df72345 [#400] Refactor old assert_tag to assert_select 2011-05-20 14:23:54 -07:00
Eric Davis a4f7629f1f [#400] Fix some tests broken by 6656103 2011-05-20 14:22:55 -07:00
Felix Schäfer 66561031eb [#400] Fix the event types (icons on activity and search views). 2011-05-20 13:51:51 -07:00
Eric Davis c778cc9208 [#415] Fix functional tests that used the older interface 2011-05-20 13:51:21 -07:00
Felix Schäfer 6015913f34 Change test to use the new journalized interface. #415 2011-05-20 22:16:26 +02:00
Gregor Schmidt 08cad02541 Removing commments from wiki_contents fixtures, since the db column was removed as well 2011-05-20 21:33:50 +02:00
Eric Davis a74517b983 Merge remote-tracking branch 'hufocf/feature/357-wrap-text-in-pdf' 2011-05-20 11:43:24 -07:00
Eric Davis 00c1852d7d [#81] Add a favicon based on a Flickr image
http://www.flickr.com/photos/thebrownhouse/4599233853/sizes/l/
2011-05-20 11:29:06 -07:00
Eric Davis eaa5382043 [#81] Add a favicon based on a Flickr image
http://www.flickr.com/photos/thebrownhouse/4599233853/sizes/l/
2011-05-20 11:28:40 -07:00
Felix Schäfer d7b963e6a6 Load the SQLite3 lib for the test to work. #112 2011-05-20 16:10:01 +02:00
Felix Schäfer cf0804259d Merge branch 'unstable' of github.com:chiliproject/chiliproject into unstable 2011-05-20 15:45:54 +02:00
Felix Schäfer dbc10d2730 Save the comments to wiki page updates correctly. #415 2011-05-20 15:44:47 +02:00
Felix Schäfer 333a3187bd Work around a deprecation in rubygems 1.6+. #322 2011-05-20 00:04:04 +02:00
Felix Schäfer 6598a44ddd Add a helper to format user lists. #304 2011-05-19 23:48:02 +02:00
Felix Schäfer 6a55e9e738 Merge pull request #57 from meineerde/issues/unstable/112-database-detection-library
Database detection library. #112
2011-05-19 14:28:00 -07:00
Gregor Schmidt 3893ef9f7d [#416] updating watcher_tag in news/show to use watcher_link 2011-05-17 20:22:05 +02:00
Gregor Schmidt 4fff430846 [#416] removing reference to now unused local variable 2011-05-17 20:03:03 +02:00
Gregor Schmidt a5b439544a [#416] introducing separate rjs view to reduce controller code 2011-05-17 20:03:03 +02:00
Gregor Schmidt ae76abd140 [#416] updating watcher controller tests to new functionality
unfortunately assert_select_rjs is not too clever - therefor we need to fall back to string matching for the more complex cases
2011-05-17 20:03:03 +02:00
Gregor Schmidt 4635a8c2a4 [#416] using a simpler approach to replace node with partial 2011-05-17 20:03:02 +02:00
Gregor Schmidt e3f54d470c [#416] :class might be nil or a symbol - then + will not work as expected 2011-05-17 20:03:02 +02:00
Gregor Schmidt 2c2ed95866 [#416] Re-Adding watcher_tag for backwards compatibility
adding deprecation warning
2011-05-17 20:03:02 +02:00
Gregor Schmidt 508b23cf41 [#416] Watcher links work using of css selectors instead of ids 2011-05-17 20:03:02 +02:00
Felix Schäfer 9cb4feefce Update the watcher list on click on "watch". #311
Based on a patch contributed by Price M.
2011-05-17 20:03:01 +02:00
Felix Schäfer 90c713d2d2 Recognize git Repositories of the form 'identifier.git' in the apache perl module. 2011-05-16 06:11:59 -07:00
Holger Just 7b3a2047fd Whitespace fixes 2011-05-16 00:03:51 +02:00
Holger Just 705c0db000 [#112] Fix failing raw version for postgres 2011-05-16 00:01:09 +02:00
Holger Just c51eb7059a [#340] Format blockquote tags in emails. 2011-05-15 23:42:39 +02:00
Holger Just d90102420d [#112] Adapt database switches to use ChiliProject::Database 2011-05-15 23:15:52 +02:00
Holger Just 8279144073 [#112] Add ChiliProject::Database
This module can be used to gather information about the currently used
database.
2011-05-15 23:14:02 +02:00
Felix Schäfer 20d804825d Update the watcher list on click on "watch". #311
Based on a patch contributed by Price M.
2011-05-14 17:54:11 +02:00
Felix Schäfer 0957e478ab Merge pull request #54 from schmidt/b/413-test-errors-in-1.8.6
Fix test errors on 1.8.6 after acts_as_journalized merge. #413
2011-05-13 16:38:45 -07:00
Felix Schäfer 00ca2af1d3 Merge pull request #53 from schmidt/b/412-test-errors-in-1.9.2
Fix test errors on 1.9.2 after acts_as_journalized merge. #412
2011-05-13 16:36:17 -07:00
Felix Schäfer d8ae680abb Merge pull request #56 from schmidt/b/414-remove-returning
Remove returning since it causes deprecation warnings. #414
2011-05-13 16:32:13 -07:00
Gregor Schmidt 76c72d8f11 [#414] remove returning which will be removed in future versions of Rails 2011-05-14 00:19:53 +02:00
Gregor Schmidt 300bc07b5a [#413] using Hash#to_a.first since Hash#first is not present in 1.8.6 2011-05-14 00:09:56 +02:00
Gregor Schmidt 09fd71232e [#412] fixes to make tests run on 1.9.2 2011-05-13 23:52:24 +02:00
Eric Davis 0ed2af49e9 [#408] Removed old JournalDetail test 2011-05-13 12:51:44 -07:00
Eric Davis 193b2c7a38 [#404] Move vendor/plugins/acts_as_journalized/app/ to the core app/ 2011-05-13 12:34:24 -07:00
Eric Davis dabe5caa1a Merge branch 'ticket/unstable/123-journalized' into unstable 2011-05-13 11:55:56 -07:00
Eric Davis f79e209d4c [#123] Fix hardcoded test value with a dynamic one 2011-05-13 11:53:25 -07:00
Eric Davis 0ba4134ecc [#123] Fix Journal notification test 2011-05-13 11:33:51 -07:00
Eric Davis aa2b0a8709 [#123 #407] Deferred Journal#visible tests 2011-05-13 11:26:06 -07:00
Eric Davis adf57a64f1 [#123] Move aaj migrations to core 2011-05-13 11:11:41 -07:00
Eric Davis 23ef9fedef [#123] Port the send_notification feature to aaj 2011-05-13 10:56:22 -07:00
Eric Davis 216619d376 Merge branch 'unstable' into ticket/unstable/123-journalized
Conflicts:
	test/unit/journal_test.rb
	vendor/plugins/acts_as_journalized/lib/redmine/acts/journalized/permissions.rb
2011-05-13 10:35:23 -07:00
Eric Davis 0ca73a7f69 [#123] Fix the down migration for Journal#journalized_type 2011-05-13 10:20:34 -07:00
Eric Davis b1845fcfeb [#123] Added latest edavis10:acts_as_journalized 2011-05-13 09:55:55 -07:00
Eric Davis 62c9fd2185 [#123] Removed the acts_as_journalized submodule 2011-05-13 09:49:56 -07:00
Eric Davis bf90848ae8 Merge remote-tracking branch 'schmidt/b/390-mysql2-incompat-in-wiki-page' into unstable 2011-05-13 09:29:48 -07:00
Eric Davis cff4e83044 [#290] Only print the plugin Gemfile messages when $DEBUG is set 2011-05-13 09:19:41 -07:00
Eric Davis 68925684fe Remove generic Rails performance test 2011-05-13 09:16:46 -07:00
Eric Davis 6c9c7dc5aa Merge remote-tracking branch 'schmidt/f/290-bundler' into unstable 2011-05-13 08:55:08 -07:00
Eric Davis f273b7b18c Create the ChiliProject namespace 2011-05-11 15:48:36 -07:00
Eric Davis 90df645cae Use link_to_user instead of a manual link 2011-05-11 15:40:55 -07:00
Eric Davis 315ec5f65c HTML escape some user values 2011-05-11 15:39:07 -07:00
Eric Davis e9c542d7da Merge remote-tracking branch 'asoltys/feature/link_to_user_profile_from_account_page' into unstable 2011-05-11 15:29:49 -07:00
Adam Soltys f27614b576 make username a link to their profile page 2011-05-11 16:18:04 -06:00
Gregor Schmidt c2d058a53b [#390] check to handle mysql2's early type casting 2011-05-11 00:19:11 +02:00
Gregor Schmidt ddcd4f2888 Pinning mysql2 gem to 0.2 branch, since 0.3 and the following are Rails 3 only 2011-05-10 08:42:37 +02:00
Gregor Schmidt a0eb66fc98 [#290] using ~> instead of < for i18n dependency
it is more accurate in this case
2011-05-10 08:40:58 +02:00
Gregor Schmidt cbc26ea982 [#290] Remove test gems from dev enviroment.
running single test without RAILS_ENV=test prefix seams to work without it.
2011-05-10 08:40:58 +02:00
Gregor Schmidt 326dffbc29 [#290] Adding rmagick, making it opt-out
using version < 2.0 since later versions do not work w/o backports on Debian Lenny
2011-05-10 08:40:58 +02:00
Gregor Schmidt ddcec2f4a0 [#290] making openid opt-out by adding it to a group 2011-05-10 08:40:58 +02:00
Gregor Schmidt 8304c6847a [#290] loading mocha after shoulda to make sure, that mocha's patches can be properly applied 2011-05-10 08:40:58 +02:00
Gregor Schmidt 2ec21614fd [#290] Removing all vendored gems 2011-05-10 08:40:58 +02:00
Gregor Schmidt ec569be507 [#290] ignoring .rvmrc files 2011-05-10 08:40:58 +02:00
Gregor Schmidt 87d8634b04 [#290] using bundler
* following setup instructions from http://gembundler.com/rails23.html
* adding generated files to .gitignore and .hgignore
* removing config.gem calls
* adding Gemfile that should work with all supported dbs and interpreters
* removing work-around for rubygems 1.5 deprecation. this seems to be fixed since now bundler handles the gem loading
2011-05-10 08:40:42 +02:00
Eric Davis 13de4cc4b0 [#383] Fixed failing tests due to a helper method name conflict (to_utf8)
Introduced in 1eee7312f6
2011-05-06 16:38:13 -07:00
Eric Davis d29315341d [#196 #216 #216] Complete the upgrade to Rails 2.3.11 2011-05-06 15:44:38 -07:00
Eric Davis cd73bd714f [#123] Fix test error due to un-reloaded object daddy objects 2011-05-06 14:48:11 -07:00
Eric Davis cc0c2165b5 [#123] Fix test on postgres, .first isn't based on ORDER 2011-05-06 14:48:11 -07:00
Eric Davis 65953cdc04 [#123] Fix AttachmentsController test from 1f88288 2011-05-06 14:48:11 -07:00
Eric Davis 1f8828838e [#123] Attachment changes need to be prefixed 2011-05-06 14:08:39 -07:00
Eric Davis ebf4584141 [#380] Add example of a cross project wiki link
Contributed by Alf Gaida
2011-05-06 11:23:44 -07:00
Felix Schäfer 9f07b2f4b4 Merge pull request #38 from edavis10/ticket/master/324-plugin-generators
Rename plugin generators to ChiliProject. #324
2011-05-05 13:14:26 -07:00
Simon COURTOIS bfacd827a8 Removig english strings from RepositoriesHelper 2011-05-05 22:05:41 +02:00
Felix Schäfer d6da8cadf6 Merge pull request #39 from enderson/326-pt_BR-updates
pt-BR updates. #326
2011-05-05 12:27:49 -07:00
Felix Schäfer 87e055cf47 disable browser autocomplete on password fields on user edit view. #360 2011-05-05 21:25:34 +02:00
Felix Schäfer 6fa5eb895f Merge pull request #47 from schmidt/b/374-url-escaping-in-js-calls
Don't HTML-escaped URLs before passing them to the JavaScript helper. #374
2011-05-05 12:00:41 -07:00
Felix Schäfer 800cee548b Merge pull request #46 from schmidt/b/373-duplicates-in-issue-autocomplete
Avoid duplicates in issue autocomplete. #373
2011-05-05 11:55:38 -07:00
Felix Schäfer 5938048e42 Merge pull request #48 from schmidt/b/379-wrong-header-in-wiki-help
Fix html_title usage in help views for Ruby 1.9. #379
2011-05-05 11:44:57 -07:00
Gregor Schmidt edb263cd2b [#379] using html_title properly 2011-05-05 10:54:39 +02:00
Gregor Schmidt 6408cddc40 [#374] Not escaping URLs since they are used in a safe CDATA section, where no entity encoding is needed. 2011-05-04 19:28:24 +02:00
Gregor Schmidt dbd6dfc69b [#373] Refactoring auto_completes#issues action
hoping to make it more intention revealing
2011-05-04 19:12:56 +02:00
Gregor Schmidt 8509212991 [#373] Adding test and fix for duplicates in issue autocompleter 2011-05-04 19:01:15 +02:00
Eric Davis 7cd96b6a6f Merge branch 'f/362-introduce-help-controller' 2011-05-02 14:38:04 -07:00
Gregor Schmidt 0b7b564a34 adding basic test, to make sure, nothing breaks 2011-05-02 15:24:11 +02:00
Gregor Schmidt 913c60f71c Fixing typo 2011-05-02 15:06:41 +02:00
Gregor Schmidt 5cbcd702a4 Replacing Redmine w/ ChiliProject in wiki help texts 2011-05-02 14:49:10 +02:00
Gregor Schmidt c0d7d45870 Fixing typo in detailed wiki syntax help 2011-05-02 14:43:31 +02:00
Gregor Schmidt aced650a10 Introducing help layout 2011-05-02 14:32:50 +02:00
Gregor Schmidt aeafbf3fa8 Cleaning up title and html header in help views 2011-05-02 13:12:35 +02:00
Gregor Schmidt 8fb5e8b211 Introducing help controller, moving wiki syntax documentation to help controller 2011-05-02 12:45:19 +02:00
Gregor Schmidt 8686a16e0d Changing the way, links to the wiki_syntax help page are generated
This fixes a comment, that was sitting there for more than 2 years.
2011-05-02 12:18:31 +02:00
Eric Davis bdc7325a82 Merge branch 'master' into unstable
Conflicts:
	doc/CHANGELOG.rdoc
2011-05-01 13:58:02 -07:00
Eric Davis 9d13deee46 Merge branch 'release-v1.3.0' 2011-05-01 13:56:36 -07:00
Eric Davis 1219610dc6 Merge branch 'release-v1.3.0' into stable 2011-05-01 13:54:27 -07:00
Eric Davis 07772e7eb7 Bump version to 1.3.0 2011-05-01 13:09:15 -07:00
Eric Davis db89e91927 Update Changelog for 1.3.0 release 2011-05-01 12:47:16 -07:00
Eric Davis afe5a2b2e8 Merge branch 'ticket/master/347-execution-after-redirect' 2011-05-01 12:31:43 -07:00
Eric Davis 614bad89a5 Merge branch 'ticket/unstable/310-skip-issue-mail-notifications' into unstable
Conflicts:
	config/locales/en.yml
	test/unit/journal_test.rb
2011-04-29 08:46:13 -07:00
Hugo Ferreira 4662b81710 [#357] Wrap long text fields properly in PDF exports 2011-04-29 16:20:51 +01:00
Eric Davis d2973a641e [#347] Fix potential Execution After Redirect bugs
Execution After Redirect (EAR) happens when redirect in a controller is
triggered but there still is code that is executed in the action.

Contributed by Adam Doupé
2011-04-28 14:39:19 -07:00
Eric Davis 72cd7f2049 [#347] Add missing fixture when running a focused test 2011-04-28 14:22:29 -07:00
Eric Davis 65692235a4 [#352] Use ChiliProject on error pages 2011-04-26 15:19:44 -07:00
Felix Schäfer b1ed5e4c7d Merge acts_as_journalized to unstable. #123 2011-04-23 21:25:52 +02:00
Eric Davis d02d8e7e17 Merge remote-tracking branch 'schmidt/b/346-fix-invalid-yaml' into unstable 2011-04-21 13:08:52 -07:00
Gregor Schmidt 90987ca34e [#346] Fixing polish and swedish translations to work with psych 2011-04-21 13:24:49 +02:00
Gregor Schmidt 31d292ce95 [#346] Fixing hebrew translations to work with psyc 2011-04-21 13:21:13 +02:00
Gregor Schmidt 50faef3712 [#346] also fixing errornous string starting with % 2011-04-21 12:04:04 +02:00
Gregor Schmidt 3b7ea67a99 [#346] changing i18n files to use valid yaml syntax that may be parsed by psych 2011-04-21 11:47:32 +02:00
Felix Schäfer 61f0e67c0d Upgrade tests to new journals type. 2011-04-21 11:46:00 +02:00
Felix Schäfer ef8141a2c1 Remove deprecated journals tests and controller. 2011-04-21 11:45:31 +02:00
Felix Schäfer d4adcae569 Update the Issue#show.api to new journals type 2011-04-21 11:44:55 +02:00
Felix Schäfer 9ca203beae Update to latest version of acts_as_journalized. 2011-04-21 11:44:16 +02:00
Eric Davis ed252f7246 [#309] Set the back_url after sending a lost password so HTTP_REFERER isn't used
Contributed by Robert Chady
2011-04-20 16:24:54 -07:00
Eric Davis 1eee7312f6 [#289] Remove single helpers in favor of :all in ApplicationController 2011-04-20 16:08:00 -07:00
Felix Schäfer 43ee27715a JournalDetails don't exist anymore. 2011-04-21 00:01:26 +02:00
Felix Schäfer ff431e8ed4 Force changeset journal creation. 2011-04-20 23:49:21 +02:00
Eric Davis d14417070d Merge branch 'ticket/unstable/288-april-upstream-redmine-review' into unstable 2011-04-16 16:38:00 -07:00
Eric Davis f06f846fce Locales update post-merge 2011-04-16 16:19:31 -07:00
Jean-Philippe Lang 42653cef32 Shorten query[column_names] param name.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5304 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:15:54 -07:00
Jean-Philippe Lang e78149f85c Keep issue filter params on sort headers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5303 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:15:54 -07:00
Jean-Philippe Lang 1335548949 Changes pagination links to non-AJAX requests (#5138).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5302 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:15:53 -07:00
Jean-Philippe Lang 07cf681d61 Makes all pagination-like links use #link_to_content_update (#5138).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5301 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:15:50 -07:00
Jean-Philippe Lang 844c0d97aa Removed the changeset-changes class to the commit logs on the issue view (#8038).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5300 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:20 -07:00
Jean-Philippe Lang 0c0763ad4b Disable unused fields when switching the period type.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5299 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:20 -07:00
Jean-Philippe Lang 82b638f727 Removed hidden project_id and issue_id parameters.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5298 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:20 -07:00
Jean-Philippe Lang 789ccec246 Changed timelogs filters to use non-AJAX requests (#1965).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5297 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:20 -07:00
Toshi MARUYAMA 966a7a9c34 PDF: code clean up lib/redmine/export/pdf.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5296 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Toshi MARUYAMA 73c5191196 PDF: fix width calculation of multi byte character in Simplified and Traditional Chinese (#61).
Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5295 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Jean-Philippe Lang 1cab1bd51e Skip a count(*) SQL query.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5294 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Jean-Philippe Lang 1d0b4dcdcc Do not load projects association in #rolled_up_trackers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5293 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Jean-Philippe Lang 3374130e60 Skip a few count(*) SQL queries on the issue list.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5292 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Toshi MARUYAMA 7f0a29f7c2 PDF: set enable to use TCPDF UTF-8 on Windows except CJK and Thai (#61).
Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5291 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Toshi MARUYAMA 6485f15bb9 PDF: fix the problem that TCPDF built-in font breaks in the Windows (#61).
This problem occurs because the EOF character string is included in the built-in font.

Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5290 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Jean-Philippe Lang ed867c4a7f Adds an index on users.type for faster retrieval of groups.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5288 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Jean-Philippe Lang 2431d830b1 No PUT request to get previous/next month.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5287 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Jean-Philippe Lang e6659501de Limits nested set overhead when destroying an issue without children.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5286 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:19 -07:00
Jean-Philippe Lang cfbe69ab59 Fixed: deleting a parent issue may lead to a stale object error (#7920).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5285 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:18 -07:00
Jean-Philippe Lang 61d4a623a8 Fixed: list of users for adding to a group may be empty if 100 first users have been added (#8029).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5284 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:18 -07:00
Jean-Philippe Lang bb4a10fc85 Fixed: bulk destroying parent and child issues raises a stale object error (#7920).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5283 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:18 -07:00
Toshi MARUYAMA 8ca3a46db0 PDF: back out r5253 (#7794, #61).
r5256 fixed #7794 completely.
r5253 effects the width of the ASCII character of Japanese PDF.

Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5281 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:13:18 -07:00
Jean-Philippe Lang 62a4170531 Shortens filter param names.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5279 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:53 -07:00
Jean-Philippe Lang 4e6962e7c9 Keep filter params in 'Per page' links.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5278 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:53 -07:00
Jean-Philippe Lang 561fc8b0f2 Disable unused filter fields so they don't get submitted.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5277 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:53 -07:00
Jean-Philippe Lang 35a848dac7 Initialize TimeEntry with issue and project for the issue edit form.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5274 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:53 -07:00
Jean-Philippe Lang 8fae4e2ee5 Fixes #possible_values_options when given an object with nil project.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5273 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:53 -07:00
Jean-Philippe Lang d8fbdca760 Adds User and Version custom field format that can be used to reference a project member or version in custom fields (#2096).
These new field formats are available for project, issue, version and time entry custom fields.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5272 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:53 -07:00
Toshi MARUYAMA 0bf7a60480 Fix test/integration/api_test/users_test.rb fails due to changing en.yml (#8035, #7855).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5270 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:53 -07:00
Toshi MARUYAMA 52be4a13b0 Fix annotate functional roles_controller_test.rb due fails to changing en.yml (#8035, #7855).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5269 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:53 -07:00
Toshi MARUYAMA 6ac1b6d4ef scm: git: fix annotate test due to changing en.yml (#8035, #7855).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5268 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Toshi MARUYAMA 4d6475cdcf PDF: fix syntax errors at vendor/plugins/rfpdf/lib/tcpdf.rb on Ruby 1.9 (#61).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5267 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Jean-Philippe Lang c8682120db Possible values label not hidden on custom field form.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5266 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Jean-Philippe Lang 5f3d184880 Modules selection lost on project form after validation failure (#8012).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5265 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Jean-Philippe Lang 33c28af67a Removed hard coded french strings (#8020).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5264 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Jean-Philippe Lang 1cf314ee9f Fixes en-GB translation for field_member_of_group and field_assigned_to_role (#7855).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5263 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Jean-Philippe Lang 18362e0bfa Set native eol on en-GB.yml (#7855).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5262 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Jean-Philippe Lang 10ff56eab1 Translations updates by joergleis (#7855).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5261 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Jean-Philippe Lang 0a3819d171 Japanese translation update by Yuki Kita.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5260 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Toshi MARUYAMA 098c1cb4fd PDF: switch TCPDF UTF-8 or FPDF ANSI (#61).
If server is Windows or language is CJK or Thai, Redmine uses FPDF.
Else Redmine uses TCPDF.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5259 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:52 -07:00
Toshi MARUYAMA 69bad84604 PDF: prepare switching TCPDF UTF-8 in non CJK or FPDF ANSI in CJK (#61).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5258 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:51 -07:00
Toshi MARUYAMA 610c4efbe9 PDF: comment out Mime pdf in vendor/plugins/rfpdf/init.rb (#61).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5257 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:51 -07:00
Toshi MARUYAMA 79abd95f73 PDF: import CJK patches (#61).
Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5256 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:51 -07:00
Toshi MARUYAMA a184b21a99 PDF: comment out memoizes (#61).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5255 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:51 -07:00
Toshi MARUYAMA dc82df16a8 PDF: transplant r4602 (#61).
Ruby1.9 compatibility.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5254 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:51 -07:00
Toshi MARUYAMA 3d7a35b7bb PDF: transplant r5183 (#61).
Fix an internal server error on formatting an issue as a PDF in Japanese (#7794).

Contributed by Yuki Sonoda.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5253 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:51 -07:00
Toshi MARUYAMA 60e084163c PDF: transplant r1497 (#61).
Fixes Chinese pdf export when the issue description is too long (#1170).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5252 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:51 -07:00
Toshi MARUYAMA 64bf51004a PDF: transplant r3389 (#61).
Korean support for PDF export (#4639).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5251 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:50 -07:00
Toshi MARUYAMA 3eb1d6b169 PDF: transplant r393 (#61).
Added chinese simplified translation (Andy Wu)
Fixed rfpdf chinese.rb

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5250 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:50 -07:00
Toshi MARUYAMA 7deb78ca4e PDF: transplant r287 (#61).
Fix for #9.
Export feature(to csv/pdf) doesn't work in Japanese
csv and pdf encoding are know defined for each language
(general_csv_encoding and general_pdf_encoding keys in lang files)
added SJIS font for japanese pdf exports.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5249 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:50 -07:00
Toshi MARUYAMA 9b3b0770ac PDF: add missing rfpdf requires (#61).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5248 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:50 -07:00
Toshi MARUYAMA 3a58444199 PDF: update rfpdf (#61).
https://github.com/edwinmoss/rfpdf
revision a04724b4af95c15a99675b34e353c15534d20411

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5247 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:50 -07:00
Jean-Philippe Lang e06b581595 Adds support for preview when editing an issue note (#5520).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5246 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:50 -07:00
Jean-Philippe Lang 9fa13cf4b8 Save queries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5245 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:49 -07:00
Jean-Philippe Lang 2e2f79aa27 Save 2 queries when displaying a root issue.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5244 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:49 -07:00
Jean-Philippe Lang d022da5dd5 Save 1 query + 1 cache hit in #shared_versions for root projects.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5243 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:49 -07:00
Jean-Philippe Lang 1191be519d Escapes wiki help link.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5242 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:49 -07:00
Jean-Philippe Lang 341c9c8408 Prettier wiki syntax help link.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5241 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:49 -07:00
Jean-Philippe Lang 23149957db Adds wiki toolbar to notes editing form (#7899).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5240 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:49 -07:00
Jean-Philippe Lang 8c57b95c6a Load scripts and css for wiki formatter toolbar when needed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5239 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:49 -07:00
Jean-Philippe Lang d16db34454 Moves jstoolbar script include tags to head.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5238 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:48 -07:00
Jean-Philippe Lang f26aec0bc5 Context menu: keep parent item highlighted when hovering a submenu item.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5237 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:48 -07:00
Jean-Philippe Lang b944276e30 Fixes progress calculation on gantt (#7838).
Contributed by Etienne Massip.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5236 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:48 -07:00
Toshi MARUYAMA 556ae0f2cd add .svn/ and .git/ to .hgignore.
"hg addremove" adds .svn/ and .git/ if .hgignore does not have these.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5235 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:48 -07:00
Toshi MARUYAMA 64e7d92c3b i18n: fix typo general_pdf_encoding "UFT-8" in sl.yml (#61).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5233 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:48 -07:00
Jean-Philippe Lang a825f24db3 Fixed windows detection in reposman.rb (#8003).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5232 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:48 -07:00
Jean-Philippe Lang 7d59698021 Fixes wrong test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5231 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:48 -07:00
Jean-Philippe Lang dafbb8b283 Fixed links in new file notification broken by r4051 (#6590).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5230 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:47 -07:00
Jean-Philippe Lang 420a49631d French translation update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5229 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:47 -07:00
Jean-Philippe Lang 4bcba6a094 Adds support for saturday as the first week day (#7097).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5228 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:47 -07:00
Jean-Philippe Lang f3ffbec7ae Restore settings even if a test failure occurs.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5227 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:47 -07:00
Jean-Philippe Lang c0d55c936b Moved calendar tests to unit/lib/redmine/helpers.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5226 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:47 -07:00
Jean-Philippe Lang b1c4f0fc4f Do not send reminders to locked users (#5773).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5225 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:47 -07:00
Jean-Philippe Lang e7a3085eba Allow bulk editing of parent issue (#5831).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5224 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:47 -07:00
Toshi MARUYAMA 5395caed68 scm: remove "View all revisions" in sub directory (#7984).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5223 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:46 -07:00
Toshi MARUYAMA f6fc3b88ff scm: add rev param to "View revisions" (#7984).
There are two paths to show specific revision.
* http://www.redmine.org/projects/redmine/repository/revisions/5219/show
* http://www.redmine.org/projects/redmine/repository/show?rev=5219

First link is http://www.redmine.org/projects/redmine/repository/revisions/5219/changes .
But, Second link is http://www.redmine.org/projects/redmine/repository/changes .

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5222 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:46 -07:00
Jean-Philippe Lang f6d059485d Adds css classes to parent/child issues (#7986).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5221 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:46 -07:00
Jean-Philippe Lang ef9e89fde4 Set style more specifically to avoid clashes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5220 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:46 -07:00
Toshi MARUYAMA 3c619704bf scm: do not display 'View revision' links in subversion if path or revision are nil (#7984).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5219 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:46 -07:00
Toshi MARUYAMA 70d58275e2 scm: backout r5213. do not display both 'View all revisions' and 'View revision' links (#7984, #7246).
Git and Mercurial support *branch*.

Git in repository root shows *master branch*.
Git master branch does not have all revisions.

Mercurial default branch is *default branch*.
Mercurial shows *tip* in repository root.

Mercurial does not treat directory. "hg log DIR" costs high.
Getting correct limited changesets in sub directory and branch is very heavy.
So, if there is no recent revision in sub directory and branch,
no changeset shows.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5218 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:46 -07:00
Jean-Philippe Lang c9e663132b Moved plugin tasks directories to lib/tasks (Rails deprecation).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5216 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:46 -07:00
Jean-Philippe Lang da721facfe Fixes sort parameter in reminder email links (#7963).
Contributed by Beat Jörg.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5215 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:46 -07:00
Jean-Philippe Lang ff5203d2c6 Fixed: unknown custom field format causes error when editing/bulk editing (#7985).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5214 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Jean-Philippe Lang 50405c5f9f Do not display both 'View all revisions' and 'View revision' links (#7984).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5213 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Jean-Philippe Lang 318862c167 Better cross-browser checkbox positioning.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5212 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Toshi MARUYAMA 87c1d4780b scm: filesystem: increase non ascii contents ratio of test repository (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5211 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Toshi MARUYAMA be2046b189 scm: set mime type in downloading file.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5210 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Toshi MARUYAMA 3ee44b363c scm: filesystem: add test for no extension file mime type in functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5209 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Toshi MARUYAMA fd400df10e scm: filesystem: fix todo comment of MIME_TYPES of big-file.txt in functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5208 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Toshi MARUYAMA 05825c38a2 scm: filesystem: add test for displaying file over max size limit (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5207 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Toshi MARUYAMA 314bb3fb6e scm: filesystem: add test for UTF-16 file displaying (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5206 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Toshi MARUYAMA af85236fe7 scm: filesystem: add test for non ascii text file displaying (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5205 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:45 -07:00
Toshi MARUYAMA 6fcddfe2e2 scm: fix non ascii text files displaying (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5204 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA 80b7a1e432 scm: filesystem: update test repository for non ascii text files displaying (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5203 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA 071fc2c89a scm: mercurial: add test of binary file should be force download in functional test (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5202 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA 9250fa0515 scm: mercurial: use constant for project id in functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5201 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA 317aca7c4c scm: mercurial: remove duplicate test from functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5200 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA cae18fa551 scm: darcs: remove duplicate test from functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5199 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA 5a10fb4f31 scm: filesystem: add test of no extension file whose content is only ASCII can be showing (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5198 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA 2b3251db53 scm: git: remove duplicate test from functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5197 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA 71ea12fcfc scm: filesystem: add functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5196 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:44 -07:00
Toshi MARUYAMA 622ddd5c99 scm: code clean up test/functional/repositories_controller_test.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5194 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:43 -07:00
Toshi MARUYAMA 862e4e716d scm: filesystem: change project id of unit model test from 1 to 3.
Project id 1 has Subversion fixtures.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5193 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:43 -07:00
Toshi MARUYAMA 476106ac0f scm: filesystem: code clean up unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5192 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:43 -07:00
Toshi MARUYAMA b06f24e932 scm: filesystem: code clean up unit adapter test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5191 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:43 -07:00
Toshi MARUYAMA aa0c79604a add GNU gettext po to Redmine::MimeType.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5190 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:43 -07:00
Toshi MARUYAMA b181e65e3d scm: cvs: check assign changesets in root directory showing of functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5189 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:43 -07:00
Toshi MARUYAMA f035de5018 scm: cvs: remove duplicate test in functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5188 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:43 -07:00
Jean-Philippe Lang a51ef9490c Show open and closed issues from "Issues by" version links.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5187 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:43 -07:00
Jean-Philippe Lang affedafa1f Fixed: atom links on wiki index broken by r4266.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5186 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Jean-Philippe Lang e0f37601f3 Fixed: Simultaneous wiki updates cause internal error (#7939).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5185 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Toshi MARUYAMA d1e5e1f504 Fix an internal server error on formatting an issue as a PDF in Japanese (#7794).
Contributed by Yuki Sonoda.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5183 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Toshi MARUYAMA e7f94c201e Fix typo in test/test_helper.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5182 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Jean-Philippe Lang 397da5033f Changes polish csv separator to ; and decimal to , (#7875).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5181 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Jean-Philippe Lang 80e6e8e371 Silently ignore invalid status_by param.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5180 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Jean-Philippe Lang 544b4bddbb Adds an option to view issues count by status on the version page (#7921).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5179 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Jean-Philippe Lang f55249ac90 Adds border and margin for issue list printing.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5178 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Jean-Philippe Lang 5909cf3396 Fixed: issue list truncated when printing with Firefox 3.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5177 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:42 -07:00
Jean-Philippe Lang 1d93b0e9f6 Fixed: news comments not deleted when deleting a project (#7904).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5176 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:41 -07:00
Jean-Philippe Lang 07e2c652d5 Fixes subversion tests not running on win32.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5175 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:41 -07:00
Jean-Philippe Lang 9b9c7ae91d Adds links on the issue list to collapse/expang all groups (#7236).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5174 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:41 -07:00
Toshi MARUYAMA 7257266d32 scm: filesystem: prevent exception raises if path encoding is incorrect.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5173 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 16:11:41 -07:00
Jean-Philippe Lang 94d3595e31 Fixed: children projects are deleted instead of being destroyed when destroying parent project (#7904).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5171 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:44:44 -07:00
Jean-Philippe Lang 82ebb82706 Fixes error in RepositoriesHelper#replace_invalid_utf8 when given nil.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5170 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:44:44 -07:00
Jean-Philippe Lang af40f86731 Fixes RepositoriesHelper#to_utf8 test failure for ruby1.8.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:44:44 -07:00
Toshi MARUYAMA 8a0574ac5d scm: git: default_branch() returns nil explicitly if branches are empty.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5168 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:44:44 -07:00
Toshi MARUYAMA 348b990b92 scm: add unit test of invalid utf8 sequences should be stripped in repository_helper to_utf8().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5166 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:44:07 -07:00
Toshi MARUYAMA 9888b93fdd scm: to_utf8() in repositories_helper always returns UTF-8 in Ruby 1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5165 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:44:07 -07:00
Toshi MARUYAMA 2de5ef5aa2 scm: git: strict Ruby 1.9 string test in unit adapter test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5164 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:43:07 -07:00
Toshi MARUYAMA 515dcdc5a5 scm: git: strict Ruby 1.9 string test in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5163 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:43:07 -07:00
Toshi MARUYAMA c840a19659 scm: subversion: code clean up unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5162 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:43:07 -07:00
Toshi MARUYAMA a955663b8d scm: code clean up unit model changeset test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5161 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:43:07 -07:00
Toshi MARUYAMA b1c37ba368 scm: strict Ruby 1.9 string test in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5160 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:43:07 -07:00
Toshi MARUYAMA 3a5f89cb43 scm: subversion: simplify Ruby 1.9 string test in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5159 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:43:07 -07:00
Toshi MARUYAMA 24db8296b8 scm: fix repository helper unit test fails in Ruby 1.9 and non UTF-8 locale.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5158 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:43:07 -07:00
Jean-Philippe Lang f34a566c75 Prevent error when referencing an issue without project (#7890).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5157 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:41:32 -07:00
Jean-Philippe Lang d71f4f2ef5 Do not actually try to fetch changesets from the subversion repository.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5156 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:41:32 -07:00
Jean-Philippe Lang f2021227e7 Adds a test for AuthSourcesController#destroy with users.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5155 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:41:32 -07:00
Jean-Philippe Lang a59bd805d3 Indentation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5154 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:41:32 -07:00
Jean-Philippe Lang 7b547d4487 Saves an extra SQL query on each request.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5153 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:41:32 -07:00
Jean-Philippe Lang 57734bdf6c Removes a space before argument parentheses.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5152 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:41:32 -07:00
Jean-Philippe Lang 29ce58b493 Adds links to reset filters on users and projects list.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5151 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:41:32 -07:00
Jean-Philippe Lang 4f8e8df6e0 Adds a Group filter on the admin users list (#7893).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5150 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:41:32 -07:00
Jean-Philippe Lang 3c19cacf97 Replaces TimeEntry.visible_by with a visible scope.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5149 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:40:03 -07:00
Toshi MARUYAMA 65333f1a6c scm: bazaar: add changesets order test in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5148 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Toshi MARUYAMA 51faa24b37 scm: use blank? for "root @ branch" in repository tree viewing.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5147 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Toshi MARUYAMA 232729d93f scm: mercurial: increase limit of branch directory latest changesets.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5146 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Toshi MARUYAMA ca2c2a2add scm: switch showing link all revisions and directory revisions if scm supports these feature or not.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5145 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Toshi MARUYAMA e311b26c41 scm: set supporting directory revisions or not at scm level.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5144 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Toshi MARUYAMA 8412b4f104 scm: set supporting all revisions or not at scm level.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5143 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Jean-Philippe Lang 27177defdd Adds a visible scope to the Journal model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5142 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Jean-Philippe Lang 7c2a3dc57d Adds Issue#visible_condition to build issue visibility statement.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5141 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Jean-Philippe Lang a1ffabb490 Changed the way the visibility SQL statement is built.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5140 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Toshi MARUYAMA 1c0e7790be scm: recovery showing "root @ branch" in repository tree viewing.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5139 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:58 -07:00
Toshi MARUYAMA cb7426d86f scm: code clean up repositories/show.rhtml.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5138 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA ba9624fcf3 scm: git: prevent showing trace when repository path changed.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5137 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 0ddc7bd1ec scm: code clean up repositories/show.rhtml.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5136 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Jean-Philippe Lang 08b40a67ca Use names instead of ids for wiki anchors (#6905).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5135 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Jean-Philippe Lang b38b871c7f Send the CSRF token with Ajax requests (#7843).
Contributed by Etienne Massip.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5134 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Jean-Philippe Lang 9049d58de4 Fixed: line breaks are ignored in quoted text (#6148).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5133 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Jean-Philippe Lang 3118308461 Moved text formatting tests from application_helper tests to formatter tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5132 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA ce42dfeb11 scm: mercurial: add tag test in functional test (#1981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5131 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 83567a28a4 scm: mercurial: add named branch test in functional test (#7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5130 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 80223c3523 scm: mercurial: branches and tags are enable in model (#1981, #7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5129 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 2fe311d0df scm: mercurial: add test of latest changesets support named branch in unit model test (#7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5128 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 4362623282 scm: mercurial: latest changesets support named branch (#7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5127 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 60745d7e5a scm: mercurial: add latest changesets supporting tag test in unit model test (#1981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5126 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 33581f524b scm: mercurial: add latest changesets improvement test in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5125 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA e0370914b1 scm: mercurial: add latest changesets improvement test in functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5124 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA ec6e2d1789 scm: mercurial: latest changesets improvement and supporting tag (#1981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5123 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 6b9b3783bc scm: mercurial: check changesets size is greater than 0 in browse test in functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5122 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 9ae4b74b1e scm: git: add browsing tag test in functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5121 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA b99a2c23de scm: git: check entries and changesets size are greater than 0 in browse test in functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5120 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 53d6f74209 scm: git: code clean up functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5119 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 9f2056071b scm: mercurial: prepare tests of named branch and tag in functional test (#1981, #7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5118 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:57 -07:00
Toshi MARUYAMA 6655727401 scm: mercurial: prepare tests of named branch and tag in unit model test (#1981, #7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5117 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA 4efc49ef2b scm: mercurial: code clean up unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5116 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA 66d6ef870a scm: mercurial: add test of non ASCII named branch in unit adapter test (#7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5115 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA 0617c4bb4e scm: mercurial: add test of non ASCII tag in unit adapter test (#1981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5114 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA dec106c973 scm: mercurial: prepare test of wrapping revision of cat and annotate with URL encoding (#1981, #7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5113 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA 997493f6af scm: mercurial: wrap revision of cat and annotate with URL encoding (#1981, #7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5112 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang c5c36bd21f Updates zoom icons and removes unused ones.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5111 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang 1bf4f52de5 Check for a valid time entry if comments have been entered when updating an issue (#7581).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5110 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang 2c996725f0 Add "mystery man" gravatar to options (#7640).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5109 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA df5bb0b7c1 scm: mercurial: remove unused parameters from "nodes_in_branch()" method in adapter (#7246, #4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5108 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang 3612441fed Removed useless javascript.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5107 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang 696aef231f Adds an autoscroll div around permissions report table.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5106 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang 91fa3f8ce2 Fixed: mail handler keywords are not removed when updating issues (#7785).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5105 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang 93a4f621f0 Prevent SystemStackError on Issue#all_dependent_issues with mutiple circular dependencies (#7320).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5104 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA 43868845ce scm: mercurial: add tests for "nodes_in_branch()" method in adapter (#7246, #4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5103 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA e17caceb4a scm: mercurial: add new "nodes_in_branch()" method in adapter (#7246, #4455).
For latest changesets supporting named branch.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5102 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Toshi MARUYAMA cc60e59e70 scm: mercurial: add new "rhlog()" function in helper extension (#7246, #4455).
For latest changesets supporting named branch.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5101 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang 9a5a1385da Fixed: Wiki headings containing backslash followed by a digit are not displayed correctly (#7846).
Contributed by Etienne Massip.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5100 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang 1b05ca5a6e Adds an option to #render_page_hierarchy to add timestamp titles.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5099 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:56 -07:00
Jean-Philippe Lang fec6eb782c Moved wiki page updated_on eager load to a scope and fixed timestamp titles on wiki page index (#7818).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5098 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Jean-Philippe Lang 690ce46904 Fixed: wiki page with backslash in title can not be found (#7589).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5097 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Jean-Philippe Lang 73cff6571e Fixes diff test regarding r5094.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5096 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Jean-Philippe Lang 37664c96b7 Fixes diff test regarding r5094.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5095 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Jean-Philippe Lang c18520d02f Highlight changes inside diff lines (#7139).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5094 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Toshi MARUYAMA ac3e6ba15b scm: cvs: fix missing author, revision and comment in tree view (#4270).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5093 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Toshi MARUYAMA b687ba7968 scm: mercurial: add :order => 'id DESC' explicitly for MySQL test fails.
Because :order => 'id DESC' is defined at 'has_many',
there is no need to set 'order'.
But, MySQL test fails.
Sqlite3 and PostgreSQL pass.
Is this MySQL bug?

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5091 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Toshi MARUYAMA 1bfb87df76 scm: mercurial: remove duplicates tests in unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5090 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Toshi MARUYAMA 943c7812dc scm: mercurial: fix unit model test fails on MySQL and remove duplicates tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5089 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Toshi MARUYAMA 539ca7bde5 scm: cvs: fix age column on repository view is off by timezone delta (#7827).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5088 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:55 -07:00
Toshi MARUYAMA ee6aa856ba scm: cvs: use "-D time_to_cvstime_rlog(identifier)" in adapter entries().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5087 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Toshi MARUYAMA 8010bd6351 scm: cvs: code clean up adapter entries().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5086 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Toshi MARUYAMA bbaa90c59f scm: cvs: use scm_cmd() in adapter revisions().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5085 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Toshi MARUYAMA 2c3836a958 scm: cvs: code clean up model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5084 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Toshi MARUYAMA fa20af4457 scm: cvs: use scm_cmd() in adapter entries().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5083 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Toshi MARUYAMA d8977e02a5 scm: cvs: add new method 'scm_cmd' to wrap shellout.
Refer Mercurial adapter r4830.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5082 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Toshi MARUYAMA 39caa465e2 scm: cvs: code clean up functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5081 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Jean-Philippe Lang ea9eafbee5 Speeds up WikiHelper#wiki_page_options_for_select.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5080 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Jean-Philippe Lang af34ecdb90 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5079 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Jean-Philippe Lang 4975675b60 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5078 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Jean-Philippe Lang da28fa6e0f Gantt: do not ignore project filter (#7000, #7352), do not display empty projects/versions, and display shared versions used in other projects (#5817, #6476, #6604).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5077 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:38:54 -07:00
Jean-Philippe Lang e3c3e50083 Prevent icons clipping on gantt.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5076 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA 46a533029f scm: git: fix newlines of test/unit/repository_git_test.rb.
svn cat fails.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5075 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA 0b862978f4 scm: git: add tests for previous and next versions in unit model test (#7821, #5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5074 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA 6f5947729c scm: git: insert revisions to database with reverse commit order (#7821, #5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5073 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA aebcad6e4d scm: git: unit model latin-1 path encoding test passes on Japanese Windows (#5251).
Ruby uses ANSI api to fork a process on Windows.
Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem
and these are incompatible with ASCII.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5072 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA af5fb55f7c scm: git: unit adapter latin-1 path encoding test passes on Japanese Windows (#5251).
Ruby uses ANSI api to fork a process on Windows.
Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem
and these are incompatible with ASCII.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5071 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA 2f87c5f582 scm: git: fix PortgreSQL functional test fails (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5070 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA ae5cfa0935 scm: git: switch "-c core.quotepath=false" in git version above 1.7.2 or not (#5251).
The -c option was introduced in git version (1.7.2)
http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.7.2.txt

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5069 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA 18d701b2a5 scm: git: change core.quotepath to false in test repository config (#5251).
The -c option was introduced in git version (1.7.2)
http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.7.2.txt

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5068 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA e158348f89 scm: git: add reverse log test in unit adapter test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5067 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA ff74490b18 scm: git: fix unit adapter test fails in Ruby 1.9 Linux latin-1 locale (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5066 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA 8a6a232cd3 scm: git: fix unit adapter test fails in Ruby 1.9 Linux latin-1 locale (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5065 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA 6ed81eca8f scm: git: add path encoding select box at setting (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5064 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:36:08 -07:00
Toshi MARUYAMA ee003a6c78 scm: git: add latin-1 encoding directory test in unit model test (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5063 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA fcfb5897f8 scm: git: add latin-1 encoding directory test in unit adapter test (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5062 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA d2e68968d6 scm: git: fix latin-1 directory entries() in adapter (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5061 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA 2ebb117044 scm: git: add latin-1 encoding directory to test repository (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5060 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA f2fa1d4920 scm: mercurial: add latin-1 encoding directory to test repository (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5059 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA ed9596a563 scm: git: add latest changesets path encoding test in unit model test (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5058 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA f747d0a866 scm: git: prepare path encoding test in unit model test (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5057 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA e491051adb scm: git: add latest changesets branch test in unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5056 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA 2739192a1d scm: git: add latest changesets tag test in unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5055 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA 8bf4be1c22 scm: git: add latest changesets limit test in unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5054 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA 132c4f58b0 scm: git: remove Setting.commit_logs_encoding from unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5053 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA a2aa2a39cf scm: git: add latest changesets test in unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5052 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA 8235e0f4a6 scm: git: prepare path encoding test in unit model test (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5051 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA 18decee672 scm: git: add tests for path encoding entries() in unit adapter test (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5050 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:17 -07:00
Toshi MARUYAMA 891ff89aed scm: git: add core.quotepath = false to run git command (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5049 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA 41b88089a9 scm: git: add tests for branch entries() in unit adapter test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5048 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA f87f51e8e8 scm: git: add tests for tag entries() in unit adapter test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5047 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA d10309e8c6 scm: git: use scm_cmd() in adapter tags().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5046 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA c7646da94f scm: git: add tags test in unit adapter test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5045 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA 2ff3b15854 scm: git: add tests for path encoding cat, diff and blame in unit adapter test (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5044 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA be67b2ec41 scm: git: use scm_cmd() in adapter branches().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5043 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA 09e76f2907 scm: git: support path encoding in adapter cat (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5042 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA 107f92ab9e scm: git: support path encoding in adapter blame (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5041 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA efa1d58362 scm: git: support path encoding in adapter entries() (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5040 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA f78339713d scm: git: support path encoding in adapter diff (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5039 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:16 -07:00
Toshi MARUYAMA 57133f594f scm: git: support path encoding in adapter revisions() (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5038 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:15 -07:00
Toshi MARUYAMA 1389d3adba scm: git: add two tags to test repository.
One is lightweight, another is annotated.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5037 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:15 -07:00
Toshi MARUYAMA e439ae3c6c scm: git: convert path encoding in "git log" (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5036 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:15 -07:00
Toshi MARUYAMA 01ca8f6b0f scm: git: add instance variable for path encoding in adapter (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5035 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:15 -07:00
Toshi MARUYAMA 0b760212f6 scm: git: code clean up adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5034 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:15 -07:00
Toshi MARUYAMA 38bfb7dae9 scm: git: update test repository for path encoding (#5251).
Mercurial and Git treats file names as byte string.
This git test repository contains Latin-1 encoding path.
Be careful on non Latin-1(CP1252) Windows.

Please see r4996 comment.

I removed a revision including "copied file" from r5026 test repository.
Mercurial supports "copy", but Git does not support.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5033 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:15 -07:00
Jean-Philippe Lang 793eff2512 CHANGELOG updated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5030 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:35:15 -07:00
Toshi MARUYAMA ea5a78435b scm: git: remove "core.quotepath = true" to run git command (#5251).
If path encoding is UTF-8, git adapter may run on Linux.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5029 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Toshi MARUYAMA 043e265e50 scm: git: use core.quotepath = true to run git command for database safety (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5028 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Toshi MARUYAMA 32fa37f49a scm: git: backout r5026 (#5251).
In case git repository contains latin-1 path,
although Redmine uses "git log -C core.quotepath=false --encoding=UTF-8",
log encoding is latin-1.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5027 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Toshi MARUYAMA a24be0ee87 scm: git: update test repository for path encoding (#5251).
Mercurial and Git treats file names as byte string.
This git test repository contains Latin-1 encoding path.
Be careful on non Latin-1(CP1252) Windows.

Please see r4996 comment.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5026 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Toshi MARUYAMA 4987d1b240 scm: git: change core.quotepath = true temporarily to run git command (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5025 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Toshi MARUYAMA 0b4a6164f0 scm: git: add core.quotepath = false to run git command (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5024 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Toshi MARUYAMA b6449c6a84 scm: git: add core.quotepath = true in test repository config (#5251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5023 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Jean-Philippe Lang 784bbccfc6 Fixed: error on JournalsController#index when custom fields are present (#7795).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5021 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Jean-Philippe Lang ca4dcce81c Updates for 1.1.2 release.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5019 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:34:43 -07:00
Jean-Philippe Lang 706448c601 Translations updates.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5016 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:32:38 -07:00
Jean-Philippe Lang 3a347d8eb8 Version list style updated.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5008 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:26:40 -07:00
Jean-Philippe Lang 52397646b2 Fixed: Login page should not show projects link and search box if authentication is required (#3715).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5007 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:26:40 -07:00
Jean-Philippe Lang 19083725ff Removes duplicate DOM id in custom field form.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5006 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:26:40 -07:00
Jean-Philippe Lang 25ce0e6cd2 Extends custom field possible values textarea.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5005 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:26:39 -07:00
Jean-Philippe Lang dac912b379 Fixed: Email notifications are sent to watchers even if 'No events' setting is chosen (#7763).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5004 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:26:39 -07:00
Jean-Philippe Lang 6f5707c2b5 Adds email notifications support for news comments (#2074).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5003 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:26:39 -07:00
Toshi MARUYAMA 2fa11b2168 scm: mercurial: add changesets order test in unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5002 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:26:39 -07:00
Toshi MARUYAMA ac58816e9f scm: mercurial: add path encoding select box at setting (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5001 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:26:39 -07:00
Toshi MARUYAMA cd9cf95d9a scm: mercurial: add path encoding tests in functional test (#2664, #4050).
TODO: This test fails in Ruby 1.9 and Encoding.default_external is not UTF-8.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5000 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:34 -07:00
Toshi MARUYAMA 7006fe1df8 scm: mercurial: additional unit model tests for path encoding (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4999 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:34 -07:00
Toshi MARUYAMA 13d13c426d scm: mercurial: add unit adapter test repository for path contains space (#2664, #4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4998 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:34 -07:00
Toshi MARUYAMA 3fadaf3c85 scm: mercurial: update test repository for path contains space (#2664, #4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4997 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:34 -07:00
Toshi MARUYAMA fe4159fc99 scm: mercurial: update test repository for path encoding (#2664).
Mercurial (and also Git) treats file names as byte string.
This mercurial test repository contains Latin-1 encoding path.
Be careful on non Latin-1(CP1252) Windows.

If your Windows is not Latin-1 Windows,
in order to checkout(update) Latin-1 path,
You need to use cygwin 1.7 and set LANG=en_US.ISO-8859-1.

Please refer.
http://mercurial.selenic.com/wiki/EncodingStrategy?action=recall&rev=6

Redmine mercurial adapter do not need to checkout(update) repository.
Mercurial does not have "bare" repository such as Git.
You can use "hg update null" for equivalent "bare" repository.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4996 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:34 -07:00
Toshi MARUYAMA bea085c3ba scm: mercurial: convert copied file path encoding (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4995 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:34 -07:00
Toshi MARUYAMA 51d4785bde scm: mercurial: remove localtime from adapter (#4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4994 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:33 -07:00
Toshi MARUYAMA ac227939ad scm: Ruby 1.9 compatibility for XML UTF-8 parsing.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4993 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:33 -07:00
Toshi MARUYAMA ce01f49ca7 scm: fix unit tests fails in Ruby 1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4992 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:25:08 -07:00
Toshi MARUYAMA 15abee2ee5 scm: mercurial: code clean up unit model test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4991 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:24:18 -07:00
Toshi MARUYAMA b00caa6e48 scm: mercurial: wrap revison, tag and branch with URL encoding for entries (#4455, #1981, #7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4989 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:23:26 -07:00
Toshi MARUYAMA ce16f4a278 scm: filesystem: add note "Default: UTF-8" in path encoding setting (#2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4988 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:23:26 -07:00
Toshi MARUYAMA fb4601221a scm: subversion: add changesets order test in unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4987 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:22:35 -07:00
Toshi MARUYAMA c54cd8a088 scm: git: add more tests in fetch changesets incremental unit model test (#5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4986 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:22:35 -07:00
Toshi MARUYAMA b91649ab41 scm: code clean up repositories_helper.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4985 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:22:35 -07:00
Toshi MARUYAMA a9a6abe40a scm: code clean up test/unit/changeset_test.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4984 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:21:10 -07:00
Toshi MARUYAMA 1c5e441b65 scm: remove global repository log encoding setting from view (#1735).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4983 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:21:10 -07:00
Toshi MARUYAMA e383414c31 scm: add feature of per project repository log encoding setting (#1735).
Subversion, Mercurial and Git supports UTF-8 log.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4982 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:21:10 -07:00
Toshi MARUYAMA 231fcf6fd8 scm: copy global log encoding setting to repository (#1735).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4981 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:17:59 -07:00
Toshi MARUYAMA ab8bdf282b scm: add log_encoding column to repositories table (#1735).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4980 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:17:59 -07:00
Toshi MARUYAMA aae9747e65 scm: darcs: refactor functional test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4979 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:17:59 -07:00
Toshi MARUYAMA e5619d5368 scm: darcs: change project id of unit app test from 1 to 3.
Project id 1 has Subversion fixtures.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4978 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:17:58 -07:00
Toshi MARUYAMA 57455eff5f scm: bazaar: change project id of unit app test from 1 to 3.
Project id 1 has Subversion fixtures.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4977 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:17:58 -07:00
Toshi MARUYAMA 57298dcc82 scm: code clean up at test/unit/changeset_test.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4976 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:17:58 -07:00
Toshi MARUYAMA 9c3c35e8b8 scm: add scm specific human_attribute_name for input validation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4975 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:17:58 -07:00
Toshi MARUYAMA 8eaa4d10e5 scm: add notes "local repository" in Git and Mercurial setting.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4974 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:17:58 -07:00
Jean-Philippe Lang be4e4c80f7 Stringify avatar to prevent "can't convert nil into String" errors on gantt (#7317).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4968 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Jean-Philippe Lang c5eef91d1c Escapes body css classes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4965 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Toshi MARUYAMA 515e89dd40 scm: git: use --encoding=UTF-8 in "git log" (#3396).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4964 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Toshi MARUYAMA 5774ea453b scm: git: refactor lastrev() in adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4963 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Toshi MARUYAMA 1042deb450 scm: ignore log encoding setting in Subversion and Mercurial (#7597).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4962 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Toshi MARUYAMA 9895d2e186 scm: refactor scm log encoding test (#1735, #3396, #7597).
Bazaar log depends on locale.
On Japanese Windows, standard out is CP932.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4961 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Toshi MARUYAMA aa58533f1a scm: return if str.blank? in to_utf8(str).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4960 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Toshi MARUYAMA 65d0bb9c93 scm: git: move saving changesets from adapter to model (#3396).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4959 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Jean-Philippe Lang 33d2c25474 Fixes a failing test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4958 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Toshi MARUYAMA 7367b72cf1 scm: mercurial: change project id of unit app test from 1 to 3.
Project id 1 has Subversion fixtures.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4957 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Toshi MARUYAMA 25d98527bd scm: git: add utf-8 log test in app unit test (#3396).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4956 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:24 -07:00
Jean-Philippe Lang c9497f39b8 Keep track of issue description changes (#746).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4954 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:03 -07:00
Jean-Philippe Lang 8b4c8e6902 Fixes wiki diff rendering.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4953 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:03 -07:00
Jean-Philippe Lang 771147ce80 Extracts a diff helper from the WikiDiff class.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4952 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:03 -07:00
Jean-Philippe Lang b5c606e3a0 Fixes syntax for time logging in commit messages (#7630, #7718).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4951 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:03 -07:00
Jean-Philippe Lang d88fa6ccce Adds support for SCM/LDAP passwords encryption in the database (#7411).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4950 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:03 -07:00
Jean-Philippe Lang b5d259383f Adds a method to temporarily override configuration settings.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4949 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:03 -07:00
Jean-Philippe Lang d2886124ee Bulgarian translation update by Ivan Cenov.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4948 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:16:02 -07:00
Jean-Philippe Lang 2740c67682 Removes obsolete code from Opera pseudo right click (#7700).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4947 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:14:42 -07:00
Jean-Philippe Lang 40787ff43f Do not responde with javascript on regular requests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4946 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:07:19 -07:00
Toshi MARUYAMA c439bd5323 scm: git: add flag of disable showing last commit in repository tree (#7047).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4945 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:07:19 -07:00
Toshi MARUYAMA 9cfcdcb727 scm: filesystem: fix mistake of respository select box on r4943 (#2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4944 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:07:19 -07:00
Toshi MARUYAMA 77f70ee27b scm: filesystem: add path encoding select item (#2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4943 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:06:57 -07:00
Toshi MARUYAMA 07b94a25f6 scm: update adapter initialize() to use path encoding (#2664, #2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4941 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:03:52 -07:00
Toshi MARUYAMA 2195984e35 scm: add "path_encoding" column in repositories table (#2664, #2274).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4940 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:03:52 -07:00
Toshi MARUYAMA 12c5dcbd13 scm: cvs: fix CVS diffs do not handle new files properly (#7615).
Contributed by Jim Naslund.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4939 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:03:52 -07:00
Toshi MARUYAMA 5fe46b215b scm: use "ASCII-8BIT" in IO.popen() in Ruby 1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4938 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:03:52 -07:00
Jean-Philippe Lang 7c57bd35f9 Adds tasks for locales maintenance.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4937 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:03:52 -07:00
Jean-Philippe Lang 9964c43b3b Adds random salt to user passwords (#7410).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4936 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 15:03:52 -07:00
Jean-Philippe Lang c224ec5168 Fixed: Bulk editing menu non-functional in Opera browser (#3132).
Contributed by Claudio Acciaresi.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4935 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:37 -07:00
Toshi MARUYAMA cb8b71470a scm: mercurial: replace urllib.unquote to urllib.unquote_plus in helper (#4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4934 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:37 -07:00
Toshi MARUYAMA 428e734ede scm: mercurial: remove unused rhannotate command options in helper.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4933 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:37 -07:00
Toshi MARUYAMA 5a6000444f scm: add unit RepositoryHelper test for Ruby 1.9 compatibility.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4932 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:37 -07:00
Toshi MARUYAMA 5e0b318256 scm: mercurial: annotate path encoding support in adapter (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4931 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:37 -07:00
Toshi MARUYAMA ef2c777b1c scm: mercurial: annotate path encoding support in helper (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4930 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:37 -07:00
Toshi MARUYAMA eb217d1340 scm: fix diffs do not handle one line new files properly (#7618).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4929 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:36 -07:00
Toshi MARUYAMA 4bd39c9df5 scm: mercurial: path encoding support for "cat" in adapter (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4928 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:36 -07:00
Toshi MARUYAMA 6caa0f1ce8 scm: mercurial: change some newlines in mercurial_adapter.rb CRLF to LF.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4927 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:59:36 -07:00
Toshi MARUYAMA a81049d52b scm: for log in Ruby 1.9, replace invalid UTF-8 to '?' instead of removing.
Refer r3466 #4773.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4926 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:58 -07:00
Toshi MARUYAMA 0e34299240 scm: Ruby 1.9 compatibility for log.
Remove assuming UTF-8 is valid.
"\xC2\x80" of latin-1(iso-8859-1) is valid sequence of UTF-8.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4925 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:58 -07:00
Toshi MARUYAMA 4620f6b2fa scm: fix unit changeset_test.rb test methods calls randomly.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4924 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:58 -07:00
Toshi MARUYAMA 13f83a883f scm: mercurial: log and entries path encoding support in adapter (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4923 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:58 -07:00
Toshi MARUYAMA 1e5e1b6ae7 scm: Ruby 1.9 compatibility for diff, cat and blame (#2664).
"\xC2\x80" of latin1(iso-8859-1) is valid sequence of UTF-8.
to_utf8() should not return string if it is UTF-8 valid_encoding.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4922 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:58 -07:00
Toshi MARUYAMA ae8f4c1f2a scm: Ruby 1.9 compatibility for browsing repository tree (#2664, #2274).
If repository path is not UTF-8, Ruby 1.9 shows trace.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4921 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:58 -07:00
Toshi MARUYAMA 764ab0f300 scm: Ruby 1.9 compatibility in getting scm version (#4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4920 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:58 -07:00
Toshi MARUYAMA ae8386b3dc scm: mercurial: override initialize() for path encoding (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4919 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:10 -07:00
Toshi MARUYAMA 34832d8731 scm: git: Ruby 1.9 compatibility of adapter test (#3396).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4918 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:58:09 -07:00
Jean-Philippe Lang ac65a69ea3 Extracts gantt subjects styles to css (#7280).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4916 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:57:31 -07:00
Jean-Philippe Lang 3a8f66116f Adds full subject as gantt subject title (#7280).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4914 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:57:31 -07:00
Jean-Philippe Lang 07092b890a Prevent text wrap in gantt subjects (#7280).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4913 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:57:31 -07:00
Toshi MARUYAMA 39332b7a72 scm: prevent diff shows trace if UTF-8 is invalid in Ruby 1.9.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4912 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:57:31 -07:00
Jean-Philippe Lang d95201c917 Makes filters behaviour consistent with the issue list.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4911 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:57:31 -07:00
Jean-Philippe Lang 7656078b92 Makes title/filters consistent with the issue list.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4910 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:57:31 -07:00
Jean-Philippe Lang cf380d959f Preserve Issues/Gantt/Calendar tab when displaying a saved query (#7605).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4909 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:57:31 -07:00
Jean-Philippe Lang 886c3e295b Splits private/public issue queries in the sidebar (#1067).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4908 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:57:31 -07:00
Toshi MARUYAMA 0e39c0e550 scm: filesystem: refactor for path encoding (#2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4907 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:52:52 -07:00
Toshi MARUYAMA b95ef671d6 scm: add "scm_iconv" method for repository path encoding in abstract_adapter.rb (#2664, #2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4906 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:52:52 -07:00
Jean-Philippe Lang 0e789c5272 Updgraded Rails to 2.3.11 (#6887).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4904 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:52:52 -07:00
Jean-Philippe Lang 3f41152b4f Added Persian translation contributed by Behrang Noroozinia (#7418).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4903 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:51:02 -07:00
Jean-Philippe Lang 40c063a158 Updated basque and czech translations. Contributed by Ales Zabala Alava and Michal Gebauer.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4901 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:50:51 -07:00
Jean-Philippe Lang bbb57ea4d2 Warning on leaving a page with unsaved content in textarea (#2910).
The warning can be turned off in the user's preference.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4900 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:46:57 -07:00
Toshi MARUYAMA 5ad7dfee4a scm: add CP932 at Setting::ENCODINGS (#2664, #2274).
CP932 is variant Japanese Shift_JIS on Windows.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4899 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Toshi MARUYAMA d201aa7b48 scm: mercurial: add 'rhcat' function using URL encoding in mercurial helper extension (#2664).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4898 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Toshi MARUYAMA 3e1a39ef69 Ruby 1.9 compatibility of unified_diff.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4897 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Toshi MARUYAMA 748ce27728 scm: subversion: change some functional tests project id from 1 to 3.
TODO: remaining tests read fixture. All tests need to read test repository.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4896 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Jean-Philippe Lang cc2d6f3605 Allow additional workflow transitions for issue author and assignee (#2732).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4895 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Jean-Philippe Lang 93a6d6c296 Fixed: date part of the time default format doesn't respect the date format (#7639).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4894 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Toshi MARUYAMA 47fdf7bb3f scm: git: move "--no-color" option from scm_cmd() to revision().
Ruby 1.9.2 test fails.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4893 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Jean-Philippe Lang 2b3ad7ab10 Use #custom_field_values to display issue custom fields in email, just like on regular views (#7604).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4892 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Jean-Philippe Lang b615e60fd8 Do not keep illegitimate custom_values when setting custom_field_values (#7604).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4891 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:45 -07:00
Jean-Philippe Lang f06bb4be34 Fixed: Workflow summary shows X icon for workflow with exactly 1 status transition (#7611).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4890 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:44 -07:00
Jean-Philippe Lang 4a7c41d30c Fixed: Syntax highlighting unavailable from board new topic or topic edit preview (#7625).
Contributed by Etienne Massip.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4889 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:43:44 -07:00
Toshi MARUYAMA c3bca3fccb scm: git: fix wrong commit range in git log command on Windows (#7657).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4887 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:40:11 -07:00
Toshi MARUYAMA 90d0875a2e scm: git: add new method 'scm_cmd' to wrap shellout.
Refer Mercurial adapter r4830.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4886 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:40:11 -07:00
Toshi MARUYAMA 899a35fc8d scm: git: add --no-color option to run "git --version".
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4885 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:40:11 -07:00
Toshi MARUYAMA 19c89413b6 scm: mercurial: code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4884 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:40:11 -07:00
Toshi MARUYAMA 66662ac84b scm: catch exception of getting command and version in model (#4273).
If command does not exist, Windows raises exception in shellout().
Linux does not raise exception.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4882 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA 6c6bc81654 scm: darcs: override client_available method (#4273).
I forgot it.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4881 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA ad66e0db4b scm: darcs: space cleanup in adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4880 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA dbdbe26f5c scm: mercurial: fix exception operation in adapter all methods using xml and io.read (#4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4879 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA b399e18548 scm: mercurial: simplify fixing exception operation in adapter "summary" method (#4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4878 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA add4b117cc scm: mercurial: fix exception operation in adapter "summary" method (#4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4876 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA e334d3dba9 scm: mercurial: unit test for named branches at adapter (#7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4875 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA 944293bb47 scm: mercurial: support named branches at adapter (#7246).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4874 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA c60a9ee5c4 scm: mercurial: unit test for tags at adapter (#1981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4873 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA 0cdbec47b5 scm: mercurial: support tags at adapter (#1981).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4872 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA b2e4dbca6f scm: mercurial: temporary disable tags and branches at model (#1981, #7246, #4455).
Until latest_changesets supports tags and branches.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4871 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA 8f636b9b21 scm: mercurial: unit app test for latest_changesets SQL "like" special character '%' and '_'.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4870 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:26 -07:00
Toshi MARUYAMA c45f66c41e scm: mercurial: unit app test for latest_changeset.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4869 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 7c6a205a01 scm: mercurial: improvement latest_changesets without supporting tags and named branches (#4455).
Based on latest-changesets-improvements-2.diff of #6159.
http://www.redmine.org/attachments/4332/latest-changesets-improvements-2.diff

Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4868 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 05c0c88840 scm: mercurial: entries unit lib test for named branch (#7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4867 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 513a217330 scm: mercurial: entries unit lib test for tag (#1981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4866 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 229c237e7e scm: mercurial: remove "TODO" comment and fix indent of unit lib test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4865 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA e37fcfece1 scm: mercurial: unit lib test for entries (#3421).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4864 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 2fe248917c scm: mercurial: move entries unit test from app to lib.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4863 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 9d9c0716f2 scm: mercurial: fix unit lib test_info test fails on Windows.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4862 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 2ddd6e2252 scm: space cleanup of lib/redmine/scm/adapters/abstract_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4861 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 49fde3723b scm: fix diff revision param validation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4860 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 7934e32ee1 scm: mercurial: fix Ruby 1.9 "hg diff" test fails (#7518).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4859 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 77f6496393 scm: in repository tree, use find_changeset_by_name instead of changesets.find_by_revision (#3724, #3421).
Mercurial revision numbers are far too brittle.
Please see #6681 description.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4858 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 654a22624e scm: mercurial: add identifier to entry.lastrev (#3724, #3421).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4857 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 3ba56db935 scm: mercurial: rewrite MercurialAdapter#entries to show per-file change log and size (#3421, #4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4856 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 29f9fbd2ee scm: mercurial: set instance value flag of whether "hg diff -c" supports true at tests (#7518).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4855 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA cb26f0adf9 scm: mercurial: rewrite MercurialAdapter#diff by using helper extension (#4455, #7518).
fix incompatibility of diff with Mercurial < 1.1.

Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4854 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 6840897f38 scm: mercurial: add instance value flag of whether "hg diff -c" supports at tests (#7518).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4853 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 86cbaaa5d1 scm: mercurial: code clean up unit app test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4852 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA cb467e3a8b scm: git: implement find_changeset_by_name (#7047).
SQL "like" is slow.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4851 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA f0d4b2625b scm: git: change project id of unit app test from 1 to 3.
Project id 1 has Subversion fixtures.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4850 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA de7f88c572 scm: mercurial: refactor Repository::Mercurial#fetch_changesets (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4849 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 0f1c932f35 scm: mercurial: rewrite MercurialAdapter#revisions as an iterator (#4455).
Now it uses XmlMini.parse() in place of slow REXML.

Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4848 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:25 -07:00
Toshi MARUYAMA 33f1436eb2 scm: mercurial: change identifier to revision in fetching revisions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4847 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 608025fd04 scm: mercurial: rewrite MercurialAdapter#info by using helper extention (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4846 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 40d72c354a scm: mercurial: add "summary" method in adapter (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4845 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 40ef1dd792 scm: mercurial: switch root_url or url in "hg" method (#4455).
"info" sets root_url from url.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4844 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA f777cc1ee8 scm: mercurial: add compatible test for "revisions" method.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4843 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA bed219927d scm: mercurial: refactor "cat" by using hg helper method (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4842 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 713757cc8c scm: mercurial: refactor "annotate" by using hg helper method (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4841 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 357ddfb112 scm: mercurial: add "hgtarget" method (#4455).
Abstract adapter shell quotes paths.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4840 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 3f80b8a9a7 scm: mercurial: change "--cwd" option to "-R" for running "hg" (#4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4839 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 60f165a9fc scm: mercurial: add compatible test for "info" method.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4838 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 29f99eee07 scm: bazaar: move cat and annotate test from unit app test to unit lib test.
Bazaar supports revision number and do not need to read database.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4836 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA e85165c84e scm: cvs: set client available if cvs version above 1.12.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4835 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 13e0b6b980 scm: mercurial: ignore redminehelper.pyc and redminehelper.pyo for Git and Mercurial (#4455).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4834 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA aa4b38025a scm: mercurial: add Mercurial helper extension (#4455).
* 'rhsummary' and 'rhmanifest' for reducing the number of hg command calls.
* 'rhdiff' for compatibility with Mercurial < 1.1.

Also renamed TEMPLATES_DIR to HELPERS_DIR because the directory now contains
templates and a helper extension.

Original version was written by Alessio Franceschelli,
downloaded from http://www.redmine.org/attachments/3395/overhaul.py

Contributed by Alessio Franceschelli and Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4833 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 34e013c187 scm: cvs: add methods of getting cvs version and add unit lib test (#4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4832 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 6d8fe71a73 scm: bazaar: add methods of getting bazaar version and add unit lib test (#4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4831 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA cad0356322 scm: mercurial: add new method 'hg' to wrap shellout (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4830 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA f62cccfdc6 scm: git: add methods of getting git version and add unit lib test (#4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4829 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 62ea9bd915 scm: mercurial: switch shell quote revision with argument.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4828 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 8b3a8d73be scm: subversion: change newlines LF to CRLF at lib/redmine/scm/adapters/subversion_adapter.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4827 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:35:24 -07:00
Toshi MARUYAMA 2e85bd621b scm: subversion: change unit app test project id from 1 to 3.
Fixtures have project id 1 subversion changesets and changes.

Change file:/// to file://.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4826 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:34:17 -07:00
Toshi MARUYAMA 323c36b3c3 scm: subversion: refactor getting svn version and add lib test (#4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4825 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:34:17 -07:00
Toshi MARUYAMA 9b68c6701f scm: catch CommandFailed during bulk Repository.fetch_changesets (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4824 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:28:22 -07:00
Toshi MARUYAMA e2f79f7c0d scm: git: remove localtime (#6346).
No needs to use localtime.
If we use localtime, we should clone.

See r4794 and r4802.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4823 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:28:22 -07:00
Toshi MARUYAMA 8d5617fc8b scm: add scm command and version methods at repository models (#4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4822 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-16 14:28:22 -07:00
Felix Schäfer 70e10ab4bd Merge the master-journalized branch from https://github.com/finnlabs/redmine/ 2011-04-14 16:28:10 +02:00
Enderson Maia f95706c962 pt-BR updates 2011-04-09 18:09:50 -03:00
Eric Davis 71c6ceb223 [#324] Rename and update the chiliproject_plugin_controller generator 2011-04-08 09:59:31 -07:00
Eric Davis 1477e8b349 [#324] Rename and update the chiliproject_plugin_model generator 2011-04-08 09:59:31 -07:00
Eric Davis cdb8c68018 [#324] Rename and update the chiliproject_plugin generator 2011-04-08 09:52:32 -07:00
Eric Davis 18c35f3792 [#324] Rename generators 2011-04-08 09:48:15 -07:00
Holger Just 6e0717261c Merge branch 'ticket/unstable/279-version-start-date' of git://github.com/edavis10/chiliproject.git into unstable 2011-04-07 23:46:54 +02:00
Eric Davis b96115bf7b [#310 LSS#5727] Add checkbox option to determine if issue emails should be sent 2011-03-30 11:48:59 -07:00
Eric Davis 84998d22a6 Sync to v1.2.0's latest code. Merge branch 'master' into unstable. 2011-03-27 11:24:39 -07:00
Eric Davis 7f47401a03 Merge branch 'release-v1.2.0' 2011-03-27 11:09:25 -07:00
Eric Davis 78cee48c2d Merge branch 'release-v1.2.0' into stable 2011-03-27 11:06:28 -07:00
Eric Davis 25b0180546 Bump version to 1.2.0 2011-03-27 11:05:08 -07:00
Eric Davis eedf576b63 Update changelog for 1.2.0 2011-03-27 10:51:38 -07:00
Eric Davis 39c19958d7 [#308] Remove Redmine::VERSION::BRANCH 2011-03-27 10:48:20 -07:00
Jean-Baptiste Barth 04361864a7 Added 'retro' style for gravatars. #7608
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4811 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 10:31:45 -07:00
Eric Davis 86faa88e55 Merge branch 'ticket/master/225-upstream-scm' 2011-03-27 10:19:26 -07:00
Toshi MARUYAMA 6d0fcf556d scm: use shell quote for scm command at adapter level (#7517, #4273).
"C:\Program Files\TortoiseHg\hg.exe" can be used in config/configuration.yml.

In Ruby 1.9 IO.popen, if cmd is an Array of String,
it will be used as the subprocess‘s argv bypassing a shell.

See http://www.ruby-doc.org/core/classes/IO.html

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4821 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 10:10:55 -07:00
Toshi MARUYAMA 6cd9bc5ca5 scm: space and tab cleanup of app/controllers/repositories_controller.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4817 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 10:10:55 -07:00
Toshi MARUYAMA 3d11a22624 scm: fix non ASCII filename downloaded from repo is broken on Internet Explorer (#7288).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4816 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 10:10:55 -07:00
Toshi MARUYAMA 52822ad58e scm: cvs: fix most binary files become corrupted on Windows (#6090).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4815 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 10:10:55 -07:00
Jean-Baptiste Barth 5356140f5f Ignore .project and .loadpath files for hg/git mirrors. #7497
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4813 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 10:10:54 -07:00
Toshi MARUYAMA 2b97992015 scm: bazaar: fix typo and mistakes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4810 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 09:26:02 -07:00
Toshi MARUYAMA 3110e97038 scm: git: fix typo of unit lib test.
This file includes UTF-8 "literal".
We need to consider Ruby 1.9 compatibility.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4809 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 09:25:25 -07:00
Toshi MARUYAMA 64835367ab scm: cvs: fix unit lib test fails on Windows.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4808 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 09:25:14 -07:00
Toshi MARUYAMA 6b6a44c831 scm: bazaar: prepare version string unit lib test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4807 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 09:24:55 -07:00
Toshi MARUYAMA 911fbefb45 scm: change gunzip to tar -z option for scm repository setup in lib/tasks/testing.rake.
Pipe does not work on Mingw Ruby.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4806 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 09:24:34 -07:00
Toshi MARUYAMA dd798edd04 scm: git: prepare version string unit lib test and git log encoding (#3396).
This file includes UTF-8 literal.
We need to consider Ruby 1.9 compatibity.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4805 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 09:24:15 -07:00
Toshi MARUYAMA 09e0aa32b8 scm: cvs: code clean up.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4804 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 09:23:10 -07:00
Toshi MARUYAMA 3edbab734b scm: subversion: prepare version string unit lib test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4803 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-27 09:22:15 -07:00
Felix Schäfer 8d6133f6db Merge branch 'finnlabs-305_jstoolbar_fix_for_ie8' 2011-03-25 17:28:08 +01:00
Felix Schäfer c7bd3788a9 Merge branch 'feature/jstoolbar_fix_for_ie8' of https://github.com/finnlabs/chiliproject into finnlabs-305_jstoolbar_fix_for_ie8 2011-03-25 17:06:06 +01:00
Eric Davis 1aa20b17b4 [#302] Protect ApplicationController methods so they are not considered actions 2011-03-24 14:22:21 -07:00
Stephan Eckardt 2c67f6103b replaced auth_source_id.nil? with change_password_allowed? in users controller 2011-03-24 13:55:50 -07:00
Holger Just 8cfe498bd6 [#230] Make loadpath of themes configurable
Based on a987b74ed14 by meineerde
2011-03-24 13:46:50 -07:00
Eric Davis f1878f4a79 Merge remote branch 'thegcat/273-autologin_cookie_name' 2011-03-24 13:06:13 -07:00
Stephan Eckardt 9e04bf83c0 Fix jstoolbar to make buttons for h1, h2, <pre> etc. work in IE8 2011-03-24 19:35:49 +01:00
Stephan Eckardt 0ace77081d Backported changes to encloseSelection from latest DotClear release, less bugs in IE8 2011-03-24 16:14:10 +01:00
Felix Schäfer 9fe45cfe1f Add git-smart-http support to apache perl module #245
Latest patch from http://www.redmine.org/issues/4905 and other changes improvements, compare also with https://orga.fachschaften.org/projects/redmine-fsenorg/repository/revisions/fsenorg/changes/extra/svn/Redmine.pm .
2011-03-20 18:45:15 +01:00
Felix Schäfer 10dffcf3b9 Get the autologin cookie name from the config #273 2011-03-20 10:18:17 +01:00
Eric Davis 904897ac90 [#283] Fix tpyo 2011-03-19 13:33:15 -07:00
Eric Davis f16c5bcb5f [#283] Fix tpyo 2011-03-19 13:33:02 -07:00
Eric Davis 85d52978c3 [#283] Update the i18n deprecation message
* Use Rails' Deprecation logger instead of the standard logger
* Update the url to a message in the forum about the change
2011-03-19 13:23:20 -07:00
Eric Davis 0c458be040 [#283] Update the i18n deprecation message
* Use Rails' Deprecation logger instead of the standard logger
* Update the url to a message in the forum about the change
2011-03-19 13:21:39 -07:00
Eric Davis 9c2089c585 Merge remote branch 'schmidt/f/282-enhance-safe_attributes' into upstream-master 2011-03-19 13:00:01 -07:00
Jens Ulferts 2e7f46c3ae [#270] bugfix: considering underscore a valid match in project identifier 2011-03-19 12:44:30 -07:00
Jens Ulferts 61be2ea669 [#270] bugfix: considering underscore a valid match in project identifier 2011-03-19 12:43:49 -07:00
Eric Davis 1071f3eec9 Merge remote branch 'schmidt/f/269-refactor-menu_manager-to-increase-extensibility' into unstable 2011-03-19 12:36:25 -07:00
Felix Schäfer a80515fb20 Merge branch 'evtuhovich_209-i18n-in-repository-helper' 2011-03-19 10:58:06 +01:00
Felix Schäfer 3377e5b5b7 Add new translation strings to all locales. #209 2011-03-19 10:57:22 +01:00
Ivan Evtuhovich 5fc8ff47f8 Move repositories_helper labels to translation, refs #209 2011-03-18 11:08:38 +03:00
Gregor Schmidt 0320517d2c [#282] Make safe_attributes work with symbol keys 2011-03-14 17:50:12 +01:00
Gregor Schmidt b5b3684473 [#282] Make safe_attributes work with sub classes 2011-03-14 17:49:19 +01:00
Felix Schäfer 40dbfd7744 Merge branch 'edavis10_280-issue-autocomplete-match-issue-ids' 2011-03-14 09:30:33 +01:00
Felix Schäfer 7415dcb620 Merge branch 'ticket/master/280-issue-autocomplete-match-issue-ids' of https://github.com/edavis10/chiliproject into edavis10_280-issue-autocomplete-match-issue-ids 2011-03-14 09:30:10 +01:00
Eric Davis cdb80f697f [#281] Show the project on cross-project issues 2011-03-13 19:34:20 -07:00
Eric Davis 2ffea883a6 [#279] Add an optional Start Date to Versions 2011-03-13 19:14:08 -07:00
Eric Davis 430fc228b5 [#219] Add plugin hooks to the mailer layout 2011-03-13 17:31:01 -07:00
Eric Davis 0db26f8337 [#199] Add view_issues_show_identifier hook
Contributed by Yuki Sonoda
2011-03-13 17:27:20 -07:00
Eric Davis 1e66dd9043 [#276] Add a link to log time to Project > Overview 2011-03-13 17:23:33 -07:00
Eric Davis ae0851ddb4 [#280] Include matching issue ids in the auto_completer.
Using SQL CAST() to convert the issue ids to strings so LIKE will work
properly.
2011-03-13 17:11:04 -07:00
Eric Davis 6ad92b659f [#278] Start issue autocompletes with one character 2011-03-13 16:48:34 -07:00
Gregor Schmidt 28b7f6cc72 [#269] Instead of patching rubytree, creating a custom sub class and using that everywhere 2011-03-09 16:26:36 +01:00
Gregor Schmidt 6dd831e3fe [#269] Extracting classes and modules from menu manager into separate files 2011-03-09 16:02:09 +01:00
Holger Just 85e1333e0c Merge remote-tracking branch 'schmidt/b/266-fix-monkey-patching-of-rubytree' 2011-03-07 22:04:12 +01:00
Felix Schäfer c8e584e894 Add the custom_fields helper to JournalsController #267 2011-03-07 19:44:11 +01:00
Gregor Schmidt 61e20cb29d Fixing monkey patching of rubytree to be more robust 2011-03-07 16:32:16 +01:00
Holger Just 0caf4b3d5e Merge remote-tracking branch 'schmidt/b/251-make-chili-work-with-rubyges-1.6' 2011-03-02 15:08:41 +01:00
Gregor Schmidt da45dfcc72 adding require 'thread' since active support needs it but rubygems 1.6 removed it
fixes #251
2011-03-02 14:56:21 +01:00
Holger Just 5592794d75 Merge branch 'meineerde/issues/250-allow-empty-groups-in-queries' into chiliproject/master 2011-03-02 11:18:50 +01:00
Holger Just ca9ff0e471 [#250] Add tests for empty sets of users in queries 2011-03-02 11:12:57 +01:00
Holger Just 21b8e8b5e5 [#250] Allow empty sets in query value lists 2011-03-02 11:11:53 +01:00
Eric Davis f2285fa914 Merge branch 'release-v1.1.0' 2011-02-27 15:15:05 -08:00
Tim Felgentreff 77b0a56768 update to incorporate latest acts_as_journalized fixes 2010-11-05 19:53:35 +01:00
Tim Felgentreff 905ac8c1e6 update to incorporate latest acts_as_journalized fixes 2010-11-05 19:48:50 +01:00
Tim Felgentreff eb805ff3fd Merge remote branch 'edavis/master' into master-journalized 2010-11-05 18:50:09 +01:00
Tim Felgentreff 0d33f6c01a update to latest acts_as_journalized plugin 2010-11-05 18:41:37 +01:00
Tim Felgentreff cbf8bf1f8d make sure we have activity to find 2010-11-05 17:58:00 +01:00
Tim Felgentreff 759313b181 more test fixes 2010-11-05 17:04:09 +01:00
Tim Felgentreff 4a2f5d37a0 fixin 2010-11-05 16:09:42 +01:00
Tim Felgentreff 66b7378306 fix journal test 2010-11-05 14:14:00 +01:00
Tim Felgentreff 445391f863 fix journal observer test 2010-11-05 14:12:11 +01:00
Tim Felgentreff 65097e7d11 fixing tests 2010-11-05 11:46:03 +01:00
Tim Felgentreff 5dda7e34a3 test fixes 2010-11-05 11:20:58 +01:00
Tim Felgentreff f0cd92c80c Merge remote branch 'edavis/master' into master-journalized 2010-11-05 10:00:23 +01:00
Tim Felgentreff 3e6d7637db update actsasjournalized 2010-11-03 18:51:49 +01:00
Tim Felgentreff a2c7e73df4 adjust tests to fixtures 2010-11-03 18:42:42 +01:00
Tim Felgentreff ea8b8c6548 update fixtures 2010-11-03 18:30:46 +01:00
Tim Felgentreff 1569aae165 updated acts_as_journalized 2010-11-03 17:46:03 +01:00
Tim Felgentreff 90ba2d4bfb update xml builder to use the journals instead of journal details 2010-11-03 17:30:07 +01:00
Tim Felgentreff 40494cbe6b test fixes 2010-11-03 16:23:11 +01:00
Tim Felgentreff 859bfa625d Merge branch 'master' of git://github.com/edavis10/redmine into master-journalized
Conflicts:
	app/models/wiki_content.rb
	app/views/wiki/history.rhtml
	config/locales/bg.yml
	config/locales/ca.yml
	config/locales/de.yml
	test/integration/api_test/projects_test.rb
2010-11-03 16:03:39 +01:00
Tim Felgentreff d6013c62f7 fix a couple more tests 2010-11-03 15:58:28 +01:00
Tim Felgentreff fe33a89c76 fix issue_test 2010-10-27 12:19:15 +02:00
Tim Felgentreff 9bb45d9e75 Fix journal_observer 2010-10-27 11:53:20 +02:00
Tim Felgentreff 1a2aa363bd fix journal observer tests, remove journal observer 2010-10-27 11:42:15 +02:00
Tim Felgentreff 8c5312e0ec more merge fixups 2010-10-26 18:58:54 +02:00
Tim Felgentreff 5310327c8a fix merge f*ckup 2010-10-26 18:46:16 +02:00
Tim Felgentreff 19c7dc0094 Merge remote branch 'edavis/master' into master-journalized
Conflicts:
	app/controllers/application_controller.rb
	app/controllers/wiki_controller.rb
	app/helpers/issues_helper.rb
	app/models/time_entry.rb
	app/models/wiki_content.rb
	app/views/wiki/edit.rhtml
	config/locales/ja.yml
	test/functional/wiki_controller_test.rb
2010-10-26 18:28:39 +02:00
Tim Felgentreff 8cece46dd4 Merge branch 'master' into master-journalized
Conflicts:
	app/controllers/application_controller.rb
	app/controllers/context_menus_controller.rb
	app/controllers/gantts_controller.rb
	app/controllers/issue_moves_controller.rb
	app/controllers/issues_controller.rb
	app/controllers/journals_controller.rb
	app/controllers/previews_controller.rb
	app/controllers/timelog_controller.rb
	app/helpers/issues_helper.rb
	app/helpers/journals_helper.rb
	app/models/issue.rb
	app/models/journal.rb
	app/models/journal_observer.rb
	app/views/admin/projects.rhtml
	app/views/context_menus/issues.html.erb
	app/views/issues/_action_menu.rhtml
	app/views/issues/_history.rhtml
	app/views/news/_news.rhtml
	app/views/news/index.rhtml
	app/views/repositories/diff.rhtml
	config/locales/bg.yml
	config/locales/bs.yml
	config/locales/ca.yml
	config/locales/cs.yml
	config/locales/da.yml
	config/locales/de.yml
	config/locales/el.yml
	config/locales/en-GB.yml
	config/locales/es.yml
	config/locales/eu.yml
	config/locales/fi.yml
	config/locales/fr.yml
	config/locales/gl.yml
	config/locales/he.yml
	config/locales/hr.yml
	config/locales/hu.yml
	config/locales/id.yml
	config/locales/it.yml
	config/locales/ko.yml
	config/locales/lt.yml
	config/locales/lv.yml
	config/locales/mn.yml
	config/locales/nl.yml
	config/locales/no.yml
	config/locales/pl.yml
	config/locales/pt-BR.yml
	config/locales/pt.yml
	config/locales/ro.yml
	config/locales/ru.yml
	config/locales/sk.yml
	config/locales/sl.yml
	config/locales/sr-YU.yml
	config/locales/sr.yml
	config/locales/sv.yml
	config/locales/th.yml
	config/locales/tr.yml
	config/locales/uk.yml
	config/locales/vi.yml
	config/locales/zh-TW.yml
	config/locales/zh.yml
	config/routes.rb
	doc/CHANGELOG
	lib/redmine.rb
	lib/redmine/export/pdf.rb
	lib/redmine/helpers/gantt.rb
	lib/redmine/version.rb
	public/stylesheets/application.css
	test/functional/context_menus_controller_test.rb
	test/functional/issues_controller_test.rb
	test/functional/journals_controller_test.rb
	test/functional/previews_controller_test.rb
	test/functional/users_controller_test.rb
	test/functional/wiki_controller_test.rb
	test/integration/routing_test.rb
	test/unit/issue_test.rb
	test/unit/mailer_test.rb
	test/unit/query_test.rb
2010-10-26 18:20:57 +02:00
Tim Felgentreff f0c657448a Updated acts_as_journalized 2010-09-15 17:51:16 +02:00
Tim Felgentreff 61fdd38435 move issue journal reply to issue controller test, as each journalized controller will now use the render_reply journals helper to reply 2010-09-15 17:50:20 +02:00
Tim Felgentreff 53fd34fbd0 message mail delivery must happen after the first journal is created 2010-09-15 17:10:22 +02:00
Tim Felgentreff bb37aa24dc Update acts_as_journalized 2010-09-15 16:40:59 +02:00
Tim Felgentreff e2b79f9cdc adjust some api 2010-09-15 16:40:52 +02:00
Tim Felgentreff a550d4e667 remove tests that were removed in trunk 2010-09-15 16:40:37 +02:00
Tim Felgentreff e28b809271 use direct method call 2010-09-15 14:26:42 +02:00
Tim Felgentreff 5af629f31f Update acts_as_journalized 2010-09-15 12:57:27 +02:00
Tim Felgentreff 68ae2d0dfd change issue specific journal query and show_details for journal helper 2010-09-15 12:56:33 +02:00
Tim Felgentreff 6863c00359 forgot a few versioned => journaled conversions 2010-09-15 11:05:42 +02:00
Tim Felgentreff 3279b2adbd fix mailer tests 2010-09-15 10:53:00 +02:00
Tim Felgentreff 485335599a fix attachment_removal 2010-09-15 10:38:07 +02:00
Tim Felgentreff aaecab6d7f use latest acts_as_journalized 2010-09-14 19:18:43 +02:00
Tim Felgentreff 3b51eb54ea fix 2 more tests 2010-09-14 19:18:28 +02:00
Tim Felgentreff e8af8d1945 Still use the event api for now 2010-09-14 18:26:08 +02:00
Tim Felgentreff 9cd55d8dd4 more test fixes 2010-09-14 18:07:38 +02:00
Tim Felgentreff d1ba27358a fix wiki content specs 2010-09-14 16:59:43 +02:00
Tim Felgentreff 68ca0636c4 init journal will return the last_journal, not the new one, now 2010-09-14 16:59:27 +02:00
Tim Felgentreff 0b852af604 fix syntax error 2010-09-14 16:09:39 +02:00
Tim Felgentreff ff56024b9b it's created_at on journals 2010-09-14 15:21:32 +02:00
Tim Felgentreff 09ccc0f6ba remove test helper method 2010-09-14 15:21:15 +02:00
Tim Felgentreff b16d63454d journals are the events, now 2010-09-14 15:21:02 +02:00
Tim Felgentreff ccc4688799 get the object from the db anew, in case it didn't save 2010-09-14 15:20:41 +02:00
Tim Felgentreff 4eb07d6ce6 fix use of versions vs journals 2010-09-14 15:18:28 +02:00
Tim Felgentreff a6a25cc5c1 render done_ratio as decimal 2010-09-14 15:17:51 +02:00
Tim Felgentreff 44a3546579 add show_detail to issue helper for limited backwards compatibility 2010-09-14 15:17:34 +02:00
Tim Felgentreff d7854003c4 fix applicationcontroller test 2010-09-14 14:46:31 +02:00
Tim Felgentreff 2dd4e3d12d Update acts_as_journalized 2010-09-14 14:25:30 +02:00
Tim Felgentreff 72e7baafdf fix various tests in mailer, wiki content and issue helper 2010-09-14 14:25:19 +02:00
Tim Felgentreff 4b098d7774 Merge branch 'journals' into 1.0-stable
Conflicts:
	app/controllers/issues_controller.rb
	app/controllers/journals_controller.rb
	app/helpers/journals_helper.rb
	app/views/issues/_history.rhtml
	lib/redmine/activity/fetcher.rb
	test/functional/issues_controller_test.rb
	test/test_helper.rb
2010-09-14 09:32:35 +02:00
Tim Felgentreff 4804d22ff3 add fixture, fixes another test 2010-09-14 09:19:39 +02:00
Eric Davis 29f9f3feff Merged r4029 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4032 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 21:21:25 +00:00
Eric Davis 2bea4b30a5 Merged r4028 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4031 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 21:21:20 +00:00
Eric Davis 00b53286fd Merged changelog from trunk, r4027.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4030 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 21:21:15 +00:00
Eric Davis c8c4fb130c Merged r4014 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4026 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:49:31 +00:00
Eric Davis 0d7cead479 Merged r4013 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4025 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:49:26 +00:00
Eric Davis b5d64b9a2f Merged r4012 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4024 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:49:19 +00:00
Eric Davis 519069b867 Merged r4011 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4023 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:49:14 +00:00
Eric Davis 7443f2a310 Merged r4010 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4022 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:49:08 +00:00
Eric Davis b419deb907 Merged r4009 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4021 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:49:03 +00:00
Eric Davis b8d5a05b20 Merged r4008 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4020 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:48:57 +00:00
Eric Davis e29244652c Merged r4007 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4019 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:48:52 +00:00
Eric Davis 27ef72c35e Merged r4006 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4018 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:48:45 +00:00
Eric Davis 86e986f014 Merged r4005 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4017 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:48:38 +00:00
Eric Davis d60cc50d99 Merged r4004 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4016 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:48:32 +00:00
Eric Davis 9e5d2100b6 Merged r4003 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4015 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-22 19:48:26 +00:00
Eric Davis ccbc9f8ff9 Merged r3952 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4002 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:48 +00:00
Eric Davis 047bf692b3 Merged r3951 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4001 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:42 +00:00
Eric Davis 3e692a908b Merged r3950 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4000 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:37 +00:00
Eric Davis d457f90fcd Merged r3949 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3999 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:31 +00:00
Eric Davis b9f23bedb7 Merged r3948 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3998 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:26 +00:00
Eric Davis d1a9f81fc6 Merged r3947 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3997 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:20 +00:00
Eric Davis 80e833cd88 Merged r3946 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3996 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:14 +00:00
Eric Davis a12a073a6e Merged r3945 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3995 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:08 +00:00
Eric Davis bc57078b12 Merged r3944 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3994 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:34:02 +00:00
Eric Davis 1c93f99a55 Merged r3943 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3993 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:57 +00:00
Eric Davis 758feaccab Merged r3942 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3992 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:51 +00:00
Eric Davis 2012c60bfd Merged r3941 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3991 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:46 +00:00
Eric Davis 8ca6941a33 Merged r3940 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3990 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:40 +00:00
Eric Davis 10a76f5e73 Merged r3939 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3989 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:34 +00:00
Eric Davis 6e5f567346 Merged r3938 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3988 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:29 +00:00
Eric Davis 7af610631f Merged r3937 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3987 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:23 +00:00
Eric Davis fab5064643 Merged r3936 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3986 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:18 +00:00
Eric Davis ab5ce45b43 Merged r3935 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3985 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:11 +00:00
Eric Davis 5345a2dd89 Merged r3934 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3984 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:33:05 +00:00
Eric Davis 7ca197b37f Merged r3933 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3983 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:59 +00:00
Eric Davis 72ce3e18f8 Merged r3932 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3982 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:53 +00:00
Eric Davis 358ee2ef2e Merged r3931 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3981 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:47 +00:00
Eric Davis b5b8d34d94 Merged r3930 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3980 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:42 +00:00
Eric Davis 597266e5a2 Merged r3929 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3979 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:36 +00:00
Eric Davis 36ad597b69 Merged r3928 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3978 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:31 +00:00
Eric Davis c67272599c Merged r3927 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3977 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:25 +00:00
Eric Davis b6bc3a3665 Merged r3926 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3976 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:19 +00:00
Eric Davis a96eb375ec Merged r3925 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3975 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:13 +00:00
Eric Davis c7e719fc4b Merged r3924 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3974 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:32:06 +00:00
Eric Davis 18d841553e Merged r3923 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3973 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:59 +00:00
Eric Davis 31d233e567 Merged r3922 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3972 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:53 +00:00
Eric Davis 4ff6070126 Merged r3921 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3971 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:48 +00:00
Eric Davis dfe44017b6 Merged r3920 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3970 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:42 +00:00
Eric Davis 7cae43314a Merged r3919 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3969 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:36 +00:00
Eric Davis 2f529fd834 Merged r3918 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3968 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:30 +00:00
Eric Davis 9892ede7b7 Merged r3917 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3967 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:24 +00:00
Eric Davis 102e845391 Merged r3916 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3966 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:18 +00:00
Eric Davis 7bdf0ab729 Merged r3915 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3965 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:12 +00:00
Eric Davis 4426fd695e Merged r3914 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3964 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:31:06 +00:00
Eric Davis 3f1c3fa020 Merged r3913 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3963 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:30:59 +00:00
Eric Davis 19bbb6e2cb Merged r3912 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3962 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:30:53 +00:00
Eric Davis b02463184a Merged r3911 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3961 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:30:48 +00:00
Eric Davis a6408945e5 Merged r3910 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3960 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:30:41 +00:00
Eric Davis c20e85e4dd Merged r3909 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3959 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:30:35 +00:00
Eric Davis 7a9fab7748 Merged r3908 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3958 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:30:29 +00:00
Eric Davis acaa223cf8 Merged r3907 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3957 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:30:23 +00:00
Eric Davis 8dde6e019d Merged r3906 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3956 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:30:03 +00:00
Eric Davis ae3d542664 Merged r3905 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3955 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:29:57 +00:00
Eric Davis c731d11209 Merged r3904 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3954 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:29:51 +00:00
Eric Davis 8458dc23d4 Merged r3903 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3953 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-08-19 04:29:46 +00:00
Tim Felgentreff bbd131ad8d Update acts_as_journalized 2010-08-10 17:12:28 +02:00
Tim Felgentreff 331d98c2d2 fix first version for wiki 2010-08-10 17:09:28 +02:00
Wieland Lindenthal 08a013da44 Minor bug fixes to journalized versions 2010-08-10 16:18:26 +02:00
Tim Felgentreff 5844623031 add acts_as_journalized into a submodule 2010-08-10 12:36:45 +02:00
Tim Felgentreff 7d67365e10 smaller fixes for journalized news and attachments 2010-08-06 18:47:56 +02:00
Tim Felgentreff cbfbd662bb fix changed method name 2010-08-06 14:57:11 +02:00
Tim Felgentreff 9409ae7350 add another journal 2010-08-06 14:56:57 +02:00
Tim Felgentreff acc093b0c1 add a journal entry for messages 2010-08-06 14:22:49 +02:00
Tim Felgentreff 1f9eda4e0d update tests to work with the new data model, where neccessary 2010-08-05 19:05:04 +02:00
Tim Felgentreff 81e97d23a8 fix document activity url 2010-08-04 19:02:49 +02:00
Tim Felgentreff 47ecf151dd completely remove acts_as_versioned as it's functionality is contained in acts_as_journalized
This makes the wiki just use the versioning provided by acts_as_journalized
2010-08-04 19:01:18 +02:00
Tim Felgentreff cea1a987ab fix display of attachments with acts_as_journalized 2010-08-04 18:56:33 +02:00
Eric Davis 9af4cb5c38 Merged r3899 from trunk
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3902 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-30 19:20:56 +00:00
Eric Davis df120e43cd Merged r3898 from trunk
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3901 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-30 19:20:52 +00:00
Eric Davis 59f98693ae Merged r3897 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3900 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-30 19:20:46 +00:00
Eric Davis 677fee310a Merged r3894 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3896 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-29 15:03:11 +00:00
Eric Davis 0843b188fb Merged r3893 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3895 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-29 15:03:06 +00:00
Tim Felgentreff f45bb1e85e use the render_journal API to pass Issue note editing permissions 2010-07-29 14:48:47 +02:00
Tim Felgentreff 5de0d0997f remove the reply action from IssueController, and use the JournalHelper API for that 2010-07-29 14:48:24 +02:00
Tim Felgentreff 75024acf5a possibly use the activity permissions in the fetcher to find visible event types 2010-07-29 11:31:06 +02:00
Tim Felgentreff d34abea14e use the journal formatters API to register the issue journal formats 2010-07-29 11:30:24 +02:00
Jean-Philippe Lang 8f64938b9e Merged r3891 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3892 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 12:57:49 +00:00
Jean-Philippe Lang 29e7ae9698 Merged r3889 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3890 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 12:49:15 +00:00
Jean-Philippe Lang f682be8468 Merged r3887 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3888 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 11:56:45 +00:00
Jean-Philippe Lang e771fc03bd Merged r3883, r3884 and r3885 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3886 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 11:49:07 +00:00
Jean-Philippe Lang 52a12aaca8 Merged r3881 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3882 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 10:49:08 +00:00
Jean-Philippe Lang 8146e096f4 Merged r3879 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3880 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 10:35:35 +00:00
Jean-Philippe Lang 41e38483a6 Merged r3877 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3878 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 10:02:55 +00:00
Jean-Philippe Lang 41c6d3cef6 Merged r3875 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3876 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 09:56:07 +00:00
Jean-Philippe Lang ec526c1261 Merged r3873 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3874 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 09:52:07 +00:00
Jean-Philippe Lang b4122707f6 Merged r3871 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3872 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 09:48:51 +00:00
Jean-Philippe Lang f70a8cde88 Merged r3869 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3870 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 09:40:59 +00:00
Jean-Philippe Lang 69f34a595d Merged r3865 and r3866 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3867 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-25 09:34:04 +00:00
Eric Davis be52ccf01f Merged r3859 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3862 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-24 00:23:50 +00:00
Eric Davis 8a1d45ffd6 Merged r3860 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3861 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-24 00:20:35 +00:00
Tim Felgentreff 4851451017 remove changes from version model 2010-07-23 17:17:00 +02:00
Tim Felgentreff 8a3cb1895b use the provided helper in issue history 2010-07-23 14:26:08 +02:00
Tim Felgentreff ff6372ad43 move wiki edits to use journalized plugin. will break if any actual edits are done 2010-07-21 18:25:01 +02:00
Tim Felgentreff ff31875149 move to STI for journals so the journals themselves can be events 2010-07-21 17:57:45 +02:00
Tim Felgentreff 2287d7ce8c with acts_as_journalized activities only have to search the journal table 2010-07-21 12:27:48 +02:00
Eric Davis 4b52b7a8df Change version to the show this is the stable branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3857 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-18 16:39:00 +00:00
Eric Davis 6ed2e003a1 Merged r3854 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3856 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-18 16:38:56 +00:00
Eric Davis 1cc116fe5c Merged r3853 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3855 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-18 16:38:51 +00:00
Eric Davis 619c148719 Merged r3849 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3852 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-18 15:53:56 +00:00
Eric Davis 0ae9cc7d07 Merged r3848 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3851 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-18 15:53:51 +00:00
Eric Davis a2a3dae974 Merged r3847 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3850 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-18 15:53:46 +00:00
Eric Davis 4f5dc94170 Merged r3845 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3846 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-16 03:47:03 +00:00
Eric Davis 4775864d69 Adding 1.0 stable branch to prepare for 1.0.0 RC
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3844 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-07-16 03:31:31 +00:00
Tim Felgentreff 2ec2405b32 convert more to acts_as_journalized 2010-07-15 21:10:05 +02:00
Tim Felgentreff 2d282f8deb move (almost) everything over to acts_as_journalized 2010-07-15 18:24:12 +02:00
Tim Felgentreff 4b0bd11f6d move more journal classes 2010-07-15 18:23:19 +02:00
Tim Felgentreff 96bbd94251 adjust for acts_as_journalized 2010-07-15 15:23:43 +02:00
Tim Felgentreff 7d4d87a9a9 journal numbers are now called versions 2010-07-15 14:43:22 +02:00
Tim Felgentreff 867266e934 init_journal has now the old signature 2010-07-15 14:43:09 +02:00
Tim Felgentreff aecb868b85 remove more journal specific functionality 2010-07-14 19:00:03 +02:00
Tim Felgentreff d7768ce600 remove journals to start moving it all out to vestal_versions based plugin 2010-07-14 14:13:55 +02:00
Holger Just f2957176bf Added helper functions to base journal class 2010-06-29 19:39:28 +02:00
Holger Just bcbb328cd2 Merge branch 'master' of git://github.com/edavis10/redmine into journals 2010-06-29 19:27:14 +02:00
Holger Just bc6805a6a6 Initial version of acts_as_journalized 2010-06-18 19:31:21 +02:00
2056 changed files with 83890 additions and 67396 deletions

12
.gitignore vendored
View File

@ -1,13 +1,18 @@
/.project
/.loadpath
/config/additional_environment.rb
/config/configuration.yml
/config/database.yml
/config/email.yml
/config/setup_load_paths.rb
/config/initializers/session_store.rb
/coverage
/db/*.db
/db/*.sqlite3
/db/schema.rb
/files/*
/lib/redmine/scm/adapters/mercurial/redminehelper.pyc
/lib/redmine/scm/adapters/mercurial/redminehelper.pyo
/log/*.log*
/log/mongrel_debug
/public/dispatch.*
@ -20,3 +25,10 @@
/vendor/rails
*.rbc
doc/app
/.bundle
/Gemfile.lock
/Gemfile.local
/.rvmrc*
/*.iml
/.idea
.rbx

0
.gitmodules vendored Normal file
View File

View File

@ -1,5 +1,7 @@
syntax: glob
.project
.loadpath
config/additional_environment.rb
config/configuration.yml
config/database.yml
@ -10,6 +12,8 @@ db/*.db
db/*.sqlite3
db/schema.rb
files/*
lib/redmine/scm/adapters/mercurial/redminehelper.pyc
lib/redmine/scm/adapters/mercurial/redminehelper.pyo
log/*.log*
log/mongrel_debug
public/dispatch.*
@ -21,3 +25,9 @@ tmp/sockets/*
tmp/test/*
vendor/rails
*.rbc
.svn/
.git/
doc/app
/.bundle
/Gemfile.lock
/.rvmrc*

59
.travis.yml Normal file
View File

@ -0,0 +1,59 @@
language: ruby
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- rbx-18mode
env:
- "TEST_SUITE=units RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- "TEST_SUITE=units RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
- "TEST_SUITE=units RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
- "TEST_SUITE=units RAILS_ENV=test DB=sqlite BUNDLE_WITHOUT=rmagick:mysql:mysql2:postgres"
- "TEST_SUITE=functionals RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- "TEST_SUITE=functionals RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
- "TEST_SUITE=functionals RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
- "TEST_SUITE=functionals RAILS_ENV=test DB=sqlite BUNDLE_WITHOUT=rmagick:mysql:mysql2:postgres"
- "TEST_SUITE=integration RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- "TEST_SUITE=integration RAILS_ENV=test DB=mysql2 BUNDLE_WITHOUT=rmagick:mysql:postgres:sqlite"
- "TEST_SUITE=integration RAILS_ENV=test DB=postgres BUNDLE_WITHOUT=rmagick:mysql:mysql2:sqlite"
- "TEST_SUITE=integration RAILS_ENV=test DB=sqlite BUNDLE_WITHOUT=rmagick:mysql:mysql2:postgres"
matrix:
exclude:
- rvm: 1.9.2
env: "TEST_SUITE=units RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- rvm: 1.9.2
env: "TEST_SUITE=functionals RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- rvm: 1.9.2
env: "TEST_SUITE=integration RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- rvm: 1.9.3
env: "TEST_SUITE=units RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- rvm: 1.9.3
env: "TEST_SUITE=functionals RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- rvm: 1.9.3
env: "TEST_SUITE=integration RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- rvm: rbx-18mode
env: "TEST_SUITE=units RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- rvm: rbx-18mode
env: "TEST_SUITE=functionals RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
- rvm: rbx-18mode
env: "TEST_SUITE=integration RAILS_ENV=test DB=mysql BUNDLE_WITHOUT=rmagick:mysql2:postgres:sqlite"
allow_failures:
- rvm: rbx-18mode
before_install:
- "sudo apt-get update -qq"
- "sudo apt-get --no-install-recommends install bzr cvs git mercurial subversion"
before_script:
- "rvm rubygems 1.8.25" # Rubygems 2.0.x fails with Rails 2.3
- "rake ci:travis:prepare"
- "rm -rf tmp/test/darcs_repository" # Don't test Darcs on Travis. It breaks there :(
script: "bundle exec rake test:$TEST_SUITE"
branches:
only:
- unstable
- master
- stable
- /^stable-.*$/
- /^release-.*$/
notifications:
email: false
irc: "irc.freenode.org#chiliproject"

33
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,33 @@
For the impatient: [report][cpo_new-issue], confirm, claim,
[fork][gh_chiliproject], [branch][cpo_contribute-code-branch],
[write][cpo_code-standards], [test][cpo_code-review], push.
The short version:
* Make sure the issue you are working on is reported and confirmed, add a note
to the issue to claim your intention to work on it.
* Fork [ChiliProject on GitHub][gh_chiliproject]
* Create a new branch from `master` with a descriptive name prefixed by the
issue ID (Example: `123-change_background_from_black_to_blue`).
* Make changes according to our [Code Standards][cpo_code-standards].
1. Be sure to include tests as necessary.
1. Make sure to not break existing tests.
1. Please try to make sure your code is going to pass a [Code
Review][cpo_code-review] prior to submitting the patch. If in doubt, just ask.
* Either upload your branch to GitHub and send a pull request to the
ChiliProject repository, or attach a patch to the issue on ChiliProject. If
you send a pull request on GitHub, remember to link to the pull request in the
issue you create on ChiliProject and to link to the issue on ChiliProject in
the pull request on GitHub.
* Make sure you watch the corresponding issue in case any discussion arises or
improvements are needed.
The long version is on the [Contribute Code][cpo_contribute-code] page.
[cpo_new-issue]: https://www.chiliproject.org/projects/chiliproject/issues/new
[cpo_contribute-code-branch]: https://www.chiliproject.org/projects/chiliproject/wiki/Contribute_Code#Branch
[cpo_contribute-code]: https://www.chiliproject.org/projects/chiliproject/wiki/Contribute_Code
[cpo_code-standards]: https://www.chiliproject.org/projects/chiliproject/wiki/Code_Standards
[cpo_code-review]: https://www.chiliproject.org/projects/chiliproject/wiki/Code_Review
[gh_chiliproject]: https://github.com/chiliproject/chiliproject

117
Gemfile Normal file
View File

@ -0,0 +1,117 @@
# -*- coding: utf-8 -*-
source "https://rubygems.org"
gem "rails", "2.3.18"
gem "json", "~> 1.7.7"
gem "coderay", "~> 1.0.0"
gem "i18n", "~> 0.4.2"
gem "rubytree", "~> 0.5.2", :require => 'tree'
gem "rdoc", ">= 2.4.2"
gem "liquid", "~> 2.3.0"
gem "acts-as-taggable-on", "= 2.1.0"
gem 'gravatarify', '~> 3.0.0'
# Needed only on RUBY_VERSION = 1.8, ruby 1.9+ compatible interpreters should bring their csv
gem "fastercsv", "~> 1.5.0", :platforms => [:ruby_18, :jruby, :mingw_18]
gem "tzinfo", "~> 0.3.31" # Fixes #903. Not required for Rails >= 3.2
group :test do
gem 'shoulda', '~> 2.10.3'
# Shoulda doesn't work nice on 1.9.3 and seems to need test-unit explicitely…
gem 'test-unit', :platforms => [:mri_19]
gem 'edavis10-object_daddy', :require => 'object_daddy'
gem 'mocha', '0.12.1'
# capybara 2 drops ruby 1.8.7 compatibility
gem 'capybara', '< 2.0.0'
end
group :ldap do
gem "net-ldap", '~> 0.3.1'
end
group :openid do
gem "ruby-openid", '~> 2.1.4', :require => 'openid'
end
group :rmagick do
gem "rmagick", ">= 1.15.17"
# Older distributions might not have a sufficiently new ImageMagick version
# for the current rmagick release (current rmagick is rmagick 2, which
# requires ImageMagick 6.4.9 or later). If this is the case for you, comment
# the line above this comment block and uncomment the one underneath it to
# get an rmagick version known to work on older distributions.
#
# The following distributions are known to *not* ship with a usable
# ImageMagick version. There might be additional ones.
# * Ubuntu 9.10 and older
# * Debian Lenny 5.0 and older
# * CentOS 5 and older
# * RedHat 5 and older
#
#gem "rmagick", "< 2.0.0"
end
# Use the commented pure ruby gems, if you have not the needed prerequisites on
# board to compile the native ones. Note, that their use is discouraged, since
# their integration is propbably not that well tested and their are slower in
# orders of magnitude compared to their native counterparts. You have been
# warned.
platforms :mri, :mingw, :rbx do
group :mysql2 do
gem "mysql2", "~> 0.2.7"
end
group :postgres do
gem "pg"
# gem "postgres-pr"
end
end
platforms :mri_18, :mingw_18 do
group :mysql do
gem "mysql"
# gem "ruby-mysql"
end
group :sqlite do
gem "sqlite3-ruby", "< 1.3", :require => "sqlite3"
end
end
platforms :mri_19, :mingw_19, :rbx do
group :sqlite do
gem "sqlite3"
end
end
platforms :jruby do
gem "jruby-openssl"
group :mysql do
gem "activerecord-jdbcmysql-adapter"
end
group :postgres do
gem "activerecord-jdbcpostgresql-adapter"
end
group :sqlite do
gem "activerecord-jdbcsqlite3-adapter"
end
end
# Load a "local" Gemfile
gemfile_local = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.readable?(gemfile_local)
puts "Loading #{gemfile_local} ..." if $DEBUG
instance_eval(File.read(gemfile_local))
end
# Load plugins' Gemfiles
["plugins", "chiliproject_plugins"].each do |plugin_path|
Dir.glob File.expand_path("../vendor/#{plugin_path}/*/Gemfile", __FILE__) do |file|
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(file)
end
end

View File

@ -1,4 +1,4 @@
= ChiliProject
= ChiliProject {<img src="https://travis-ci.org/chiliproject/chiliproject.png?branch=master" />}[http://travis-ci.org/chiliproject/chiliproject]
ChiliProject is a web based project management system. It supports your team throughout the complete project life cycle, from setting up and discussing a project plan, over tracking issues and reporting work progress to collaboratively sharing knowledge.

View File

@ -1,10 +1,12 @@
# 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 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'rdoc/task'
require 'tasks/rails'
require 'tasks/rails'
# Load rake tasks from plugins in chiliproject_plugins
Dir["#{RAILS_ROOT}/vendor/chiliproject_plugins/*/lib/tasks/**/*.rake"].sort.each { |ext| load ext }

View File

@ -1,32 +1,28 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class AccountController < ApplicationController
helper :custom_fields
include CustomFieldsHelper
include CustomFieldsHelper
# prevents login action to be filtered by check_if_login_required application scope filter
skip_before_filter :check_if_login_required
# Login request and validation
def login
if request.get?
logout_user
else
if User.current.logged?
redirect_to home_url
elsif request.post?
authenticate_user
end
end
@ -36,12 +32,12 @@ class AccountController < ApplicationController
logout_user
redirect_to home_url
end
# Enable user to 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])
@token = Token.find_by_action_and_value("recovery", params[:token].to_s)
redirect_to(home_url) && return unless @token and !@token.expired?
@user = @token.user
if request.post?
@ -51,13 +47,13 @@ class AccountController < ApplicationController
flash[:notice] = l(:notice_account_password_updated)
redirect_to :action => 'login'
return
end
end
end
render :template => "account/password_recovery"
return
else
if request.post?
user = User.find_by_mail(params[:mail])
user = User.find_by_mail(params[:mail].to_s)
# user not found in db
(flash.now[:error] = l(:notice_account_unknown_email); return) unless user
# user uses an external authentification
@ -67,13 +63,13 @@ class AccountController < ApplicationController
if token.save
Mailer.deliver_lost_password(token)
flash[:notice] = l(:notice_account_lost_email_sent)
redirect_to :action => 'login'
redirect_to :action => 'login', :back_url => home_url
return
end
end
end
end
# User self-registration
def register
redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration]
@ -109,11 +105,11 @@ class AccountController < ApplicationController
end
end
end
# Token based account activation
def activate
redirect_to(home_url) && return unless Setting.self_registration? && params[:token]
token = Token.find_by_action_and_value('register', params[:token])
token = Token.find_by_action_and_value('register', params[:token].to_s)
redirect_to(home_url) && return unless token and !token.expired?
user = token.user
redirect_to(home_url) && return unless user.registered?
@ -124,17 +120,17 @@ class AccountController < ApplicationController
end
redirect_to :action => 'login'
end
private
def logout_user
if User.current.logged?
cookies.delete :autologin
cookies.delete Redmine::Configuration['autologin_cookie_name']
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])
@ -156,7 +152,7 @@ class AccountController < ApplicationController
end
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|
if result.successful?
@ -185,7 +181,7 @@ class AccountController < ApplicationController
register_manually_by_administrator(user) do
onthefly_creation_failed(user)
end
end
end
else
# Existing record
if user.active?
@ -197,7 +193,7 @@ class AccountController < ApplicationController
end
end
end
def successful_authentication(user)
# Valid user
self.logged_user = user
@ -208,18 +204,17 @@ class AccountController < ApplicationController
call_hook(:controller_account_success_authentication_after, {:user => user })
redirect_back_or_default :controller => 'my', :action => 'page'
end
def set_autologin_cookie(user)
token = Token.create(:user => user, :action => 'autologin')
cookie_name = Redmine::Configuration['autologin_cookie_name'] || 'autologin'
cookie_options = {
:value => token.value,
:expires => 1.year.from_now,
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
:secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false),
:path => Redmine::Configuration['autologin_cookie_path'],
:secure => Redmine::Configuration['autologin_cookie_secure'],
:httponly => true
}
cookies[cookie_name] = cookie_options
cookies[Redmine::Configuration['autologin_cookie_name']] = cookie_options
end
# Onthefly creation failed, display the registration form to fill/fix attributes
@ -247,7 +242,7 @@ class AccountController < ApplicationController
yield if block_given?
end
end
# Automatically register a user
#
# Pass a block for behavior when a user fails to save
@ -263,7 +258,7 @@ class AccountController < ApplicationController
yield if block_given?
end
end
# Manual activation by the administrator
#
# Pass a block for behavior when a user fails to save

View File

@ -1,3 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class ActivitiesController < ApplicationController
menu_item :activity
before_filter :find_optional_project
@ -5,7 +19,7 @@ class ActivitiesController < ApplicationController
def index
@days = Setting.activity_days_default.to_i
if params[:from]
begin; @date_to = params[:from].to_date + 1; rescue; end
end
@ -14,18 +28,18 @@ class ActivitiesController < ApplicationController
@date_from = @date_to - @days
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
@author = (params[:user_id].blank? ? nil : User.active.find(params[:user_id]))
@activity = Redmine::Activity::Fetcher.new(User.current, :project => @project,
@activity = Redmine::Activity::Fetcher.new(User.current, :project => @project,
:with_subprojects => @with_subprojects,
:author => @author)
@activity.scope_select {|t| !params["show_#{t}"].nil?}
@activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty?
@activity.scope = (@author.nil? ? :default : :all) if @activity.scope.empty? unless params[:set_filter]
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])
respond_to do |format|
format.html {
format.html {
@events_by_day = events.group_by(&:event_date)
render :layout => false if request.xhr?
}
@ -40,7 +54,7 @@ class ActivitiesController < ApplicationController
}
end
end
rescue ActiveRecord::RecordNotFound
render_404
end

View File

@ -1,51 +1,51 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class AdminController < ApplicationController
layout 'admin'
before_filter :require_admin
helper :sort
include SortHelper
include SortHelper
menu_item :projects, :only => [:projects]
menu_item :plugins, :only => [:plugins]
menu_item :info, :only => [:info]
def index
@no_configuration_data = Redmine::DefaultData::Loader::no_data?
end
def projects
@status = params[:status] ? params[:status].to_i : 1
c = ARCondition.new(@status == 0 ? "status <> 0" : ["status = ?", @status])
unless params[:name].blank?
name = "%#{params[:name].strip.downcase}%"
c << ["LOWER(identifier) LIKE ? OR LOWER(name) LIKE ?", name, name]
end
@projects = Project.find :all, :order => 'lft',
:conditions => c.conditions
render :action => "projects", :layout => false if request.xhr?
end
def plugins
@plugins = Redmine::Plugin.all
@plugins = Redmine::Plugin.all.sort
end
# Loads the default configuration
# (roles, trackers, statuses, workflow, enumerations)
def default_configuration
@ -59,7 +59,7 @@ class AdminController < ApplicationController
end
redirect_to :action => 'index'
end
def test_email
raise_delivery_errors = ActionMailer::Base.raise_delivery_errors
# Force ActionMailer to raise delivery errors so we can catch it
@ -73,14 +73,14 @@ class AdminController < ApplicationController
ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
redirect_to :controller => 'settings', :action => 'edit', :tab => 'notifications'
end
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.find_by_login("admin").try(:check_password?, "admin")],
[:text_file_repository_writable, File.writable?(Attachment.storage_path)],
[:text_plugin_assets_writable, File.writable?(Engines.public_directory)],
[:text_rmagick_available, Object.const_defined?(:Magick)]
]
end
end
end

View File

@ -1,80 +1,99 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
require 'uri'
require 'cgi'
class ApplicationController < ActionController::Base
helper :all
protected
include Redmine::I18n
layout 'base'
exempt_from_layout 'builder', 'rsb'
# 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['_chiliproject_session'] && cookies['_chiliproject_session'] !~ /--/
cookies.delete '_chiliproject_session'
redirect_to home_path
return false
protect_from_forgery
def handle_unverified_request
super
cookies.delete(:autologin)
end
# FIXME: Remove this when all of Rack and Rails have learned how to
# properly use encodings
before_filter :params_filter
def params_filter
self.utf8nize!(params) if RUBY_VERSION >= '1.9'
end
def utf8nize!(obj)
if 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
protect_from_forgery
rescue_from ActionController::InvalidAuthenticityToken, :with => :invalid_authenticity_token
# FIXME: This doesn't work with Rails >= 3.0 anymore
# Possible workaround: https://github.com/rails/rails/issues/671#issuecomment-1780159
rescue_from ActionController::RoutingError, :with => proc{
# manually apply basic before_filters which aren't applied by default here
user_setup
check_if_login_required
set_localization
render_404
}
include Redmine::Search::Controller
include Redmine::MenuManager::MenuController
helper Redmine::MenuManager::MenuHelper
Redmine::Scm::Base.all.each do |scm|
require_dependency "repository/#{scm.underscore}"
end
def user_setup
# Check the settings cache for each request
Setting.check_cache
# Find the current user
User.current = find_current_user
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?
elsif cookies[Redmine::Configuration['autologin_cookie_name']] && Setting.autologin?
# auto-login feature starts a new session
user = User.try_to_autologin(cookies[:autologin])
user = User.try_to_autologin(cookies[Redmine::Configuration['autologin_cookie_name']])
session[:user_id] = user.id if user
user
elsif params[:format] == 'atom' && params[:key] && accept_key_auth_actions.include?(params[:action])
# RSS key authentication does not start a session
User.find_by_rss_key(params[:key])
User.find_by_rss_key(params[:key].to_s)
elsif Setting.rest_api_enabled? && api_request?
if (key = api_key_from_request) && accept_key_auth_actions.include?(params[:action])
# Use API key
User.find_by_api_key(key)
User.find_by_api_key(key.to_s)
else
# HTTP Basic, either username/password or API key/random
authenticate_with_http_basic do |username, password|
@ -94,14 +113,14 @@ class ApplicationController < ActionController::Base
User.current = User.anonymous
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
return true if User.current.logged?
require_login if Setting.login_required?
end
end
def set_localization
lang = nil
if User.current.logged?
@ -117,7 +136,7 @@ class ApplicationController < ActionController::Base
lang ||= Setting.default_language
set_language_if_valid(lang)
end
def require_login
if !User.current.logged?
# Extract only the basic url parameters on non-GET requests
@ -146,7 +165,7 @@ class ApplicationController < ActionController::Base
end
true
end
def deny_access
User.current.logged? ? render_403 : require_login
end
@ -197,7 +216,7 @@ class ApplicationController < ActionController::Base
# Finds and sets @project based on @object.project
def find_project_from_association
render_404 unless @object.present?
@project = @object.project
rescue ActiveRecord::RecordNotFound
render_404
@ -226,7 +245,7 @@ class ApplicationController < ActionController::Base
rescue ActiveRecord::RecordNotFound
render_404
end
# Check if project is unique before bulk operations
def check_project_uniqueness
unless @project
@ -235,7 +254,7 @@ class ApplicationController < ActionController::Base
return false
end
end
# 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
@ -257,7 +276,7 @@ class ApplicationController < ActionController::Base
end
def redirect_back_or_default(default)
back_url = CGI.unescape(params[:back_url].to_s)
back_url = URI.escape(CGI.unescape(params[:back_url].to_s))
if !back_url.blank?
begin
uri = URI.parse(back_url)
@ -271,27 +290,28 @@ class ApplicationController < ActionController::Base
end
end
redirect_to default
false
end
def render_403(options={})
@project = nil
render_error({:message => :notice_not_authorized, :status => 403}.merge(options))
return false
end
def render_404(options={})
render_error({:message => :notice_file_not_found, :status => 404}.merge(options))
return false
end
# Renders an error response
def render_error(arg)
arg = {:message => arg} unless arg.is_a?(Hash)
@message = arg[:message]
@message = l(@message) if @message.is_a?(Symbol)
@status = arg[:status] || 500
respond_to do |format|
format.html {
render :template => 'common/error', :layout => use_layout, :status => @status
@ -309,31 +329,24 @@ class ApplicationController < ActionController::Base
def use_layout
request.xhr? ? false : 'base'
end
def invalid_authenticity_token
if api_request?
logger.error "Form authenticity token is missing or is invalid. API calls must include a proper Content-type header (text/xml or text/json)."
end
render_error "Invalid form authenticity token."
end
def render_feed(items, options={})
def render_feed(items, options={})
@items = items || []
@items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
@items = @items.slice(0, Setting.feeds_limit.to_i)
@title = options[:title] || Setting.app_title
render :template => "common/feed.atom.rxml", :layout => false, :content_type => 'application/atom+xml'
end
def self.accept_key_auth(*actions)
actions = actions.flatten.map(&:to_s)
write_inheritable_attribute('accept_key_auth_actions', actions)
end
def accept_key_auth_actions
self.class.read_inheritable_attribute('accept_key_auth_actions') || []
end
# Returns the number of objects that should be displayed
# on the paginated list
def per_page_option
@ -369,10 +382,10 @@ class ApplicationController < ActionController::Base
offset = 0 if offset < 0
end
offset ||= 0
[offset, limit]
end
# qvalues http header parser
# code taken from webrick
def parse_qvalues(value)
@ -393,16 +406,16 @@ class ApplicationController < ActionController::Base
rescue
nil
end
# Returns a string that can be used as filename value in Content-Disposition header
def filename_for_content_disposition(name)
request.env['HTTP_USER_AGENT'] =~ %r{MSIE} ? ERB::Util.url_encode(name) : name
end
def api_request?
%w(xml json).include? params[:format]
end
# Returns the API key present in the request
def api_key_from_request
if params[:key].present?
@ -459,7 +472,7 @@ class ApplicationController < ActionController::Base
)
render options
end
# Overrides #default_template so that the api template
# is used automatically if it exists
def default_template(action_name = self.action_name)
@ -473,7 +486,7 @@ class ApplicationController < ActionController::Base
end
super
end
# Overrides #pick_layout so that #render with no arguments
# doesn't use the layout for api requests
def pick_layout(*args)

View File

@ -1,27 +1,24 @@
# Redmine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class AttachmentsController < ApplicationController
before_filter :find_project
before_filter :file_readable, :read_authorize, :except => :destroy
before_filter :delete_authorize, :only => :destroy
verify :method => :post, :only => :destroy
def show
if @attachment.is_diff?
@diff = File.new(@attachment.diskfile, "rb").read
@ -33,19 +30,19 @@ class AttachmentsController < ApplicationController
download
end
end
def download
if @attachment.container.is_a?(Version) || @attachment.container.is_a?(Project)
@attachment.increment_download
end
# images are sent inline
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
:type => detect_content_type(@attachment),
:type => detect_content_type(@attachment),
:disposition => (@attachment.image? ? 'inline' : 'attachment')
end
def destroy
# Make sure association callbacks are called
@attachment.container.attachments.delete(@attachment)
@ -53,7 +50,7 @@ class AttachmentsController < ApplicationController
rescue ::ActionController::RedirectBackError
redirect_to :controller => 'projects', :action => 'show', :id => @project
end
private
def find_project
@attachment = Attachment.find(params[:id])
@ -63,20 +60,20 @@ private
rescue ActiveRecord::RecordNotFound
render_404
end
# Checks that the file exists and is readable
def file_readable
@attachment.readable? ? true : render_404
end
def read_authorize
@attachment.visible? ? true : deny_access
end
def delete_authorize
@attachment.deletable? ? true : deny_access
end
def detect_content_type(attachment)
content_type = attachment.content_type
if content_type.blank?

View File

@ -1,23 +1,20 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class AuthSourcesController < ApplicationController
layout 'admin'
before_filter :require_admin
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
@ -58,7 +55,7 @@ class AuthSourcesController < ApplicationController
render 'auth_sources/edit'
end
end
def test_connection
@auth_method = AuthSource.find(params[:id])
begin

View File

@ -1,17 +1,68 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class AutoCompletesController < ApplicationController
before_filter :find_project
before_filter :find_project, :only => :issues
before_filter :require_admin, :only => :projects
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)
if q.present?
query = (params[:scope] == "all" && Setting.cross_project_issue_relations?) ? Issue : @project.issues
@issues |= query.visible.find_all_by_id(q.to_i) if q =~ /^\d+$/
@issues |= query.visible.find(:all,
:limit => 10,
:order => "#{Issue.table_name}.id ASC",
:conditions => ["LOWER(#{Issue.table_name}.subject) LIKE :q OR CAST(#{Issue.table_name}.id AS CHAR(13)) LIKE :q", {:q => "%#{q.downcase}%" }])
end
unless q.blank?
@issues += query.visible.find(:all, :conditions => ["LOWER(#{Issue.table_name}.subject) LIKE ?", "%#{q.downcase}%"], :limit => 10)
render :layout => false
end
def users
if params[:remove_group_members].present?
@group = Group.find(params[:remove_group_members])
@removed_users = @group.users
end
@issues.compact!
if params[:remove_watchers].present? && params[:klass].present?
watcher_class = params[:klass].constantize
if watcher_class.included_modules.include?(Redmine::Acts::Watchable) # check class is a watching class
@object = watcher_class.find(params[:remove_watchers])
@removed_users = @object.watcher_users
end
end
@removed_users ||= []
if params[:include_groups]
user_finder = Principal
else
user_finder = User
end
@users = user_finder.active.like(params[:q]).find(:all, :limit => 100) - @removed_users
render :layout => false
end
def projects
@principal = Principal.find(params[:id])
@projects = Project.active.like(params[:q]).find(:all, :limit => 100) - @principal.projects
render :layout => false
end

View File

@ -1,32 +1,26 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class BoardsController < ApplicationController
default_search_scope :messages
before_filter :find_project, :find_board_if_available, :authorize
accept_key_auth :index, :show
helper :messages
include MessagesHelper
helper :sort
include SortHelper
helper :watchers
include WatchersHelper
def index
@boards = @project.boards
render_404 if @boards.empty?
@ -44,7 +38,7 @@ class BoardsController < ApplicationController
sort_update 'created_on' => "#{Message.table_name}.created_on",
'replies' => "#{Message.table_name}.replies_count",
'updated_on' => "#{Message.table_name}.updated_on"
@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(', '),
@ -62,7 +56,7 @@ class BoardsController < ApplicationController
}
end
end
verify :method => :post, :only => [ :destroy ], :redirect_to => { :action => :index }
def new
@ -84,7 +78,7 @@ class BoardsController < ApplicationController
@board.destroy
redirect_to_settings_in_projects
end
private
def redirect_to_settings_in_projects
redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'

View File

@ -1,14 +1,24 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class CalendarsController < ApplicationController
menu_item :calendar
before_filter :find_optional_project
rescue_from Query::StatementInvalid, :with => :query_statement_invalid
helper :issues
helper :projects
helper :queries
include QueriesHelper
helper :sort
include SortHelper
def show
@ -16,27 +26,27 @@ class CalendarsController < ApplicationController
@year = params[:year].to_i
if params[:month] and params[:month].to_i > 0 and params[:month].to_i < 13
@month = params[:month].to_i
end
end
end
@year ||= Date.today.year
@month ||= Date.today.month
@calendar = Redmine::Helpers::Calendar.new(Date.civil(@year, @month, 1), current_language, :month)
retrieve_query
@query.group_by = nil
if @query.valid?
events = []
events += @query.issues(:include => [:tracker, :assigned_to, :priority],
:conditions => ["((start_date BETWEEN ? AND ?) OR (due_date BETWEEN ? AND ?))", @calendar.startdt, @calendar.enddt, @calendar.startdt, @calendar.enddt]
:conditions => ["((#{Issue.table_name}.start_date BETWEEN ? AND ?) OR (#{Issue.table_name}.due_date BETWEEN ? AND ?))", @calendar.startdt, @calendar.enddt, @calendar.startdt, @calendar.enddt]
)
events += @query.versions(:conditions => ["effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt])
events += @query.versions(:conditions => ["#{Version.table_name}.effective_date BETWEEN ? AND ?", @calendar.startdt, @calendar.enddt])
@calendar.events = events
end
render :action => 'show', :layout => false if request.xhr?
end
def update
show
end

View File

@ -1,3 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class CommentsController < ApplicationController
default_search_scope :news
model_object News
@ -7,12 +21,15 @@ class CommentsController < ApplicationController
verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed }
def create
@comment = Comment.new(params[:comment])
raise Unauthorized unless @news.commentable?
@comment = Comment.new
@comment.safe_attributes = params[:comment]
@comment.author = User.current
if @news.comments << @comment
flash[:notice] = l(:label_comment_added)
end
redirect_to :controller => 'news', :action => 'show', :id => @news
end
@ -32,5 +49,5 @@ class CommentsController < ApplicationController
@comment = nil
@news
end
end

View File

@ -1,9 +1,22 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class ContextMenusController < ApplicationController
helper :watchers
def issues
@issues = Issue.visible.all(:conditions => {:id => params[:ids]}, :include => :project)
if (@issues.size == 1)
@issue = @issues.first
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@ -33,12 +46,12 @@ class ContextMenusController < ApplicationController
@assignables = @projects.map(&:assignable_users).inject{|memo,a| memo & a}
@trackers = @projects.map(&:trackers).inject{|memo,t| memo & t}
end
@priorities = IssuePriority.all.reverse
@statuses = IssueStatus.find(:all, :order => 'position')
@back = back_url
render :layout => false
end
end

View File

@ -1,30 +1,27 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class CustomFieldsController < ApplicationController
layout 'admin'
before_filter :require_admin
def index
@custom_fields_by_type = CustomField.find(:all).group_by {|f| f.class.name }
@tab = params[:tab] || 'IssueCustomField'
end
def new
@custom_field = begin
if params[:type].to_s.match(/.+CustomField$/)
@ -33,13 +30,14 @@ class CustomFieldsController < ApplicationController
rescue
end
(redirect_to(:action => 'index'); return) unless @custom_field.is_a?(CustomField)
if request.post? and @custom_field.save
flash[:notice] = l(:notice_successful_create)
call_hook(:controller_custom_fields_new_after_save, :params => params, :custom_field => @custom_field)
redirect_to :action => 'index', :tab => @custom_field.class.name
else
@trackers = Tracker.find(:all, :order => 'position')
end
@trackers = Tracker.find(:all, :order => 'position')
end
def edit
@ -48,10 +46,11 @@ class CustomFieldsController < ApplicationController
flash[:notice] = l(:notice_successful_update)
call_hook(:controller_custom_fields_edit_after_save, :params => params, :custom_field => @custom_field)
redirect_to :action => 'index', :tab => @custom_field.class.name
else
@trackers = Tracker.find(:all, :order => 'position')
end
@trackers = Tracker.find(:all, :order => 'position')
end
def destroy
@custom_field = CustomField.find(params[:id]).destroy
redirect_to :action => 'index', :tab => @custom_field.class.name

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class DocumentsController < ApplicationController
default_search_scope :documents
@ -22,9 +19,8 @@ class DocumentsController < ApplicationController
before_filter :find_model_object, :except => [:index, :new]
before_filter :find_project_from_association, :except => [:index, :new]
before_filter :authorize
helper :attachments
def index
@sort_by = %w(category date title author).include?(params[:sort_by]) ? params[:sort_by] : 'category'
documents = @project.documents.find :all, :include => [:attachments, :category]
@ -41,39 +37,58 @@ class DocumentsController < ApplicationController
@document = @project.documents.build
render :layout => false if request.xhr?
end
def show
@attachments = @document.attachments.find(:all, :order => "created_on DESC")
end
def new
@document = @project.documents.build(params[:document])
if request.post? and @document.save
attachments = Attachment.attach_files(@document, params[:attachments])
render_attachment_warning_if_needed(@document)
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'index', :project_id => @project
@document = @project.documents.build
@document.safe_attributes = params[:document]
if request.post?
if User.current.allowed_to?(:add_document_watchers, @project) && params[:document]['watcher_user_ids'].present?
@document.watcher_user_ids = params[:document]['watcher_user_ids']
end
if @document.save
attachments = Attachment.attach_files(@document, params[:attachments])
render_attachment_warning_if_needed(@document)
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'index', :project_id => @project
end
end
end
def edit
@categories = DocumentCategory.all
if request.post? and @document.update_attributes(params[:document])
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'show', :id => @document
if request.post?
if User.current.allowed_to?(:add_document_watchers, @project) && params[:document]['watcher_user_ids'].present?
@document.watcher_user_ids = params[:document]['watcher_user_ids']
end
if @document.update_attributes(params[:document])
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'show', :id => @document
end
end
end
end
def destroy
@document.destroy
redirect_to :controller => 'documents', :action => 'index', :project_id => @project
end
def add_attachment
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')
# TODO: refactor
@document.recipients.each do |recipient|
Mailer.deliver_attachments_added(attachments[:files], recipient)
end
end
redirect_to :action => 'show', :id => @document
end

View File

@ -1,28 +1,24 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class EnumerationsController < ApplicationController
layout 'admin'
before_filter :require_admin
helper :custom_fields
include CustomFieldsHelper
def index
list
render :action => 'list'
@ -39,7 +35,7 @@ class EnumerationsController < ApplicationController
begin
@enumeration = params[:type].constantize.new
rescue NameError
@enumeration = Enumeration.new
@enumeration = Enumeration.new
end
end
@ -68,17 +64,19 @@ class EnumerationsController < ApplicationController
render :action => 'edit'
end
end
def destroy
@enumeration = Enumeration.find(params[:id])
if !@enumeration.in_use?
# No associated objects
@enumeration.destroy
redirect_to :action => 'index'
return
elsif params[:reassign_to_id]
if reassign_to = @enumeration.class.find_by_id(params[:reassign_to_id])
@enumeration.destroy(reassign_to)
redirect_to :action => 'index'
return
end
end
@enumerations = @enumeration.class.find(:all) - [@enumeration]

View File

@ -1,10 +1,23 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class FilesController < ApplicationController
menu_item :files
before_filter :find_project_by_project_id
before_filter :authorize
helper :sort
include SortHelper
def index
@ -13,7 +26,7 @@ class FilesController < ApplicationController
'created_on' => "#{Attachment.table_name}.created_on",
'size' => "#{Attachment.table_name}.filesize",
'downloads' => "#{Attachment.table_name}.downloads"
@containers = [ Project.find(@project.id, :include => :attachments, :order => sort_clause)]
@containers += @project.versions.find(:all, :include => :attachments, :order => sort_clause).sort.reverse
render :layout => !request.xhr?
@ -29,7 +42,11 @@ 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])
# TODO: refactor
recipients = attachments[:files].first.container.project.notified_users.select {|user| user.allowed_to?(:view_files, container.project)}.collect {|u| u.mail}
recipients.each do |recipient|
Mailer.deliver_attachments_added(attachments[:files], recipient)
end
end
redirect_to project_files_path(@project)
end

View File

@ -1,27 +1,36 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class GanttsController < ApplicationController
menu_item :gantt
before_filter :find_optional_project
rescue_from Query::StatementInvalid, :with => :query_statement_invalid
helper :gantt
helper :issues
helper :projects
helper :queries
include QueriesHelper
helper :sort
include SortHelper
include Redmine::Export::PDF
def show
@gantt = Redmine::Helpers::Gantt.new(params)
@gantt.project = @project
retrieve_query
@query.group_by = nil
@gantt.query = @query if @query.valid?
basename = (@project ? "#{@project.identifier}-" : '') + 'gantt'
respond_to do |format|
format.html { render :action => "show", :layout => !request.xhr? }
format.png { send_data(@gantt.to_image, :disposition => 'inline', :type => 'image/png', :filename => "#{basename}.png") } if @gantt.respond_to?('to_image')

View File

@ -1,27 +1,23 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class GroupsController < ApplicationController
layout 'admin'
before_filter :require_admin
helper :custom_fields
# GET /groups
# GET /groups.xml
def index
@ -48,7 +44,7 @@ class GroupsController < ApplicationController
# GET /groups/new.xml
def new
@group = Group.new
respond_to do |format|
format.html # new.html.erb
format.xml { render :xml => @group }
@ -105,22 +101,22 @@ class GroupsController < ApplicationController
format.xml { head :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?
respond_to do |format|
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'users' }
format.js {
render(:update) {|page|
format.js {
render(:update) {|page|
page.replace_html "tab-content-users", :partial => 'groups/users'
users.each {|user| page.visual_effect(:highlight, "user-#{user.id}") }
}
}
end
end
def remove_user
@group = Group.find(params[:id])
@group.users.delete(User.find(params[:user_id])) if request.post?
@ -129,17 +125,20 @@ class GroupsController < ApplicationController
format.js { render(:update) {|page| page.replace_html "tab-content-users", :partial => 'groups/users'} }
end
end
def autocomplete_for_user
@group = Group.find(params[:id])
@users = User.active.like(params[:q]).find(:all, :limit => 100) - @group.users
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?
if params[:project_ids] # Multiple memberships, one per project
params[:project_ids].each do |project_id|
@membership = Member.edit_membership(params[:membership_id], (params[:membership]|| {}).merge(:project_id => project_id), @group)
@membership.save if request.post?
end
else # Single membership
@membership = Member.edit_membership(params[:membership_id], params[:membership], @group)
@membership.save if request.post?
end
respond_to do |format|
if @membership.valid?
format.html { redirect_to :controller => 'groups', :action => 'edit', :id => @group, :tab => 'memberships' }
@ -158,7 +157,7 @@ class GroupsController < ApplicationController
end
end
end
def destroy_membership
@group = Group.find(params[:id])
Member.find(params[:membership_id]).destroy if request.post?

View File

@ -0,0 +1,21 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class HelpController < ApplicationController
def wiki_syntax
end
def wiki_syntax_detailed
end
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class IssueCategoriesController < ApplicationController
menu_item :settings
@ -22,11 +19,12 @@ class IssueCategoriesController < ApplicationController
before_filter :find_project_from_association, :except => :new
before_filter :find_project, :only => :new
before_filter :authorize
verify :method => :post, :only => :destroy
def new
@category = @project.issue_categories.build(params[:category])
@category = @project.issue_categories.build
@category.safe_attributes = params[:category]
if request.post?
if @category.save
respond_to do |format|
@ -51,9 +49,10 @@ class IssueCategoriesController < ApplicationController
end
end
end
def edit
if request.post? and @category.update_attributes(params[:category])
@category.safe_attributes = params[:category]
if request.post? and @category.save
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'projects', :action => 'settings', :tab => 'categories', :id => @project
end
@ -65,10 +64,12 @@ class IssueCategoriesController < ApplicationController
# No issue assigned to this category
@category.destroy
redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories'
return
elsif params[:todo]
reassign_to = @project.issue_categories.find_by_id(params[:reassign_to_id]) if params[:todo] == 'reassign'
@category.destroy(reassign_to)
redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories'
return
end
@categories = @project.issue_categories - [@category]
end
@ -79,8 +80,8 @@ private
def find_model_object
super
@category = @object
end
end
def find_project
@project = Project.find(params[:project_id])
rescue ActiveRecord::RecordNotFound

View File

@ -1,8 +1,22 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class IssueMovesController < ApplicationController
default_search_scope :issues
before_filter :find_issues, :check_project_uniqueness
before_filter :authorize
def new
prepare_for_issue_move
render :layout => false if request.xhr?
@ -17,8 +31,7 @@ class IssueMovesController < ApplicationController
moved_issues = []
@issues.each do |issue|
issue.reload
issue.init_journal(User.current)
issue.current_journal.notes = @notes if @notes.present?
issue.init_journal(User.current, @notes || "")
call_hook(:controller_issues_move_before_save, { :params => params, :issue => issue, :target_project => @target_project, :copy => !!@copy })
if r = issue.move_to_project(@target_project, new_tracker, {:copy => @copy, :attributes => extract_changed_attributes_for_move(params)})
moved_issues << r
@ -48,7 +61,7 @@ class IssueMovesController < ApplicationController
@copy = params[:copy_options] && params[:copy_options][:copy]
@allowed_projects = Issue.allowed_target_projects_on_move
@target_project = @allowed_projects.detect {|p| p.id.to_s == params[:new_project_id]} if params[:new_project_id]
@target_project ||= @project
@target_project ||= @project
@trackers = @target_project.trackers
@available_statuses = Workflow.available_statuses(@project)
@notes = params[:notes]

View File

@ -1,23 +1,20 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class IssueRelationsController < ApplicationController
before_filter :find_issue, :find_project_from_association, :authorize
def new
@relation = IssueRelation.new(params[:relation])
@relation.issue_from = @issue
@ -39,7 +36,7 @@ class IssueRelationsController < ApplicationController
end
end
end
def destroy
relation = IssueRelation.find(params[:id])
if request.post? && @issue.relations.include?(relation)
@ -54,7 +51,7 @@ class IssueRelationsController < ApplicationController
}
end
end
private
def find_issue
@issue = @object = Issue.find(params[:issue_id])

View File

@ -1,28 +1,25 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class IssueStatusesController < ApplicationController
layout 'admin'
before_filter :require_admin
verify :method => :post, :only => [ :destroy, :create, :update, :move, :update_issue_done_ratio ],
:redirect_to => { :action => :index }
def index
@issue_status_pages, @issue_statuses = paginate :issue_statuses, :per_page => 25, :order => "position"
render :action => "index", :layout => false if request.xhr?
@ -62,8 +59,8 @@ class IssueStatusesController < ApplicationController
rescue
flash[:error] = l(:error_unable_delete_issue_status)
redirect_to :action => 'index'
end
end
def update_issue_done_ratio
if IssueStatus.update_issue_done_ratios
flash[:notice] = l(:notice_issue_done_ratios_updated)

View File

@ -1,24 +1,21 @@
# Redmine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class IssuesController < ApplicationController
menu_item :new_issue, :only => [:new, :create]
default_search_scope :issues
before_filter :find_issue, :only => [:show, :edit, :update]
before_filter :find_issues, :only => [:bulk_edit, :bulk_update, :move, :perform_move, :destroy]
before_filter :check_project_uniqueness, :only => [:move, :perform_move]
@ -30,27 +27,17 @@ class IssuesController < ApplicationController
accept_key_auth :index, :show, :create, :update, :destroy
rescue_from Query::StatementInvalid, :with => :query_statement_invalid
helper :journals
helper :projects
include ProjectsHelper
helper :custom_fields
include JournalsHelper
include ProjectsHelper
include CustomFieldsHelper
helper :issue_relations
include IssueRelationsHelper
helper :watchers
include WatchersHelper
helper :attachments
include AttachmentsHelper
helper :queries
include QueriesHelper
helper :repositories
include RepositoriesHelper
helper :sort
include SortHelper
include IssuesHelper
helper :timelog
helper :gantt
include Redmine::Export::PDF
verify :method => [:post, :delete],
@ -60,12 +47,12 @@ class IssuesController < ApplicationController
verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed }
verify :method => :post, :only => :bulk_update, :render => {:nothing => true, :status => :method_not_allowed }
verify :method => :put, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
def index
retrieve_query
sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria)
sort_update(@query.sortable_columns)
if @query.valid?
case params[:format]
when 'csv', 'pdf'
@ -77,16 +64,16 @@ class IssuesController < ApplicationController
else
@limit = per_page_option
end
@issue_count = @query.issue_count
@issue_pages = Paginator.new self, @issue_count, @limit, params['page']
@offset ||= @issue_pages.current.offset
@issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version],
:order => sort_clause,
:offset => @offset,
:order => sort_clause,
:offset => @offset,
:limit => @limit)
@issue_count_by_group = @query.issue_count_by_group
respond_to do |format|
format.html { render :template => 'issues/index.rhtml', :layout => !request.xhr? }
format.api
@ -101,10 +88,9 @@ class IssuesController < ApplicationController
rescue ActiveRecord::RecordNotFound
render_404
end
def show
@journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on ASC")
@journals.each_with_index {|j,i| j.indice = i+1}
@journals = @issue.journals.find(:all, :include => [:user], :order => "#{Journal.table_name}.created_at ASC")
@journals.reverse! if User.current.wants_comments_in_reverse_order?
@changesets = @issue.changesets.visible.all
@changesets.reverse! if User.current.wants_comments_in_reverse_order?
@ -112,7 +98,7 @@ class IssuesController < ApplicationController
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
@priorities = IssuePriority.all
@time_entry = TimeEntry.new
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
respond_to do |format|
format.html { render :template => 'issues/show.rhtml' }
format.api
@ -132,6 +118,7 @@ class IssuesController < ApplicationController
def create
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
IssueObserver.instance.send_notification = params[:send_notification] == '0' ? false : true
if @issue.save
attachments = Attachment.attach_files(@issue, params[:attachments])
render_attachment_warning_if_needed(@issue)
@ -152,8 +139,9 @@ class IssuesController < ApplicationController
end
end
end
def edit
return render_reply(@journal) if @journal
update_issue_from_params
@journal = @issue.current_journal
@ -166,10 +154,10 @@ class IssuesController < ApplicationController
def update
update_issue_from_params
JournalObserver.instance.send_notification = params[:send_notification] == '0' ? false : true
if @issue.save_issue_with_child_records(params, @time_entry)
render_attachment_warning_if_needed(@issue)
flash[:notice] = l(:notice_successful_update) unless @issue.current_journal.new_record?
flash[:notice] = l(:notice_successful_update) unless @issue.current_journal == @journal
respond_to do |format|
format.html { redirect_back_or_default({:action => 'show', :id => @issue}) }
@ -177,7 +165,7 @@ class IssuesController < ApplicationController
end
else
render_attachment_warning_if_needed(@issue)
flash[:notice] = l(:notice_successful_update) unless @issue.current_journal.new_record?
flash[:notice] = l(:notice_successful_update) unless @issue.current_journal == @journal
@journal = @issue.current_journal
respond_to do |format|
@ -206,6 +194,7 @@ class IssuesController < ApplicationController
journal = issue.init_journal(User.current, params[:notes])
issue.safe_attributes = attributes
call_hook(:controller_issues_bulk_edit_before_save, { :params => params, :issue => issue })
JournalObserver.instance.send_notification = params[:send_notification] == '0' ? false : true
unless issue.save
# Keep unsaved issue ids to display them in flash error
unsaved_issue_ids << issue.id
@ -214,7 +203,7 @@ class IssuesController < ApplicationController
set_flash_from_bulk_issue_save(@issues, unsaved_issue_ids)
redirect_back_or_default({:controller => 'issues', :action => 'index', :project_id => @project})
end
def destroy
@hours = TimeEntry.sum(:hours, :conditions => ['issue_id IN (?)', @issues]).to_f
if @hours > 0
@ -236,7 +225,13 @@ class IssuesController < ApplicationController
return unless api_request?
end
end
@issues.each(&:destroy)
@issues.each do |issue|
begin
issue.reload.destroy
rescue ::ActiveRecord::RecordNotFound # raised by #reload if issue no longer exists
# nothing to do, issue was already deleted (eg. by a parent)
end
end
respond_to do |format|
format.html { redirect_back_or_default(:action => 'index', :project_id => @project) }
format.api { head :ok }
@ -250,14 +245,14 @@ private
rescue ActiveRecord::RecordNotFound
render_404
end
def find_project
project_id = (params[:issue] && params[:issue][:project_id]) || params[:project_id]
@project = Project.find(project_id)
rescue ActiveRecord::RecordNotFound
render_404
end
# Used by #edit and #update to set some common instance variables
# from the params
# TODO: Refactor, not everything in here is needed by #edit
@ -265,12 +260,13 @@ private
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
@priorities = IssuePriority.all
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
@time_entry = TimeEntry.new
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
@time_entry.attributes = params[:time_entry]
@notes = params[:notes] || (params[:issue].present? ? params[:issue][:notes] : nil)
@issue.init_journal(User.current, @notes)
@issue.safe_attributes = params[:issue]
@journal = @issue.current_journal
end
# TODO: Refactor, lots of extra code in here
@ -283,7 +279,7 @@ private
else
@issue = @project.issues.visible.find(params[:id])
end
@issue.project = @project
# Tracker must be set before custom field values
@issue.tracker ||= @project.trackers.find((params[:issue] && params[:issue][:tracker_id]) || params[:tracker_id] || :first)
@ -291,7 +287,7 @@ private
render_error l(:error_no_tracker_in_project)
return false
end
@issue.start_date ||= Date.today
@issue.start_date ||= User.current.today if Setting.issue_startdate_is_adddate?
if params[:issue].is_a?(Hash)
@issue.safe_attributes = params[:issue]
if User.current.allowed_to?(:add_issue_watchers, @project) && @issue.new_record?

View File

@ -1,48 +1,46 @@
# redMine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
require 'diff'
class JournalsController < ApplicationController
before_filter :find_journal, :only => [:edit]
before_filter :find_journal, :only => [:edit, :diff]
before_filter :find_issue, :only => [:new]
before_filter :find_optional_project, :only => [:index]
before_filter :authorize, :only => [:new, :edit]
before_filter :authorize, :only => [:new, :edit, :diff]
accept_key_auth :index
menu_item :issues
helper :issues
helper :queries
include QueriesHelper
helper :sort
include SortHelper
def index
retrieve_query
sort_init 'id', 'desc'
sort_update(@query.sortable_columns)
if @query.valid?
@journals = @query.journals(:order => "#{Journal.table_name}.created_on DESC",
:limit => 25)
@journals = @query.issue_journals(:order => "#{Journal.table_name}.created_at DESC",
:limit => 25)
end
@title = (@project ? @project.name : Setting.app_title) + ": " + (@query.new_record? ? l(:label_changes_details) : @query.name)
render :layout => false, :content_type => 'application/atom+xml'
rescue ActiveRecord::RecordNotFound
render_404
end
# Used when replying to an issue or journal
def new
journal = Journal.find(params[:journal_id]) if params[:journal_id]
if journal
@ -56,7 +54,7 @@ class JournalsController < ApplicationController
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'
@ -65,23 +63,49 @@ class JournalsController < ApplicationController
page << "$('notes').scrollTop = $('notes').scrollHeight - $('notes').clientHeight;"
}
end
def edit
(render_403; return false) unless @journal.editable_by?(User.current)
if request.post?
@journal.update_attributes(:notes => params[:notes]) if params[:notes]
@journal.update_attribute(:notes, params[:notes]) if params[:notes]
@journal.destroy if @journal.details.empty? && @journal.notes.blank?
call_hook(:controller_journals_edit_post, { :journal => @journal, :params => params})
respond_to do |format|
format.html { redirect_to :controller => 'issues', :action => 'show', :id => @journal.journalized_id }
format.html { redirect_to :controller => @journal.journaled.class.name.pluralize.downcase,
:action => 'show', :id => @journal.journaled_id }
format.js { render :action => 'update' }
end
else
respond_to do |format|
format.html {
# TODO: implement non-JS journal update
render :nothing => true
}
format.js
end
end
end
private
def diff
if valid_field?(params[:field])
from = @journal.changes[params[:field]][0]
to = @journal.changes[params[:field]][1]
@diff = Redmine::Helpers::Diff.new(to, from)
@issue = @journal.journaled
respond_to do |format|
format.html { }
format.js { render :layout => false }
end
else
render_404
end
end
private
def find_journal
@journal = Journal.find(params[:id])
(render_403; return false) unless @journal.editable_by?(User.current)
@project = @journal.journalized.project
rescue ActiveRecord::RecordNotFound
render_404
@ -94,4 +118,9 @@ private
rescue ActiveRecord::RecordNotFound
render_404
end
# Is this a valid field for diff'ing?
def valid_field?(field)
field.to_s.strip == "description"
end
end

View File

@ -1,24 +1,22 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class LdapAuthSourcesController < AuthSourcesController
menu_item :ldap_authentication, :only => [:index]
protected
def auth_source_class
AuthSourceLdap
end

View File

@ -1,27 +1,24 @@
# redMine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class MailHandlerController < ActionController::Base
before_filter :check_credential
verify :method => :post,
:only => :index,
:render => { :nothing => true, :status => 405 }
# Submits an incoming email to MailHandler
def index
options = params.dup
@ -32,9 +29,9 @@ class MailHandlerController < ActionController::Base
render :nothing => true, :status => :unprocessable_entity
end
end
private
def check_credential
User.current = nil
unless Setting.mail_handler_api_enabled? && params[:key].to_s == Setting.mail_handler_api_key

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class MembersController < ApplicationController
model_object Member
@ -24,24 +21,26 @@ class MembersController < ApplicationController
def new
members = []
if params[:member] && request.post?
attrs = params[:member].dup
if (user_ids = attrs.delete(:user_ids))
if params[:member]
if params[:member][:user_ids]
attrs = params[:member].dup
user_ids = attrs.delete(:user_ids)
user_ids.each do |user_id|
members << Member.new(attrs.merge(:user_id => user_id))
members << Member.new(:role_ids => params[:member][:role_ids], :user_id => user_id)
end
else
members << Member.new(attrs)
members << Member.new(:role_ids => params[:member][:role_ids], :user_id => params[:member][:user_id])
end
@project.members << members
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|
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}") }
@ -58,17 +57,17 @@ class MembersController < ApplicationController
page.alert(l(:notice_failed_to_save_members, :errors => errors.join(', ')))
}
}
end
end
end
def edit
if request.post? and @member.update_attributes(params[:member])
respond_to do |format|
format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
format.js {
render(:update) {|page|
format.js {
render(:update) {|page|
page.replace_html "tab-content-members", :partial => 'projects/settings/members'
page << 'hideOnLoad()'
page.visual_effect(:highlight, "member-#{@member.id}")
@ -91,7 +90,7 @@ class MembersController < ApplicationController
}
end
end
def autocomplete_for_member
@principals = Principal.active.like(params[:q]).find(:all, :limit => 100) - @project.principals
render :layout => false

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class MessagesController < ApplicationController
menu_item :boards
@ -25,12 +22,10 @@ class MessagesController < ApplicationController
verify :method => :post, :only => [ :reply, :destroy ], :redirect_to => { :action => :show }
verify :xhr => true, :only => :quote
helper :watchers
helper :attachments
include AttachmentsHelper
include AttachmentsHelper
REPLIES_PER_PAGE = 25 unless const_defined?(:REPLIES_PER_PAGE)
# Show a topic and its replies
def show
page = params[:page]
@ -39,40 +34,40 @@ class MessagesController < ApplicationController
offset = @topic.children.count(:conditions => ["#{Message.table_name}.id < ?", params[:r].to_i])
page = 1 + offset / REPLIES_PER_PAGE
end
@reply_count = @topic.children.count
@reply_pages = Paginator.new self, @reply_count, REPLIES_PER_PAGE, page
@replies = @topic.children.find(:all, :include => [:author, :attachments, {:board => :project}],
:order => "#{Message.table_name}.created_on ASC",
:limit => @reply_pages.items_per_page,
:offset => @reply_pages.current.offset)
@reply = Message.new(:subject => "RE: #{@message.subject}")
render :action => "show", :layout => false if request.xhr?
end
# Create a new topic
def new
@message = Message.new(params[:message])
@message = Message.new
@message.author = User.current
@message.board = @board
if params[:message] && User.current.allowed_to?(:edit_messages, @project)
@message.locked = params[:message]['locked']
@message.sticky = params[:message]['sticky']
end
if request.post? && @message.save
call_hook(:controller_messages_new_after_save, { :params => params, :message => @message})
attachments = Attachment.attach_files(@message, params[:attachments])
render_attachment_warning_if_needed(@message)
redirect_to :action => 'show', :id => @message
@message.safe_attributes = params[:message]
if request.post?
if @message.save
call_hook(:controller_messages_new_after_save, { :params => params, :message => @message})
attachments = Attachment.attach_files(@message, params[:attachments])
render_attachment_warning_if_needed(@message)
redirect_to :action => 'show', :id => @message
end
end
end
# Reply to a topic
def reply
@reply = Message.new(params[:reply])
@reply = Message.new
@reply.author = User.current
@reply.board = @board
@reply.safe_attributes = params[:reply]
@topic.children << @reply
if !@reply.new_record?
call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply})
@ -85,11 +80,8 @@ class MessagesController < ApplicationController
# Edit a message
def edit
(render_403; return false) unless @message.editable_by?(User.current)
if params[:message]
@message.locked = params[:message]['locked']
@message.sticky = params[:message]['sticky']
end
if request.post? && @message.update_attributes(params[:message])
@message.safe_attributes = params[:message]
if request.post? && @message.save
attachments = Attachment.attach_files(@message, params[:attachments])
render_attachment_warning_if_needed(@message)
flash[:notice] = l(:notice_successful_update)
@ -97,7 +89,7 @@ class MessagesController < ApplicationController
redirect_to :action => 'show', :board_id => @message.board, :id => @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)
@ -106,7 +98,7 @@ class MessagesController < ApplicationController
{ :controller => 'boards', :action => 'show', :project_id => @project, :id => @board } :
{ :action => 'show', :id => @message.parent, :r => @message }
end
def quote
user = @message.author
text = @message.content
@ -115,7 +107,7 @@ class MessagesController < ApplicationController
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 << "$('reply_subject').value = \"#{subject}\";"
page << "$('message_subject').value = \"#{subject}\";"
page.<< "$('message_content').value = \"#{content}\";"
page.show 'reply'
page << "Form.Element.focus('message_content');"
@ -123,14 +115,14 @@ class MessagesController < ApplicationController
page << "$('message_content').scrollTop = $('message_content').scrollHeight - $('message_content').clientHeight;"
}
end
def preview
message = @board.messages.find_by_id(params[:id])
@attachements = message.attachments if message
@text = (params[:message] || params[:reply])[:content]
render :partial => 'common/preview'
end
private
def find_message
find_board
@ -139,7 +131,7 @@ private
rescue ActiveRecord::RecordNotFound
render_404
end
def find_board
@board = Board.find(params[:board_id], :include => :project)
@project = @board.project

View File

@ -1,26 +1,20 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class MyController < ApplicationController
before_filter :require_login
helper :issues
helper :users
helper :custom_fields
BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues,
'issuesreportedbyme' => :label_reported_issues,
@ -31,8 +25,8 @@ class MyController < ApplicationController
'timelog' => :label_spent_time
}.merge(Redmine::Views::MyPage::Block.additional_blocks).freeze
DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'],
'right' => ['issuesreportedbyme']
DEFAULT_LAYOUT = { 'left' => ['issuesassignedtome'],
'right' => ['issuesreportedbyme']
}.freeze
verify :xhr => true,
@ -88,7 +82,7 @@ class MyController < ApplicationController
end
end
end
# Create a new feeds key
def reset_rss_key
if request.post?
@ -122,7 +116,7 @@ class MyController < ApplicationController
@block_options = []
BLOCKS.each {|k, v| @block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]}
end
# Add a block to user's page
# The block is added on top of the page
# params[:block] : id of the block to add
@ -136,10 +130,10 @@ class MyController < ApplicationController
# add it on top
layout['top'].unshift block
@user.pref[:my_page_layout] = layout
@user.pref.save
@user.pref.save
render :partial => "block", :locals => {:user => @user, :block_name => block}
end
# Remove a block to user's page
# params[:block] : id of the block to remove
def remove_block
@ -149,7 +143,7 @@ class MyController < ApplicationController
layout = @user.pref[:my_page_layout] || {}
%w(top left right).each {|f| (layout[f] ||= []).delete block }
@user.pref[:my_page_layout] = layout
@user.pref.save
@user.pref.save
render :nothing => true
end
@ -169,7 +163,7 @@ class MyController < ApplicationController
}
layout[group] = group_items
@user.pref[:my_page_layout] = layout
@user.pref.save
@user.pref.save
end
end
render :nothing => true

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class NewsController < ApplicationController
default_search_scope :news
@ -24,7 +21,8 @@ class NewsController < ApplicationController
before_filter :authorize, :except => [:index]
before_filter :find_optional_project, :only => :index
accept_key_auth :index
def index
case params[:format]
when 'xml', 'json'
@ -32,9 +30,9 @@ class NewsController < ApplicationController
else
@limit = 10
end
scope = @project ? @project.news.visible : News.visible
@news_count = scope.count
@news_pages = Paginator.new self, @news_count, @limit, params['page']
@offset ||= @news_pages.current.offset
@ -42,14 +40,14 @@ class NewsController < ApplicationController
:order => "#{News.table_name}.created_on DESC",
:offset => @offset,
:limit => @limit)
respond_to do |format|
format.html { render :layout => false if request.xhr? }
format.api
format.atom { render_feed(@newss, :title => (@project ? @project.name : Setting.app_title) + ": #{l(:label_news_plural)}") }
end
end
def show
@comments = @news.comments
@comments.reverse! if User.current.wants_comments_in_reverse_order?
@ -61,22 +59,21 @@ class NewsController < ApplicationController
def create
@news = News.new(:project => @project, :author => User.current)
if request.post?
@news.attributes = params[:news]
if @news.save
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'news', :action => 'index', :project_id => @project
else
render :action => 'new'
end
@news.safe_attributes = params[:news]
if @news.save
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'news', :action => 'index', :project_id => @project
else
render :action => 'new'
end
end
def edit
end
def update
if request.put? and @news.update_attributes(params[:news])
@news.safe_attributes = params[:news]
if @news.save
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'show', :id => @news
else
@ -88,14 +85,14 @@ class NewsController < ApplicationController
@news.destroy
redirect_to :action => 'index', :project_id => @project
end
private
def find_project
@project = Project.find(params[:project_id])
rescue ActiveRecord::RecordNotFound
render_404
end
def find_optional_project
return true unless params[:project_id]
@project = Project.find(params[:project_id])

View File

@ -1,3 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class PreviewsController < ApplicationController
before_filter :find_project
@ -22,12 +36,12 @@ class PreviewsController < ApplicationController
end
private
def find_project
project_id = (params[:issue] && params[:issue][:project_id]) || params[:project_id]
@project = Project.find(project_id)
rescue ActiveRecord::RecordNotFound
render_404
end
end

View File

@ -1,7 +1,21 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class ProjectEnumerationsController < ApplicationController
before_filter :find_project_by_project_id
before_filter :authorize
def update
if request.put? && params[:enumerations]
Project.transaction do
@ -11,7 +25,7 @@ class ProjectEnumerationsController < ApplicationController
end
flash[:notice] = l(:notice_successful_update)
end
redirect_to :controller => 'projects', :action => 'settings', :tab => 'activities', :id => @project
end

View File

@ -1,29 +1,28 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class ProjectsController < ApplicationController
menu_item :overview
menu_item :roadmap, :only => :roadmap
menu_item :settings, :only => :settings
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ]
before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy]
before_filter :find_project, :except => [ :index, :new, :create, :copy ]
before_filter :authorize, :only => [ :show, :settings, :edit, :update, :modules ]
before_filter :authorize_global, :only => [:new, :create]
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
before_filter :jump_to_project_menu_item, :only => :show
before_filter :load_project_settings, :only => :settings
accept_key_auth :index, :show, :create, :update, :destroy
after_filter :only => [:create, :edit, :update, :archive, :unarchive, :destroy] do |controller|
@ -32,22 +31,17 @@ class ProjectsController < ApplicationController
end
end
helper :sort
include SortHelper
helper :custom_fields
include CustomFieldsHelper
helper :issues
helper :queries
include CustomFieldsHelper
include QueriesHelper
helper :repositories
include RepositoriesHelper
include ProjectsHelper
# Lists visible projects
def index
respond_to do |format|
format.html {
@projects = Project.visible.find(:all, :order => 'lft')
format.html {
@projects = Project.visible.find(:all, :order => 'lft')
}
format.api {
@offset, @limit = api_offset_and_limit
@ -61,11 +55,12 @@ class ProjectsController < ApplicationController
}
end
end
def new
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
@trackers = Tracker.all
@project = Project.new(params[:project])
@project = Project.new
@project.safe_attributes = params[:project]
end
verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed }
@ -77,14 +72,9 @@ class ProjectsController < ApplicationController
if validate_parent_id && @project.save
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
# Add current user as a project member if he is not admin
unless User.current.admin?
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
m = Member.new(:user => User.current, :roles => [r])
@project.members << m
end
add_current_user_to_project_if_not_admin(@project)
respond_to do |format|
format.html {
format.html {
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'projects', :action => 'settings', :id => @project
}
@ -96,9 +86,9 @@ class ProjectsController < ApplicationController
format.api { render_validation_errors(@project) }
end
end
end
def copy
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
@trackers = Tracker.all
@ -112,7 +102,7 @@ class ProjectsController < ApplicationController
@project.identifier = Project.next_identifier if Setting.sequential_project_identifiers?
else
redirect_to :controller => 'admin', :action => 'projects'
end
end
else
Mailer.with_deliveries(params[:notifications] == '1') do
@project = Project.new
@ -134,35 +124,27 @@ class ProjectsController < ApplicationController
rescue ActiveRecord::RecordNotFound
redirect_to :controller => 'admin', :action => 'projects'
end
# Show @project
def show
if params[:jump]
# try to redirect to the requested menu item
redirect_to_project_menu_item(@project, params[:jump]) && return
end
@users_by_role = @project.users_by_role
@subprojects = @project.children.visible
@subprojects = @project.children.visible.all
@news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC")
@trackers = @project.rolled_up_trackers
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)
TimeEntry.visible_by(User.current) do
@total_hours = TimeEntry.sum(:hours,
:include => :project,
:conditions => cond).to_f
if User.current.allowed_to?(:view_time_entries, @project)
@total_hours = TimeEntry.visible.sum(:hours, :include => :project, :conditions => cond).to_f
end
@key = User.current.rss_key
respond_to do |format|
format.html
format.api
@ -170,14 +152,8 @@ class ProjectsController < ApplicationController
end
def settings
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
@issue_category ||= IssueCategory.new
@member ||= @project.members.new
@trackers = Tracker.all
@repository ||= @project.repository
@wiki ||= @project.wiki
end
def edit
end
@ -188,7 +164,7 @@ class ProjectsController < ApplicationController
if validate_parent_id && @project.save
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
respond_to do |format|
format.html {
format.html {
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'settings', :id => @project
}
@ -196,8 +172,8 @@ class ProjectsController < ApplicationController
end
else
respond_to do |format|
format.html {
settings
format.html {
load_project_settings
render :action => 'settings'
}
format.api { render_validation_errors(@project) }
@ -220,12 +196,12 @@ class ProjectsController < ApplicationController
end
redirect_to(url_for(:controller => 'admin', :action => 'projects', :status => params[:status]))
end
def unarchive
@project.unarchive if request.post? && !@project.active?
redirect_to(url_for(:controller => 'admin', :action => 'projects', :status => params[:status]))
end
# Delete @project
def destroy
@project_to_destroy = @project
@ -240,8 +216,7 @@ class ProjectsController < ApplicationController
end
end
end
# hide project in layout
@project = nil
hide_project_in_layout
end
private
@ -267,4 +242,33 @@ private
end
true
end
def jump_to_project_menu_item
if params[:jump]
# try to redirect to the requested menu item
redirect_to_project_menu_item(@project, params[:jump]) && return
end
end
def load_project_settings
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
@issue_category ||= IssueCategory.new
@member ||= @project.members.new
@trackers = Tracker.all
@repository ||= @project.repository
@wiki ||= @project.wiki
end
def hide_project_in_layout
@project = nil
end
def add_current_user_to_project_if_not_admin(project)
unless User.current.admin?
r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first
m = Member.new(:user => User.current, :roles => [r])
project.members << m
end
end
end

View File

@ -1,35 +1,34 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class QueriesController < ApplicationController
menu_item :issues
before_filter :find_query, :except => :new
before_filter :find_optional_project, :only => :new
def new
@query = Query.new(params[:query])
@query.project = params[:query_is_for_all] ? nil : @project
@query.display_subprojects = params[:display_subprojects] if params[:display_subprojects].present?
@query.user = User.current
@query.is_public = false unless User.current.allowed_to?(:manage_public_queries, @project) || User.current.admin?
@query.column_names = nil if params[:default_columns]
@query.add_filters(params[:fields], params[:operators], params[:values]) if params[:fields]
@query.add_filters(params[:fields] || params[:f], params[:operators] || params[:op], params[:values] || params[:v]) if params[:fields] || params[:f]
@query.group_by ||= params[:group_by]
@query.column_names = params[:c] if params[:c]
@query.column_names = nil if params[:default_columns]
if request.post? && params[:confirm] && @query.save
flash[:notice] = l(:notice_successful_create)
redirect_to :controller => 'issues', :action => 'index', :project_id => @project, :query_id => @query
@ -37,16 +36,19 @@ class QueriesController < ApplicationController
end
render :layout => false if request.xhr?
end
def edit
if request.post?
@query.filters = {}
@query.add_filters(params[:fields], params[:operators], params[:values]) if params[:fields]
@query.add_filters(params[:fields] || params[:f], params[:operators] || params[:op], params[:values] || params[:v]) if params[:fields] || params[:f]
@query.attributes = params[:query]
@query.project = nil if params[:query_is_for_all]
@query.display_subprojects = params[:display_subprojects] if params[:display_subprojects].present?
@query.is_public = false unless User.current.allowed_to?(:manage_public_queries, @project) || User.current.admin?
@query.group_by ||= params[:group_by]
@query.column_names = params[:c] if params[:c]
@query.column_names = nil if params[:default_columns]
if @query.save
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'issues', :action => 'index', :project_id => @project, :query_id => @query
@ -58,7 +60,7 @@ class QueriesController < ApplicationController
@query.destroy if request.post?
redirect_to :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1
end
private
def find_query
@query = Query.find(params[:id])
@ -67,7 +69,7 @@ private
rescue ActiveRecord::RecordNotFound
render_404
end
def find_optional_project
@project = Project.find(params[:project_id]) if params[:project_id]
render_403 unless User.current.allowed_to?(:save_queries, @project, :global => true)

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class ReportsController < ApplicationController
menu_item :issues
@ -37,7 +34,7 @@ class ReportsController < ApplicationController
@issues_by_subproject = Issue.by_subproject(@project) || []
render :template => "reports/issue_report"
end
end
def issue_report_details
case params[:detail]

View File

@ -1,19 +1,16 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
require 'SVG/Graph/Bar'
require 'SVG/Graph/BarHorizontal'
@ -26,14 +23,14 @@ class RepositoriesController < ApplicationController
menu_item :repository
menu_item :settings, :only => :edit
default_search_scope :changesets
before_filter :find_repository, :except => :edit
before_filter :find_project, :only => :edit
before_filter :authorize
accept_key_auth :revisions
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
def edit
@repository = @project.repository
if !@repository
@ -52,7 +49,7 @@ class RepositoriesController < ApplicationController
end
end
end
def committers
@committers = @repository.committers
@users = @project.users
@ -67,16 +64,17 @@ class RepositoriesController < ApplicationController
redirect_to :action => 'committers', :id => @project
end
end
def destroy
@repository.destroy
redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository'
end
def show
def show
@repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty?
@entries = @repository.entries(@path, @rev)
@changeset = @repository.find_changeset_by_name(@rev)
if request.xhr?
@entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
else
@ -88,7 +86,7 @@ class RepositoriesController < ApplicationController
end
alias_method :browse, :show
def changes
@entry = @repository.entry(@path, @rev)
(show_error_not_found; return) unless @entry
@ -96,23 +94,23 @@ class RepositoriesController < ApplicationController
@properties = @repository.properties(@path, @rev)
@changeset = @repository.find_changeset_by_name(@rev)
end
def revisions
@changeset_count = @repository.changesets.count
@changeset_pages = Paginator.new self, @changeset_count,
per_page_option,
params['page']
per_page_option,
params['page']
@changesets = @repository.changesets.find(:all,
:limit => @changeset_pages.items_per_page,
:offset => @changeset_pages.current.offset,
:include => [:user, :repository])
:limit => @changeset_pages.items_per_page,
:offset => @changeset_pages.current.offset,
:include => [:user, :repository])
respond_to do |format|
format.html { render :layout => false if request.xhr? }
format.atom { render_feed(@changesets, :title => "#{@project.name}: #{l(:label_revision_plural)}") }
end
end
def entry
@entry = @repository.entry(@path, @rev)
(show_error_not_found; return) unless @entry
@ -122,20 +120,44 @@ class RepositoriesController < ApplicationController
@content = @repository.cat(@path, @rev)
(show_error_not_found; return) unless @content
if 'raw' == params[:format] || @content.is_binary_data? || (@entry.size && @entry.size > Setting.file_max_size_displayed.to_i.kilobyte)
if 'raw' == params[:format] ||
(@content.size && @content.size > Setting.file_max_size_displayed.to_i.kilobyte) ||
! is_entry_text_data?(@content, @path)
# Force the download
send_data @content, :filename => @path.split('/').last
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_data @content, send_opt
else
# Prevent empty lines when displaying a file with Windows style eol
# TODO: UTF-16
# Is this needs? AttachmentsController reads file simply.
@content.gsub!("\r\n", "\n")
@changeset = @repository.find_changeset_by_name(@rev)
end
end
end
def is_entry_text_data?(ent, path)
# UTF-16 contains "\x00".
# It is very strict that file contains less than 30% of ascii symbols
# in non Western Europe.
return true if Redmine::MimeType.is_type?('text', path)
# Ruby 1.8.6 has a bug of integer divisions.
# http://apidock.com/ruby/v1_8_6_287/String/is_binary_data%3F
if ent.respond_to?("is_binary_data?") && ent.is_binary_data? # Ruby 1.8.x and <1.9.2
return false
elsif ent.respond_to?(:force_encoding) && (ent.dup.force_encoding("UTF-8") != ent.dup.force_encoding("BINARY") ) # Ruby 1.9.2
# TODO: need to handle edge cases of non-binary content that isn't UTF-8
return false
end
true
end
private :is_entry_text_data?
def annotate
@entry = @repository.entry(@path, @rev)
(show_error_not_found; return) unless @entry
@annotate = @repository.scm.annotate(@path, @rev)
(render_error l(:error_scm_annotate); return) if @annotate.nil? || @annotate.empty?
@changeset = @repository.find_changeset_by_name(@rev)
@ -153,7 +175,7 @@ class RepositoriesController < ApplicationController
rescue ChangesetNotFound
show_error_not_found
end
def diff
if params[:format] == 'diff'
@diff = @repository.diff(@path, @rev, @rev_to)
@ -166,14 +188,14 @@ class RepositoriesController < ApplicationController
else
@diff_type = params[:type] || User.current.pref[:diff_type] || 'inline'
@diff_type = 'inline' unless %w(inline sbs).include?(@diff_type)
# Save diff type as user preference
if User.current.logged? && @diff_type != User.current.pref[:diff_type]
User.current.pref[:diff_type] = @diff_type
User.current.preference.save
end
@cache_key = "repositories/diff/#{@repository.id}/" + Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}")
@cache_key = "repositories/diff/#{@repository.id}/" + Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}")
unless read_fragment(@cache_key)
@diff = @repository.diff(@path, @rev, @rev_to)
show_error_not_found unless @diff
@ -185,11 +207,11 @@ class RepositoriesController < ApplicationController
end
end
def stats
def stats
end
def graph
data = nil
data = nil
case params[:graph]
when "commits_per_month"
data = graph_commits_per_month(@repository)
@ -203,7 +225,7 @@ class RepositoriesController < ApplicationController
render_404
end
end
private
REV_PARAM_RE = %r{\A[a-f0-9]*\Z}i
@ -216,8 +238,8 @@ class RepositoriesController < ApplicationController
@path ||= ''
@rev = params[:rev].blank? ? @repository.default_branch : params[:rev].strip
@rev_to = params[:rev_to]
unless @rev.to_s.match(REV_PARAM_RE) && @rev.to_s.match(REV_PARAM_RE)
unless @rev.to_s.match(REV_PARAM_RE) && @rev_to.to_s.match(REV_PARAM_RE)
if @repository.branches.blank?
raise InvalidRevisionParam
end
@ -231,12 +253,12 @@ class RepositoriesController < ApplicationController
def show_error_not_found
render_error :message => l(:error_scm_not_found), :status => 404
end
# Handler for Redmine::Scm::Adapters::CommandFailed exception
def show_error_command_failed(exception)
render_error l(:error_scm_command_failed, exception.message)
end
def graph_commits_per_month(repository)
@date_to = Date.today
@date_from = @date_to << 11
@ -248,10 +270,10 @@ class RepositoriesController < ApplicationController
changes_by_day = repository.changes.count(:all, :group => :commit_date, :conditions => ["commit_date BETWEEN ? AND ?", @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 }
fields = []
12.times {|m| fields << month_name(((Date.today.month - 1 - m) % 12) + 1)}
graph = SVG::Graph::Bar.new(
:height => 300,
:width => 800,
@ -263,7 +285,7 @@ class RepositoriesController < ApplicationController
:graph_title => l(:label_commits_per_month),
:show_graph_title => true
)
graph.add_data(
:data => commits_by_month[0..11].reverse,
:title => l(:label_revision_plural)
@ -273,7 +295,7 @@ class RepositoriesController < ApplicationController
:data => changes_by_month[0..11].reverse,
:title => l(:label_change_plural)
)
graph.burn
end
@ -283,18 +305,18 @@ class RepositoriesController < ApplicationController
changes_by_author = repository.changes.count(:all, :group => :committer)
h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o}
fields = commits_by_author.collect {|r| r.first}
commits_data = commits_by_author.collect {|r| r.last}
changes_data = commits_by_author.collect {|r| h[r.first] || 0}
fields = fields + [""]*(10 - fields.length) if fields.length<10
commits_data = commits_data + [0]*(10 - commits_data.length) if commits_data.length<10
changes_data = changes_data + [0]*(10 - changes_data.length) if changes_data.length<10
# Remove email adress in usernames
fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') }
graph = SVG::Graph::BarHorizontal.new(
:height => 400,
:width => 800,
@ -306,7 +328,7 @@ class RepositoriesController < ApplicationController
:graph_title => l(:label_commits_per_author),
:show_graph_title => true
)
graph.add_data(
:data => commits_data,
:title => l(:label_revision_plural)
@ -316,12 +338,12 @@ class RepositoriesController < ApplicationController
:data => changes_data,
:title => l(:label_change_plural)
)
graph.burn
end
end
class Date
def months_ago(date = Date.today)
(date.year - self.year)*12 + (date.month - self.month)

View File

@ -1,23 +1,20 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class RolesController < ApplicationController
layout 'admin'
before_filter :require_admin
verify :method => :post, :only => [ :destroy, :move ],
@ -38,9 +35,10 @@ class RolesController < ApplicationController
end
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'index'
else
@permissions = @role.setable_permissions
@roles = Role.find :all, :order => 'builtin, position'
end
@permissions = @role.setable_permissions
@roles = Role.find :all, :order => 'builtin, position'
end
def edit
@ -48,8 +46,9 @@ class RolesController < ApplicationController
if request.post? and @role.update_attributes(params[:role])
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'index'
else
@permissions = @role.setable_permissions
end
@permissions = @role.setable_permissions
end
def destroy
@ -60,8 +59,8 @@ class RolesController < ApplicationController
flash[:error] = l(:error_can_not_remove_role)
redirect_to :action => 'index'
end
def report
def report
@roles = Role.find(:all, :order => 'builtin, position')
@permissions = Redmine::AccessControl.permissions.select { |p| !p.public? }
if request.post?

View File

@ -1,24 +1,20 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class SearchController < ApplicationController
before_filter :find_optional_project
helper :messages
include MessagesHelper
def index
@ -26,7 +22,7 @@ class SearchController < ApplicationController
@question.strip!
@all_words = params[:all_words] || (params[:submit] ? false : true)
@titles_only = !params[:titles_only].nil?
projects_to_search =
case params[:scope]
when 'all'
@ -38,16 +34,16 @@ class SearchController < ApplicationController
else
@project
end
offset = nil
begin; offset = params[:offset].to_time if params[:offset]; rescue; end
# quick jump to an issue
if @question.match(/^#?(\d+)$/) && Issue.visible.find_by_id($1.to_i)
redirect_to :controller => "issues", :action => "show", :id => $1
return
end
@object_types = Redmine::Search.available_search_types.dup
if projects_to_search.is_a? Project
# don't search projects
@ -55,23 +51,23 @@ class SearchController < ApplicationController
# only show what the user is allowed to view
@object_types = @object_types.select {|o| User.current.allowed_to?("view_#{o}".to_sym, projects_to_search)}
end
@scope = @object_types.select {|t| params[t]}
@scope = @object_types if @scope.empty?
# extract tokens from the question
# eg. hello "bye bye" => ["hello", "bye bye"]
@tokens = @question.scan(%r{((\s|^)"[\s\w]+"(\s|$)|\S+)}).collect {|m| m.first.gsub(%r{(^\s*"\s*|\s*"\s*$)}, '')}
# tokens must be at least 2 characters long
@tokens = @tokens.uniq.select {|w| w.length > 1 }
if !@tokens.empty?
# no more than 5 tokens to search for
@tokens.slice! 5..-1 if @tokens.size > 5
@tokens.slice! 5..-1 if @tokens.size > 5
@results = []
@results_by_type = Hash.new {|h,k| h[k] = 0}
limit = 10
@scope.each do |s|
r, c = s.singularize.camelcase.constantize.search(@tokens, projects_to_search,
@ -87,13 +83,13 @@ class SearchController < ApplicationController
if params[:previous].nil?
@pagination_previous_date = @results[0].event_datetime if offset && @results[0]
if @results.size > limit
@pagination_next_date = @results[limit-1].event_datetime
@pagination_next_date = @results[limit-1].event_datetime
@results = @results[0, limit]
end
else
@pagination_next_date = @results[-1].event_datetime if offset && @results[-1]
if @results.size > limit
@pagination_previous_date = @results[-(limit)].event_datetime
@pagination_previous_date = @results[-(limit)].event_datetime
@results = @results[-(limit), limit]
end
end
@ -103,7 +99,7 @@ class SearchController < ApplicationController
render :layout => false if request.xhr?
end
private
private
def find_optional_project
return true unless params[:id]
@project = Project.find(params[:id])

View File

@ -1,23 +1,20 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
# See doc/COPYRIGHT.rdoc for more details.
#++
class SettingsController < ApplicationController
layout 'admin'
before_filter :require_admin
def index
@ -36,16 +33,16 @@ class SettingsController < ApplicationController
end
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'edit', :tab => params[:tab]
return
end
@options = {}
@options[:user_format] = User::USER_FORMATS.keys.collect {|f| [User.current.name(f), f.to_s] }
@deliveries = ActionMailer::Base.perform_deliveries
else
@options = {}
@options[:user_format] = User::USER_FORMATS.keys.collect {|f| [User.current.name(f), f.to_s] }
@deliveries = ActionMailer::Base.perform_deliveries
@guessed_host_and_path = request.host_with_port.dup
@guessed_host_and_path << ('/'+ Redmine::Utils.relative_url_root.gsub(%r{^\/}, '')) unless Redmine::Utils.relative_url_root.blank?
Redmine::Themes.rescan
@guessed_host_and_path = request.host_with_port.dup
@guessed_host_and_path << ('/'+ Redmine::Utils.relative_url_root.gsub(%r{^\/}, '')) unless Redmine::Utils.relative_url_root.blank?
Redmine::Themes.rescan
end
end
def plugin
@ -54,9 +51,10 @@ class SettingsController < ApplicationController
Setting["plugin_#{@plugin.id}"] = params[:settings]
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'plugin', :id => @plugin.id
else
@partial = @plugin.settings[:partial]
@settings = Setting["plugin_#{@plugin.id}"]
end
@partial = @plugin.settings[:partial]
@settings = Setting["plugin_#{@plugin.id}"]
rescue Redmine::PluginNotFound
render_404
end

View File

@ -1,28 +1,25 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class SysController < ActionController::Base
before_filter :check_enabled
def projects
p = Project.active.has_module(:repository).find(:all, :include => :repository, :order => 'identifier')
render :xml => p.to_xml(:include => :repository)
end
def create_project_repository
project = Project.find(params[:id])
if project.repository
@ -37,7 +34,7 @@ class SysController < ActionController::Base
end
end
end
def fetch_changesets
projects = []
if params[:id]

View File

@ -1,14 +1,24 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class TimeEntryReportsController < ApplicationController
menu_item :issues
before_filter :find_optional_project
before_filter :load_available_criterias
helper :sort
include SortHelper
helper :issues
helper :timelog
include TimelogHelper
helper :custom_fields
include CustomFieldsHelper
def report
@ -16,16 +26,16 @@ class TimeEntryReportsController < ApplicationController
@criterias = @criterias.select{|criteria| @available_criterias.has_key? criteria}
@criterias.uniq!
@criterias = @criterias[0,3]
@columns = (params[:columns] && %w(year month week day).include?(params[:columns])) ? params[:columns] : 'month'
retrieve_date_range
unless @criterias.empty?
sql_select = @criterias.collect{|criteria| @available_criterias[criteria][:sql] + " AS " + criteria}.join(', ')
sql_group_by = @criterias.collect{|criteria| @available_criterias[criteria][:sql]}.join(', ')
sql_condition = ''
if @project.nil?
sql_condition = Project.allowed_to_condition(User.current, :view_time_entries)
elsif @issue.nil?
@ -41,9 +51,9 @@ class TimeEntryReportsController < ApplicationController
sql << " (%s) AND" % sql_condition
sql << " (spent_on BETWEEN '%s' AND '%s')" % [ActiveRecord::Base.connection.quoted_date(@from), ActiveRecord::Base.connection.quoted_date(@to)]
sql << " GROUP BY #{sql_group_by}, tyear, tmonth, tweek, spent_on"
@hours = ActiveRecord::Base.connection.select_all(sql)
@hours.each do |row|
case @columns
when 'year'
@ -56,14 +66,13 @@ class TimeEntryReportsController < ApplicationController
row['day'] = "#{row['spent_on']}"
end
end
@total_hours = @hours.inject(0) {|s,k| s = s + k['hours'].to_f}
@periods = []
# Date#at_beginning_of_ not supported in Rails 1.2.x
date_from = @from.to_time
# 100 columns max
while date_from <= @to.to_time && @periods.length < 100
while date_from <= @to.to_time
case @columns
when 'year'
@periods << "#{date_from.year}"
@ -80,13 +89,13 @@ class TimeEntryReportsController < ApplicationController
end
end
end
respond_to do |format|
format.html { render :layout => !request.xhr? }
format.csv { send_data(report_to_csv(@criterias, @periods, @hours), :type => 'text/csv; header=present', :filename => 'timelog.csv') }
end
end
private
# TODO: duplicated in TimelogController
@ -141,7 +150,7 @@ class TimeEntryReportsController < ApplicationController
else
# default
end
@from, @to = @to, @from if @from && @to && @from > @to
@from ||= (TimeEntry.earilest_date_for_project(@project) || Date.today)
@to ||= (TimeEntry.latest_date_for_project(@project) || Date.today)
@ -151,6 +160,9 @@ class TimeEntryReportsController < ApplicationController
@available_criterias = { 'project' => {:sql => "#{TimeEntry.table_name}.project_id",
:klass => Project,
:label => :label_project},
'status' => {:sql => "#{Issue.table_name}.status_id",
:klass => IssueStatus,
:label => :field_status},
'version' => {:sql => "#{Issue.table_name}.fixed_version_id",
:klass => Version,
:label => :label_version},
@ -170,7 +182,7 @@ class TimeEntryReportsController < ApplicationController
:klass => Issue,
:label => :label_issue}
}
# Add list and boolean custom fields as available criterias
custom_fields = (@project.nil? ? IssueCustomField.for_all : @project.all_issue_custom_fields)
custom_fields.select {|cf| %w(list bool).include? cf.field_format }.each do |cf|
@ -178,7 +190,7 @@ class TimeEntryReportsController < ApplicationController
:format => cf.field_format,
:label => cf.name}
end if @project
# Add list and boolean time entry custom fields
TimeEntryCustomField.find(:all).select {|cf| %w(list bool).include? cf.field_format }.each do |cf|
@available_criterias["cf_#{cf.id}"] = {:sql => "(SELECT c.value FROM #{CustomValue.table_name} c WHERE c.custom_field_id = #{cf.id} AND c.customized_type = 'TimeEntry' AND c.customized_id = #{TimeEntry.table_name}.id)",

View File

@ -1,19 +1,16 @@
# Redmine - project management software
# Copyright (C) 2006-2010 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class TimelogController < ApplicationController
menu_item :issues
@ -22,14 +19,11 @@ class TimelogController < ApplicationController
before_filter :authorize, :except => [:index]
before_filter :find_optional_project, :only => [:index]
accept_key_auth :index, :show, :create, :update, :destroy
helper :sort
include SortHelper
helper :issues
include TimelogHelper
helper :custom_fields
include CustomFieldsHelper
def index
sort_init 'spent_on', 'desc'
sort_update 'spent_on' => 'spent_on',
@ -38,65 +32,61 @@ class TimelogController < ApplicationController
'project' => "#{Project.table_name}.name",
'issue' => 'issue_id',
'hours' => 'hours'
cond = ARCondition.new
if @project.nil?
cond << Project.allowed_to_condition(User.current, :view_time_entries)
elsif @issue.nil?
cond << @project.project_condition(Setting.display_subprojects_issues?)
else
if @issue
cond << "#{Issue.table_name}.root_id = #{@issue.root_id} AND #{Issue.table_name}.lft >= #{@issue.lft} AND #{Issue.table_name}.rgt <= #{@issue.rgt}"
elsif @project
cond << @project.project_condition(Setting.display_subprojects_issues?)
end
retrieve_date_range
cond << ['spent_on BETWEEN ? AND ?', @from, @to]
TimeEntry.visible_by(User.current) do
respond_to do |format|
format.html {
# Paginate results
@entry_count = TimeEntry.count(:include => [:project, :issue], :conditions => cond.conditions)
@entry_pages = Paginator.new self, @entry_count, per_page_option, params['page']
@entries = TimeEntry.find(:all,
:include => [:project, :activity, :user, {:issue => :tracker}],
:conditions => cond.conditions,
:order => sort_clause,
:limit => @entry_pages.items_per_page,
:offset => @entry_pages.current.offset)
@total_hours = TimeEntry.sum(:hours, :include => [:project, :issue], :conditions => cond.conditions).to_f
respond_to do |format|
format.html {
# Paginate results
@entry_count = TimeEntry.visible.count(:include => [:project, :issue], :conditions => cond.conditions)
@entry_pages = Paginator.new self, @entry_count, per_page_option, params['page']
@entries = TimeEntry.visible.find(:all,
:include => [:project, :activity, :user, {:issue => :tracker}],
:conditions => cond.conditions,
:order => sort_clause,
:limit => @entry_pages.items_per_page,
:offset => @entry_pages.current.offset)
@total_hours = TimeEntry.visible.sum(:hours, :include => [:project, :issue], :conditions => cond.conditions).to_f
render :layout => !request.xhr?
}
format.api {
@entry_count = TimeEntry.count(:include => [:project, :issue], :conditions => cond.conditions)
@entry_pages = Paginator.new self, @entry_count, per_page_option, params['page']
@entries = TimeEntry.find(:all,
:include => [:project, :activity, :user, {:issue => :tracker}],
:conditions => cond.conditions,
:order => sort_clause,
:limit => @entry_pages.items_per_page,
:offset => @entry_pages.current.offset)
}
format.atom {
entries = TimeEntry.find(:all,
:include => [:project, :activity, :user, {:issue => :tracker}],
:conditions => cond.conditions,
:order => "#{TimeEntry.table_name}.created_on DESC",
:limit => Setting.feeds_limit.to_i)
render_feed(entries, :title => l(:label_spent_time))
}
format.csv {
# Export all entries
@entries = TimeEntry.find(:all,
:include => [:project, :activity, :user, {:issue => [:tracker, :assigned_to, :priority]}],
:conditions => cond.conditions,
:order => sort_clause)
send_data(entries_to_csv(@entries), :type => 'text/csv; header=present', :filename => 'timelog.csv')
}
end
render :layout => !request.xhr?
}
format.api {
@entry_count = TimeEntry.visible.count(:include => [:project, :issue], :conditions => cond.conditions)
@entry_pages = Paginator.new self, @entry_count, per_page_option, params['page']
@entries = TimeEntry.visible.find(:all,
:include => [:project, :activity, :user, {:issue => :tracker}],
:conditions => cond.conditions,
:order => sort_clause,
:limit => @entry_pages.items_per_page,
:offset => @entry_pages.current.offset)
}
format.atom {
entries = TimeEntry.visible.find(:all,
:include => [:project, :activity, :user, {:issue => :tracker}],
:conditions => cond.conditions,
:order => "#{TimeEntry.table_name}.created_on DESC",
:limit => Setting.feeds_limit.to_i)
render_feed(entries, :title => l(:label_spent_time))
}
format.csv {
# Export all entries
@entries = TimeEntry.visible.find(:all,
:include => [:project, :activity, :user, {:issue => [:tracker, :assigned_to, :priority]}],
:conditions => cond.conditions,
:order => sort_clause)
send_data(entries_to_csv(@entries), :type => 'text/csv; header=present', :filename => 'timelog.csv')
}
end
end
def show
respond_to do |format|
# TODO: Implement html response
@ -107,8 +97,8 @@ class TimelogController < ApplicationController
def new
@time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => User.current.today)
@time_entry.attributes = params[:time_entry]
@time_entry.safe_attributes = params[:time_entry]
call_hook(:controller_timelog_edit_before_save, { :params => params, :time_entry => @time_entry })
render :action => 'edit'
end
@ -116,10 +106,10 @@ class TimelogController < ApplicationController
verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed }
def create
@time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => User.current.today)
@time_entry.attributes = params[:time_entry]
@time_entry.safe_attributes = params[:time_entry]
call_hook(:controller_timelog_edit_before_save, { :params => params, :time_entry => @time_entry })
if @time_entry.save
respond_to do |format|
format.html {
@ -133,21 +123,21 @@ class TimelogController < ApplicationController
format.html { render :action => 'edit' }
format.api { render_validation_errors(@time_entry) }
end
end
end
end
def edit
@time_entry.attributes = params[:time_entry]
@time_entry.safe_attributes = params[:time_entry]
call_hook(:controller_timelog_edit_before_save, { :params => params, :time_entry => @time_entry })
end
verify :method => :put, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
def update
@time_entry.attributes = params[:time_entry]
@time_entry.safe_attributes = params[:time_entry]
call_hook(:controller_timelog_edit_before_save, { :params => params, :time_entry => @time_entry })
if @time_entry.save
respond_to do |format|
format.html {
@ -161,7 +151,7 @@ class TimelogController < ApplicationController
format.html { render :action => 'edit' }
format.api { render_validation_errors(@time_entry) }
end
end
end
end
verify :method => :delete, :only => :destroy, :render => {:nothing => true, :status => :method_not_allowed }
@ -212,7 +202,7 @@ private
rescue ActiveRecord::RecordNotFound
render_404
end
def find_optional_project
if !params[:issue_id].blank?
@issue = Issue.find(params[:issue_id])
@ -222,7 +212,7 @@ private
end
deny_access unless User.current.allowed_to?(:view_time_entries, @project, :global => true)
end
# Retrieves the date range based on predefined ranges or specific from/to param dates
def retrieve_date_range
@free_period = false
@ -263,7 +253,7 @@ private
else
# default
end
@from, @to = @to, @from if @from && @to && @from > @to
@from ||= (TimeEntry.earilest_date_for_project(@project) || Date.today)
@to ||= (TimeEntry.latest_date_for_project(@project) || Date.today)

View File

@ -1,23 +1,20 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class TrackersController < ApplicationController
layout 'admin'
before_filter :require_admin
verify :method => :post, :only => :destroy, :redirect_to => { :action => :index }
@ -51,7 +48,7 @@ class TrackersController < ApplicationController
end
@projects = Project.find(:all)
end
def destroy
@tracker = Tracker.find(params[:id])
unless @tracker.issues.empty?
@ -60,5 +57,5 @@ class TrackersController < ApplicationController
@tracker.destroy
end
redirect_to :action => 'index'
end
end
end

View File

@ -1,43 +1,41 @@
# Redmine - project management software
# Copyright (C) 2006-2010 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class UsersController < ApplicationController
layout 'admin'
before_filter :require_admin, :except => :show
before_filter :find_user, :only => [:show, :edit, :update, :edit_membership, :destroy_membership]
accept_key_auth :index, :show, :create, :update
helper :sort
before_filter :require_admin, :except => :show
before_filter :find_user, :only => [:show, :edit, :update, :destroy, :edit_membership, :destroy_membership]
accept_key_auth :index, :show, :create, :update, :destroy
include SortHelper
helper :custom_fields
include CustomFieldsHelper
include CustomFieldsHelper
def index
sort_init 'login', 'asc'
sort_update %w(login firstname lastname mail admin created_on last_login_on)
case params[:format]
when 'xml', 'json'
@offset, @limit = api_offset_and_limit
else
@limit = per_page_option
end
scope = User
scope = scope.in_group(params[:group_id].to_i) if params[:group_id].present?
@status = params[:status] ? params[:status].to_i : 1
c = ARCondition.new(@status == 0 ? "status <> 0" : ["status = ?", @status])
@ -45,36 +43,39 @@ class UsersController < ApplicationController
name = "%#{params[:name].strip.downcase}%"
c << ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ? OR LOWER(mail) LIKE ?", name, name, name, name]
end
@user_count = User.count(:conditions => c.conditions)
@user_count = scope.count(:conditions => c.conditions)
@user_pages = Paginator.new self, @user_count, @limit, params['page']
@offset ||= @user_pages.current.offset
@users = User.find :all,
@users = scope.find :all,
:order => sort_clause,
:conditions => c.conditions,
:limit => @limit,
:offset => @offset
respond_to do |format|
format.html { render :layout => !request.xhr? }
respond_to do |format|
format.html {
@groups = Group.all.sort
render :layout => !request.xhr?
}
format.api
end
end
end
def show
# show projects based on current user visibility
@memberships = @user.memberships.all(:conditions => Project.visible_by(User.current))
events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
@events_by_day = events.group_by(&:event_date)
unless User.current.admin?
if !@user.active? || (@user != User.current && @memberships.empty? && events.empty?)
render_404
return
end
end
respond_to do |format|
format.html { render :layout => 'base' }
format.api
@ -85,14 +86,14 @@ class UsersController < ApplicationController
@user = User.new(:language => Setting.default_language, :mail_notification => Setting.default_notification_option)
@auth_sources = AuthSource.find(:all)
end
verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed }
def create
@user = User.new(:language => Setting.default_language, :mail_notification => Setting.default_notification_option)
@user.safe_attributes = params[:user]
@user.admin = params[:user][:admin] || false
@user.login = params[:user][:login]
@user.password, @user.password_confirmation = params[:user][:password], params[:user][:password_confirmation] unless @user.auth_source_id
@user.password, @user.password_confirmation = params[:user][:password], params[:user][:password_confirmation] if @user.change_password_allowed?
# TODO: Similar to My#account
@user.pref.attributes = params[:pref]
@ -103,12 +104,12 @@ class UsersController < ApplicationController
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
Mailer.deliver_account_information(@user, params[:user][:password]) if params[:send_information]
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_create)
redirect_to(params[:continue] ?
{:controller => 'users', :action => 'new'} :
redirect_to(params[:continue] ?
{:controller => 'users', :action => 'new'} :
{:controller => 'users', :action => 'edit', :id => @user}
)
}
@ -130,15 +131,15 @@ class UsersController < ApplicationController
@auth_sources = AuthSource.find(:all)
@membership ||= Member.new
end
verify :method => :put, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
def update
@user.admin = params[:user][:admin] if params[:user][:admin]
@user.login = params[:user][:login] if params[:user][:login]
if params[:user][:password].present? && (@user.auth_source_id.nil? || params[:user][:auth_source_id].blank?)
@user.safe_attributes = params[:user]
if params[:user][:password].present? && @user.change_password_allowed?
@user.password, @user.password_confirmation = params[:user][:password], params[:user][:password_confirmation]
end
@user.safe_attributes = params[:user]
# Was the account actived ? (do it before User#save clears the change)
was_activated = (@user.status_change == [User::STATUS_REGISTERED, User::STATUS_ACTIVE])
# TODO: Similar to My#account
@ -151,10 +152,10 @@ class UsersController < ApplicationController
if was_activated
Mailer.deliver_account_activated(@user)
elsif @user.active? && params[:send_information] && !params[:user][:password].blank? && @user.auth_source_id.nil?
elsif @user.active? && params[:send_information] && !params[:user][:password].blank? && @user.change_password_allowed?
Mailer.deliver_account_information(@user, params[:user][:password])
end
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_update)
@ -177,9 +178,35 @@ class UsersController < ApplicationController
redirect_to :controller => 'users', :action => 'edit', :id => @user
end
verify :method => :delete, :only => :destroy, :render => {:nothing => true, :status => :method_not_allowed }
def destroy
# Only allow to delete users with STATUS_REGISTERED for now
# It is assumed that these users are not yet references in any way
# from other objects.
return render_403 unless @user.deletable?
@user.destroy
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_delete)
redirect_back_or_default(:action => 'index')
}
format.api { head :ok }
end
end
def edit_membership
@membership = Member.edit_membership(params[:membership_id], params[:membership], @user)
@membership.save if request.post?
if params[:project_ids] # Multiple memberships, one per project
params[:project_ids].each do |project_id|
@membership = Member.edit_membership(params[:membership_id], (params[:membership] || {}).merge(:project_id => project_id), @user)
@membership.save if request.post?
end
else # Single membership
@membership = Member.edit_membership(params[:membership_id], params[:membership], @user)
@membership.save if request.post?
end
respond_to do |format|
if @membership.valid?
format.html { redirect_to :controller => 'users', :action => 'edit', :id => @user, :tab => 'memberships' }
@ -198,7 +225,7 @@ class UsersController < ApplicationController
end
end
end
def destroy_membership
@membership = Member.find(params[:membership_id])
if request.post? && @membership.deletable?
@ -209,9 +236,9 @@ class UsersController < ApplicationController
format.js { render(:update) {|page| page.replace_html "tab-content-memberships", :partial => 'users/memberships'} }
end
end
private
def find_user
if params[:id] == 'current'
require_login || return

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class VersionsController < ApplicationController
menu_item :roadmap
@ -23,20 +20,18 @@ class VersionsController < ApplicationController
before_filter :find_project, :only => [:index, :new, :create, :close_completed]
before_filter :authorize
helper :custom_fields
helper :projects
def index
@trackers = @project.trackers.find(:all, :order => 'position')
retrieve_selected_tracker_ids(@trackers, @trackers.select {|t| t.is_in_roadmap?})
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id]
@versions = @project.shared_versions || []
@versions += @project.rolled_up_versions.visible if @with_subprojects
@versions = @versions.uniq.sort
@versions.reject! {|version| version.closed? || version.completed? } unless params[:completed]
@issues_by_version = {}
unless @selected_tracker_ids.empty?
@versions.each do |version|
@ -49,19 +44,19 @@ class VersionsController < ApplicationController
end
@versions.reject! {|version| !project_ids.include?(version.project_id) && @issues_by_version[version].blank?}
end
def show
@issues = @version.fixed_issues.visible.find(:all,
:include => [:status, :tracker, :priority],
:order => "#{Tracker.table_name}.position, #{Issue.table_name}.id")
end
def new
@version = @project.versions.build
if params[:version]
attributes = params[:version].dup
attributes.delete('sharing') unless attributes.nil? || @version.allowed_sharings.include?(attributes['sharing'])
@version.attributes = attributes
@version.safe_attributes = attributes
end
end
@ -71,7 +66,7 @@ class VersionsController < ApplicationController
if params[:version]
attributes = params[:version].dup
attributes.delete('sharing') unless attributes.nil? || @version.allowed_sharings.include?(attributes['sharing'])
@version.attributes = attributes
@version.safe_attributes = attributes
end
if request.post?
@ -101,12 +96,13 @@ class VersionsController < ApplicationController
def edit
end
def update
if request.put? && params[:version]
attributes = params[:version].dup
attributes.delete('sharing') unless @version.allowed_sharings.include?(attributes['sharing'])
if @version.update_attributes(attributes)
@version.safe_attributes = attributes
if @version.save
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
else
@ -116,7 +112,7 @@ class VersionsController < ApplicationController
end
end
end
def close_completed
if request.put?
@project.close_completed_versions
@ -133,7 +129,7 @@ class VersionsController < ApplicationController
redirect_to :controller => 'projects', :action => 'settings', :tab => 'versions', :id => @project
end
end
def status_by
respond_to do |format|
format.html { render :action => 'show' }

View File

@ -1,29 +1,27 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class WatchersController < ApplicationController
before_filter :find_project
before_filter :require_login, :check_project_privacy, :only => [:watch, :unwatch]
before_filter :authorize, :only => [:new, :destroy]
before_filter :authorize_access_to_object, :only => [:new, :destroy]
verify :method => :post,
:only => [ :watch, :unwatch ],
:render => { :nothing => true, :status => :method_not_allowed }
def watch
if @watched.respond_to?(:visible?) && !@watched.visible?(User.current)
render_403
@ -31,15 +29,18 @@ class WatchersController < ApplicationController
set_watcher(User.current, true)
end
end
def unwatch
set_watcher(User.current, false)
end
def new
@watcher = Watcher.new(params[:watcher])
@watcher.watchable = @watched
@watcher.save if request.post?
params[:user_ids].each do |user_id|
@watcher = Watcher.new((params[:watcher] || {}).merge({:user_id => user_id}))
@watcher.watchable = @watched
@watcher.save if request.post?
end if params[:user_ids].present?
respond_to do |format|
format.html { redirect_to :back }
format.js do
@ -51,9 +52,9 @@ class WatchersController < ApplicationController
rescue ::ActionController::RedirectBackError
render :text => 'Watcher added.', :layout => true
end
def destroy
@watched.set_watcher(User.find(params[:user_id]), false) if request.post?
@watched.set_watcher(Principal.find(params[:user_id]), false) if request.post?
respond_to do |format|
format.html { redirect_to :back }
format.js do
@ -63,7 +64,7 @@ class WatchersController < ApplicationController
end
end
end
private
def find_project
klass = Object.const_get(params[:object_type].camelcase)
@ -73,29 +74,48 @@ private
rescue
render_404
end
def set_watcher(user, watching)
@watched.set_watcher(user, watching)
if params[:replace].present?
if params[:replace].is_a? Array
replace_ids = params[:replace]
else
replace_ids = [params[:replace]]
end
else
replace_ids = ['watcher']
end
respond_to do |format|
format.html { redirect_to :back }
format.js do
render(:update) do |page|
replace_ids.each do |replace_id|
page.replace_html replace_id, watcher_link(@watched, user, :replace => replace_ids)
if params[:replace].present?
if params[:replace].is_a? Array
@replace_selectors = params[:replace]
else
@replace_selectors = params[:replace].split(',').map(&:strip)
end
else
@replace_selectors = ['#watcher']
end
@user = user
render :action => 'replace_selectors'
end
end
rescue ::ActionController::RedirectBackError
render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true
end
def authorize_access_to_object
permission = ''
case params[:action]
when 'new'
permission << 'add_'
when 'destroy'
permission << 'delete_'
end
# Ends up like: :delete_wiki_page_watchers
permission << "#{@watched.class.name.underscore}_watchers"
if User.current.allowed_to?(permission.to_sym, @project)
return true
else
deny_access
end
end
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class WelcomeController < ApplicationController
caches_action :robots
@ -22,7 +19,7 @@ class WelcomeController < ApplicationController
@news = News.latest User.current
@projects = Project.latest User.current
end
def robots
@projects = Project.all_public.active
render :layout => false, :content_type => 'text/plain'

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
require 'diff'
@ -35,16 +32,21 @@ class WikiController < ApplicationController
default_search_scope :wiki_pages
before_filter :find_wiki, :authorize
before_filter :find_existing_page, :only => [:rename, :protect, :history, :diff, :annotate, :add_attachment, :destroy]
verify :method => :post, :only => [:protect], :redirect_to => { :action => :show }
helper :attachments
include AttachmentsHelper
helper :watchers
include AttachmentsHelper
# List of pages, sorted alphabetically and by parent (hierarchy)
def index
load_pages_grouped_by_date_without_content
load_pages_for_index
@pages_by_parent_id = @pages.group_by(&:parent_id)
end
# List of page, by last update
def date_index
load_pages_for_index
@pages_by_date = @pages.group_by {|p| p.updated_on.to_date}
end
# display a page (in editing mode if it doesn't exist)
@ -77,34 +79,30 @@ class WikiController < ApplicationController
end
end
@editable = editable?
render :action => 'show'
end
# edit an existing page or a new one
def edit
@page = @wiki.find_or_new_page(params[:id])
@page = @wiki.find_or_new_page(params[:id])
return render_403 unless editable?
@page.content = WikiContent.new(:page => @page) if @page.new_record?
@content = @page.content_for_version(params[:version])
@content.text = initial_page_content(@page) if @content.text.blank?
# don't keep previous comment
@content.comments = nil
# To prevent StaleObjectError exception when reverting to a previous version
@content.version = @page.content.version
rescue ActiveRecord::StaleObjectError
# Optimistic locking exception
flash[:error] = l(:notice_locking_conflict)
@content.lock_version = @page.content.lock_version
end
verify :method => :put, :only => :update, :render => {:nothing => true, :status => :method_not_allowed }
# Creates a new page or updates an existing one
def update
@page = @wiki.find_or_new_page(params[:id])
@page = @wiki.find_or_new_page(params[:id])
return render_403 unless editable?
@page.content = WikiContent.new(:page => @page) if @page.new_record?
@content = @page.content_for_version(params[:version])
@content.text = initial_page_content(@page) if @content.text.blank?
# don't keep previous comment
@ -117,6 +115,7 @@ class WikiController < ApplicationController
redirect_to :action => 'show', :project_id => @project, :id => @page.title
return
end
params[:content].delete(:version) # The version count is automatically increased
@content.attributes = params[:content]
@content.author = User.current
# if page is new @page.save will also save content, but not if page isn't a new record
@ -131,7 +130,8 @@ class WikiController < ApplicationController
rescue ActiveRecord::StaleObjectError
# Optimistic locking exception
flash[:error] = l(:notice_locking_conflict)
flash.now[:error] = l(:notice_locking_conflict)
render :action => 'edit'
end
# rename a page
@ -145,7 +145,7 @@ class WikiController < ApplicationController
redirect_to :action => 'show', :project_id => @project, :id => @page.title
end
end
def protect
@page.update_attribute :protected, params[:protected]
redirect_to :action => 'show', :project_id => @project, :id => @page.title
@ -155,24 +155,25 @@ class WikiController < ApplicationController
def history
@version_count = @page.content.versions.count
@version_pages = Paginator.new self, @version_count, per_page_option, params['p']
# don't load text
@versions = @page.content.versions.find :all,
:select => "id, author_id, comments, updated_on, version",
# don't load text
@versions = @page.content.versions.find :all,
:select => "id, user_id, notes, created_at, version",
:order => 'version DESC',
:limit => @version_pages.items_per_page + 1,
:offset => @version_pages.current.offset
render :layout => false if request.xhr?
end
def diff
@diff = @page.diff(params[:version], params[:version_from])
render_404 unless @diff
end
def annotate
@annotate = @page.annotate(params[:version])
render_404 unless @annotate
@editable = editable?
end
verify :method => :delete, :only => [:destroy], :redirect_to => { :action => :show }
@ -180,7 +181,7 @@ class WikiController < ApplicationController
# Children can be either set as root pages, removed or reassigned to another parent page
def destroy
return render_403 unless editable?
@descendants_count = @page.descendants.size
if @descendants_count > 0
case params[:todo]
@ -216,10 +217,6 @@ class WikiController < ApplicationController
end
end
def date_index
load_pages_grouped_by_date_without_content
end
def preview
page = @wiki.find_page(params[:id])
# page is nil when previewing a new page
@ -240,7 +237,7 @@ class WikiController < ApplicationController
end
private
def find_wiki
@project = Project.find(params[:project_id])
@wiki = @project.wiki
@ -248,13 +245,13 @@ private
rescue ActiveRecord::RecordNotFound
render_404
end
# Finds the requested page and returns a 404 error if it doesn't exist
def find_existing_page
@page = @wiki.find_page(params[:id])
render_404 if @page.nil?
end
# Returns true if the current user is allowed to edit the page, otherwise false
def editable?(page = @page)
page.editable_by?(User.current)
@ -267,13 +264,7 @@ private
helper.instance_method(:initial_page_content).bind(self).call(page)
end
# eager load information about last updates, without loading text
def load_pages_grouped_by_date_without_content
@pages = @wiki.pages.find :all, :select => "#{WikiPage.table_name}.*, #{WikiContent.table_name}.updated_on",
:joins => "LEFT JOIN #{WikiContent.table_name} ON #{WikiContent.table_name}.page_id = #{WikiPage.table_name}.id",
:order => 'title'
@pages_by_date = @pages.group_by {|p| p.updated_on.to_date}
@pages_by_parent_id = @pages.group_by(&:parent_id)
def load_pages_for_index
@pages = @wiki.pages.with_updated_on.all(:order => 'title', :include => {:wiki => :project})
end
end

View File

@ -1,28 +1,25 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class WikisController < ApplicationController
menu_item :settings
before_filter :find_project, :authorize
# Create or update a project's wiki
def edit
@wiki = @project.wiki || Wiki.new(:project => @project)
@wiki.attributes = params[:wiki]
@wiki.safe_attributes = params[:wiki]
@wiki.save if request.post?
render(:update) {|page| page.replace_html "tab-content-wiki", :partial => 'projects/settings/wiki'}
end
@ -32,6 +29,6 @@ class WikisController < ApplicationController
if request.post? && params[:confirm] && @project.wiki
@project.wiki.destroy
redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'wiki'
end
end
end
end

View File

@ -1,57 +1,65 @@
# Redmine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class WorkflowsController < ApplicationController
layout 'admin'
before_filter :require_admin
before_filter :find_roles
before_filter :find_trackers
def index
@workflow_counts = Workflow.count_by_tracker_and_role
end
def edit
@role = Role.find_by_id(params[:role_id])
@tracker = Tracker.find_by_id(params[:tracker_id])
@tracker = Tracker.find_by_id(params[:tracker_id])
if request.post?
Workflow.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id])
(params[:issue_status] || []).each { |old, news|
news.each { |new|
@role.workflows.build(:tracker_id => @tracker.id, :old_status_id => old, :new_status_id => new)
(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)
}
}
if @role.save
flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker
return
end
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.find(:all, :order => 'position')
if @tracker && @role && @statuses.any?
workflows = Workflow.all(:conditions => {:role_id => @role.id, :tracker_id => @tracker.id})
@workflows = {}
@workflows['always'] = workflows.select {|w| !w.author && !w.assignee}
@workflows['author'] = workflows.select {|w| w.author}
@workflows['assignee'] = workflows.select {|w| w.assignee}
end
end
def copy
if params[:source_tracker_id].blank? || params[:source_tracker_id] == 'any'
@source_tracker = nil
else
@ -62,10 +70,10 @@ class WorkflowsController < ApplicationController
else
@source_role = Role.find_by_id(params[:source_role_id].to_i)
end
@target_trackers = params[:target_tracker_ids].blank? ? nil : Tracker.find_all_by_id(params[:target_tracker_ids])
@target_roles = params[:target_role_ids].blank? ? nil : Role.find_all_by_id(params[:target_role_ids])
if request.post?
if params[:source_tracker_id].blank? || params[:source_role_id].blank? || (@source_tracker.nil? && @source_role.nil?)
flash.now[:error] = l(:error_workflow_copy_source)
@ -84,7 +92,7 @@ class WorkflowsController < ApplicationController
def find_roles
@roles = Role.find(:all, :order => 'builtin, position')
end
def find_trackers
@trackers = Tracker.find(:all, :order => 'position')
end

37
app/drops/base_drop.rb Normal file
View File

@ -0,0 +1,37 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class BaseDrop < Liquid::Drop
def initialize(object)
@object = object unless object.respond_to?(:visible?) && !object.visible?
end
# Defines a Liquid method on the drop that is allowed to call the
# Ruby method directly. Best used for attributes.
#
# Based on Module#liquid_methods
def self.allowed_methods(*allowed_methods)
class_eval do
allowed_methods.each do |sym|
define_method sym do
if @object.respond_to?(:public_send)
@object.public_send(sym) rescue nil
else
@object.send(sym) rescue nil
end
end
end
end
end
end

79
app/drops/issue_drop.rb Normal file
View File

@ -0,0 +1,79 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class IssueDrop < BaseDrop
allowed_methods :id
allowed_methods :subject
allowed_methods :description
allowed_methods :project
allowed_methods :tracker
allowed_methods :status
allowed_methods :due_date
allowed_methods :category
allowed_methods :assigned_to
allowed_methods :priority
allowed_methods :fixed_version
allowed_methods :author
allowed_methods :created_on
allowed_methods :updated_on
allowed_methods :start_date
allowed_methods :done_ratio
allowed_methods :estimated_hours
allowed_methods :parent
def custom_field(name)
return '' unless name.present?
custom_field = IssueCustomField.find_by_name(name.strip)
return '' unless custom_field.present?
custom_value = @object.custom_value_for(custom_field)
if custom_value.present?
return custom_value.value
else
return ''
end
end
# TODO: both required, method_missing for Ruby and before_method for Liquid
# Allows accessing custom fields by their name:
#
# - issue.the_name_of_player => CustomField(:name => "The name Of Player")
#
def before_method(method_sym)
if custom_field_with_matching_name = has_custom_field_with_matching_name?(method_sym)
custom_field(custom_field_with_matching_name.name)
else
super
end
end
# Allows accessing custom fields by their name:
#
# - issue.the_name_of_player => CustomField(:name => "The name Of Player")
#
def method_missing(method_sym, *arguments, &block)
if custom_field_with_matching_name = has_custom_field_with_matching_name?(method_sym)
custom_field(custom_field_with_matching_name.name)
else
super
end
end
private
def has_custom_field_with_matching_name?(method_sym)
custom_field_with_matching_name = @object.available_custom_fields.detect {|custom_field|
custom_field.name.downcase.underscore.gsub(' ','_') == method_sym.to_s
}
end
end

View File

@ -0,0 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class IssueStatusDrop < BaseDrop
allowed_methods :name
end

View File

@ -0,0 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class PrincipalDrop < BaseDrop
allowed_methods :name
end

17
app/drops/project_drop.rb Normal file
View File

@ -0,0 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class ProjectDrop < BaseDrop
allowed_methods :name, :identifier
end

17
app/drops/tracker_drop.rb Normal file
View File

@ -0,0 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class TrackerDrop < BaseDrop
allowed_methods :name
end

View File

@ -0,0 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
class WikiPageDrop < BaseDrop
allowed_methods :title
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module AccountHelper
end

View File

@ -1,23 +1,20 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module AdminHelper
def project_status_options_for_select(selected)
options_for_select([[l(:label_all), ''],
options_for_select([[l(:label_all), ''],
[l(:status_active), 1]], selected)
end
end

View File

@ -1,27 +1,23 @@
# Redmine - project management software
# Copyright (C) 2006-2010 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
# See doc/COPYRIGHT.rdoc for more details.
#++
require 'forwardable'
require 'cgi'
module ApplicationHelper
include Redmine::WikiFormatting::Macros::Definitions
include Redmine::I18n
include GravatarHelper::PublicMethods
include Gravatarify::Helper
extend Forwardable
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
@ -61,9 +57,14 @@ module ApplicationHelper
end
end
# Show a sorted linkified (if active) comma-joined list of users
def list_users(users, options={})
users.sort.collect{|u| link_to_user(u, options)}.join(", ")
end
# Displays a link to +issue+ with its subject.
# Examples:
#
#
# link_to_issue(issue) # => Defect #6: This is the subject
# link_to_issue(issue, :truncate => 6) # => Defect #6: This i...
# link_to_issue(issue, :subject => false) # => Defect #6
@ -80,7 +81,7 @@ module ApplicationHelper
subject = truncate(subject, :length => options[:truncate])
end
end
s = link_to "#{issue.tracker} ##{issue.id}", {:controller => "issues", :action => "show", :id => issue},
s = link_to "#{h(issue.tracker)} ##{issue.id}", {:controller => "issues", :action => "show", :id => issue},
:class => issue.css_classes,
:title => title
s << ": #{h subject}" if subject
@ -106,10 +107,10 @@ module ApplicationHelper
text = options.delete(:text) || format_revision(revision)
rev = revision.respond_to?(:identifier) ? revision.identifier : revision
link_to(text, {:controller => 'repositories', :action => 'revision', :id => project, :rev => rev},
link_to(h(text), {:controller => 'repositories', :action => 'revision', :id => project, :rev => rev},
:title => l(:label_revision_id, format_revision(revision)))
end
# Generates a link to a message
def link_to_message(message, options={}, html_options = nil)
link_to(
@ -126,7 +127,7 @@ module ApplicationHelper
# Generates a link to a project if active
# Examples:
#
#
# link_to_project(project) # => link to the specified project overview
# link_to_project(project, :action=>'settings') # => link to project settings
# link_to_project(project, {:only_path => false}, :class => "project") # => 3rd arg adds html options
@ -160,15 +161,15 @@ module ApplicationHelper
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)
end
def format_activity_description(text)
h(truncate(text.to_s, :length => 120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...')).gsub(/[\r\n]+/, "<br />")
end
@ -180,29 +181,29 @@ module ApplicationHelper
h("#{version.project} - #{version}")
end
end
def due_date_distance_in_words(date)
if date
l((date < Date.today ? :label_roadmap_overdue : :label_roadmap_due_in), distance_of_date_in_words(Date.today, date))
end
end
def render_page_hierarchy(pages, node=nil)
def render_page_hierarchy(pages, node=nil, options={})
content = ''
if pages[node]
content << "<ul class=\"pages-hierarchy\">\n"
pages[node].each do |page|
content << "<li>"
content << link_to(h(page.pretty_title), {:controller => 'wiki', :action => 'show', :project_id => page.project, :id => page.title},
:title => (page.respond_to?(:updated_on) ? l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on)) : nil))
content << "\n" + render_page_hierarchy(pages, page.id) if pages[page.id]
:title => (options[:timestamp] && page.updated_on ? l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on)) : nil))
content << "\n" + render_page_hierarchy(pages, page.id, options) if pages[page.id]
content << "</li>\n"
end
content << "</ul>\n"
end
content
end
# Renders flash messages
def render_flash_messages
s = ''
@ -211,7 +212,7 @@ module ApplicationHelper
end
s
end
# Renders tabs and their content
def render_tabs(tabs)
if tabs.any?
@ -220,23 +221,20 @@ module ApplicationHelper
content_tag 'p', l(:label_no_data), :class => "nodata"
end
end
# Renders the project quick-jump box
def render_project_jump_box
# Retrieve them now to avoid a COUNT query
projects = User.current.projects.all
def render_project_jump_box(projects = [], html_options = {})
projects ||= User.current.memberships.collect(&:project).compact.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) }
end
s << '</select>'
s
# option_tags = content_tag :option, l(:label_jump_to_a_project), :value => ""
option_tags = (content_tag :option, "", :value => "" )
option_tags << project_tree_options_for_select(projects, :selected => @project) do |p|
{ :value => url_for(:controller => 'projects', :action => 'show', :id => p, :jump => current_menu_item) }
end
select_tag "", option_tags, html_options.merge({ :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|
@ -252,14 +250,14 @@ module ApplicationHelper
end
s
end
# Yields the given block for each project with its level in the tree
#
# Wrapper for Project#project_tree
def project_tree(projects, &block)
Project.project_tree(projects, &block)
end
def project_nested_ul(projects, &block)
s = ''
if projects.any?
@ -270,7 +268,7 @@ module ApplicationHelper
else
ancestors.pop
s << "</li>"
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
ancestors.pop
s << "</ul></li>\n"
end
@ -283,20 +281,28 @@ module ApplicationHelper
end
s
end
def principals_check_box_tags(name, principals)
s = ''
principals.sort.each do |principal|
s << "<label>#{ check_box_tag name, principal.id, false } #{h principal}</label>\n"
s << "<label style='display:block;'>#{ check_box_tag name, principal.id, false } #{h principal}</label>\n"
end
s
s
end
def projects_check_box_tags(name, projects)
s = ''
projects.each do |project|
s << "<label>#{ check_box_tag name, project.id, false } #{h project}</label>\n"
end
s
end
# Truncates and returns the string as a single line
def truncate_single_line(string, *args)
truncate(string.to_s, *args).gsub(%r{[\r\n]+}m, ' ')
end
# Truncates at line break after 250 characters or options[:length]
def truncate_lines(string, options={})
length = options[:length] || 250
@ -314,7 +320,7 @@ module ApplicationHelper
def authoring(created, author, options={})
l(options[:label] || :label_added_time_by, :author => link_to_user(author), :age => time_tag(created))
end
def time_tag(time)
text = distance_of_time_in_words(Time.now, time)
if @project
@ -341,15 +347,15 @@ module ApplicationHelper
html = ''
if paginator.current.previous
html << link_to_remote_content_update('&#171; ' + l(:label_previous), url_param.merge(page_param => paginator.current.previous)) + ' '
html << link_to_content_update('&#171; ' + l(:label_previous), url_param.merge(page_param => paginator.current.previous)) + ' '
end
html << (pagination_links_each(paginator, options) do |n|
link_to_remote_content_update(n.to_s, url_param.merge(page_param => n))
link_to_content_update(n.to_s, url_param.merge(page_param => n))
end || '')
if paginator.current.next
html << ' ' + link_to_remote_content_update((l(:label_next) + ' &#187;'), url_param.merge(page_param => paginator.current.next))
html << ' ' + link_to_content_update((l(:label_next) + ' &#187;'), url_param.merge(page_param => paginator.current.next))
end
unless count.nil?
@ -361,20 +367,14 @@ module ApplicationHelper
html
end
def per_page_links(selected=nil)
url_param = params.dup
url_param.clear if url_param.has_key?(:set_filter)
def per_page_links(selected=nil)
links = Setting.per_page_options_array.collect do |n|
n == selected ? n : link_to_remote(n, {:update => "content",
:url => params.dup.merge(:per_page => n),
:method => :get},
{:href => url_for(url_param.merge(:per_page => 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
end
def reorder_links(name, url)
link_to(image_tag('2uparrow.png', :alt => l(:label_sort_highest)), url.merge({"#{name}[move_to]" => 'highest'}), :method => :post, :title => l(:label_sort_highest)) +
link_to(image_tag('1uparrow.png', :alt => l(:label_sort_higher)), url.merge({"#{name}[move_to]" => 'higher'}), :method => :post, :title => l(:label_sort_higher)) +
@ -386,15 +386,17 @@ module ApplicationHelper
elements = args.flatten
elements.any? ? content_tag('p', args.join(' &#187; ') + ' &#187; ', :class => 'breadcrumb') : nil
end
def other_formats_links(&block)
concat('<p class="other-formats">' + l(:label_export_to))
yield Redmine::Views::OtherFormatsBuilder.new(self)
concat('</p>')
end
def page_header_title
if @project.nil? || @project.new_record?
if @page_header_title.present?
h(@page_header_title)
elsif @project.nil? || @project.new_record?
h(Setting.app_title)
else
b = []
@ -416,9 +418,9 @@ module ApplicationHelper
def html_title(*args)
if args.empty?
title = []
title << @project.name if @project
title << h(@project.name) if @project
title += @html_title if @html_title
title << Setting.app_title
title << h(Setting.app_title)
title.select {|t| !t.blank? }.join(' - ')
else
@html_title ||= []
@ -434,8 +436,9 @@ module ApplicationHelper
css << 'theme-' + theme.name
end
css << 'controller-' + params[:controller]
css << 'action-' + params[:action]
css << 'project-' + @project.id.to_s if @project.present?
css << 'controller-' + params[:controller] if params[:controller]
css << 'action-' + params[:action] if params[:action]
css.join(' ')
end
@ -452,34 +455,66 @@ module ApplicationHelper
case args.size
when 1
obj = options[:object]
text = args.shift
input_text = args.shift
when 2
obj = args.shift
attr = args.shift
text = obj.send(attr).to_s
input_text = obj.send(attr).to_s
else
raise ArgumentError, 'invalid arguments to textilizable'
end
return '' if text.blank?
return '' if input_text.blank?
project = options[:project] || @project || (obj && obj.respond_to?(:project) ? obj.project : nil)
only_path = options.delete(:only_path) == false ? false : true
text = Redmine::WikiFormatting.to_html(Setting.text_formatting, text, :object => obj, :attribute => attr) { |macro, args| exec_macro(macro, obj, args) }
begin
text = ChiliProject::Liquid::Legacy.run_macros(input_text)
liquid_template = ChiliProject::Liquid::Template.parse(text)
liquid_variables = get_view_instance_variables_for_liquid
liquid_variables.merge!({'current_user' => User.current})
liquid_variables.merge!({'toc' => '{{toc}}'}) # Pass toc through to replace later
liquid_variables.merge!(ChiliProject::Liquid::Variables.all)
# Pass :view in a register so this view (with helpers) can be used inside of a tag
text = liquid_template.render(liquid_variables, :registers => {:view => self, :object => obj, :attribute => attr})
# Add Liquid errors to the log
if Rails.logger && Rails.logger.debug?
msg = ""
liquid_template.errors.each do |exception|
msg << "[Liquid Error] #{exception.message}\n:\n#{exception.backtrace.join("\n")}"
msg << "\n\n"
end
Rails.logger.debug msg
end
rescue Liquid::SyntaxError => exception
msg = "[Liquid Syntax Error] #{exception.message}"
if Rails.logger && Rails.logger.debug?
log_msg = "#{msg}\n"
log_msg << exception.backtrace.collect{ |str| " #{str}" }.join("\n")
log_msg << "\n\n"
Rails.logger.debug log_msg
end
# Skip Liquid if there is a syntax error
text = content_tag(:div, msg, :class => "flash error")
text << h(input_text)
end
@parsed_headings = []
text = parse_non_pre_blocks(text) do |text|
[:parse_inline_attachments, :parse_wiki_links, :parse_redmine_links, :parse_headings].each do |method_name|
[:parse_inline_attachments, :parse_wiki_links, :parse_redmine_links, :parse_headings, :parse_relative_urls].each do |method_name|
send method_name, text, project, obj, attr, only_path, options
end
end
if @parsed_headings.any?
replace_toc(text, @parsed_headings)
end
text
end
def parse_non_pre_blocks(text)
s = StringScanner.new(text)
tags = []
@ -508,13 +543,48 @@ module ApplicationHelper
end
parsed
end
RELATIVE_LINK_RE = %r{
<a
(?:
(\shref=
(?: # the href and link
(?:'(\/[^>]+?)')|
(?:"(\/[^>]+?)")
)
)|
[^>]
)*
>
[^<]*?<\/a> # content and closing link tag.
}x unless const_defined?(:RELATIVE_LINK_RE)
def parse_relative_urls(text, project, obj, attr, only_path, options)
return if only_path
text.gsub!(RELATIVE_LINK_RE) do |m|
href, relative_url = $1, $2 || $3
next m unless href.present?
if defined?(request) && request.present?
# we have a request!
protocol, host_with_port = request.protocol, request.host_with_port
elsif @controller
# use the same methods as url_for in the Mailer
url_opts = @controller.class.default_url_options
next m unless url_opts && url_opts[:protocol] && url_opts[:host]
protocol, host_with_port = "#{url_opts[:protocol]}://", url_opts[:host]
else
next m
end
m.sub href, " href=\"#{protocol}#{host_with_port}#{relative_url}\""
end
end
def parse_inline_attachments(text, project, obj, attr, only_path, options)
# when using an image link, try to use an attachment, if possible
if options[:attachments] || (obj && obj.respond_to?(:attachments))
attachments = nil
text.gsub!(/src="([^\/"]+\.(bmp|gif|jpg|jpeg|png))"(\s+alt="([^"]*)")?/i) do |m|
filename, ext, alt, alttext = $1.downcase, $2, $3, $4
filename, ext, alt, alttext = $1.downcase, $2, $3, $4
attachments ||= (options[:attachments] || obj.attachments).sort_by(&:created_on).reverse
# search for the picture in attachments
if found = attachments.detect { |att| att.filename.downcase == filename }
@ -567,7 +637,7 @@ module ApplicationHelper
wiki_page_id = page.present? ? Wiki.titleize(page) : nil
url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, :id => wiki_page_id, :anchor => anchor)
end
link_to((title || page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
link_to(h(title || page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new')))
else
# project or wiki doesn't exist
all
@ -577,7 +647,7 @@ module ApplicationHelper
end
end
end
# Redmine links
#
# Examples:
@ -621,7 +691,7 @@ module ApplicationHelper
if prefix.nil? && sep == 'r'
# project.changesets.visible raises an SQL error because of a double join on repositories
if project && project.repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(project.repository.id, identifier))
link = link_to("#{project_prefix}r#{identifier}", {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision},
link = link_to(h("#{project_prefix}r#{identifier}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.revision},
:class => 'changeset',
:title => truncate_single_line(changeset.comments, :length => 100))
end
@ -671,7 +741,7 @@ module ApplicationHelper
if project && project.repository && (changeset = Changeset.visible.find(:first, :conditions => ["repository_id = ? AND scmid LIKE ?", project.repository.id, "#{name}%"]))
link = link_to h("#{project_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :rev => changeset.identifier},
:class => 'changeset',
:title => truncate_single_line(changeset.comments, :length => 100)
:title => truncate_single_line(h(changeset.comments), :length => 100)
end
when 'source', 'export'
if project && project.repository && User.current.allowed_to?(:browse_repository, project)
@ -700,35 +770,39 @@ module ApplicationHelper
leading + (link || "#{project_prefix}#{prefix}#{sep}#{identifier}")
end
end
HEADING_RE = /<h(1|2|3|4)( [^>]+)?>(.+?)<\/h(1|2|3|4)>/i unless const_defined?(:HEADING_RE)
# Headings and TOC
# Adds ids and links to headings unless options[:headings] is set to false
def parse_headings(text, project, obj, attr, only_path, options)
return if options[:headings] == false
text.gsub!(HEADING_RE) do
level, attrs, content = $1.to_i, $2, $3
item = strip_tags(content).strip
anchor = item.gsub(%r{[^\w\s\-]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
@parsed_headings << [level, anchor, item]
"<h#{level} #{attrs} id=\"#{anchor}\">#{content}<a href=\"##{anchor}\" class=\"wiki-anchor\">&para;</a></h#{level}>"
"<a name=\"#{anchor}\"></a>\n<h#{level} #{attrs}>#{content}<a href=\"##{anchor}\" class=\"wiki-anchor\">&para;</a></h#{level}>"
end
end
TOC_RE = /<p>\{\{([<>]?)toc\}\}<\/p>/i unless const_defined?(:TOC_RE)
TOC_RE = /<p>\{%\s*toc(_right|_left)?\s*%\}<\/p>/i unless const_defined?(:TOC_RE)
# Renders the TOC with given headings
def replace_toc(text, headings)
text.gsub!(TOC_RE) do
if headings.empty?
''
else
div_class = 'toc'
div_class << ' right' if $1 == '>'
div_class << ' left' if $1 == '<'
out = "<ul class=\"#{div_class}\"><li>"
toc_class = 'toc'
toc_class << ' right' if $1 == '_right'
toc_class << ' left' if $1 == '_left'
out = "<fieldset class=\"header_collapsible collapsible #{toc_class}\">"
out << "<legend onclick=\"toggleFieldset(this);\"><span>#{l(:label_toc)}</span></legend>"
out << "<div>"
out << "<ul class=\"toc\"><li>"
root = headings.map(&:first).min
current = root
started = false
@ -746,6 +820,7 @@ module ApplicationHelper
end
out << '</li></ul>' * (current - root)
out << '</li></ul>'
out << '</div></fieldset>'
end
end
end
@ -777,7 +852,7 @@ module ApplicationHelper
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)) unless back_url.blank?
hidden_field_tag('back_url', CGI.escape(back_url), :id => nil) unless back_url.blank?
end
def check_all_links(form_name)
@ -793,25 +868,23 @@ module ApplicationHelper
pcts << (100 - pcts[1] - pcts[0])
width = options[:width] || '100px;'
legend = options[:legend] || ''
content_tag('table',
content_tag('tr',
(pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed') : '') +
(pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done') : '') +
(pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo') : '')
), :class => 'progress', :style => "width: #{width};") +
content_tag('div',
content_tag('div', '', :style => "width: #{pcts[0]}%;", :class => 'closed ui-progressbar-value ui-widget-header ui-corner-left') +
content_tag('div', '', :style => "width: #{pcts[1]}%;", :class => 'done ui-progressbar-value ui-widget-header'),
:class => 'progress ui-progressbar ui-widget ui-widget-content ui-corner-all', :style => "width: #{width};") +
content_tag('p', legend, :class => 'pourcent')
end
def checked_image(checked=true)
if checked
image_tag 'toggle_check.png'
end
end
def context_menu(url)
unless @context_menu_included
content_for :header_tags do
javascript_include_tag('context_menu') +
javascript_include_tag('context_menu.jquery') +
stylesheet_link_tag('context_menu')
end
if l(:direction) == 'rtl'
@ -821,7 +894,7 @@ module ApplicationHelper
end
@context_menu_included = true
end
javascript_tag "new ContextMenu('#{ url_for(url) }')"
javascript_tag "jQuery(document).ContextMenu('#{ url_for(url) }')"
end
def context_menu_link(name, url, options={})
@ -837,35 +910,29 @@ module ApplicationHelper
options[:class] << ' disabled'
url = '#'
end
link_to name, url, options
link_to h(name), url, options
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("jQuery('##{field_id}').datepicker(datepickerSettings)")
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
else
'' # use language
end
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')
end
def jquery_datepicker_settings
start_of_week = Setting.start_of_week.to_s
start_of_week_string = start_of_week.present? ? "firstDay: '#{start_of_week}', " : ''
script = javascript_tag("var datepickerSettings = {" +
start_of_week_string +
"showOn: 'both', " +
"buttonImage: '" + path_to_image('/images/calendar.png') + "', " +
"buttonImageOnly: true, " +
"showButtonPanel: true, " +
"dateFormat: 'yy-mm-dd' " +
"}")
unless current_language == :en
jquery_locale = l("jquery.ui", :default => current_language.to_s)
script << javascript_include_tag("libs/ui/i18n/jquery.ui.datepicker-#{jquery_locale}.js")
end
script
end
def content_for(name, content = nil, &block)
@ -878,10 +945,29 @@ module ApplicationHelper
(@has_content && @has_content[name]) || false
end
# Returns the gravatar image tag for the given email
# +email+ is a string with an email address
def gravatar(email, options={})
gravatarify_options = {}
gravatarify_options[:secure] = options.delete :ssl
[:default, :size, :rating, :filetype].each {|key| gravatarify_options[key] = options.delete key}
# Default size is 50x50 px
gravatarify_options[:size] ||= 50
options[:class] ||= 'gravatar'
gravatarify_options[:html] = options
gravatar_tag email, gravatarify_options
end
# Returns the avatar image tag for the given +user+ if avatars are enabled
# +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?
if user.is_a?(Group)
size = options[:size] || 50
size = "#{size}x#{size}" # image_tag uses WxH
options[:class] ||= 'gravatar'
return image_tag("group.png", options.merge(:size => size))
end
options.merge!({:ssl => (defined?(request) && request.ssl?), :default => Setting.gravatar_default})
email = nil
if user.respond_to?(:mail)
@ -895,6 +981,16 @@ module ApplicationHelper
end
end
# Returns the javascript tags that are included in the html layout head
def javascript_heads
tags = javascript_include_tag(:defaults)
unless User.current.pref.warn_on_leaving_unsaved == '0'
tags << "\n" + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
end
tags << jquery_datepicker_settings
tags
end
def favicon
"<link rel='shortcut icon' href='#{image_path('/favicon.ico')}' />"
end
@ -906,7 +1002,7 @@ module ApplicationHelper
def robot_exclusion_tag(content="NOINDEX,FOLLOW,NOARCHIVE")
"<meta name='ROBOTS' content='#{h(content)}' />"
end
# Returns true if arg is expected in the API response
def include_in_api_response?(arg)
unless @included_in_api_response
@ -928,7 +1024,73 @@ module ApplicationHelper
options
end
end
# Expands the current menu item using JavaScript based on the params
def expand_current_menu
current_menu_class =
case
when params[:controller] == "timelog"
"reports"
when params[:controller] == 'projects' && params[:action] == 'changelog'
"reports"
when params[:controller] == 'issues' && ['calendar','gantt'].include?(params[:action])
"reports"
when params[:controller] == 'projects' && params[:action] == 'roadmap'
'roadmap'
when params[:controller] == 'versions' && params[:action] == 'show'
'roadmap'
when params[:controller] == 'projects' && params[:action] == 'settings'
'settings'
when params[:controller] == 'contracts' || params[:controller] == 'deliverables'
'contracts'
else
params[:controller]
end
javascript_tag("jQuery.menu_expand({ menuItem: '.#{current_menu_class}' });")
end
# Menu items for the main top menu
def main_top_menu_items
split_top_menu_into_main_or_more_menus[:main]
end
# Menu items for the more top menu
def more_top_menu_items
split_top_menu_into_main_or_more_menus[:more]
end
def help_menu_item
split_top_menu_into_main_or_more_menus[:help]
end
# Split the :top_menu into separate :main and :more items
def split_top_menu_into_main_or_more_menus
unless @top_menu_split
items_for_main_level = []
items_for_more_level = []
help_menu = nil
menu_items_for(:top_menu) do |item|
if item.name == :home || item.name == :my_page
items_for_main_level << item
elsif item.name == :help
help_menu = item
elsif item.name == :projects
# Remove, present in layout
else
items_for_more_level << item
end
end
@top_menu_split = {
:main => items_for_main_level,
:more => items_for_more_level,
:help => help_menu
}
end
@top_menu_split
end
private
def wiki_helper
@ -936,12 +1098,24 @@ module ApplicationHelper
extend helper
return self
end
def link_to_remote_content_update(text, url_params)
link_to_remote(text,
{:url => url_params, :method => :get, :update => 'content', :complete => 'window.scrollTo(0,0)'},
{:href => url_for(:params => url_params)}
)
def link_to_content_update(text, url_params = {}, html_options = {})
link_to(text, url_params, html_options)
end
def get_view_instance_variables_for_liquid
internal_variables = %w{
@output_buffer @cookies @helpers @real_format @assigns_added @assigns
@view_paths @controller
}
self.instance_variables.collect(&:to_s).reject do |ivar|
ivar.match(/^@_/) || # Rails "internal" variables: @_foo
ivar.match(/^@template/) ||
internal_variables.include?(ivar)
end.inject({}) do |acc,ivar|
acc[ivar.sub('@','')] = instance_variable_get(ivar)
acc
end
end
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module AttachmentsHelper
# Displays view/delete links to the attachments of the given object
@ -21,21 +18,21 @@ module AttachmentsHelper
# :author -- author names are not displayed if set to false
def link_to_attachments(container, options = {})
options.assert_valid_keys(:author)
if container.attachments.any?
options = {:deletable => container.attachments_deletable?, :author => true}.merge(options)
render :partial => 'attachments/links', :locals => {:attachments => container.attachments, :options => options}
end
end
def to_utf8(str)
def to_utf8_for_attachments(str)
if str.respond_to?(:force_encoding)
str.force_encoding('UTF-8')
return str if str.valid_encoding?
else
return str if /\A[\r\n\t\x20-\x7e]*\Z/n.match(str) # for us-ascii
end
begin
Iconv.conv('UTF-8//IGNORE', 'UTF-8', str + ' ')[0..-3]
rescue Iconv::InvalidEncoding

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module AuthSourcesHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module BoardsHelper
end

View File

@ -1,3 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module CalendarsHelper
def link_to_previous_month(year, month, options={})
target_year, target_month = if month == 1
@ -5,14 +19,14 @@ module CalendarsHelper
else
[year, month - 1]
end
name = if target_month == 12
"#{month_name(target_month)} #{target_year}"
else
"#{month_name(target_month)}"
end
link_to_month(('&#171; ' + name), target_year, target_month, options)
link_to_month(('&#171; ' + h(name)), target_year, target_month, options)
end
def link_to_next_month(year, month, options={})
@ -28,18 +42,10 @@ module CalendarsHelper
"#{month_name(target_month)}"
end
link_to_month((name + ' &#187;'), target_year, target_month, options)
link_to_month((h(name) + ' &#187;'), target_year, target_month, options)
end
def link_to_month(link_name, year, month, options={})
project_id = options[:project].present? ? options[:project].to_param : nil
link_target = calendar_path(:year => year, :month => month, :project_id => project_id)
link_to_remote(link_name,
{:update => "content", :url => link_target, :method => :put},
{:href => link_target})
link_to_content_update(link_name, params.merge(:year => year, :month => month))
end
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module CustomFieldsHelper
@ -29,53 +26,51 @@ module CustomFieldsHelper
{:name => 'DocumentCategoryCustomField', :partial => 'custom_fields/index', :label => DocumentCategory::OptionName}
]
end
# Return custom field html tag corresponding to its format
def custom_field_tag(name, custom_value)
def custom_field_tag(name, custom_value)
custom_field = custom_value.custom_field
field_name = "#{name}[custom_field_values][#{custom_field.id}]"
field_id = "#{name}_custom_field_values_#{custom_field.id}"
field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
case field_format.edit_as
case field_format.try(:edit_as)
when "date"
text_field_tag(field_name, custom_value.value, :id => field_id, :size => 10) +
calendar_for(field_id)
date_field_tag(field_name, custom_value.value, :id => field_id, :size => 10)
when "text"
text_area_tag(field_name, custom_value.value, :id => field_id, :rows => 3, :style => 'width:90%')
when "bool"
hidden_field_tag(field_name, '0') + check_box_tag(field_name, '1', custom_value.true?, :id => field_id)
when "list"
blank_option = custom_field.is_required? ?
(custom_field.default_value.blank? ? "<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>" : '') :
(custom_field.default_value.blank? ? "<option value=\"\">--- #{l(:actionview_instancetag_blank_option)} ---</option>" : '') :
'<option></option>'
select_tag(field_name, blank_option + options_for_select(custom_field.possible_values, custom_value.value), :id => field_id)
select_tag(field_name, blank_option + options_for_select(custom_field.possible_values_options(custom_value.customized), custom_value.value), :id => field_id)
else
text_field_tag(field_name, custom_value.value, :id => field_id)
end
end
# Return custom field label tag
def custom_field_label_tag(name, custom_value)
content_tag "label", custom_value.custom_field.name +
content_tag "label", h(custom_value.custom_field.name) +
(custom_value.custom_field.is_required? ? " <span class=\"required\">*</span>" : ""),
:for => "#{name}_custom_field_values_#{custom_value.custom_field.id}",
:class => (custom_value.errors.empty? ? nil : "error" )
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)
end
def custom_field_tag_for_bulk_edit(name, custom_field)
field_name = "#{name}[custom_field_values][#{custom_field.id}]"
field_id = "#{name}_custom_field_values_#{custom_field.id}"
field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
case field_format.edit_as
case field_format.try(:edit_as)
when "date"
text_field_tag(field_name, '', :id => field_id, :size => 10) +
calendar_for(field_id)
date_field_tag(field_name, '', :id => field_id, :size => 10)
when "text"
text_area_tag(field_name, '', :id => field_id, :rows => 3, :style => 'width:90%')
when "bool"
@ -83,7 +78,7 @@ module CustomFieldsHelper
[l(:general_text_yes), '1'],
[l(:general_text_no), '0']]), :id => field_id)
when "list"
select_tag(field_name, options_for_select([[l(:label_no_change_option), '']] + custom_field.possible_values), :id => field_id)
select_tag(field_name, options_for_select([[l(:label_no_change_option), '']] + custom_field.possible_values_options), :id => field_id)
else
text_field_tag(field_name, '', :id => field_id)
end
@ -94,17 +89,17 @@ module CustomFieldsHelper
return "" unless custom_value
format_value(custom_value.value, custom_value.custom_field.field_format)
end
# Return a string used to display a custom value
def format_value(value, field_format)
Redmine::CustomFieldFormat.format_value(value, field_format) # Proxy
end
# Return an array of custom field formats which can be used in select_tag
def custom_field_formats_for_select
Redmine::CustomFieldFormat.as_select
def custom_field_formats_for_select(custom_field)
Redmine::CustomFieldFormat.as_select(custom_field.class.customized_class.name)
end
# Renders the custom_values in api views
def render_api_custom_values(custom_values, api)
api.array :custom_fields do

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module DocumentsHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module EnumerationsHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module GanttHelper
@ -21,29 +18,21 @@ module GanttHelper
case in_or_out
when :in
if gantt.zoom < 4
link_to_remote(l(:text_zoom_in),
{:url => gantt.params.merge(:zoom => (gantt.zoom+1)), :method => :get, :update => 'content'},
{:href => url_for(gantt.params.merge(:zoom => (gantt.zoom+1))),
:class => 'icon icon-zoom-in'})
link_to_content_update l(:text_zoom_in),
params.merge(gantt.params.merge(:zoom => (gantt.zoom+1))),
:class => 'icon icon-zoom-in'
else
content_tag('span', l(:text_zoom_in), :class => 'icon icon-zoom-in')
end
when :out
if gantt.zoom > 1
link_to_remote(l(:text_zoom_out),
{:url => gantt.params.merge(:zoom => (gantt.zoom-1)), :method => :get, :update => 'content'},
{:href => url_for(gantt.params.merge(:zoom => (gantt.zoom-1))),
:class => 'icon icon-zoom-out'})
link_to_content_update l(:text_zoom_out),
params.merge(gantt.params.merge(:zoom => (gantt.zoom-1))),
:class => 'icon icon-zoom-out'
else
content_tag('span', l(:text_zoom_out), :class => 'icon icon-zoom-out')
end
end
end
def number_of_issues_on_versions(gantt)
versions = gantt.events.collect {|event| (event.is_a? Version) ? event : nil}.compact
versions.sum {|v| v.fixed_issues.for_gantt.with_query(@query).count}
end
end

View File

@ -1,19 +1,16 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module GroupsHelper
# Options for the new membership projects combo-box
@ -24,7 +21,7 @@ module GroupsHelper
end
options
end
def group_settings_tabs
tabs = [{:name => 'general', :partial => 'groups/general', :label => :label_general},
{:name => 'users', :partial => 'groups/users', :label => :label_user_plural},

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module IssueCategoriesHelper
end

View File

@ -1,2 +1,16 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module IssueMovesHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module IssueRelationsHelper
def collection_for_relation_type_select

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module IssueStatusesHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module IssuesHelper
include ApplicationHelper
@ -48,23 +45,25 @@ module IssuesHelper
link_to_issue(issue) + "<br /><br />" +
"<strong>#{@cached_label_project}</strong>: #{link_to_project(issue.project)}<br />" +
"<strong>#{@cached_label_status}</strong>: #{issue.status.name}<br />" +
"<strong>#{@cached_label_status}</strong>: #{h(issue.status.name)}<br />" +
"<strong>#{@cached_label_start_date}</strong>: #{format_date(issue.start_date)}<br />" +
"<strong>#{@cached_label_due_date}</strong>: #{format_date(issue.due_date)}<br />" +
"<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" +
"<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}"
"<strong>#{@cached_label_assigned_to}</strong>: #{h(issue.assigned_to)}<br />" +
"<strong>#{@cached_label_priority}</strong>: #{h(issue.priority.name)}"
end
# TODO: deprecate and/or remove
def render_issue_subject_with_tree(issue)
s = ''
issue.ancestors.each do |ancestor|
s << '<div>' + content_tag('p', link_to_issue(ancestor))
ancestors = issue.root? ? [] : issue.ancestors.all
ancestors.each do |ancestor|
s << '<div>' + content_tag('h2', link_to_issue(ancestor))
end
s << '<div>' + content_tag('h3', h(issue.subject))
s << '</div>' * (issue.ancestors.size + 1)
s << '<div class="subject">' + content_tag('h2', h(issue.subject))
s << '</div>' * (ancestors.size + 1)
s
end
def render_descendants_tree(issue)
s = '<form><table class="list issues">'
issue_list(issue.descendants.sort_by(&:lft)) do |child, level|
@ -79,7 +78,23 @@ module IssuesHelper
s << '</form></table>'
s
end
def render_parents_and_subtree(issue)
return if issue.leaf? && !issue.parent
s = '<form><table id="issue_tree" class="list">'
issue_list(issue.self_and_ancestors.sort_by(&:lft) + issue.descendants.sort_by(&:lft)) do |el, level|
s << content_tag('tr',
content_tag('td', check_box_tag("ids[]", el.id, false, :id => nil), :class => 'checkbox') +
content_tag('td', link_to_issue(el, :truncate => 60), :class => 'subject') +
content_tag('td', h(el.status)) +
content_tag('td', link_to_user(el.assigned_to)) +
content_tag('td', progress_bar(el.done_ratio, :width => '80px')),
:class => "issue issue-#{el.id} #{"self" if el == issue} hascontextmenu #{level > 0 ? "idnt idnt-#{level}" : nil}")
end
s << '</table></form>'
s
end
def render_custom_fields_rows(issue)
return if issue.custom_field_values.empty?
ordered_values = []
@ -98,86 +113,38 @@ module IssuesHelper
s << "</tr>\n"
s
end
def sidebar_queries
unless @sidebar_queries
# User can see public queries and his own queries
visible = ARCondition.new(["is_public = ? OR user_id = ?", true, (User.current.logged? ? User.current.id : 0)])
# Project specific queries and global queries
visible << (@project.nil? ? ["project_id IS NULL"] : ["project_id IS NULL OR project_id = ?", @project.id])
@sidebar_queries = Query.find(:all,
:select => 'id, name',
@sidebar_queries = Query.find(:all,
:select => 'id, name, is_public',
:order => "name ASC",
:conditions => visible.conditions)
end
@sidebar_queries
end
def show_detail(detail, no_html=false)
case detail.property
when 'attr'
field = detail.prop_key.to_s.gsub(/\_id$/, "")
label = l(("field_" + field).to_sym)
case
when ['due_date', 'start_date'].include?(detail.prop_key)
value = format_date(detail.value.to_date) if detail.value
old_value = format_date(detail.old_value.to_date) if detail.old_value
def query_links(title, queries)
# links to #index on issues/show
url_params = controller_name == 'issues' ? {:controller => 'issues', :action => 'index', :project_id => @project} : params
when ['project_id', 'status_id', 'tracker_id', 'assigned_to_id', 'priority_id', 'category_id', 'fixed_version_id'].include?(detail.prop_key)
value = find_name_by_reflection(field, detail.value)
old_value = find_name_by_reflection(field, detail.old_value)
content_tag('h3', h(title)) +
queries.collect {|query|
link_to(h(query.name), url_params.merge(:query_id => query))
}.join('<br />')
end
when detail.prop_key == 'estimated_hours'
value = "%0.02f" % detail.value.to_f unless detail.value.blank?
old_value = "%0.02f" % detail.old_value.to_f unless detail.old_value.blank?
when detail.prop_key == 'parent_id'
label = l(:field_parent_issue)
value = "##{detail.value}" unless detail.value.blank?
old_value = "##{detail.old_value}" unless detail.old_value.blank?
end
when 'cf'
custom_field = CustomField.find_by_id(detail.prop_key)
if custom_field
label = custom_field.name
value = format_value(detail.value, custom_field.field_format) if detail.value
old_value = format_value(detail.old_value, custom_field.field_format) if detail.old_value
end
when 'attachment'
label = l(:label_attachment)
end
call_hook(:helper_issues_show_detail_after_setting, {:detail => detail, :label => label, :value => value, :old_value => old_value })
label ||= detail.prop_key
value ||= detail.value
old_value ||= detail.old_value
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 or detail.value.empty?)
if detail.property == 'attachment' && !value.blank? && a = Attachment.find_by_id(detail.prop_key)
# Link to the attachment if it has not been removed
value = link_to_attachment(a)
else
value = content_tag("i", h(value)) if value
end
end
if !detail.value.blank?
case detail.property
when 'attr', 'cf'
if !detail.old_value.blank?
l(:text_journal_changed, :label => label, :old => old_value, :new => value)
else
l(:text_journal_set_to, :label => label, :value => value)
end
when 'attachment'
l(:text_journal_added, :label => label, :value => value)
end
else
l(:text_journal_deleted, :label => label, :old => old_value)
end
def render_sidebar_queries
out = ''
queries = sidebar_queries.select {|q| !q.is_public?}
out << query_links(l(:label_my_queries), queries) if queries.any?
queries = sidebar_queries.select {|q| q.is_public?}
out << query_links(l(:label_query_plural), queries) if queries.any?
out
end
# Find the name of an associated record stored in the field attribute
@ -188,7 +155,7 @@ module IssuesHelper
return record.name if record
end
end
# Renders issue children recursively
def render_api_issue_children(issue, api)
return if issue.leaf?
@ -202,14 +169,14 @@ module IssuesHelper
end
end
end
def issues_to_csv(issues, project = nil)
ic = Iconv.new(l(:general_csv_encoding), 'UTF-8')
ic = Iconv.new(l(:general_csv_encoding), 'UTF-8')
decimal_separator = l(:general_csv_decimal_separator)
export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv|
# csv header fields
headers = [ "#",
l(:field_status),
l(:field_status),
l(:field_project),
l(:field_tracker),
l(:field_priority),
@ -236,9 +203,9 @@ module IssuesHelper
# csv lines
issues.each do |issue|
fields = [issue.id,
issue.status.name,
issue.status.name,
issue.project.name,
issue.tracker.name,
issue.tracker.name,
issue.priority.name,
issue.subject,
issue.assigned_to,
@ -250,7 +217,7 @@ module IssuesHelper
issue.done_ratio,
issue.estimated_hours.to_s.gsub('.', decimal_separator),
issue.parent_id,
format_time(issue.created_on),
format_time(issue.created_on),
format_time(issue.updated_on)
]
custom_fields.each {|f| fields << show_value(issue.custom_value_for(f)) }
@ -260,4 +227,14 @@ module IssuesHelper
end
export
end
def send_notification_option
content_tag(:p,
content_tag(:label,
l(:label_notify_member_plural), :for => 'send_notification') +
hidden_field_tag('send_notification', '0', :id => nil) +
check_box_tag('send_notification', '1', true))
end
end

View File

@ -1,42 +1,132 @@
# redMine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module JournalsHelper
def render_notes(issue, journal, options={})
content = ''
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_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes",
{ :controller => 'journals', :action => 'edit', :id => journal },
:title => l(:button_edit)) if editable
unloadable
include ApplicationHelper
include ActionView::Helpers::TagHelper
def self.included(base)
base.class_eval do
if respond_to? :before_filter
before_filter :find_optional_journal, :only => [:edit]
end
end
end
def render_journal(model, journal, options = {})
return "" if journal.initial?
journal_classes = journal.css_classes
journal_content = render_journal_details(journal, :label_updated_time_by, model, options)
avatar = avatar(journal.user, :size => "40")
unless avatar.blank?
profile_wrap = content_tag("div", avatar, {:class => "profile-wrap"}, false)
journal_content = profile_wrap + journal_content
journal_classes << " has-avatar"
end
content_tag("div", journal_content, :id => "change-#{journal.id}", :class => journal_classes)
end
# This renders a journal entry with a header and details
def render_journal_details(journal, header_label = :label_updated_time_by, model=nil, options={})
header = <<-HTML
<h4>
<div class="journal-link" style="float:right;">#{link_to "##{journal.anchor}", :anchor => "note-#{journal.anchor}"}</div>
#{authoring journal.created_at, journal.user, :label => header_label}
#{content_tag('a', '', :name => "note-#{journal.anchor}")}
</h4>
HTML
header << render_notes(model, journal, options) unless journal.notes.blank?
if journal.details.any?
details = content_tag "ul", :class => "journal-attributes details" do
journal.details.collect do |detail|
if d = journal.render_detail(detail)
content_tag("li", d)
end
end.compact.join(' ')
end
end
content_tag "div", "#{header}#{details}", :class => "journal-details"
end
def render_notes(model, journal, options={})
controller = model.class.name.downcase.pluralize
action = 'edit'
reply_links = authorize_for(controller, action)
if User.current.logged?
editable = User.current.allowed_to?(options[:edit_permission], journal.project) if options[:edit_permission]
if journal.user == User.current && options[:edit_own_permission]
editable ||= User.current.allowed_to?(options[:edit_own_permission], journal.project)
end
end
unless journal.notes.blank?
links = [].tap do |l|
if reply_links
l << link_to_remote(image_tag('comment.png'), :title => l(:button_quote),
:url => {:controller => controller, :action => action, :id => model, :journal_id => journal})
end
if editable
l << link_to_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes",
{ :controller => 'journals', :action => 'edit', :id => journal },
:title => l(:button_edit))
end
end
end
content = ''
content << content_tag('div', links.join(' '), :class => 'contextual') unless links.empty?
content << textilizable(journal, :notes)
css_classes = "wiki"
css_classes << " editable" if editable
content_tag('div', content, :id => "journal-#{journal.id}-notes", :class => css_classes)
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;"
link_to text, '#', options.merge(:onclick => onclick)
end
# This may conveniently be used by controllers to find journals referred to in the current request
def find_optional_journal
@journal = Journal.find_by_id(params[:journal_id])
end
def render_reply(journal)
user = journal.user
text = journal.notes
# 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) do |page|
page << "$('notes').value = \"#{escape_javascript content}\";"
page.show 'update'
page << "Form.Element.focus('notes');"
page << "Element.scrollTo('update');"
page << "$('notes').scrollTop = $('notes').scrollHeight - $('notes').clientHeight;"
end
end
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006-2008 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module MailHandlerHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module MembersHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module MessagesHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module MyHelper
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module NewsHelper
end

View File

@ -1,26 +1,23 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module ProjectsHelper
def link_to_version(version, options = {})
return '' unless version && version.is_a?(Version)
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, options
end
def project_settings_tabs
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural},
{:name => 'modules', :action => :select_project_modules, :partial => 'projects/settings/modules', :label => :label_module_plural},
@ -32,9 +29,9 @@ module ProjectsHelper
{:name => 'boards', :action => :manage_boards, :partial => 'projects/settings/boards', :label => :label_board_plural},
{:name => 'activities', :action => :manage_project_activities, :partial => 'projects/settings/activities', :label => :enumeration_activities}
]
tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)}
tabs.select {|tab| User.current.allowed_to?(tab[:action], @project)}
end
def parent_project_select_tag(project)
selected = project.parent
# retrieve the requested parent project
@ -42,13 +39,13 @@ module ProjectsHelper
if parent_id
selected = (parent_id.blank? ? nil : Project.find(parent_id))
end
options = ''
options << "<option value=''></option>" if project.allowed_parents.include?(nil)
options << project_tree_options_for_select(project.allowed_parents.compact, :selected => selected)
content_tag('select', options, :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)
@ -65,7 +62,7 @@ module ProjectsHelper
else
ancestors.pop
s << "</li>"
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
ancestors.pop
s << "</ul></li>\n"
end
@ -93,7 +90,7 @@ module ProjectsHelper
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)
else

View File

@ -1,35 +1,32 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module QueriesHelper
def operators_for_select(filter_type)
Query.operators_by_filter_type[filter_type].collect {|o| [l(Query.operators[o]), o]}
end
def column_header(column)
column.sortable ? sort_header_tag(column.name.to_s, :caption => column.caption,
:default_order => column.default_order) :
content_tag('th', column.caption)
:default_order => column.default_order) :
content_tag('th', h(column.caption))
end
def column_content(column, issue)
value = column.value(issue)
case value.class.name
when 'String'
if column.name == :subject
@ -45,7 +42,7 @@ module QueriesHelper
if column.name == :done_ratio
progress_bar(value, :width => '80px')
else
value.to_s
h(value.to_s)
end
when 'User'
link_to_user value
@ -78,20 +75,21 @@ module QueriesHelper
# Give it a name, required to be valid
@query = Query.new(:name => "_")
@query.project = @project
if params[:fields]
if params[:fields] || params[:f]
@query.filters = {}
@query.add_filters(params[:fields], params[:operators], params[:values])
@query.add_filters(params[:fields] || params[:f], params[:operators] || params[:op], params[:values] || params[:v])
else
@query.available_filters.keys.each do |field|
@query.add_short_filter(field, params[field]) if params[field]
end
end
@query.group_by = params[:group_by]
@query.column_names = params[:query] && params[:query][:column_names]
session[:query] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names}
@query.display_subprojects = params[:display_subprojects] if params[:display_subprojects]
@query.column_names = params[:c] || (params[:query] && params[:query][:column_names])
session[:query] = {:project_id => @query.project_id, :filters => @query.filters, :group_by => @query.group_by, :column_names => @query.column_names, :display_subprojects => @query.display_subprojects}
else
@query = Query.find_by_id(session[:query][:id]) if session[:query][:id]
@query ||= Query.new(:name => "_", :project => @project, :filters => session[:query][:filters], :group_by => session[:query][:group_by], :column_names => session[:query][:column_names])
@query ||= Query.new(:name => "_", :project => @project, :filters => session[:query][:filters], :group_by => session[:query][:group_by], :column_names => session[:query][:column_names], :display_subprojects => session[:query][:display_subprojects])
@query.project = @project
end
end

View File

@ -1,22 +1,19 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module ReportsHelper
def aggregate(data, criteria)
a = 0
data.each { |row|
@ -28,9 +25,9 @@ module ReportsHelper
} unless data.nil?
a
end
def aggregate_link(data, criteria, *args)
a = aggregate data, criteria
a > 0 ? link_to(a, *args) : '-'
end
a > 0 ? link_to(h(a), *args) : '-'
end
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
require 'iconv'
@ -25,13 +22,13 @@ module RepositoriesHelper
revision.to_s
end
end
def truncate_at_line_break(text, length = 255)
if text
text.gsub(%r{^(.{#{length}}[^\n]*)\n.+$}m, '\\1...')
end
end
def render_properties(properties)
unless properties.nil? || properties.empty?
content = ''
@ -41,7 +38,7 @@ module RepositoriesHelper
content_tag('ul', content, :class => 'properties')
end
end
def render_changeset_changes
changes = @changeset.changes.find(:all, :limit => 1000, :order => 'path').collect do |change|
case change.action
@ -57,7 +54,7 @@ module RepositoriesHelper
change
end
end.compact
tree = { }
changes.each do |change|
p = tree
@ -72,13 +69,13 @@ module RepositoriesHelper
end
p[:c] = change
end
render_changes_tree(tree[:s])
end
def render_changes_tree(tree)
return '' if tree.nil?
output = ''
output << '<ul>'
tree.keys.sort.each do |file|
@ -87,7 +84,7 @@ module RepositoriesHelper
if s = tree[file][:s]
style << ' folder'
path_param = to_path_param(@repository.relative_path(file))
text = link_to(text, :controller => 'repositories',
text = link_to(h(text), :controller => 'repositories',
:action => 'show',
:id => @project,
:path => path_param,
@ -97,33 +94,44 @@ module RepositoriesHelper
elsif c = tree[file][:c]
style << " change-#{c.action}"
path_param = to_path_param(@repository.relative_path(c.path))
text = link_to(text, :controller => 'repositories',
text = link_to(h(text), :controller => 'repositories',
:action => 'entry',
:id => @project,
:path => path_param,
:rev => @changeset.identifier) unless c.action == 'D'
text << " - #{c.revision}" unless c.revision.blank?
text << ' (' + link_to('diff', :controller => 'repositories',
text << " - #{h(c.revision)}" unless c.revision.blank?
text << ' (' + link_to(l(:label_diff), :controller => 'repositories',
:action => 'diff',
:id => @project,
:path => path_param,
:rev => @changeset.identifier) + ') ' if c.action == 'M'
text << ' ' + content_tag('span', c.from_path, :class => 'copied-from') unless c.from_path.blank?
text << ' ' + content_tag('span', h(c.from_path), :class => 'copied-from') unless c.from_path.blank?
output << "<li class='#{style}'>#{text}</li>"
end
end
output << '</ul>'
output
end
def to_utf8(str)
def to_utf8_for_repositories(str)
return str if str.nil?
str = to_utf8_internal(str)
if str.respond_to?(:force_encoding)
str.force_encoding('UTF-8')
end
str
end
def to_utf8_internal(str)
return str if str.nil?
if str.respond_to?(:force_encoding)
str.force_encoding('ASCII-8BIT')
end
return str if str.empty?
return str if /\A[\r\n\t\x20-\x7e]*\Z/n.match(str) # for us-ascii
if str.respond_to?(:force_encoding)
str.force_encoding('UTF-8')
return str if str.valid_encoding?
else
return str if /\A[\r\n\t\x20-\x7e]*\Z/n.match(str) # for us-ascii
end
@encodings ||= Setting.repositories_encodings.split(',').collect(&:strip)
@encodings.each do |encoding|
begin
@ -132,31 +140,63 @@ module RepositoriesHelper
# do nothing here and try the next encoding
end
end
str = replace_invalid_utf8(str)
end
private :to_utf8_internal
def replace_invalid_utf8(str)
return str if str.nil?
if str.respond_to?(:force_encoding)
str.force_encoding('UTF-8')
if ! str.valid_encoding?
str = str.encode("US-ASCII", :invalid => :replace,
:undef => :replace, :replace => '?').encode("UTF-8")
end
else
# removes invalid UTF8 sequences
begin
str = Iconv.conv('UTF-8//IGNORE', 'UTF-8', str + ' ')[0..-3]
rescue Iconv::InvalidEncoding
# "UTF-8//IGNORE" is not supported on some OS
end
end
str
end
def repository_field_tags(form, repository)
def repository_field_tags(form, repository)
method = repository.class.name.demodulize.underscore + "_field_tags"
send(method, form, repository) if repository.is_a?(Repository) && respond_to?(method) && method != 'repository_field_tags'
if repository.is_a?(Repository) &&
respond_to?(method) && method != 'repository_field_tags'
send(method, form, repository)
end
end
def scm_select_tag(repository)
scm_options = [["--- #{l(:actionview_instancetag_blank_option)} ---", '']]
Redmine::Scm::Base.all.each do |scm|
scm_options << ["Repository::#{scm}".constantize.scm_name, scm] if Setting.enabled_scm.include?(scm) || (repository && repository.class.name.demodulize == scm)
if Setting.enabled_scm.include?(scm) ||
(repository && repository.class.name.demodulize == scm)
scm_options << ["Repository::#{scm}".constantize.scm_name, scm]
end
end
select_tag('repository_scm',
select_tag('repository_scm',
options_for_select(scm_options, repository.class.name.demodulize),
:disabled => (repository && !repository.new_record?),
:onchange => remote_function(:url => { :controller => 'repositories', :action => 'edit', :id => @project }, :method => :get, :with => "Form.serialize(this.form)")
:onchange => remote_function(
:url => {
:controller => 'repositories',
:action => 'edit',
:id => @project
},
:method => :get,
:with => "Form.serialize(this.form)")
)
end
def with_leading_slash(path)
path.to_s.starts_with?('/') ? path : "/#{path}"
end
def without_leading_slash(path)
path.gsub(%r{^/+}, '')
end
@ -172,27 +212,46 @@ module RepositoriesHelper
end
def darcs_field_tags(form, repository)
content_tag('p', form.text_field(:url, :label => 'Root directory', :size => 60, :required => true, :disabled => (repository && !repository.new_record?)))
content_tag('p', form.text_field(:url, :label => :label_darcs_path, :size => 60, :required => true, :disabled => (repository && !repository.new_record?))) +
content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
:label => l(:setting_commit_logs_encoding), :required => true))
end
def mercurial_field_tags(form, repository)
content_tag('p', form.text_field(:url, :label => 'Root directory', :size => 60, :required => true, :disabled => (repository && !repository.root_url.blank?)))
content_tag('p', form.text_field(:url, :label => :label_mercurial_path, :size => 60, :required => true, :disabled => (repository && !repository.root_url.blank?)) +
'<br />' + l(:text_mercurial_repo_example)) +
content_tag('p', form.select(:path_encoding, [nil] + Setting::ENCODINGS,
:label => l(:label_path_encoding)) +
'<br />' + l(:text_default_encoding))
end
def git_field_tags(form, repository)
content_tag('p', form.text_field(:url, :label => 'Path to .git directory', :size => 60, :required => true, :disabled => (repository && !repository.root_url.blank?)))
content_tag('p', form.text_field(:url, :label => :label_git_path, :size => 60, :required => true, :disabled => (repository && !repository.root_url.blank?)) +
'<br />' + l(:text_git_repo_example)) +
content_tag('p', form.select(
:path_encoding, [nil] + Setting::ENCODINGS,
:label => l(:label_path_encoding)) +
'<br />' + l(:text_default_encoding))
end
def cvs_field_tags(form, repository)
content_tag('p', form.text_field(:root_url, :label => 'CVSROOT', :size => 60, :required => true, :disabled => !repository.new_record?)) +
content_tag('p', form.text_field(:url, :label => 'Module', :size => 30, :required => true, :disabled => !repository.new_record?))
content_tag('p', form.text_field(:root_url, :label => :label_cvs_path, :size => 60, :required => true, :disabled => !repository.new_record?)) +
content_tag('p', form.text_field(:url, :label => :label_cvs_module, :size => 30, :required => true, :disabled => !repository.new_record?)) +
content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
:label => l(:setting_commit_logs_encoding), :required => true))
end
def bazaar_field_tags(form, repository)
content_tag('p', form.text_field(:url, :label => 'Root directory', :size => 60, :required => true, :disabled => (repository && !repository.new_record?)))
content_tag('p', form.text_field(:url, :label => :label_bazaar_path, :size => 60, :required => true, :disabled => (repository && !repository.new_record?))) +
content_tag('p', form.select(:log_encoding, [nil] + Setting::ENCODINGS,
:label => l(:setting_commit_logs_encoding), :required => true))
end
def filesystem_field_tags(form, repository)
content_tag('p', form.text_field(:url, :label => 'Root directory', :size => 60, :required => true, :disabled => (repository && !repository.root_url.blank?)))
content_tag('p', form.text_field(:url, :label => :label_filesystem_path, :size => 60, :required => true, :disabled => (repository && !repository.root_url.blank?))) +
content_tag('p', form.select(:path_encoding, [nil] + Setting::ENCODINGS,
:label => l(:label_path_encoding)) +
'<br />' + l(:text_default_encoding))
end
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module RolesHelper
end

View File

@ -1,25 +1,22 @@
# redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module SearchHelper
def highlight_tokens(text, tokens)
return text unless text && tokens && !tokens.empty?
re_tokens = tokens.collect {|t| Regexp.escape(t)}
regexp = Regexp.new "(#{re_tokens.join('|')})", Regexp::IGNORECASE
regexp = Regexp.new "(#{re_tokens.join('|')})", Regexp::IGNORECASE
result = ''
text.split(regexp).each_with_index do |words, i|
if result.length > 1200
@ -37,19 +34,20 @@ module SearchHelper
end
result
end
def type_label(t)
l("label_#{t.singularize}_plural", :default => t.to_s.humanize)
end
def project_select_tag
options = [[l(:label_project_all), 'all']]
options << [l(:label_my_projects), 'my_projects'] unless User.current.memberships.empty?
options << [l(:label_and_its_subprojects, @project.name), 'subprojects'] unless @project.nil? || @project.descendants.active.empty?
options << [@project.name, ''] unless @project.nil?
label_tag("scope", l(:description_project_scope), :class => "hidden-for-sighted") +
select_tag('scope', options_for_select(options, params[:scope].to_s)) if options.size > 1
end
def render_results_by_type(results_by_type)
links = []
# Sorts types by results count
@ -57,8 +55,18 @@ module SearchHelper
c = results_by_type[t]
next if c == 0
text = "#{type_label(t)} (#{c})"
links << link_to(text, :q => params[:q], :titles_only => params[:title_only], :all_words => params[:all_words], :scope => params[:scope], t => 1)
links << link_to(h(text), :q => params[:q], :titles_only => params[:title_only], :all_words => params[:all_words], :scope => params[:scope], t => 1)
end
('<ul>' + links.map {|link| content_tag('li', link)}.join(' ') + '</ul>') unless links.empty?
end
def link_to_previous_search_page(pagination_previous_date)
link_to_content_update('&#171; ' + l(:label_previous),
params.merge(:previous => 1, :offset => pagination_previous_date.strftime("%Y%m%d%H%M%S")))
end
def link_to_next_search_page(pagination_next_date)
link_to_content_update(l(:label_next) + ' &#187;',
params.merge(:previous => nil, :offset => pagination_next_date.strftime("%Y%m%d%H%M%S")))
end
end

View File

@ -1,19 +1,16 @@
# Redmine - project management software
# Copyright (C) 2006-2009 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module SettingsHelper
def administration_settings_tabs
@ -27,7 +24,7 @@ module SettingsHelper
{:name => 'repositories', :partial => 'settings/repositories', :label => :label_repository_plural}
]
end
def setting_select(setting, choices, options={})
if blank_text = options.delete(:blank)
choices = [[blank_text.is_a?(Symbol) ? l(blank_text) : blank_text, '']] + choices
@ -35,38 +32,38 @@ module SettingsHelper
setting_label(setting, options) +
select_tag("settings[#{setting}]", options_for_select(choices, Setting.send(setting).to_s), options)
end
def setting_multiselect(setting, choices, options={})
setting_values = Setting.send(setting)
setting_values = [] unless setting_values.is_a?(Array)
setting_label(setting, options) +
hidden_field_tag("settings[#{setting}][]", '') +
choices.collect do |choice|
text, value = (choice.is_a?(Array) ? choice : [choice, choice])
text, value = (choice.is_a?(Array) ? choice : [choice, choice])
content_tag('label',
check_box_tag("settings[#{setting}][]", value, Setting.send(setting).include?(value)) + text.to_s,
:class => 'block'
)
end.join
end
def setting_text_field(setting, options={})
setting_label(setting, options) +
text_field_tag("settings[#{setting}]", Setting.send(setting), options)
end
def setting_text_area(setting, options={})
setting_label(setting, options) +
text_area_tag("settings[#{setting}]", Setting.send(setting), options)
end
def setting_check_box(setting, options={})
setting_label(setting, options) +
hidden_field_tag("settings[#{setting}]", 0) +
check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options)
end
def setting_label(setting, options={})
label = options.delete(:label)
label != false ? content_tag("label", l(label || "setting_#{setting}")) : ''

View File

@ -1,3 +1,17 @@
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
# Helpers to sort tables using clickable column headers.
#
# Author: Stuart Rackham <srackham@methods.co.nz>, March 2005.
@ -15,18 +29,18 @@
#
# helper :sort
# include SortHelper
#
#
# def list
# sort_init 'last_name'
# sort_update %w(first_name last_name)
# @items = Contact.find_all nil, sort_clause
# end
#
#
# Controller (using Pagination module):
#
# helper :sort
# include SortHelper
#
#
# def list
# sort_init 'last_name'
# sort_update %w(first_name last_name)
@ -34,9 +48,9 @@
# :order_by => sort_clause,
# :per_page => 10
# end
#
#
# View (table header in list.rhtml):
#
#
# <thead>
# <tr>
# <%= sort_header_tag('id', :title => 'Sort by contact ID') %>
@ -52,32 +66,32 @@
module SortHelper
class SortCriteria
def initialize
@criteria = []
end
def available_criteria=(criteria)
unless criteria.is_a?(Hash)
criteria = criteria.inject({}) {|h,k| h[k] = k; h}
end
@available_criteria = criteria
end
def from_param(param)
@criteria = param.to_s.split(',').collect {|s| s.split(':')[0..1]}
normalize!
end
def criteria=(arg)
@criteria = arg
normalize!
end
def to_param
@criteria.collect {|k,o| k + (o ? '' : ':desc')}.join(',')
end
def to_sql
sql = @criteria.collect do |k,o|
if s = @available_criteria[k]
@ -86,33 +100,33 @@ module SortHelper
end.compact.join(', ')
sql.blank? ? nil : sql
end
def add!(key, asc)
@criteria.delete_if {|k,o| k == key}
@criteria = [[key, asc]] + @criteria
normalize!
end
def add(*args)
r = self.class.new.from_param(to_param)
r.add!(*args)
r
end
def first_key
@criteria.first && @criteria.first.first
end
def first_asc?
@criteria.first && @criteria.first.last
end
def empty?
@criteria.empty?
end
private
def normalize!
@criteria ||= []
@criteria = @criteria.collect {|s| s = s.to_a; [s.first, (s.last == false || s.last == 'desc') ? false : true]}
@ -120,7 +134,7 @@ module SortHelper
@criteria.slice!(3)
self
end
# Appends DESC to the sort criterion unless it has a fixed order
def append_desc(criterion)
if criterion =~ / (asc|desc)$/i
@ -130,14 +144,14 @@ module SortHelper
end
end
end
def sort_name
controller_name + '_' + action_name + '_sort'
end
# Initializes the default sort.
# Examples:
#
#
# sort_init 'name'
# sort_init 'id', 'desc'
# sort_init ['name', ['id', 'desc']]
@ -165,7 +179,7 @@ module SortHelper
@sort_criteria.criteria = @sort_default if @sort_criteria.empty?
session[sort_name] = @sort_criteria.to_param
end
# Clears the sort criteria session data
#
def sort_clear
@ -187,7 +201,7 @@ module SortHelper
#
def sort_link(column, caption, default_order)
css, order = nil, default_order
if column.to_s == @sort_criteria.first_key
if @sort_criteria.first_asc?
css = 'sort asc'
@ -198,18 +212,14 @@ module SortHelper
end
end
caption = column.to_s.humanize unless caption
sort_options = { :sort => @sort_criteria.add(column.to_s, order).to_param }
# don't reuse params if filters are present
url_options = params.has_key?(:set_filter) ? sort_options : params.merge(sort_options)
url_options = params.merge(sort_options)
# Add project_id to url_options
url_options = url_options.merge(:project_id => params[:project_id]) if params.has_key?(:project_id)
link_to_remote(caption,
{:update => "content", :url => url_options, :method => :get},
{:href => url_for(url_options),
:class => css})
link_to_content_update(h(caption), url_options, :class => css)
end
# Returns a table header <th> tag with a sort link for the named column

View File

@ -1,23 +1,20 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module TimelogHelper
include ApplicationHelper
def render_timelog_breadcrumb
links = []
links << link_to(l(:label_project_all), {:project_id => nil, :issue_id => nil})
@ -52,15 +49,15 @@ module TimelogHelper
activities.each { |a| collection << [a.name, a.id] }
collection
end
def select_hours(data, criteria, value)
if value.to_s.empty?
data.select {|row| row[criteria].blank? }
else
else
data.select {|row| row[criteria].to_s == value.to_s}
end
end
def sum_hours(data)
sum = 0
data.each do |row|
@ -68,7 +65,7 @@ module TimelogHelper
end
sum
end
def options_for_period_select(value)
options_for_select([[l(:label_all_time), 'all'],
[l(:label_today), 'today'],
@ -82,9 +79,9 @@ module TimelogHelper
[l(:label_this_year), 'current_year']],
value)
end
def entries_to_csv(entries)
ic = Iconv.new(l(:general_csv_encoding), 'UTF-8')
ic = Iconv.new(l(:general_csv_encoding), 'UTF-8')
decimal_separator = l(:general_csv_decimal_separator)
custom_fields = TimeEntryCustomField.find(:all)
export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv|
@ -101,7 +98,7 @@ module TimelogHelper
]
# Export custom fields
headers += custom_fields.collect(&:name)
csv << headers.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
# csv lines
entries.each do |entry|
@ -116,20 +113,20 @@ module TimelogHelper
entry.comments
]
fields += custom_fields.collect {|f| show_value(entry.custom_value_for(f)) }
csv << fields.collect {|c| begin; ic.iconv(c.to_s); rescue; c.to_s; end }
end
end
export
end
def format_criteria_value(criteria, value)
if value.blank?
l(:label_none)
elsif k = @available_criterias[criteria][:klass]
obj = k.find_by_id(value.to_i)
if obj.is_a?(Issue)
obj.visible? ? "#{obj.tracker} ##{obj.id}: #{obj.subject}" : "##{obj.id}"
obj.visible? ? h("#{obj.tracker} ##{obj.id}: #{obj.subject}") : h("##{obj.id}")
else
obj
end
@ -137,14 +134,14 @@ module TimelogHelper
format_value(value, @available_criterias[criteria][:format])
end
end
def report_to_csv(criterias, periods, hours)
export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv|
# Column headers
headers = criterias.collect {|criteria| l(@available_criterias[criteria][:label]) }
headers += periods
headers << l(:label_total)
csv << headers.collect {|c| to_utf8(c) }
csv << headers.collect {|c| to_utf8_for_timelogs(c) }
# Content
report_criteria_to_csv(csv, criterias, periods, hours)
# Total row
@ -160,13 +157,13 @@ module TimelogHelper
end
export
end
def report_criteria_to_csv(csv, criterias, periods, hours, level=0)
hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value|
hours_for_value = select_hours(hours, criterias[level], value)
next if hours_for_value.empty?
row = [''] * level
row << to_utf8(format_criteria_value(criterias[level], value))
row << to_utf8_for_timelogs(format_criteria_value(criterias[level], value))
row += [''] * (criterias.length - level - 1)
total = 0
periods.each do |period|
@ -176,14 +173,14 @@ module TimelogHelper
end
row << "%.2f" %total
csv << row
if criterias.length > level + 1
report_criteria_to_csv(csv, criterias, periods, hours_for_value, level + 1)
end
end
end
def to_utf8(s)
def to_utf8_for_timelogs(s)
@ic ||= Iconv.new(l(:general_csv_encoding), 'UTF-8')
begin; @ic.iconv(s.to_s); rescue; s.to_s; end
end

View File

@ -1,19 +1,16 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module TrackersHelper
end

View File

@ -1,29 +1,26 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module UsersHelper
def users_status_options_for_select(selected)
user_count_by_status = User.count(:group => 'status').to_hash
options_for_select([[l(:label_all), ''],
options_for_select([[l(:label_all), ''],
["#{l(:status_active)} (#{user_count_by_status[1].to_i})", 1],
["#{l(:status_registered)} (#{user_count_by_status[2].to_i})", 2],
["#{l(:status_locked)} (#{user_count_by_status[3].to_i})", 3]], selected)
end
# Options for the new membership projects combo-box
def options_for_membership_project_select(user, projects)
options = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---")
@ -32,23 +29,36 @@ module UsersHelper
end
options
end
def user_mail_notification_options(user)
user.valid_notification_options.collect {|o| [l(o.last), o.first]}
end
def change_status_link(user)
url = {:controller => 'users', :action => 'update', :id => user, :page => params[:page], :status => params[:status], :tab => nil}
links = []
if user.locked?
link_to l(:button_unlock), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
links << link_to(l(:button_unlock), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock')
elsif user.registered?
link_to l(:button_activate), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
links << link_to(l(:button_activate), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock')
elsif user != User.current
link_to l(:button_lock), url.merge(:user => {:status => User::STATUS_LOCKED}), :method => :put, :class => 'icon icon-lock'
links << link_to(l(:button_lock), url.merge(:user => {:status => User::STATUS_LOCKED}), :method => :put, :class => 'icon icon-lock')
end
if user.deletable?
links << link_to(
l(:button_delete), {:controller => 'users', :action => 'destroy', :id => user},
:method => :delete,
:confirm => l(:text_are_you_sure),
:title => l(:button_delete),
:class => 'icon icon-del'
)
end
links.join(" ")
end
def user_settings_tabs
tabs = [{:name => 'general', :partial => 'users/general', :label => :label_general},
{:name => 'memberships', :partial => 'users/memberships', :label => :label_project_plural}

View File

@ -1,28 +1,24 @@
# redMine - project management software
# Copyright (C) 2006 Jean-Philippe Lang
#-- encoding: UTF-8
#-- copyright
# ChiliProject is a project management system.
#
# Copyright (C) 2010-2013 the ChiliProject Team
#
# 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.
#
# See doc/COPYRIGHT.rdoc for more details.
#++
module VersionsHelper
STATUS_BY_CRITERIAS = %w(category tracker priority author assigned_to)
STATUS_BY_CRITERIAS = %w(category tracker status priority author assigned_to)
def render_issue_status_by(version, criteria)
criteria ||= 'category'
raise 'Unknown criteria' unless STATUS_BY_CRITERIAS.include?(criteria)
criteria = 'category' unless STATUS_BY_CRITERIAS.include?(criteria)
h = Hash.new {|k,v| k[v] = [0, 0]}
begin
# Total issue count
@ -37,10 +33,10 @@ module VersionsHelper
end
counts = h.keys.compact.sort.collect {|k| {:group => k, :total => h[k][0], :open => h[k][1], :closed => (h[k][0] - h[k][1])}}
max = counts.collect {|c| c[:total]}.max
render :partial => 'issue_counts', :locals => {:version => version, :criteria => criteria, :counts => counts, :max => max}
end
def status_by_options_for_select(value)
options_for_select(STATUS_BY_CRITERIAS.collect {|criteria| [l("field_#{criteria}".to_sym), criteria]}, value)
end

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