diff --git a/Gemfile.lock b/Gemfile.lock index 34314d845..0ecb19aff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -125,7 +125,6 @@ GEM mocha (1.1.0) metaclass (~> 0.0.1) multi_json (1.10.1) - mysql2 (0.3.11) mysql2 (0.3.11-x86-mingw32) net-ldap (0.3.1) nokogiri (1.6.3) diff --git a/ReadMe.txt b/ReadMe.txt index 538457d3d..895e7ffb8 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -88,3 +88,12 @@ bundle exec rake db:migrate:down VERSION=20140811022947 bundle exec rake db:migrate:up VERSION=20140811022947 bundle exec rake db:migrate bundle exec rake project_score:calculate +=================================[2014-10-17]==================================== +kw:数据迁移,web_footer_oranizers表已存在 +bundle exec rake db:migrate:down VERSION=20141013014908 +bundle exec rake db:migrate:up VERSION=20141013014908 +bundle exec rake db:migrate +kw:数据迁移,web_footer_companies表已存在 +bundle exec rake db:migrate:down VERSION=20141013023400 +bundle exec rake db:migrate:up VERSION=20141013023400 +bundle exec rake db:migrate diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 7b4e326ad..fb6c2e8fe 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -159,7 +159,7 @@ class AdminController < ApplicationController respond_to do |format| flash[:notice] = l(:notice_successful_update) format.html { - redirect_to admin_first_page_made_url + redirect_to first_page_made_url } format.api { render_api_ok } #format.json { render json: @first_page, status: :created, location: @first_page } @@ -194,7 +194,7 @@ class AdminController < ApplicationController respond_to do |format| format.html { flash[:notice] = l(:notice_successful_update) - redirect_to admin_course_page_made_url + redirect_to course_page_made_url } format.api { render_api_ok } end @@ -217,25 +217,21 @@ class AdminController < ApplicationController if request.get? @contest_page = FirstPage.find_by_page_type('contest') @first_page = FirstPage.find_by_page_type('project') - @notification = ContestNotification.first; elsif request.post? @first_page = FirstPage.find_by_page_type('project') @contest_page = FirstPage.find_by_page_type('contest') - @notification = ContestNotification.first; @first_page.web_title = params[:web_title] @contest_page.web_title = params[:web_title] @contest_page.title = params[:contest_title] @contest_page.image_width = params[:image_width] @contest_page.image_height = params[:image_height] @contest_page.description = params[:contest_description] - @notification.title = params[:contest_notification_title] - @notification.content = params[:contest_notification][:content] - if @first_page.save && @contest_page.save && @notification.save + if @first_page.save && @contest_page.save respond_to do |format| format.html { flash[:notice] = l(:notice_successful_update) - redirect_to admin_contest_page_made_url + redirect_to contest_page_made_url } format.api { render_api_ok } end @@ -270,7 +266,7 @@ class AdminController < ApplicationController respond_to do |format| format.html { flash[:notice] = l(:notice_successful_update) - redirect_to admin_web_footer_made_url + redirect_to web_footer_made_url } format.api { render_api_ok } end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7f3dc0203..67948a8e1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -499,19 +499,19 @@ class ApplicationController < ActionController::Base def render_403(options={}) @project = nil - #render_error({:message => :notice_not_authorized, :status => 403}.merge(options)) - render :template => 'common/403' + render_error({:message => :notice_not_authorized, :status => 403}.merge(options),'common/403') + #render :template => 'common/403' return false end def render_404(options={}) - #render_error({:message => :notice_file_not_found, :status => 404}.merge(options)) - render :template => 'common/404' + render_error({:message => :notice_file_not_found, :status => 404}.merge(options),'common/404') + #render :template => 'common/404' return false end # Renders an error response - def render_error(arg) + def render_error(arg,template = 'common/error') arg = {:message => arg} unless arg.is_a?(Hash) @message = arg[:message] @lay = arg[:layout] @@ -521,9 +521,9 @@ class ApplicationController < ActionController::Base respond_to do |format| format.html { if @lay - render :template => 'common/error', :layout => @lay,:status => @status + render :template => template, :layout => @lay,:status => @status else - render :template => 'common/error', :layout => use_layout, :status => @status + render :template => template, :layout => use_layout, :status => @status end } @@ -766,7 +766,7 @@ class ApplicationController < ActionController::Base end def find_web_footer - @organize = WebFooterOranizer.first + @organizer = WebFooterOranizer.first @companies = WebFooterCompany.all end end diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 905bbb0a2..75b87c6f0 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -84,7 +84,10 @@ class AttachmentsController < ApplicationController candown= User.current.member_of_course?(course) || (course.is_public==1 && @attachment.is_public == 1) elsif @attachment.container.class.to_s=="HomeworkAttach" && @attachment.container.bid.reward_type == 3 candown = true + elsif @attachment.container_type == "Bid" && @attachment.container && @attachment.container.courses + candown = User.current.member_of_course?(@attachment.container.courses.first) || (course.is_public == 1 && @attachment.is_public == 1) else + candown = @attachment.is_public == 1 end if candown || User.current.admin? || User.current.id == @attachment.author_id diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index c54a419cb..8402c05f0 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -21,30 +21,37 @@ class CoursesController < ApplicationController before_filter :toggleCourse, only: [:finishcourse, :restartcourse] before_filter :require_login, :only => [:join, :unjoin] - before_filter :allow_join, :only => [:join] + #before_filter :allow_join, :only => [:join] def join if User.current.logged? - course = Course.find(params[:object_id]) - unless User.current.member_of_course? course - if params[:course_password] == course.password - members = [] - members << Member.new(:role_ids => [10], :user_id => User.current.id) - course.members << members - StudentsForCourse.create(:student_id => User.current.id, :course_id => params[:object_id]) - @state = 0 + course = Course.find_by_id params[:object_id] + if course + if course_endTime_timeout? course + @state = 2 else - @state = 1 + if User.current.member_of_course?(course) + @state = 3 + else + if params[:course_password] == course.password + members = [] + members << Member.new(:role_ids => [10], :user_id => User.current.id) + course.members << members + StudentsForCourse.create(:student_id => User.current.id, :course_id => params[:object_id]) + @state = 0 + else + @state = 1 + end + end end else - @state = 3 + @state = 4 end else - @state = 4 + @state = 5 end respond_to do |format| - # format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} - format.js { render :partial => 'set_join', :locals => {:user => User.current, :course => Course.find(params[:object_id]), :object_id => params[:object_id]} } + format.js { render :partial => 'set_join', :locals => {:user => User.current, :course => course, :object_id => params[:object_id]} } end rescue Exception => e @state = 4 @@ -424,9 +431,7 @@ class CoursesController < ApplicationController @course_type = params[:course_type] @school_id = params[:school_id] per_page_option = 10 - - - if @school_id == "0" or @school_id.nil? + if @school_id == "0" || @school_id.nil? @courses_all = Course.active.visible. joins("LEFT JOIN #{CourseStatus.table_name} ON #{Course.table_name}.id = #{CourseStatus.table_name}.course_id") else @@ -434,49 +439,37 @@ class CoursesController < ApplicationController joins("LEFT JOIN #{CourseStatus.table_name} ON #{Course.table_name}.id = #{CourseStatus.table_name}.course_id"). where("#{Course.table_name}.school_id = ?", @school_id) end - @course_count = @courses_all.count @course_pages = Paginator.new @course_count, per_page_option, params['page'] - @course_activity_count=Hash.new @courses_all.each do |course| @course_activity_count[course.id]=0 end - - case params[:course_sort_type] when '0' @courses = @courses_all.order("created_at desc") @s_type = 0 @courses = @courses.offset(@course_pages.offset).limit(@course_pages.per_page) - - @course_activity_count=get_course_activity @courses, @course_activity_count + @course_activity_count=get_course_activity @courses, @course_activity_count when '1' @courses = @courses_all.order("course_ac_para desc") @s_type = 1 @courses = @courses.offset(@course_pages.offset).limit(@course_pages.per_page) - @course_activity_count=get_course_activity @courses, @course_activity_count when '2' @courses = @courses_all.order("watchers_count desc") @s_type = 2 @courses = @courses.offset(@course_pages.offset).limit(@course_pages.per_page) - @course_activity_count=get_course_activity @courses, @course_activity_count - when '3' - @course_activity_count=get_course_activity @courses_all, @course_activity_count - @courses=handle_course @courses_all, @course_activity_count - @s_type = 3 @courses = @courses[@course_pages.offset, @course_pages.per_page] else @s_type = 0 @courses = @courses_all.order("created_at desc") @courses = @courses.offset(@course_pages.offset).limit(@course_pages.per_page) - @course_activity_count=get_course_activity @courses, @course_activity_count end @@ -518,18 +511,14 @@ class CoursesController < ApplicationController # 鏂板缓浣滀笟 def new_homework @homework = Bid.new - @homework.proportion @homework.safe_attributes = params[:bid] if (User.current.logged? && User.current.member_of_course?(Course.find params[:id] )) render :layout => 'base_courses' else render_403 end - end - - def toggleCourse @course_prefs = Course.find_by_extra(@course.extra) unless (@course_prefs.teacher == User.current || User.current.admin?) @@ -697,8 +686,8 @@ class CoursesController < ApplicationController private - def allow_join - if course_endTime_timeout? Course.find(params[:object_id]) + def allow_join course + if course_endTime_timeout? course respond_to do |format| format.js { @state = 2 @@ -719,7 +708,4 @@ class CoursesController < ApplicationController render_404 end end - - - end diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 89ad42c17..313afa1c7 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -113,7 +113,7 @@ class FilesController < ApplicationController end if order_by.count == 1 - sort += "#{Attachment.table_name}.#{attribute} desc " + sort += "#{Attachment.table_name}.#{attribute} asc " elsif order_by.count == 2 sort += "#{Attachment.table_name}.#{attribute} #{order_by[1]} " end diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 4e23fc41b..00c843045 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -130,7 +130,7 @@ class MyController < ApplicationController @user.pref.save @user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : []) set_language_if_valid @user.language - flash.now[:notice] = l(:notice_account_updated) + flash[:notice] = l(:notice_account_updated) redirect_to user_url(@user) return else diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index c9550add3..0c1f65317 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -113,7 +113,7 @@ class RepositoriesController < ApplicationController @root_path=RepositoriesHelper::ROOT_PATH @repository_name=User.current.login.to_s+"/"+params[:repository][:identifier]+".git" @project_path=@root_path+"htdocs/"+@repository_name - @repository_tag=params[:repository][:upassword] + @repository_tag=params[:repository][:upassword] || params[:repository][:password] @repo_name=User.current.login.to_s+"_"+params[:repository][:identifier] logger.info "htpasswd -mb "+@root_path+"user.passwd "+@repo_name+": "+@repository_tag logger.info "the value of create repository"+@root_path+": "+@repository_name+": "+@project_path+": "+@repo_name diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 9d1bb1472..7e6e3d04a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -33,15 +33,16 @@ class UsersController < ApplicationController before_filter :require_admin, :except => [:show, :index, :search, :tag_save, :tag_saveEx,:user_projects, :user_newfeedback, :user_comments, :watch_bids, :watch_contests, :info, :user_watchlist, :user_fanslist,:update, :user_courses, :user_homeworks, :watch_projects, :show_score, :topic_score_index, :project_score_index, :activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index, - :activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities] + :activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities,:user_projects_index] #edit has been deleted by huang, 2013-9-23 before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses, :user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index, :activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index, - :activity_new_score_index, :influence_new_score_index, :score_new_index] + :activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index] before_filter :auth_user_extension, only: :show before_filter :rest_user_score, only: :show + #before_filter :select_entry, only: :user_projects accept_api_auth :index, :show, :create, :update, :destroy,:tag_save , :tag_saveEx #william @@ -80,6 +81,21 @@ class UsersController < ApplicationController end end + def user_projects_index + if User.current.admin? + memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}").first + else + cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" + memberships = @user.memberships.all(:conditions => cond).first + end + watch_projects = Project.joins(:watchers).where("project_type <>? and watchable_type = ? and `watchers`.user_id = ?", '1','Project', @user.id).first + if memberships.nil? && watch_projects + redirect_to(:watch_projects_user) and return + else + redirect_to(:user_projects_user) and return + end + end + #added by young def user_projects @@ -92,8 +108,6 @@ class UsersController < ApplicationController #events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20) #@events_by_day = events.group_by(&:event_date) @state = 0 - - #add by huang unless User.current.admin? if !@user.active? #|| (@user != User.current && @memberships.empty? && events.empty?) diff --git a/app/controllers/web_footer_companies_controller.rb b/app/controllers/web_footer_companies_controller.rb index 4c5748e40..0fa076c2f 100644 --- a/app/controllers/web_footer_companies_controller.rb +++ b/app/controllers/web_footer_companies_controller.rb @@ -10,7 +10,7 @@ class WebFooterCompaniesController < ApplicationController end def new - @company = WebFooterCompany.new + @company ||= WebFooterCompany.new end def create @@ -20,8 +20,11 @@ class WebFooterCompaniesController < ApplicationController redirect_to web_footer_companies_url else flash[:error] = "#{l :web_footer_company_create_fail}: #{@company.errors.full_messages[0]}" - new - render :action => 'new' + respond_to do |format| + format.html { render :action => 'new'} + format.api { render_validation_errors(@company) } + end + end end @@ -42,7 +45,6 @@ class WebFooterCompaniesController < ApplicationController redirect_to web_footer_companies_url else flash[:error] = "#{l :web_footer_company_update_fail}: #{@company.errors.full_messages[0]}" - edit render :action => 'edit' end end diff --git a/app/helpers/attachments_helper.rb b/app/helpers/attachments_helper.rb index e6f20ea60..060ced940 100644 --- a/app/helpers/attachments_helper.rb +++ b/app/helpers/attachments_helper.rb @@ -143,16 +143,19 @@ module AttachmentsHelper params[:q] ||= "" filename_condition = params[:q].strip - attachAll = Attachment.scoped - - # 闄ゅ幓褰撳墠璇剧▼鐨勬墍鏈夎祫婧 - nobelong_attach = Attachment.where("!(container_type = '#{course.class}' and container_id = #{course.id})") unless course.blank? + #attachAll = Attachment.where("author_id = #{User.current.id}") + # + ## 闄ゅ幓褰撳墠璇剧▼鐨勬墍鏈夎祫婧 + #nobelong_attach = # 鎼滅储鍩熺‘瀹 - domain = course.nil? ? attachAll : nobelong_attach + course.nil? ? + domain=Attachment.where("author_id = #{User.current.id}") + : + domain=Attachment.where("author_id = #{User.current.id} and container_type = 'Course' and container_id <> #{course.id}") unless course.blank? # 鎼滅储鍒扮殑璧勬簮 - searched_attach = domain.where("is_public=1 and filename LIKE :like ", like:"%#{filename_condition}%").limit(limit).order('created_on desc') + searched_attach = domain.where("filename LIKE :like ", like:"%#{filename_condition}%").limit(limit).order('created_on desc') #searched_attach = private_filter searched_attach searched_attach = paginateHelper(searched_attach, 10) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 3a8b1b09a..99b21d8cc 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -479,7 +479,6 @@ module CoursesHelper type << option2 type end - #鑾峰彇璇剧▼鍔ㄦ def get_course_activity courses, activities @course_ids=activities.keys() @@ -504,20 +503,8 @@ module CoursesHelper activities[news.course_id]+=1 end - #feedbackc_count - JournalsForMessage.where(jour_id: @course_ids, jour_type: Course).each do |jourformess| - activities[jourformess.jour_id]+=1 - end - - #activities!=0 - i=0; - courses.each do |course| - id=course.id - if activities[id]==0 - activities[id]=1 - end - end - + # 鍔ㄦ佹暟 + 1 ( 鏌愭煇鍒涘缓浜嗚璇剧▼ ) + activities.each_pair { |key, value| activities[key] = value + 1 } return activities end diff --git a/app/models/contesting_project.rb b/app/models/contesting_project.rb index 3db6d6f86..9828bb598 100644 --- a/app/models/contesting_project.rb +++ b/app/models/contesting_project.rb @@ -7,9 +7,10 @@ class ContestingProject < ActiveRecord::Base DESCRIPTION_LENGTH_LIMIT = 500 validates :description, length: {maximum:DESCRIPTION_LENGTH_LIMIT } - validates :user_id, presence: true - validates :contest_id, presence: true, uniqueness: {:scope => :project_id} - validates :project_id, presence: true + validates :user_id, presence: true + validates :contest_id, presence: true, uniqueness: {scope: :project_id} + validates :project_id, presence: true + validate :validate_user validate :validate_contest validate :validate_project diff --git a/app/views/admin/_tab_partial.html.erb b/app/views/admin/_tab_partial.html.erb new file mode 100644 index 000000000..86191fdb5 --- /dev/null +++ b/app/views/admin/_tab_partial.html.erb @@ -0,0 +1,8 @@ +
@@ -38,26 +31,7 @@ <%= text_area_tag 'contest_description',@contest_page.description,:rows => 8, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
-- - -
-- <%= text_field_tag 'contest_notification_title', params[:label_contest_notification_title], :value => @notification.title,:size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %> -
- - <%= text_area 'contest_notification', 'content', :value => @notification.content,:cols => 80, :rows => 15, :class => 'wiki-edit' %> - <%= wikitoolbar_for 'contest_notification_content' %> - - -diff --git a/app/views/admin/first_page_made.html.erb b/app/views/admin/first_page_made.html.erb index e4403457c..d8fbc0533 100644 --- a/app/views/admin/first_page_made.html.erb +++ b/app/views/admin/first_page_made.html.erb @@ -5,14 +5,7 @@ <%= text_field_tag 'web_title', params[:wbe_title],:value => @first_page.web_title, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
-diff --git a/app/views/admin/web_footer_made.html.erb b/app/views/admin/web_footer_made.html.erb index 52f7cd5eb..65e77631c 100644 --- a/app/views/admin/web_footer_made.html.erb +++ b/app/views/admin/web_footer_made.html.erb @@ -5,14 +5,7 @@ <%= text_field_tag 'web_title', params[:wbe_title],:value => @first_page.web_title, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
-<%= l(:label_contest_innovate ) %> | -<%= l(:label_user_location) %> : | -- | -- | -
- contest.trustie.net - | -- <%=link_to l(:field_homepage), home_path %> > - <%=link_to l(:label_contest_innovate), welcome_contest_path %> > l(:label_details) | -
<%= @notification.title %>
-<%= @notification.content.html_safe %>
-- <%= f.text_field :title, - :required => true, - :size => 60, - :maxlength => 60, - :style => "width:488px;" - %> -
-- <%= f.text_area :description, - :required => true, - :cols => 60, - :rows => 11, - :class => 'wiki-edit', - :style => "width:490px;" - %> -
- ++ <%= f.text_field :title, + :required => true, + :size => 60, + :maxlength => 60, + :style => "width:488px;", + :onblur => "regexTitle();" + %> +
+ ++ <%= f.text_area :description, + :required => true, + :cols => 60, + :rows => 11, + :class => 'wiki-edit', + :style => "width:490px;", + :onblur => "regexDescription();" + %> +
+- <%= l(:label_no_data) %> -
- <% else %> + ++ + <%= l(:label_bids_reward_method) %> + + <%= @contest.budget%> + + +
+- - <%= l(:label_bids_reward_method) %> - - <%= @contest.budget%> - - -
-<%= content_tag('span',"#{l(:label_bid_show_course_name)}:", :class => "course-font")%> <% unless @course.is_public == 1 %> - <%= l(:label_private) %> + + <%= l(:label_private) %> + <% end %> <%= content_tag('span', link_to("#{@course.name}", course_path(@course), :class => "info"))%>
@@ -19,9 +21,8 @@ <%= content_tag('span', "#{l(:label_institution_name)}:", :class => "course-font")%> <% @admin = @course.course_infos%> <%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%> - <% unless @course.teacher.user_extensions.school.nil? %> - <%= link_to @course.teacher.user_extensions.school.try(:name), school_course_list_path(@course.teacher.user_extensions.school) %> + <%= link_to(@course.school.try(:name), school_course_list_path(@course.school)) if @course.school %> <% end %> <% end %> @@ -46,13 +47,11 @@<%= content_tag('span', "#{garble @course.members.count}", :class => "info") %> - <%#= content_tag('span', l(:label_x_member, :count => @course.members.count)) %> <%= content_tag('span', l(:label_x_member, :count => memberCount(@course))) %>
- <%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %> <%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
@@ -62,7 +61,7 @@ <% if(course_endTime_timeout? @course) %> - 璇剧▼瀛︽湡宸茬粨鏉 + <%= l(:lable_course_end) %> <% else %> <%= join_in_course_for_list(@course, User.current,['regular'])%> @@ -80,10 +79,6 @@<%= l(:label_homeworks_form_new_description) %>
- <%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :onblur => "regexName();" %> + <%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", + :maxlength => Bid::NAME_LENGTH_LIMIT, + :onblur => "regexName();" %>
-+
+ +
-<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>
- ++ <%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;", + :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %> +
<% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %><%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:150px;",:value => "#{time}", :onchange => "regexDeadLine();", :readonly => true) %> <%= calendar_for('bid_deadline')%>
-<%= f.select :is_evaluation, is_evaluation_option %> +
+ <%= f.select :is_evaluation, is_evaluation_option %>
-<%= f.select :proportion, proportion_option %> +
+ <%= f.select :proportion, proportion_option %>
-<%= hidden_field_tag 'course_id', @course.id %> +
+ <%= hidden_field_tag 'course_id', @course.id %>
-