diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a7c28cee0..6a07c5c84 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -44,7 +44,7 @@ class ProjectsController < ApplicationController before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join] before_filter :authorize, :except => [:new_join, :new_homework, :homework, :statistics, :search, :watcherlist, :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, :statistics, :feedback] before_filter :authorize_global, :only => [:new, :create] - before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ] + before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar] #by young # before_filter :member, :file, :statistics, :watcherlist # modified by fq diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 0657ddfe4..61a3bfb51 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -44,7 +44,7 @@ class RepositoriesController < ApplicationController @repository.is_default = @project.repository.nil? @repository.project = @project @course_tag = params[:course] - if @course_tag + if @course_tag == 1 render :layout => 'base_courses' else render :layout => 'base_projects' @@ -58,7 +58,7 @@ class RepositoriesController < ApplicationController @repository.is_default = @project.repository.nil? @repository.project = @project @course_tag = params[:course] - if @course_tag + if @course_tag == 1 render :layout => 'base_courses' else render :layout => 'base_projects' @@ -221,7 +221,7 @@ class RepositoriesController < ApplicationController @properties = @repository.properties(@path, @rev) @repositories = @project.repositories @course_tag = params[:course] - if @course_tag + if @course_tag == 1 render :action => 'show', :layout => 'base_courses' else render :action => 'show', :layout => 'base_projects' diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index cc271a1c0..825c79060 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -26,7 +26,8 @@ class UsersController < ApplicationController #Ended by young - before_filter :require_admin, :except => [:show, :index, :search, :tag_save, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :info, :user_watchlist, :user_fanslist,:edit,:update, :user_courses] + before_filter :require_admin, :except => [:show, :index, :search, :tag_save, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :info, :user_watchlist, :user_fanslist,:update, :user_courses] + #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, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments, :watch_bids, :info] accept_api_auth :index, :show, :create, :update, :destroy,:tag_save diff --git a/app/views/bids/_bid_show.html.erb b/app/views/bids/_bid_show.html.erb index 050a17753..04bd6d2e7 100644 --- a/app/views/bids/_bid_show.html.erb +++ b/app/views/bids/_bid_show.html.erb @@ -15,10 +15,19 @@
<%= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %>
+<%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_public_info) %>