diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 162cc09cb..810322931 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -93,8 +93,8 @@ class BidsController < ApplicationController @offset ||= @bid_pages.reverse_offset #added by nie - if params[:bid_sort_type].present? - case params[:bid_sort_type] + if params[:contest_sort_type].present? + case params[:contest_sort_type] when '0' unless @offset == 0 @bids = @bids.offset(@offset).limit(@limit).all.reverse @@ -372,7 +372,7 @@ class BidsController < ApplicationController @bid = Bid.new @bid.name = params[:bid][:name] @bid.description = params[:bid][:description] - @bid.reward_type = params[:bid_reward_type] + @bid.reward_type = 2 @bid.budget = params[:bid][:budget] @bid.deadline = params[:bid][:deadline] @bid.author_id = User.current.id diff --git a/app/helpers/bids_helper.rb b/app/helpers/bids_helper.rb index 74d24a863..3c7528fe9 100644 --- a/app/helpers/bids_helper.rb +++ b/app/helpers/bids_helper.rb @@ -76,12 +76,12 @@ module BidsHelper content = ''.html_safe case state when 0 - content << content_tag('li', link_to(l(:label_sort_by_active), calls_path(:contest_sort_type => '1'))) - content << content_tag('li', link_to(l(:label_sort_by_time), calls_path(:contest_sort_type => '0'), :class=>"selected"), :class=>"selected") + content << content_tag('li', link_to(l(:label_sort_by_active), contest_path(:contest_sort_type => '1'))) + content << content_tag('li', link_to(l(:label_sort_by_time), contest_path(:contest_sort_type => '0'), :class=>"selected"), :class=>"selected") when 1 - content << content_tag('li', link_to(l(:label_sort_by_active), calls_path(:contest_sort_type => '1'), :class=>"selected"), :class=>"selected") - content << content_tag('li', link_to(l(:label_sort_by_time), calls_path(:contest_sort_type => '0'))) + content << content_tag('li', link_to(l(:label_sort_by_active), contest_path(:contest_sort_type => '1'), :class=>"selected"), :class=>"selected") + content << content_tag('li', link_to(l(:label_sort_by_time), contest_path(:contest_sort_type => '0'))) end content = content_tag('ul', content) content_tag('div', content, :class => "tabs") diff --git a/app/views/bids/_form_contest.html.erb b/app/views/bids/_form_contest.html.erb index d41f4f880..b7e4dc5c7 100644 --- a/app/views/bids/_form_contest.html.erb +++ b/app/views/bids/_form_contest.html.erb @@ -24,8 +24,7 @@

<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %>

<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_description)}" %>

-

<%= select_tag 'bid_reward_type', "".html_safe, - :onChange => "show('bid_reward_type', 'bid_budget', '"+l(:label_bids_reward_what)+"','"+l(:label_bids_new_money)+"','"+l(:label_bids_new_credit)+"','"+l(:label_bids_new_content)+"')" %> +

<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %> diff --git a/app/views/bids/new_contest.html.erb b/app/views/bids/new_contest.html.erb index df35523e3..216816bd1 100644 --- a/app/views/bids/new_contest.html.erb +++ b/app/views/bids/new_contest.html.erb @@ -1,7 +1,7 @@

<%=l(:label_newtype_contest)%>

-<%= labelled_form_for @bid, :url => {:controller => 'bids', :action => 'create_bid'} do |f| %> +<%= labelled_form_for @bid, :url => {:controller => 'bids', :action => 'create_contest'} do |f| %>
<%= render :partial => 'form_contest', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> diff --git a/app/views/users/_my_course.html.erb b/app/views/users/_my_course.html.erb index 60ce7525b..db08d71b8 100644 --- a/app/views/users/_my_course.html.erb +++ b/app/views/users/_my_course.html.erb @@ -9,7 +9,7 @@ <% if @user.user_extensions.identity == 0 %> <%= l(:label_project_course_unadd) %><%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1}, :class => 'icon icon-add' %> <% else %> - <%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'projects',:action=>'index', :course => 1}, :class => 'icon icon-add' %> + <%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'projects',:action=>'course', :course => 1}, :class => 'icon icon-add' %> <% end %>

<% end %> diff --git a/app/views/users/_my_joinedcourse.html.erb b/app/views/users/_my_joinedcourse.html.erb index b02ea6040..4e2221189 100644 --- a/app/views/users/_my_joinedcourse.html.erb +++ b/app/views/users/_my_joinedcourse.html.erb @@ -9,7 +9,7 @@ <% if @user.user_extensions.identity == 0 %> <%= l(:label_project_course_unadd) %><%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1}, :class => 'icon icon-add' %> <% else %> - <%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'projects',:action=>'index', :course => 1}, :class => 'icon icon-add' %> + <%= l(:label_project_cousre_studentun) %><%= link_to"#{l(:label_course_join_student)}",{:controller=>'projects',:action=>'course', :course => 1}, :class => 'icon icon-add' %> <% end %>

<% end %> diff --git a/config/routes.rb b/config/routes.rb index 000a152f0..0db7afc7d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -473,7 +473,7 @@ RedmineApp::Application.routes.draw do match 'calls', :controller => 'bids', :action => 'index' match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond' - match 'contest', :controller => 'bids', :action => 'contest' + match 'contest', :controller => 'bids', :action => 'contest', :as => 'contest' ######added by nie match 'tags/show_projects_tags',:to => 'tags#show_projects_tags'