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 @@ <% if bid.reward_type.nil? or bid.reward_type == 1%> <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> <% elsif bid.reward_type == 2%> <%= l(:label_bids_reward_method) %><%= bid.budget%> <% else %> <% end %> + <% unless bid.reward_type == 3 %> <%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) - <%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>)<%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) + <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <% else %> + + <%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) + <%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) + <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + + <% end %> <%= format_time bid.created_on %> diff --git a/app/views/layouts/base_bids.html.erb b/app/views/layouts/base_bids.html.erb index eff2cd6f7..36be8c5f0 100644 --- a/app/views/layouts/base_bids.html.erb +++ b/app/views/layouts/base_bids.html.erb @@ -64,7 +64,7 @@
<%= link_to l(:label_x_followers, :count => @bid.watcher_users.count)+"("+@bid.watcher_users.count.to_s+")", respond_path(@bid) %>   <%= link_to l(:label_bidding_project)+"("+@bid.biding_projects.count.to_s+")", project_for_bid_path(@bid) %>  - <%= link_to l(:label_x_responses, :count => @bid.commit)+"("+@bid.commit.to_s+")", respond_path(@bid)%> + <%= link_to l(:label_x_bids_responses, :count => @bid.commit)+"("+@bid.commit.to_s+")", respond_path(@bid)%>
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb index 0802d9b2a..e2c990915 100644 --- a/app/views/projects/_form.html.erb +++ b/app/views/projects/_form.html.erb @@ -10,7 +10,7 @@ <% unless @project.identifier_frozen? %> <%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %> <% end %>

-

<%= 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) %>

<%= f.text_field :project_type, :value => 0 %>