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

This commit is contained in:
huang 2016-10-25 16:10:19 +08:00
commit 7ffb010b4f
7 changed files with 71 additions and 44 deletions

View File

@ -2,45 +2,45 @@
<div class="proInfoBox mb10"> <div class="proInfoBox mb10">
<%= issue_fields_rows do |rows| %> <%= issue_fields_rows do |rows| %>
<ul class="fl" > <ul class="fl" >
<li><p class="label">&nbsp;状态&nbsp;&nbsp;:&nbsp;</p><p class="pro_info_p" style="width:130px;"><%= @issue.status.name %></p> <li><p class="label03" >&nbsp;状态&nbsp;&nbsp;:&nbsp;</p><p class="pro_info_p"><%= @issue.status.name %></p>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('assigned_to_id') %> <% unless @issue.disabled_core_fields.include?('assigned_to_id') %>
<li><p class="label">&nbsp;指派给&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:130px;"><%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %></span> <li><p class="label03" >&nbsp;指派给&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p"><%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "--" %></span>
</li> </li>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</ul> </ul>
<ul class="fl" > <ul class="fl" >
<li><p class="label">&nbsp;优先级&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:130px;"><%= @issue.priority.name %></span> <li><p class="label03" >&nbsp;优先级&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:50px;"><%= @issue.priority.name %></span>
</li> </li>
<div class="cl"></div> <div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('done_ratio') %> <% unless @issue.disabled_core_fields.include?('done_ratio') %>
<li><p class="label">&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:130px;"><%= @issue.done_ratio %>%</span> <li><p class="label03" >&nbsp;% 完成&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:50px;"><%= @issue.done_ratio %>%</span>
</li> </li>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</ul> </ul>
<ul class="fl " > <ul class="fl " >
<% unless @issue.disabled_core_fields.include?('start_date') %> <% unless @issue.disabled_core_fields.include?('start_date') %>
<li><p class="label">&nbsp;开始&nbsp;&nbsp;:&nbsp;</p><p class="pro_info_p" style="width:130px;"><%= format_date(@issue.start_date) %></p> <li><p class="label03" style="width:50px;" >&nbsp;开始&nbsp;&nbsp;:&nbsp;</p><p class="pro_info_p"><%= format_date(@issue.start_date) %></p>
</li> </li>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('estimated_hours') %> <% unless @issue.disabled_core_fields.include?('estimated_hours') %>
<li><p class="label">&nbsp;周期&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:130px;"><%= l_hours(@issue.estimated_hours) %></span> <li><p class="label03" style="width:50px;">&nbsp;周期&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p"><%= l_hours(@issue.estimated_hours) %></span>
</li> </li>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
</ul> </ul>
<ul class="fl " > <ul class="fl " >
<% unless @issue.disabled_core_fields.include?('due_date') %> <% unless @issue.disabled_core_fields.include?('due_date') %>
<li><p class="label">&nbsp;计划完成&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:130px;"><%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %></span> <li><p class="label03" >&nbsp;计划完成&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:120px;"><%= format_date(@issue.due_date)? format_date(@issue.due_date) : "--" %></span>
</li> </li>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %> <% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
<li><p class="label">&nbsp;<%=l(:milestone)%>&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:130px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span> <li><p class="label03" >&nbsp;<%=l(:milestone)%>&nbsp;&nbsp;:&nbsp;</p><span class="pro_info_p" style="width:120px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span>
</li> </li>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>

View File

@ -2,8 +2,8 @@
<div class="ping_dispic"> <div class="ping_dispic">
<%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %> <%= link_to image_tag(url_to_avatar(@issue.author), :width => 46, :height => 46), user_path(@issue.author), :class => "ping_dispic" %>
</div> </div>
<div class="talk_txt fl" style="width:790px;"> <div class="talk_txt fl">
<p class="pro_page_tit" style="word-break:break-all; width:790px;"> <p class="pro_page_tit" style="word-break:break-all;">
<% case @issue.tracker_id %> <% case @issue.tracker_id %>
<% when 1%> <% when 1%>
<span class="fl" title="缺陷">【缺陷】</span> <span class="fl" title="缺陷">【缺陷】</span>
@ -41,7 +41,7 @@
<%= render :partial => 'issue_attachments',:locals => {:issue => @issue} %> <%= render :partial => 'issue_attachments',:locals => {:issue => @issue} %>
</div> </div>
<!--属性--> <!--属性-->
<%= render :partial => 'issues/attributes_show' %> <%#= render :partial => 'issues/attributes_show' %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

View File

@ -86,11 +86,7 @@
<% end %> <% end %>
</li> </li>
<li class=" clear" id="assigned_to_tips"> <li class=" clear" id="assigned_to_tips">
<% if @issue.assigned_to.nil? %> <%= @issue.assigned_to.nil? ? "未指派" : "已指派" %>
未指派
<% else %>
已指派
<% end %>
</li> </li>
<li class=" clear"> <li class=" clear">
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %> <% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
@ -107,11 +103,7 @@
<% end %> <% end %>
</li> </li>
<li class=" clear" id="milestone_option_tips"> <li class=" clear" id="milestone_option_tips">
<% if @issue.fixed_version.nil? %> <%= @issue.fixed_version.nil? ? "无里程碑" : "已指派里程碑" %>
无里程碑
<% else %>
已指派里程碑
<% end %>
<%= link_to "", new_project_version_path(@issue.project), :class => "pic_add mt5 ml5 fr", :target => "_blank" %> <%= link_to "", new_project_version_path(@issue.project), :class => "pic_add mt5 ml5 fr", :target => "_blank" %>
</li> </li>
<li class=" clear" style="border:1px solid #c8c8c8;"> <li class=" clear" style="border:1px solid #c8c8c8;">
@ -122,11 +114,7 @@
<% end %> <% end %>
</li> </li>
<li class=" clear" id="option_start_date_tips"> <li class=" clear" id="option_start_date_tips">
<% if @issue.start_date.nil? %> <%= @issue.start_date.nil? ? "未选择开始日期" : "已选择开始日期" %>
未选择开始日期
<% else %>
已选择开始日期
<% end %>
</li> </li>
<li class=" clear" style="border:1px solid #c8c8c8;"> <li class=" clear" style="border:1px solid #c8c8c8;">
<label class="label02" ></label> <label class="label02" ></label>
@ -137,11 +125,7 @@
<% end %> <% end %>
</li> </li>
<li class=" clear " id="option_end_date_tips"> <li class=" clear " id="option_end_date_tips">
<% if @issue.due_date.nil? %> <%= @issue.due_date.nil? ? "未选择结束日期" : "已选择结束日期" %>
未选择结束日期
<% else %>
已选择结束日期
<% end %>
</li> </li>
<li class=" clear"><%= l(:field_estimated_hours) %></li> <li class=" clear"><%= l(:field_estimated_hours) %></li>
<li class=" clear"> <li class=" clear">

View File

@ -6,11 +6,11 @@
autoUrl('reply_content_<%= comment.id %>'); autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<li class="reply-container ml15" nhname="reply_rec"> <li class="homepagePostReplyContainer" nhname="reply_rec">
<div class="homepagePostReplyPortrait" > <div class="homepagePostReplyPortrait" >
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
</div> </div>
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();"> <div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%> <%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>"> <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
@ -55,13 +55,13 @@
</li> </li>
<% end %> <% end %>
</ul> </ul>
<div class="reply-container borderBottomNone minHeight48 ml15"> <div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>"> <div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @issue.id%>">
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %> <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
</div> </div>
<div class="reply-content mb10"> <div class="homepagePostReplyInputContainer mb10">
<% if User.current.logged? %> <% if User.current.logged? %>
<div nhname='new_message_<%= @issue.id %>' style="display:none;"> <div nhname='new_message_<%= @issue.id %>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %> <%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>

View File

@ -15,12 +15,12 @@
} }
}); });
</script> </script>
<div class="mb10" id =issue_show_total""> <div class="mt10 mb10" id =issue_show_total"">
<div class="banner-big f16 fontGrey3"> <div class="banner-big f16 fontGrey3">
问题跟踪 问题跟踪
</div> </div>
<div class="container-big mt10" > <div class="resources mt10" style="float:left;">
<div class="pro_page_box"> <div class="pro_page_box">
<div class="problem_main borderBottomNone"> <div class="problem_main borderBottomNone">
<div id="issue_detail_show"> <div id="issue_detail_show">
@ -30,9 +30,9 @@
<!--problem_main end--> <!--problem_main end-->
<div style="clear: both;"></div> <div style="clear: both;"></div>
<div class="container-big-grey"> <div class="homepagePostReply">
<div class="topBorder" style="display: <%= @issue.journals.count>0 ? 'none': '' %>"></div> <div class="topBorder" style="display: <%= @issue.journals.count>0 ? 'none': '' %>"></div>
<div class="reply-banner" > <div class="homepagePostReplyBanner" >
<div class="homepagePostReplyBannerCount"> <div class="homepagePostReplyBannerCount">
<%=render :partial => 'issue_reply_banner' %> <%=render :partial => 'issue_reply_banner' %>
</div> </div>
@ -45,7 +45,47 @@
</div> </div>
</div> </div>
<div id="issue_edit_show" class="mt10 pro_newissue_con clear"> <div id="issue_edit_show" class="mt10 pro_newissue_con">
<%= render :partial => 'issues/edit'%> <%= render :partial => 'issues/edit'%>
</div> </div>
</div> <ul class="fr pro_new_conbox_right" id="project_issue_info_show">
<li class="clear">
<span class="pro_new_conbox_leftspan fl">当前状态</span>
<span class="pro_new_conbox_rightspan fl ml10"><%= @issue.status.name %></span>
</li>
<li class="clear">
<span class="pro_new_conbox_leftspan fl">选定优先级</span>
<span class="pro_new_conbox_rightspan fl ml10"><%= @issue.priority.name %></span>
</li>
<% unless @issue.disabled_core_fields.include?('assigned_to_id') %>
<li class="clear">
<span class="pro_new_conbox_leftspan fl">指派给</span>
<span class="pro_new_conbox_rightspan fl ml10">
<a href="" class="c_blue" ><%= @issue.assigned_to ? @issue.assigned_to.show_name : "--" %></a></span>
</li>
<% end %>
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
<li class="clear">
<span class="pro_new_conbox_leftspan fl">里程碑</span>
<span class="pro_new_conbox_rightspan fl ml10"><%= @issue.fixed_version ? @issue.fixed_version : "--" %></span>
</li>
<%end%>
<% unless @issue.disabled_core_fields.include?('start_date') %>
<li class="clear"><span class="pro_new_conbox_leftspan fl">开始日期</span>
<span class="pro_new_conbox_rightspan fl ml10"><%= format_date(@issue.start_date) %></span>
</li>
<% end %>
<% unless @issue.disabled_core_fields.include?('estimated_hours') %>
<li class="clear"><span class="pro_new_conbox_leftspan fl">预计工时(H)</span>
<span class="pro_new_conbox_rightspan fl ml10"><%= l_hours(@issue.estimated_hours) %></span>
</li>
<% end %>
<% unless @issue.disabled_core_fields.include?('done_ratio') %>
<li class="clear"><span class="pro_new_conbox_leftspan fl">完成度</span>
<span class="pro_new_conbox_rightspan fl ml10"><%= @issue.done_ratio %>%</span>
</li>
<% end %>
</ul>
<div class="cl"></div>
</div>

View File

@ -105,7 +105,8 @@ function addFile(inputEl, file, eagerUpload,btnId) {
'type': 'text', 'type': 'text',
'class': 'upload_filename readonly', 'class': 'upload_filename readonly',
'name': 'attachments[' + attachmentId + '][filename]', 'name': 'attachments[' + attachmentId + '][filename]',
'readonly': 'readonly' 'readonly': 'readonly',
'style': 'border:none;'
}).val(file.name), }).val(file.name),
// $('<input>', { // $('<input>', {
// 'type': 'text', // 'type': 'text',

View File

@ -565,14 +565,16 @@ function cancel_relation(orgId,projectId){
function issueEditShow(){ function issueEditShow(){
$("#issue_detail").hide(); $("#issue_detail").hide();
$(".container-big").hide(); $(".resources ").hide();
$("#issue_edit").show(); $("#issue_edit").show();
$("#project_issue_info_show").hide();
} }
function issueDetailShow(){ function issueDetailShow(){
$("#issue_edit").hide(); $("#issue_edit").hide();
$("#issue_detail").show(); $("#issue_detail").show();
$(".container-big").show(); $(".resources ").show();
$("#project_issue_info_show").show();
} }
//项目讨论区提交 //项目讨论区提交