Project

General

Profile

Patch #4053 ยป render_project_jump_box.patch

Nobuhiro IMAI, 2009-10-19 08:01

View differences:

app/helpers/application_helper.rb
147 147
    projects = User.current.projects.all
148 148
    if projects.any?
149 149
      s = '<select onchange="if (this.value != \'\') { window.location = this.value; }">' +
150
            "<option value='' selected='selected'>#{ l(:label_jump_to_a_project) }</option>" +
150
            "<option value=''>#{ l(:label_jump_to_a_project) }</option>" +
151 151
            '<option value="" disabled="disabled">---</option>'
152
      s << project_tree_options_for_select(projects) do |p|
152
      s << project_tree_options_for_select(projects, :selected => @project) do |p|
153 153
        { :value => url_for(:controller => 'projects', :action => 'show', :id => p, :jump => current_menu_item) }
154 154
      end
155 155
      s << '</select>'
    (1-1/1)