Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject

Conflicts:
	app/views/issues/index.html.erb
This commit is contained in:
daiao 2016-10-27 11:17:23 +08:00
commit 025ec0c9f1
17 changed files with 138 additions and 83 deletions

View File

@ -310,7 +310,7 @@
<% end %> <% end %>
<% end %> <% end %>
<% if @issues.empty? %> <% if @issues.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata mt10"><%= l(:label_no_data) %></p>
<% else %> <% else %>
<div id="issue_list"> <div id="issue_list">
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %> <%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
@ -330,3 +330,4 @@
</div> </div>
<!--缺陷列表结束--> <!--缺陷列表结束-->

View File

@ -0,0 +1,4 @@
<div class="pro_new_info mb10">
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
<p class="sy_tab_con_p ">没有数据可供显示!</p>
</div>

View File

@ -58,7 +58,9 @@
<li> <li>
<p class="label">&nbsp;指派&nbsp;&nbsp;:&nbsp;</p> <p class="label">&nbsp;指派&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p" style="width:130px;"> <span class="pro_info_p" style="width:130px;">
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %> <% unless activity.assigned_to.nil? %>
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %>
<% end %>
<a href="javascript:void(0)" class="pic_edit2 ml5" style="vertical-align:top;"></a></span> <a href="javascript:void(0)" class="pic_edit2 ml5" style="vertical-align:top;"></a></span>
<%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project), <%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project),
{ :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0}, { :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0},

View File

@ -1,4 +1,4 @@
<div class="st_list2"> <div class="st_list2" style="width:970px;">
<div class="st_box"> <div class="st_box">
<a href="#" class="fr fb mb5" >加入时间</a> <a href="#" class="fr fb mb5" >加入时间</a>
<div class="cl"></div><!--st_box_top end--> <div class="cl"></div><!--st_box_top end-->

View File

@ -10,20 +10,16 @@
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div> <div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
<%if count>3 %> <%if count>3 %>
<div class="homepagePostReplyBannerMore"> <div class="homepagePostReplyBannerMore">
<% if activity.class.to_s == 'HomeworkCommon' %> <% if activity.class.to_s == 'Issue' %>
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'HomeworkCommon',<%=activity.id %>,<%=hw_status %>,<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_project_acts('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_issue',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
<% elsif activity.class.to_s == 'Message' %> <% elsif activity.class.to_s == 'Message' %>
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_message_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>,<%=is_course %>,<%=is_board %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_project_acts('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_message',<%=user_activity_id %>,<%=is_course %>,<%=is_board %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多
</a>
<% elsif activity.class.to_s == 'BlogComment' %>
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_blog_comment_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>,<%=homepage %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
<% else %> <% else %>
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_all_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" > <a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_project_acts('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
展开更多 展开更多
</a> </a>
<% end %> <% end %>

View File

@ -1,17 +1,14 @@
<div class="project_r_h" style="width:730px;"> <div class="container-big mb10">
<h2 class="project_h2 fl"><%= @subPage_title %></h2> <div class="project_r_h" style="width:970px;">
<% if is_project_manager?(User.current, @project) %> <h2 class="project_h2 fl"><%= @subPage_title %></h2>
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;"> <% if is_project_manager?(User.current, @project) %>
<%=link_to "成员管理", :controller => 'projects', :action => 'settings', :id => @project.id, :tab => 'members' %> <span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
</span> <%=link_to "成员管理", :controller => 'projects', :action => 'settings', :id => @project.id, :tab => 'members' %>
<% end %> </span>
<% end %>
</div>
<div class="member_content">
<%= error_messages_for 'member' %>
<%= render :partial => @render_file, :locals => {:members => @members} %>
</div>
</div> </div>
<div class="member_content">
<%= error_messages_for 'member' %>
<%= render :partial => @render_file, :locals => {:members => @members} %>
</div>
<script>
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
</script>

View File

@ -34,16 +34,16 @@
<table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0"> <table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th class="w150 hidden">版本库名</th> <th class="w130 pl10 pr10 hidden fl">版本库名</th>
<th class="w100 hidden">管理系统</th> <th class="w90 pr10 hidden fl">管理系统</th>
<th class="w536 hidden">库路径</th> <th class="w536 hidden fl">库路径</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th class="w150 hidden"><%= @gitlab_repository.identifier %></th> <th class="w130 pl10 pr10 hidden fl"><%= @gitlab_repository.identifier %></th>
<th class="w100 hidden">Git</th> <th class="w90 pr10 hidden fl">Git</th>
<th class="w536 hidden db"><%=h @repos_url %></th> <th class="w536 hidden fl"><%=h @repos_url %></th>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -11,23 +11,23 @@
<table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0"> <table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th>名称</th> <th class="fl" style="width:156px;">名称</th>
<th>结束日期</th> <th class="w80 fl">结束日期</th>
<th>描述</th> <th class="w350 fl">描述</th>
<th>状态</th> <th class="w50 fl">状态</th>
<th >操作</th> <th class="w150 fl">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<% @project.shared_versions.each do |version| %> <% @project.shared_versions.each do |version| %>
<tr> <tr>
<th> <th class="fl hidden" style="width:156px;">
<a><%= 'shared' if version.project != @project %> <%= link_to_version version %></a> <%= link_to version.name, project_versions_path(version), :class => "c_blue02" %>
</th> </th>
<th><%= format_date(version.effective_date) %></th> <th class="fl w80"><%= format_date(version.effective_date) %></th>
<th><%=h version.description %></th> <th class="fl w350 hidden"><%=h version.description %></th>
<th><%= l("version_status_#{version.status}") %></th> <th class="fl w50"><%= l("version_status_#{version.status}") %></th>
<th> <th class="fl w150">
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %> <% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to l(:button_edit), edit_version_path(version, :is_setting => true), :class => 'sy_btn_blue mr5', :remote => true %> <%= link_to l(:button_edit), edit_version_path(version, :is_setting => true), :class => 'sy_btn_blue mr5', :remote => true %>
<%= delete_link_version version_path(version, :is_setting => true), :class=>"sy_btn_grey mr5", :remote => true %> <%= delete_link_version version_path(version, :is_setting => true), :class=>"sy_btn_grey mr5", :remote => true %>

View File

@ -1,30 +1,28 @@
<div class="project_r_h" style="width:730px;"> <div class="container-big mb10">
<h2 class="project_h2"><%= l(:label_user_watcher)%></h2> <div class="project_r_h" style="width:970px;">
</div> <h2 class="project_h2"><%= l(:label_user_watcher)%></h2>
<div class="st_list2"> </div>
<div class="st_box"> <div class="st_list2" style="width:970px;">
<a href="#" class="fr fb mb5" >加入时间</a> <div class="st_box">
<div class="cl"></div><!--st_box_top end--> <a href="#" class="fr fb mb5" >加入时间</a>
<div class="cl"></div><!--st_box_top end-->
<% for user in @project.watcher_users %>
<div class="st_boxlist">
<a href="javascript:" class="st_img">
<%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %>
</a>
<span class="fl ml10 c_grey"><%= l(:label_username)%></span>
<%= link_to(user.name, user_path(user),:class => "ml10 c_blue02") %>
<span class="fr c_grey"><%= format_date(user.created_on) %></span>
</div>
<div class="cl"></div>
<% end%>
<% for user in @project.watcher_users %>
<div class="st_boxlist">
<a href="javascript:" class="st_img">
<%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %>
</a>
<span class="fl ml10 c_grey"><%= l(:label_username)%></span>
<%= link_to(user.name, user_path(user),:class => "ml10 c_blue02") %>
<span class="fr c_grey"><%= format_date(user.created_on) %></span>
</div>
<div class="cl"></div> <div class="cl"></div>
<% end%> </div>
</div>
<% html_title(l(:label_followers)) -%>
<div class="cl"></div> </div>
</div>
</div>
<% html_title(l(:label_followers)) -%>
<script>
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
</script>

View File

@ -25,9 +25,24 @@
</div> </div>
</div> </div>
</div> </div>
<div class="alert alert-orange mb15 ">
在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %></a> <% if @request.state == "merged" %>
</div> <div class="alert alert-orange mb15 ">
改动已合并至 <%= @request.target_branch %> 分支
</div>
<% else %>
<% if is_project_manager?(User.current.id, @project.id) %>
<% if @request.state == "closed" %>
该请求已被关闭
<% else %>
<div class="alert alert-orange mb15 ">
在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %></a>
</div>
<% end %>
<% end %>
<% end %>
<div class="new_roadmap_conbox mb10" > <div class="new_roadmap_conbox mb10" >
<div class=" clear"> <div class=" clear">
<ul class="new_roadmap_nav fl" > <ul class="new_roadmap_nav fl" >

View File

@ -41,10 +41,6 @@
}); });
</script> </script>
<% else %> <% else %>
<div class="new_roadmap_conbox mb10" > <%= render :partial => "projects/no_data" %>
<div class="new_roadmap_navbox clear">
版本库中还没有提交代码,请先提交代码
</div>
</div>
<% end %> <% end %>

View File

@ -62,7 +62,9 @@
<li> <li>
<p class="label03">&nbsp;指派&nbsp;&nbsp;:&nbsp;</p> <p class="label03">&nbsp;指派&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p" style="width:130px;"> <span class="pro_info_p" style="width:130px;">
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %> <% unless activity.assigned_to.nil? %>
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "linkBlue hidden", :style => "max-width:100px; display:inline-block;" %>
<% end %>
<a href="javascript:void(0)" class="pic_edit2 ml5" style="vertical-align:top;"></a></span> <a href="javascript:void(0)" class="pic_edit2 ml5" style="vertical-align:top;"></a></span>
<%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project), <%= select( :issue, :user_id, principals_options_for_isuue_list(activity.project),
{ :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0}, { :include_blank => false,:selected => @assign_to_id ? @assign_to_id : 0},

View File

@ -10,4 +10,8 @@ $('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :p
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>'); $('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>');
<% elsif params[:type] == 'News' || params[:type] == 'Issue' || params[:type] == 'Syllabus' %> <% elsif params[:type] == 'News' || params[:type] == 'Issue' || params[:type] == 'Syllabus' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>'); $('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>');
<% elsif params[:type] == 'is_project_issue' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'projects/project_issue_reply', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>');
<% elsif params[:type] == 'is_project_message' %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'projects/project_message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i,:is_course => @is_course, :is_board => @is_board}) %>');
<% end %> <% end %>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1495,6 +1495,41 @@ function expand_reply_homework(container, btnid, id, type, div_id, hw_status, us
} }
} }
// 项目中展开
function expand_reply_project_acts(container, btnid, id, type, div_id, hw_status, user_activity_id) {
var target = $(container);
var btn = $(btnid);
if (btn.data('init') == '0') {
btn.data('init', 1);
$.get(
'/users/all_journals',
{
type: type,
id: id,
div_id: div_id,
hw_status: hw_status,
user_activity_id: user_activity_id
},
function(data) {
}
);
btn.html('收起回复');
//target.show();
} else if(btn.data('init') == '1') {
btn.data('init', 3);
btn.html('展开更多');
target.hide();
target.eq(0).show();
target.eq(1).show();
target.eq(2).show();
}
else {
btn.data('init', 1);
btn.html('收起回复');
target.show();
}
}
//by yk 列表描述将文字和起来去掉空格多于100就显示省略号 //by yk 列表描述将文字和起来去掉空格多于100就显示省略号
function description_showwords_ellipsis(id,num){ function description_showwords_ellipsis(id,num){
var str = ""; var str = "";

View File

@ -253,7 +253,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.w305{ width:305px;} .w305{ width:305px;}
.w350 {width:350px;} .w350 {width:350px;}
.w362 {width:362px;} .w362 {width:362px;}
.h400{height: 400px !important;} .h400{height:400px !important;}
.w430{ width:430px;} .w430{ width:430px;}
.W440{ width:440px;} .W440{ width:440px;}
.w450 {width:450px;} .w450 {width:450px;}
@ -271,7 +271,6 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.w607 {width:607px;} .w607 {width:607px;}
.w664{ width:664px;} .w664{ width:664px;}
.w683{ width:683px;} .w683{ width:683px;}
.w350{ width:350px;}
.w610{ width:610px;} .w610{ width:610px;}
.w600{ width:600px !important;} .w600{ width:600px !important;}
.w603{ width:603px !important;} .w603{ width:603px !important;}

View File

@ -877,6 +877,8 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
.sy_new_table thead tr td{ border-bottom:1px solid #e5e5e5; font-weight: bold; background-image: linear-gradient(#fcfcfc, #eee);} .sy_new_table thead tr td{ border-bottom:1px solid #e5e5e5; font-weight: bold; background-image: linear-gradient(#fcfcfc, #eee);}
.sy_new_table tbody tr:hover{ background:#f5f5f5;} .sy_new_table tbody tr:hover{ background:#f5f5f5;}
.sy_new_table tbody tr td{ height:40px; line-height:40px; border-bottom:1px solid #e5e5e5; color:#888;} .sy_new_table tbody tr td{ height:40px; line-height:40px; border-bottom:1px solid #e5e5e5; color:#888;}
.table-td-w180{display:inline-block;with:180px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
.table-td-w380{display:inline-block;with:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
/*项目简介*/ /*项目简介*/
.pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;} .pro_new_info{ border:1px solid #ddd; background-color:#fff; width: 998px;}
.pro_new_info h2{ background: #eee; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px;} .pro_new_info h2{ background: #eee; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px;}
@ -1008,4 +1010,8 @@ textarea.muban_textarea{ width: 98.5%;border:1px solid #ddd; background:#fff; co
.alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;} .alert-blue{ background-color: #d9edf7;border-color: #bce8f1; color: #3a87ad;}
.alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;} .alert-orange{ background-color: #fff9e9;border-color: #f6d0b1; color:#ee4a20;}
.close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;} .close{padding: 0;cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; font-size: 21px; font-weight: bold;line-height: 1; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.3;}
.close:hover{opacity: 0.5;} .close:hover{opacity: 0.5;}
/* 课程大纲 */
.icons_tishi{ width: 110px; height: 110px;margin: 135px auto 20px;}
.sy_tab_con_p{ font-size: 16px;text-align: center; margin-bottom:100px; color:#888;}