diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 91966d290..467b56257 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -126,13 +126,7 @@ class ProjectsController < ApplicationController
# @offset ||= @project_pages.offset
# @projects = Project.visible.offset(@offset).limit(@limit).order('lft').all
@project_type = params[:project_type]
- if @project_type == '1'
- session[:enterprise_college] = 1
- elsif @project_type == '0'
- session[:enterprise_college] = 2
- else
- session[:enterprise_college] = 0
- end
+
@offset, @limit = api_offset_and_limit({:limit => 10})
@projects_status = ProjectStatus.visible.where("project_type <> ? or project_type is null", 1)
@@ -253,7 +247,6 @@ class ProjectsController < ApplicationController
# @project_pages = Paginator.new @project_count, @limit, params['page']
# @offset ||= @project_pages.offset
# @projects = Project.visible.offset(@offset).limit(@limit).order('lft').all
- session[:enterprise_college] = 1
@project_type = params[:project_type]
@offset, @limit = api_offset_and_limit({:limit => 10})
@@ -495,6 +488,10 @@ class ProjectsController < ApplicationController
@course.extra='course' + DateTime.parse(Time.now.to_s).strftime('%Y-%m-%d_%H-%M-%S').to_s
@course.safe_attributes = params[:project][:course]
@course.tea_id = User.current.id
+ # added by bai
+ @course.term = params[:term]
+ @course.time = params[:time]
+ # end
# @course.save
# project = ProjectInfo.create(:user_id => User.current.id, :project_id => @project.id)
# project_status = ProjectStatus.create(:project_id => @project.id)
@@ -767,7 +764,10 @@ class ProjectsController < ApplicationController
@course = Course.find_by_extra(@project.identifier)
unless @course.nil?
@course.password = params[:project][:course][:password]
- @course.term = params[:project][:course][:term]
+ # added by bai
+ @course.term = params[:term]
+ @course.time = params[:time]
+ # end
@course.save
end
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
diff --git a/app/views/bids/_project_list.html.erb b/app/views/bids/_project_list.html.erb
index 4c0f64849..08ddee5de 100644
--- a/app/views/bids/_project_list.html.erb
+++ b/app/views/bids/_project_list.html.erb
@@ -6,12 +6,12 @@
<% if User.current.logged? %>
- <% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ?', 5, 7)).size >0) %>
+
<%= toggle_link l(:button_bidding_homework), 'put-bid-form' %>
- <% end %>
+
|
<% end %>
diff --git a/app/views/bids/show.html.erb b/app/views/bids/show.html.erb
index 5a1e12a7f..977c35b67 100644
--- a/app/views/bids/show.html.erb
+++ b/app/views/bids/show.html.erb
@@ -4,16 +4,7 @@
<%= link_to image_tag(url_to_avatar(@bid.author), :class => "avatar"), user_path(@bid.author), :class => "avatar" %> |
- <%= link_to(@bid.author.lastname+@bid.author.firstname, user_path(@bid.author))%>:<%= @bid.name %> |
-
-
-
- <%= render :partial => "/praise_tread/praise_tread",
- :locals => {:obj => @bid,:show_flag => true,:user_id =>User.current.id}%>
-
-
- |
-
+ <%= link_to(@bid.author.lastname+@bid.author.firstname, user_path(@bid.author))%>:<%= @bid.name %> |
<% if @bid.reward_type.nil? or @bid.reward_type == 1%>
@@ -33,24 +24,25 @@
<%= l(:label_bids_credit) %> <%= @bid.budget%> <%= l(:label_bids_credit_number) %>
<% end %>
- |
-
-
-
-
-
- |
-
- <%= @bid.description %>
+
+ |
<%= @bid.description %>
<% if @bid.attachments.any?%>
<% options = {:author => true} %>
<%= render :partial => 'attachments/links',
:locals => {:attachments => @bid.attachments, :options => options} %>
<% end %>
|
-
+
+
+
+
+ <%= render :partial => "/praise_tread/praise_tread",
+ :locals => {:obj => @bid,:show_flag => true,:user_id =>User.current.id}%>
+
+ |
+
-
+
<%= render :partial => 'history', :locals => { :bid => @bid, :journals => @jour, :state => false} %>
diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb
index 53acaed70..551ce4a6a 100644
--- a/app/views/layouts/_base_header.html.erb
+++ b/app/views/layouts/_base_header.html.erb
@@ -1,4 +1,4 @@
-