def link_to_project(project, options={}, html_options = nil)
if project.archived?
h(project.name)
- elsif options.key?(:action)
- raise "#link_to_project no longer accepts :action option in Redmine 3.0"
else
link_to project.name, project_path(project, options), html_options
end
fields_for(*args, &proc)
end
- def labelled_remote_form_for(*args, &proc)
- ActiveSupport::Deprecation.warn "ApplicationHelper#labelled_remote_form_for is deprecated and will be removed in Redmine 2.2."
- args << {} unless args.last.is_a?(Hash)
- options = args.last
- options.merge!({:builder => Redmine::Views::LabelledFormBuilder, :remote => true})
- form_for(*args, &proc)
- end
-
def error_messages_for(*objects)
html = ""
objects = objects.map {|o| o.is_a?(String) ? instance_variable_get("@#{o}") : o}.compact
module WatchersHelper
- def watcher_tag(object, user, options={})
- ActiveSupport::Deprecation.warn "#watcher_tag is deprecated and will be removed in Redmine 3.0. Use #watcher_link instead."
- watcher_link(object, user)
- end
-
def watcher_link(objects, user)
return '' unless user && user.logged?
objects = Array.wrap(objects)
subclasses
end
- # TODO: remove in Redmine 3.0
- def self.overridding_change?(new, previous)
- ActiveSupport::Deprecation.warn "Enumeration#overridding_change? is deprecated and will be removed in Redmine 3.0. Please use #overriding_change?."
- overriding_change?(new, previous)
- end
-
# Does the +new+ Hash override the previous Enumeration?
def self.overriding_change?(new, previous)
if (same_active_state?(new['active'], previous.active)) && same_custom_values?(new,previous)
a
end
- def self.commit_fix_keywords
- ActiveSupport::Deprecation.warn "Setting.commit_fix_keywords is deprecated and will be removed in Redmine 3"
- if commit_update_keywords.is_a?(Array)
- commit_update_keywords.first && commit_update_keywords.first['keywords']
- end
- end
-
- def self.commit_fix_status_id
- ActiveSupport::Deprecation.warn "Setting.commit_fix_status_id is deprecated and will be removed in Redmine 3"
- if commit_update_keywords.is_a?(Array)
- commit_update_keywords.first && commit_update_keywords.first['status_id']
- end
- end
-
- def self.commit_fix_done_ratio
- ActiveSupport::Deprecation.warn "Setting.commit_fix_done_ratio is deprecated and will be removed in Redmine 3"
- if commit_update_keywords.is_a?(Array)
- commit_update_keywords.first && commit_update_keywords.first['done_ratio']
- end
- end
-
def self.openid?
Object.const_defined?(:OpenID) && self[:openid].to_i > 0
end
end
end
- # TODO: remove in Redmine 3.0
- def completed_pourcent
- ActiveSupport::Deprecation.warn "Version#completed_pourcent is deprecated and will be removed in Redmine 3.0. Please use #completed_percent instead."
- completed_percent
- end
-
# Returns the percentage of issues that have been marked as 'closed'.
def closed_percent
if issues_count == 0
end
end
- # TODO: remove in Redmine 3.0
- def closed_pourcent
- ActiveSupport::Deprecation.warn "Version#closed_pourcent is deprecated and will be removed in Redmine 3.0. Please use #closed_percent instead."
- closed_percent
- end
-
# Returns true if the version is overdue: due date reached and some open issues
def overdue?
effective_date && (effective_date < Date.today) && (open_issues_count > 0)