完成里程碑界面
This commit is contained in:
parent
8e7b4868ca
commit
fec751608a
|
@ -187,6 +187,28 @@ module ApplicationHelper
|
|||
s
|
||||
end
|
||||
|
||||
def link_to_issue_version(issue, options={})
|
||||
title = nil
|
||||
subject = nil
|
||||
text = options[:tracker] == false ? "##{issue.id}" : "#{issue.tracker} ##{issue.id}"
|
||||
if options[:subject] == false
|
||||
title = truncate(issue.subject, :length => 60)
|
||||
else
|
||||
subject = issue.subject
|
||||
if options[:truncate]
|
||||
subject = truncate(subject, :length => 60)
|
||||
end
|
||||
end
|
||||
if issue.status_id == 5
|
||||
s = link_to text, issue_path(issue), :class => "text_line_s", :title => title
|
||||
else
|
||||
s = link_to text, issue_path(issue), :class => "c_blue", :title => title
|
||||
end
|
||||
s << h(": #{subject}") if subject
|
||||
s = h("#{issue.project} - ") + s if options[:project]
|
||||
s
|
||||
end
|
||||
|
||||
# Generates a link to an attachment.
|
||||
# Options:
|
||||
# * :text - Link text (default to attachment filename)
|
||||
|
@ -724,7 +746,7 @@ module ApplicationHelper
|
|||
|
||||
def breadcrumb(*args)
|
||||
elements = args.flatten
|
||||
elements.any? ? content_tag('p', (args.join(" \xc2\xbb ") + " \xc2\xbb ").html_safe, :class => 'breadcrumb') : nil
|
||||
elements.any? ? content_tag('p', (args.join(" \xc2\xbb ") + " \xc2\xbb ").html_safe, :class => 'wiki_con_tit"') : nil
|
||||
end
|
||||
|
||||
def other_formats_links(&block)
|
||||
|
|
|
@ -24,6 +24,11 @@ module ProjectsHelper
|
|||
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => "c_blue02"
|
||||
end
|
||||
|
||||
def link_to_version_show(version, options = {})
|
||||
return '' unless version && version.is_a?(Version)
|
||||
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => " f16 fb c_dblue "
|
||||
end
|
||||
|
||||
def project_settings_tabs
|
||||
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural},
|
||||
{:name => 'modules', :action => :select_project_modules, :partial => 'projects/settings/modules', :label => :label_module_plural},
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<!--Modified by young-->
|
||||
<% if version.issues_count > 0 %>
|
||||
<p style="margin-top:0;font-size:12px;">»<%= l(:label_versions_progress)%></p>
|
||||
<%= progress_bar([version.closed_percent, version.completed_percent], :width => '40em', :legend => ('%0.0f%' % version.completed_percent)) %>
|
||||
<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)) %>
|
||||
<p class="progress-info">
|
||||
<%= link_to(l(:label_x_issues, :count => version.issues_count),
|
||||
project_issues_path(version.project, :status_id => '*', :fixed_version_id => version, :set_filter => 1)) %>
|
||||
<%= 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",) %>
|
||||
|
||||
(<%= link_to_if(version.closed_issues_count > 0, l(:label_x_closed_issues_abbr, :count => version.closed_issues_count),
|
||||
project_issues_path(version.project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1)) %>
|
||||
(<%= link_to_if(version.closed_issues_count > 0, l(:label_x_closed_issues_abbr, :count => version.closed_issues_count),
|
||||
project_issues_path(version.project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>
|
||||
—
|
||||
<%= link_to_if(version.open_issues_count > 0, l(:label_x_open_issues_abbr, :count => version.open_issues_count),
|
||||
project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1)) %>)
|
||||
<%= link_to_if(version.open_issues_count > 0, l(:label_x_open_issues_abbr, :count => version.open_issues_count),
|
||||
project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>)
|
||||
</p>
|
||||
<% else %>
|
||||
<p class="progress-info"><%= l(:label_roadmap_no_issues) %></p>
|
||||
<p><%= l(:label_roadmap_no_issues) %></p>
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +1,81 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
||||
</div>
|
||||
<!--<div class="content-title-top">-->
|
||||
<!--<%#= link_to l(:label_version_new), new_project_version_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>-->
|
||||
<!--</div>-->
|
||||
<div class="roadmap">
|
||||
<fieldset id="filters" class="collapsible collapsed" >
|
||||
<legend><%= l(:label_version_display_settings)%></legend>
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
|
||||
<%=h tracker.name %></label>
|
||||
<% end %>
|
||||
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
|
||||
<% if @project.descendants.active.any? %>
|
||||
<%= hidden_field_tag 'with_subprojects', 0 %>
|
||||
<label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
|
||||
<% end %>
|
||||
<%= submit_tag l(:button_apply), :class => 'sub_btn ml10', :name => nil %>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<% if @versions.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<% @versions.each do |version| %>
|
||||
|
||||
<div class="roadmap_box">
|
||||
<p><a href="javascript:void(0)" class=" f16 fb c_dblue " target="_blank">
|
||||
<%= link_to_version_show version, :name => version_anchor(version) %>
|
||||
<% if version.completed? %>
|
||||
<span style="color: #E8770D;float:right;"><%= format_date(version.effective_date) %></span>
|
||||
<% 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>
|
||||
<% end %>
|
||||
</a>
|
||||
</p>
|
||||
<div class="roadmap_pro mb10">
|
||||
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
|
||||
<%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
|
||||
|
||||
</div><!--roadmap_pro end-->
|
||||
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
|
||||
<div class="roadmap_list">
|
||||
<%= form_tag({}) do -%>
|
||||
<p class="f14 mb5">»<%= l(:label_related_issues) %></p>
|
||||
<ul class="roadmap_list_ul">
|
||||
<% issues.each do |issue| -%>
|
||||
<li style="overflow:hidden">
|
||||
<%= link_to_issue_version(issue, :project => (@project != issue.project)) %>
|
||||
</li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %><!--roadmap_list end-->
|
||||
<div class="roadmap_list">
|
||||
<p class="f14 mb5">»<%= l(:label_versions_description)%></p>
|
||||
<p><%=h version.description %></p>
|
||||
</div><!--roadmap_list end-->
|
||||
</div><!--roadmap_box end-->
|
||||
<% end %>
|
||||
|
||||
<ul class="wlist" >
|
||||
<%= pagination_links_full @versions_pages%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div><!--roadmap end-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--modified by young-->
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
||||
|
@ -25,11 +103,11 @@
|
|||
|
||||
<!-- <h3><%= l(:label_version_plural) %></h3>
|
||||
<% @versions.each do |version| %>
|
||||
<%= link_to format_version_name(version), "##{version_anchor(version)}" %><br />
|
||||
<%= link_to format_version_name(version), "##{version_anchor(version)}", :class =>" f16 fb c_dblue " %><br />
|
||||
<% end %> -->
|
||||
<% if @completed_versions.present? %>
|
||||
<p>
|
||||
<%= link_to_function l(:label_completed_versions),
|
||||
<%= link_to_function l(:label_completed_versions),
|
||||
'$("#toggle-completed-versions").toggleClass("collapsed"); $("#completed-versions").toggle()',
|
||||
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %><br />
|
||||
<span id="completed-versions" style="display:none;">
|
||||
|
|
|
@ -32,16 +32,16 @@
|
|||
|
||||
<div class="box tabular" style="padding-top: 10px;">
|
||||
<!--上一页-->
|
||||
<% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %>
|
||||
<%= fields_for @page do |fp| %>
|
||||
<p>
|
||||
<label>
|
||||
<%= l(:field_parent_title) %>
|
||||
</label>
|
||||
<%= fp.select :parent_id,content_tag('option', '', :value => '') + wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%# if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %>
|
||||
<%#= fields_for @page do |fp| %>
|
||||
<!--<p>-->
|
||||
<!--<label>-->
|
||||
<!--<%#= l(:field_parent_title) %>-->
|
||||
<!--</label>-->
|
||||
<!--<%#= fp.select :parent_id,content_tag('option', '', :value => '') + wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent) %>-->
|
||||
<!--</p>-->
|
||||
<%# end %>
|
||||
<%# end %>
|
||||
<ul class="wiki_new_ul">
|
||||
<li><label class="label"> <%= l(:field_comments) %> : </label>
|
||||
<%= f.text_field :comments, :class => "w557" %>
|
||||
|
|
|
@ -390,3 +390,21 @@ div.flash.warning, .conflict {
|
|||
.floatbox{ width:420px; border:3px solid #15bccf; background:#fff; padding:5px;}
|
||||
a.box_close{ display:block; float:right; width:16px; height:16px; background:url(../images/img_floatbox.png) 0 0 no-repeat;}
|
||||
a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
||||
|
||||
/*里程碑进度条*/
|
||||
table.progress {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0pt;
|
||||
empty-cells: show;
|
||||
text-align: center;
|
||||
float: left;
|
||||
margin: 1px 6px 1px 0px;}
|
||||
p.progress-info {
|
||||
clear: left;
|
||||
font-size: 80%;
|
||||
margin-top: -4px;
|
||||
color: #777;
|
||||
color: #777;}
|
||||
p.percent {
|
||||
font-size: 80%;
|
||||
}
|
Loading…
Reference in New Issue