parent
0226785f51
commit
bf081b95bd
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -24,8 +24,7 @@
|
|||
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_contest_name)}" %></p>
|
||||
|
||||
<p style="margin-left:-10px;padding-right: 20px;"><%= 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)}" %></p>
|
||||
<p><%= select_tag 'bid_reward_type', "<option value = '0'>#{l(:label_choose_reward)}</option><option value = '1'>#{l(:label_money)}</option><option value = '2'>#{l(:label_reward_1)}</option>".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)+"')" %>
|
||||
<p>
|
||||
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => l(:label_bids_reward_what) %>
|
||||
|
||||
<!-- 设置奖项设置的打开 关闭开关-->
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- huang -->
|
||||
<h3><%=l(:label_newtype_contest)%></h3>
|
||||
|
||||
<%= labelled_form_for @bid, :url => {:controller => 'bids', :action => 'create_bid'} do |f| %>
|
||||
<%= labelled_form_for @bid, :url => {:controller => 'bids', :action => 'create_contest'} do |f| %>
|
||||
<div class="box tabular">
|
||||
<%= render :partial => 'form_contest', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
|
|
|
@ -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 %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -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 %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue