Merge branch 'rep_quality' into develop
This commit is contained in:
commit
7b75664b82
|
@ -385,6 +385,7 @@ module ApplicationHelper
|
||||||
subject = truncate(subject, :length => 60)
|
subject = truncate(subject, :length => 60)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# status_id:3、已解决 5、已关闭
|
||||||
if issue.status_id == 3
|
if issue.status_id == 3
|
||||||
s = link_to text, issue_path(issue), :class => "text_line_s", :title => title
|
s = link_to text, issue_path(issue), :class => "text_line_s", :title => title
|
||||||
elsif issue.status_id == 5
|
elsif issue.status_id == 5
|
||||||
|
@ -1765,20 +1766,21 @@ module ApplicationHelper
|
||||||
link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
|
link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 本次修改,修改为只显示关闭的所占%比
|
||||||
def progress_bar(pcts, options={})
|
def progress_bar(pcts, options={})
|
||||||
pcts = [pcts, pcts] unless pcts.is_a?(Array)
|
pcts = [pcts] unless pcts.is_a?(Array)
|
||||||
pcts = pcts.collect(&:round)
|
pcts = pcts.collect(&:round)
|
||||||
pcts[1] = pcts[1] - pcts[0]
|
# pcts[1] = pcts[1] + pcts[0]
|
||||||
pcts << (100 - pcts[1] - pcts[0])
|
pcts << (100 - pcts[0])
|
||||||
width = options[:width] || '100px;'
|
width = options[:width] || '100px;'
|
||||||
legend = options[:legend] || ''
|
legend = options[:legend] || ''
|
||||||
content_tag('table',
|
content_tag('table',
|
||||||
content_tag('tr',
|
content_tag('tr',
|
||||||
(pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed') : ''.html_safe) +
|
(pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed', :title => "已关闭:#{pcts[0]}%") : ''.html_safe) +
|
||||||
(pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done') : ''.html_safe) +
|
# (pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done', :title => "开发中:#{pcts[1]}%") : ''.html_safe) +
|
||||||
(pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo') : ''.html_safe)
|
(pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'todo', :title => "未完成:#{pcts[1]}%") : ''.html_safe), :style => "width: #{width}"
|
||||||
), :class => 'progress', :style => "width: #{width};").html_safe +
|
), :class => 'progress').html_safe
|
||||||
content_tag('p', legend, :class => 'percent').html_safe
|
# + content_tag('p', legend, :class => 'percent').html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
def checked_image(checked=true)
|
def checked_image(checked=true)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!--Modified by young-->
|
<!--Modified by young-->
|
||||||
<% if version.issues_count > 0 %>
|
<% if version.issues_count > 0 %>
|
||||||
<p class="f14 mb5">»<%= l(:label_versions_progress)%></p>
|
<p class="f14 mb5">»<%= l(:label_versions_progress)%></p>
|
||||||
<%= progress_bar([version.closed_percent, version.completed_percent], :width => '82%', :legend => ('%0.0f%' % version.completed_percent)) %>
|
<%= progress_bar([version.closed_percent], :width => '648px;', :legend => ('%0.0f%' % version.completed_percent)) %>
|
||||||
<p class="progress-info">
|
<p class="progress-info">
|
||||||
<%= link_to(l(:label_x_issues, :count => version.issues_count),
|
<%= link_to(l(:label_x_issues, :count => version.issues_count),
|
||||||
project_issues_path(version.project, :status_id => '*', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue",) %>
|
project_issues_path(version.project, :status_id => '*', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue",) %>
|
||||||
|
|
|
@ -2,69 +2,68 @@
|
||||||
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="roadmap">
|
<div class="roadmap">
|
||||||
<fieldset id="filters" class="collapsible collapsed" >
|
<fieldset id="filters" class="collapsible collapsed" >
|
||||||
<legend><%= l(:label_version_display_settings)%></legend>
|
<legend><%= l(:label_version_display_settings)%></legend>
|
||||||
<%= form_tag({}, :method => :get) do %>
|
<%= form_tag({}, :method => :get) do %>
|
||||||
<% @trackers.each do |tracker| %>
|
<% @trackers.each do |tracker| %>
|
||||||
<label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
|
<label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
|
||||||
<%=h tracker.name %></label>
|
<%=h tracker.name %></label>
|
||||||
<% end %>
|
<% end %>
|
||||||
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
|
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
|
||||||
<% if @project.descendants.active.any? %>
|
<% if @project.descendants.active.any? %>
|
||||||
<%= hidden_field_tag 'with_subprojects', 0 %>
|
<%= hidden_field_tag 'with_subprojects', 0 %>
|
||||||
<label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
|
<label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= submit_tag l(:button_apply), :class => 'sub_btn ml10', :name => nil %>
|
<%= submit_tag l(:button_apply), :class => 'sub_btn ml10', :name => nil %>
|
||||||
<%= link_to l(:label_version_new), new_project_version_path(@project), :class => 'green_u_btn fr' if User.current.allowed_to?(:manage_versions, @project) %>
|
<%= link_to l(:label_version_new), new_project_version_path(@project), :class => 'green_u_btn fr' if User.current.allowed_to?(:manage_versions, @project) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<% if @versions.empty? %>
|
||||||
<% if @versions.empty? %>
|
|
||||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% @versions.each do |version| %>
|
<% @versions.each do |version| %>
|
||||||
|
|
||||||
<div class="roadmap_box">
|
<div class="roadmap_box">
|
||||||
<p><a href="javascript:void(0)" class=" f16 fb c_dblue " target="_blank">
|
<p><a href="javascript:void(0)" class=" f16 fb c_dblue " target="_blank">
|
||||||
<%= link_to_version_show version, :name => version_anchor(version) %>
|
<%= link_to_version_show version, :name => version_anchor(version) %>
|
||||||
<% if version.completed? %>
|
<% if version.completed? %>
|
||||||
<span style="color: #E8770D;float:right;"><%= format_date(version.effective_date) %></span>
|
<span style="color: #E8770D;float:right;"><%= format_date(version.effective_date) %></span>
|
||||||
<% elsif version.effective_date %>
|
<% elsif version.effective_date %>
|
||||||
<span style="color: #E8770D;float:right;"><strong><%= due_date_distance_in_words(version.effective_date) %></strong> (<%= format_date(version.effective_date) %>)</span>
|
<span style="color: #E8770D;float:right;"><strong><%= due_date_distance_in_words(version.effective_date) %></strong> (<%= format_date(version.effective_date) %>)</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="roadmap_pro mb10">
|
<div class="roadmap_pro mb10">
|
||||||
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
|
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
|
||||||
<%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
|
<%#= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
|
||||||
|
|
||||||
</div><!--roadmap_pro end-->
|
</div><!--roadmap_pro end-->
|
||||||
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
|
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
|
||||||
<div class="roadmap_list">
|
<div class="roadmap_list">
|
||||||
<%= form_tag({}) do -%>
|
<%= form_tag({}) do -%>
|
||||||
<p class="f14 mb5">»<%= l(:label_related_issues) %></p>
|
<p class="f14 mb5">»<%= l(:label_related_issues) %></p>
|
||||||
<ul class="roadmap_list_ul">
|
<ul class="roadmap_list_ul">
|
||||||
<% issues.each do |issue| -%>
|
<% issues.each do |issue| -%>
|
||||||
<li style="overflow:hidden">
|
<li style="overflow:hidden">
|
||||||
<%= link_to_issue_version(issue, :project => (@project != issue.project)) %>
|
<%= link_to_issue_version(issue, :project => (@project != issue.project)) %>
|
||||||
</li>
|
</li>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %><!--roadmap_list end-->
|
<% end %><!--roadmap_list end-->
|
||||||
<div class="roadmap_list">
|
<div class="roadmap_list">
|
||||||
<p class="f14 mb5">»<%= l(:label_versions_description)%></p>
|
<p class="f14 mb5">»<%= l(:label_versions_description)%></p>
|
||||||
<p><%=h version.description %></p>
|
<p><%=h version.description %></p>
|
||||||
</div><!--roadmap_list end-->
|
</div><!--roadmap_list end-->
|
||||||
</div><!--roadmap_box end-->
|
</div><!--roadmap_box end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<ul class="wlist" >
|
<ul class="wlist" >
|
||||||
<%= pagination_links_full @versions_pages%>
|
<%= pagination_links_full @versions_pages%>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div><!--roadmap end-->
|
</div><!--roadmap end-->
|
||||||
|
|
||||||
|
|
|
@ -605,14 +605,15 @@ img.ui-datepicker-trigger {
|
||||||
|
|
||||||
/* 里程碑 */
|
/* 里程碑 */
|
||||||
.roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;}
|
.roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;}
|
||||||
.progress{ width:520px; height:20px; margin-bottom:5px; background:#e9e9e9;}
|
.progress{ width:648px; height:20px; margin-bottom:5px; background:#e9e9e9;}
|
||||||
.closed{ background:#bae0ba; display:block;height:20px; float:left;}
|
.closed{ background:#bae0ba; height:20px;}
|
||||||
.done{ background:#d3edd3; display:block;height:20px;float:left;}
|
.done{ background:#d3edd3; display:block;height:20px;float:left;}
|
||||||
.roadmap_box{ margin-bottom:10px;}
|
.roadmap_box{ margin-bottom:10px;}
|
||||||
.roadmap_list_ul{border:1px solid #ddd; border-bottom:none; margin-bottom:10px;}
|
.roadmap_list_ul{border:1px solid #ddd; border-bottom:none; margin-bottom:10px;}
|
||||||
.roadmap_list_ul li{border-bottom:1px solid #ddd; height:21px; padding-top:5px; padding-left:10px;}
|
.roadmap_list_ul li{border-bottom:1px solid #ddd; height:21px; padding-top:5px; padding-left:10px;}
|
||||||
.roadmap_list_ul li:hover{background:#ffffdd;}
|
.roadmap_list_ul li:hover{background:#ffffdd;}
|
||||||
.text_line_s{ text-decoration:line-through; color:#999;}
|
.text_line_s{ text-decoration:line-through; color:#999;}
|
||||||
|
.del_line{ text-decoration:line-through !important; color:#999;}
|
||||||
.roadmap_list_w{ width:555px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
.roadmap_list_w{ width:555px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||||
|
|
||||||
.wiki_text{ width:663px; height:300px; margin-bottom:10px;}
|
.wiki_text{ width:663px; height:300px; margin-bottom:10px;}
|
||||||
|
|
Loading…
Reference in New Issue