From: Etienne Massip Date: Tue, 26 Jun 2012 17:36:29 +0000 (+0000) Subject: Code cleanup. X-Git-Tag: 2.1.0~404 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=56cf38135720c65e2cb5f2820466a2c74d551482;p=redmine.git Code cleanup. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9899 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d32c86b75..7772035d3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -239,21 +239,22 @@ module ApplicationHelper return unless User.current.logged? projects = User.current.memberships.collect(&:project).compact.select(&:active?).uniq if projects.any? - s = '' - s.html_safe + + select_tag('project_quick_jump_box', options, :onchange => 'if (this.value != \'\') { window.location = this.value; }') end end def project_tree_options_for_select(projects, options = {}) s = '' project_tree(projects) do |project, level| - name_prefix = (level > 0 ? (' ' * 2 * level + '» ') : '').html_safe + name_prefix = (level > 0 ? ' ' * 2 * level + '» ' : '').html_safe tag_options = {:value => project.id} if project == options[:selected] || (options[:selected].respond_to?(:include?) && options[:selected].include?(project)) tag_options[:selected] = 'selected'