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 @@