Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop

This commit is contained in:
huangjingquan 2013-11-21 17:12:00 +08:00
commit b8db0f59d2
54 changed files with 242 additions and 50901 deletions

View File

@ -715,13 +715,20 @@ class BidsController < ApplicationController
end
def add_homework
# homework = HomeworkAttach.create(:bid_id => @bid.id, :user_id => User.current.id)
# homework.save_attachments(params[:attachments] || (params[:bid] && params[:bid][:uploads]))
@homework = HomeworkAttach.new
@homework.bid_id = @bid.id
@homework.user_id = User.current.id
@homework.save_attachments(params[:attachments])
@homework.save
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 = ? or id =?',5, 10, 7)).size >0)
# homework = HomeworkAttach.create(:bid_id => @bid.id, :user_id => User.current.id)
# homework.save_attachments(params[:attachments] || (params[:bid] && params[:bid][:uploads]))
@homework = HomeworkAttach.new
@homework.bid_id = @bid.id
@homework.user_id = User.current.id
@homework.save_attachments(params[:attachments])
@homework.save
if @homework.attachments.empty?
@homework.delete
flash[:error] = l(:no_attachmens_allowed)
# else
end
end
@homework_list = @bid.homeworks
end

View File

@ -100,12 +100,12 @@ class BoardsController < ApplicationController
end
def edit
if @project.project_type == 1
render :layout => 'base_courses'
end
end
def update
if @project.project_type ==1
render :layout => 'base_courses'
end
@board.safe_attributes = params[:board]
if @board.save
redirect_to_settings_in_projects

View File

@ -81,6 +81,35 @@
<% end %>
</td>
</tr>
</table>
</div>
<!--parameter -->
<div class="user_fans">
<table width="240" border="0">
<tr align="center" width="80px">
<td class="font_index"><%=link_to "#{@bid.join_in_contests.count}",:controller => "bids", :action => "show_participator" %></td>
<td class="font_index"><%=link_to "#{@bid.projects.count}", :controller => 'bids', :action => 'show_project' %></td>
<tr class="font_aram">
<td align="center" width="70px"> <%= l(:label_participator) %></td>
<td align="center" width="70px"> <%= l(:label_bidding_project) %></td>
</tr>
</table>
<div class="user_underline"></div>
</div>
<div class="inf_user_image">
<table>
<tr>
<td><%= l(:lable_contest_user) %><%= link_to(@user.show_name, user_path(@user))%></td>
</tr>

View File

@ -148,18 +148,18 @@
</td>
</tr>
<tr>
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag.png", weight:"15px", height:"15px") %>
<!-- td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag.png", weight:"15px", height:"15px") %>
<%= link_to l(:project_module_boards) ,project_boards_path(@project) %>
</td>
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag.png", weight:"15px", height:"15px") %>
<%= link_to l(:label_module_share) ,share_show_path(@project) %>
</td>
</td -->
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag.png", weight:"15px", height:"15px") %>
<%= link_to l(:label_module_share) ,share_show_path(@project) %>
</td>
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag.png", weight:"15px", height:"15px") %>
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project) %>
</td>
</tr>
<tr>
<td align="left" width="190px" valign="left"><%=image_tag("/images/sidebar/tool_tag.png", weight:"15px", height:"15px") %>
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project) %>
</td>
</tr>

View File

@ -5,9 +5,6 @@
<tr>
<td><span class="font_welcome_trustie"><%= l(:label_welcome_trustie) %> </span><span class="font_welcome_tdescription">, <%= l(:label_welcome_trustie_description) %></span></td>
</tr>
<!-- <tr>
<td class="font_welcome_Edescription">Trustie forge,a socialized collaboration platform for project management,software development and software crowdsourcing for creative university students and entrepreneurs.</td>
</tr> -->
</table>
</div>
<table>
@ -15,63 +12,66 @@
<td> <%= call_hook :view_account_login_top %>
<div id="login-form_new">
<%= form_tag(signin_path) do %>
<%= back_url_hidden_field_tag if is_logout? %>
<% unless User.current.logged? %> <!--modified by young-->
<table>
<tr>
<td align="right"><label for="username"><%= l(:label_username) %></label></td>
<td align="left"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td>
</tr>
<tr>
<td align="right"><label for="password"><%= l(:label_password) %></label></td>
<td align="left"><%= password_field_tag 'password', nil, :tabindex => '2' %></td>
</tr>
<% if Setting.openid? %>
<tr>
<td align="right"><label for="openid_url"><%= l(:field_identity_url)%></label></td>
<td align="left"><%= text_field_tag "openid_url", nil, :tabindex => '3' %></td>
</tr>
<% end %>
<tr>
<td></td>
<td align="left"> <% if Setting.autologin? %> <label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label> <% end %> </td>
</tr>
<tr>
<td align="left"> <% if Setting.lost_password? %>
<%= link_to l(:label_password_lost), lost_password_path %>
<% end %> </td>
<td align="right">
<input type="submit" name="login" value="<%= l(:button_login)%> &#187;" tabindex="5"/>
</td>
</tr>
</table>
<% else %>
<div>
<!--info-->
<!-- modified by bai -->
<table width="200" border="0">
<tr>
<td colspan="2" align="center" class="font_welcome_Cdescription" ><%= l(:label_welcome) %> <strong class="font_small_watch" style=" word-wrap: break-word; word-break: break-all"><%=link_to User.current.lastname<<User.current.firstname, user_path(User.current) %></strong> <%= l(:label_join) %></td>
</tr>
<tr>
<%= back_url_hidden_field_tag if is_logout? %>
<% unless User.current.logged? %> <!--modified by young-->
<table>
<tr>
<td align="right"><label for="username"><%= l(:label_username) %></label></td>
<td align="left"><%= text_field_tag 'username', params[:username], :tabindex => '1' %></td>
</tr>
<tr>
<td align="right"><label for="password"><%= l(:label_password) %></label></td>
<td align="left"><%= password_field_tag 'password', nil, :tabindex => '2' %></td>
</tr>
<% if Setting.openid? %>
<tr>
<td align="right"><label for="openid_url"><%= l(:field_identity_url)%></label></td>
<td align="left"><%= text_field_tag "openid_url", nil, :tabindex => '3' %></td>
</tr>
<% end %>
<tr>
<td></td>
<td align="left">
<% if Setting.autologin? %> <label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label>
<% end %>
</td>
</tr>
<tr>
<td align="left">
<% if Setting.lost_password? %>
<%= link_to l(:label_password_lost), lost_password_path %>
<% end %>
</td>
<td align="right">
<input type="submit" name="login" value="<%= l(:button_login)%> &#187;" tabindex="5"/>
</td>
</tr>
</table>
<% else %>
<div>
<!--info-->
<table width="200" border="0">
<tr>
<td colspan="2" align="center" class="font_welcome_Cdescription" ><%= l(:label_welcome) %> <strong class="font_small_watch" style=" word-wrap: break-word; word-break: break-all"><%=link_to User.current.lastname<<User.current.firstname, user_path(User.current) %></strong> <%= l(:label_join) %></td>
</tr>
<tr>
<td rowspan="2" style="padding-left: 20px"><%= image_tag(url_to_avatar(User.current), :class => 'avatar') %></td>
<td><strong class="font_small_watch"><%= link_to l(:label_user_watcher)+"("+User.watched_by(User.current).count.to_s+")", user_path(User.current) %></strong>&nbsp
<strong class="font_small_watch"><%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+User.current.watcher_users(User.current.id).count.to_s+")", user_path(User.current) %></strong></td>
</tr>
<tr>
<td align="left"><% unless User.current.memberships.empty? %>
<%= l(:label_x_welcome_participate, :count => User.current.memberships.count) %> <strong class="font_small_watch"><%= link_to User.current.memberships.count, {:controller => 'users', :action => 'user_projects', :id => User.current} %></strong> <%= l(:label_welcome_participate_project)%>
<% end %>
</td>
</tr>
</table>
<!-- end -->
</div>
<td rowspan="2" style="padding-left: 20px"><%= image_tag(url_to_avatar(User.current), :class => 'avatar') %></td>
<td><strong class="font_small_watch"><%= link_to l(:label_user_watcher)+"("+User.watched_by(User.current).count.to_s+")", user_path(User.current) %></strong>&nbsp
<strong class="font_small_watch"><%=link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+User.current.watcher_users(User.current.id).count.to_s+")", user_path(User.current) %></strong></td>
</tr>
<tr>
<td align="left"><% unless User.current.memberships.empty? %>
<%= l(:label_x_welcome_participate, :count => User.current.memberships.count) %> <strong class="font_small_watch"><%= link_to User.current.memberships.count, {:controller => 'users', :action => 'user_projects', :id => User.current} %></strong> <%= l(:label_welcome_participate_project)%>
<% end %>
</td>
</tr>
</table>
</div>
<% end %>
<% end %>
<% end %>
</div> <%= call_hook :view_account_login_bottom %>
</div>
<%= call_hook :view_account_login_bottom %>
<% if params[:username].present? %>
<%= javascript_tag "$('#password').focus();" %>
@ -100,37 +100,78 @@
}
}
</script>
<%= stylesheet_link_tag 'welcome' %>
<div class="body_resize">
<div class="right">
<div class="home">热门项目</div>
<div class="project">
<span style="overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;">
<a href="#" >Trustie1balabalbalabalbalabalbalabalbalabalbalabalbbalabalbalabalbalabalbalabalbalabalbalabal</a>
</span>
<span class="grey">This is a project!balabalabalabala...</span></div>
</div>
<!-- p class="grey">Fusce vehicula dignissim ligula. Vestibulum sit amet neque eu neque suscipit consequat quis vel risus. </p>
<p><strong>Vestibulum vehicula purus nec dui accumsan fermentum.</strong> Suspendisse potenti. Ut dapibus est id odio pretium blandit in eget leo. Aliquam erat volutpat. Curabitur blandit </p>
<p class="grey">&nbsp;</p -->
</div>
<div class="left">
<div class="home" >新手指引 &amp; 问答</div>
<!-- p><strong><em> 5th / April / 2009 </em></strong></p>
<p>Integer mauris. Cras iaculis viverra dolorqw. Nulla suscipit. </p -->
<div class="project"> <a href="#" ><span >新手入门指引帖 && FAQ bala...</span></a> <span class="grey"><strong><em>[ Trustie ]</em></strong></span></div>
</div>
<div class="clr"></div>
</div>
<!-- end -->
<br/><br/><br/><br/><br/><br/><br/>
<!-- end -->
<div>
<table width="700" border="0" align="center" style="padding-top: 0px">
<tr><td colspan="5" align="center" style="padding-bottom: 10px; font-size: 18px; font-color: #5c5c5c ; font-family: 微软雅黑"><%= l(:label_welcome_leave_message) %> <strong><%= toggle_link l(:label_welcome_click_me), 'put-bid-form', {:focus => 'new_form_project_message'} %></strong></td></tr>
<tr>
<td colspan="5" align="center" style="padding-bottom: 10px; font-size: 18px; font-color: #5c5c5c ; font-family: 微软雅黑"><%= l(:label_welcome_leave_message) %> <strong><%= toggle_link l(:label_welcome_click_me), 'put-bid-form', {:focus => 'new_form_project_message'} %></strong>
</td>
</tr>
<tr><td colspan="5" align="center" ><div class="homepage_underline"></div></td></tr>
<tr><td colspan="5" align="center">
<div id="put-bid-form" style="display: none">
<%= form_for('new_form', :method => :post,
:url => {:controller => 'words', :action => 'add_project_respond'}) do |f|%>
<table border="0" width="525px" align="center" >
<tr>
<td><%= f.text_area 'project_message', :rows => 3, :cols => 65, :value => "#{l(:label_welcome_my_respond)}", :onfocus => "clearInfo('new_form_project_message','#{l(:label_welcome_my_respond)}')", :onblur => "showInfo('new_form_project_message','#{l(:label_welcome_my_respond)}')", :style => "resize: none;", :class => 'noline'%></td>
</tr>
</table>
<table border="0" width="525px" align="center">
<tr>
<td align="right"> <%= submit_tag l(:button_submit), :name => nil , :class => "bid_btn" %></td>
</tr>
</table>
<% end %>
</div></td>
<tr>
<td colspan="5" align="center">
<div id="put-bid-form" style="display: none">
<%= form_for('new_form', :method => :post, :url => {:controller => 'words', :action => 'add_project_respond'}) do |f|%>
<table border="0" width="525px" align="center" >
<tr>
<td>
<%= f.text_area 'project_message',
:rows => 3,
:cols => 65,
:value => "#{l(:label_welcome_my_respond)}",
:onfocus => "clearInfo('new_form_project_message','#{l(:label_welcome_my_respond)}')",
:onblur => "showInfo('new_form_project_message','#{l(:label_welcome_my_respond)}')",
:style => "resize: none;",
:class => 'noline'%>
</td>
</tr>
</table>
<table border="0" width="525px" align="center">
<tr>
<td align="right"> <%= submit_tag l(:button_submit), :name => nil , :class => "bid_btn" %></td>
</tr>
</table>
<% end %>
</div>
</td>
</tr>
</tr>
</table>
</table>
</div>
<div style="padding-top: 40px"></div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1311,6 +1311,8 @@ zh:
button_bidding: 我要参加
field_enterprise: '企业:'
no_attachmens_allowed: 提交作业不能为空
button_bidding_homework: 参加竞标 #huang
field_homework_type: 提交形式 #bai
label_homework_respond: 作业情况
@ -1589,7 +1591,8 @@ zh:
label_join_contest: 加入竞赛
label_exit_contest: 退出竞赛
label_contest_modify_settings: 配置竞赛 #added by bai
label_participator: 参与者
label_contest_modify_settings: 配置竞赛
label_no_current_participate: 该竞赛暂无参与者
#end

View File

@ -310,8 +310,8 @@ Redmine::MenuManager.map :project_menu do |menu|
# menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
# menu.push :wiki, { :controller => 'wiki', :action => 'show', :id => nil }, :param => :project_id,
# :if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
# menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
# :if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
:if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
menu.push :files, { :controller => 'files', :action => 'index' }, :param => :project_id, :caption => :label_file_new
menu.push :repository, { :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil },
:if => Proc.new { |p| p.repository && !p.repository.new_record? && !( !User.current.member_of?(p) && p.hidden_repo ) }

View File

@ -0,0 +1,62 @@
.body_resize { width:950px; margin:0 auto; padding:0;}
.left { width:371px; float:left; margin:20px 5px 10px 5px; padding:5px;}
.right { width:527px; float:left; margin:20px 5px 10px 5px; padding:5px;}
.right ul { list-style:none; margin:5px 20px; padding:0;}
.right li { font: bold 12px Arial, Helvetica, sans-serif; color:#6f6f6f; padding:5px 20px; margin:0; background:url(images/about_ul_li.gif) left no-repeat;}
.body { background:#ebebeb; border-bottom:1px solid #fff; } /*没用到*/
.home {
font:bold 16px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
color:#2c2c2c;
border-bottom:1px solid #cccccc;
padding:10px 5px;
margin:0 0 10px 0;
}
p {
font:normal 13px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
color:#6f6f6f;
line-height:1.8em;
padding:5px 5px;
margin:0;
}
div.project {
font:normal 15px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
color:#6f6f6f;
line-height:1.8em;
padding:5px 5px;
margin:0;
border-bottom:1px solid #eeeeee;
width: 95%;
float: right;
}
div.project a{
color: #5B5B5B;
}
/*div.project{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}*/
span.grey {
float: right;
font: normal 13px Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
color:#afaeae;
line-height:1.8em;
padding:5px 5px;
margin:0;
}
p.clr, .clr { clear:both; padding:0; margin:0; background:none;}