修改了日历和版本库bug

This commit is contained in:
huangjingquan 2013-09-23 15:12:06 +08:00
parent 278cb57ab9
commit 5dbef9e2c5
6 changed files with 18 additions and 8 deletions

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -15,10 +15,19 @@
<tr>
<td> <% if bid.reward_type.nil? or bid.reward_type == 1%> <strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑"><%= l(:label_call_bonus) %>&nbsp;<%= l(:label_RMB_sign) %><%= bid.budget%></span></strong> <% elsif bid.reward_type == 2%> <strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong> <% else %> <!-- <strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %>&nbsp;<%= bid.budget%>&nbsp;<%= l(:label_bids_credit_number) %></span></strong> --> <% end %> <!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> --></td>
</tr>
<% unless bid.reward_type == 3 %>
<tr>
<td><span class="font_lighter"><%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<strong><%= link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>)</span>
<span class="font_lighter"><%= l(:label_x_bids_responses, :count => bid.commit) %>(<strong><%= link_to bid.commit, respond_path(bid) %></strong>)</span><span class="font_lighter"><%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><%= link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span></td>
<span class="font_lighter"><%= l(:label_x_bids_responses, :count => bid.commit) %>(<strong><%= link_to bid.commit, respond_path(bid) %></strong>)</span>
<span class="font_lighter"> <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><%= link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span></td>
</tr>
<% else %>
<tr>
<td><span class="font_lighter"><%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<strong><%= link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>)
</span><span class="font_lighter"><%= l(:label_x_responses, :count => bid.commit) %>(<strong><%= link_to bid.commit, respond_path(bid) %></strong>)</span>
<span class="font_lighter"> <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><%= link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span></td>
</tr>
<% end %>
</table></td>
<td width="200" align="right" class="a"><span class="font_lighter"> <%= format_time bid.created_on %></span></td>
</tr>

View File

@ -64,7 +64,7 @@
<div>
<%= link_to l(:label_x_followers, :count => @bid.watcher_users.count)+"("+@bid.watcher_users.count.to_s+")", respond_path(@bid) %> &nbsp;
<%= link_to l(:label_bidding_project)+"("+@bid.biding_projects.count.to_s+")", project_for_bid_path(@bid) %>&nbsp;
<%= 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)%>
</div>
</div>
<div class="user_fans">

View File

@ -10,7 +10,7 @@
<% unless @project.identifier_frozen? %>
<em class="info"><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info).html_safe %></em>
<% end %></p>
<p style="margin-left:-10px;"><%= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p>
<!-- <p style="margin-left:-10px;"><%= f.text_field :homepage, :size => 60, :style => "width:488px;margin-left: 10px;" %></p> --> <!-- by huang -->
<p style="margin-left:-10px;"><em style ="color: #888888;display: block;font-size: 90%;font-style: normal;"><%= f.check_box :is_public, :style => "margin-left:10px;" %><%= l(:label_public_info) %></em></p>
<p style="display:none;"><%= f.text_field :project_type, :value => 0 %></p>