初步修改了路线图页面的显示
This commit is contained in:
parent
4eb9a0950e
commit
c3f81ba00e
|
@ -170,7 +170,7 @@ class IssuesController < ApplicationController
|
||||||
return unless update_issue_from_params
|
return unless update_issue_from_params
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { }
|
format.html {render :layout => 'base_projects' }#added by young
|
||||||
format.xml { }
|
format.xml { }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,7 +39,14 @@ class VersionsController < ApplicationController
|
||||||
|
|
||||||
@versions = @project.shared_versions || []
|
@versions = @project.shared_versions || []
|
||||||
@versions += @project.rolled_up_versions.visible if @with_subprojects
|
@versions += @project.rolled_up_versions.visible if @with_subprojects
|
||||||
|
#added by young
|
||||||
@versions = @versions.uniq.sort
|
@versions = @versions.uniq.sort
|
||||||
|
@offset, @limit = api_offset_and_limit({:limit => 4})
|
||||||
|
@versions_count = @versions.count
|
||||||
|
@versions_pages = Paginator.new @versions_count, @limit, params['page']
|
||||||
|
@offset ||= @versions_pages.offset
|
||||||
|
@versions = @versions.slice(@offset, @limit)
|
||||||
|
#end by young
|
||||||
unless params[:completed]
|
unless params[:completed]
|
||||||
@completed_versions = @versions.select {|version| version.closed? || version.completed? }
|
@completed_versions = @versions.select {|version| version.closed? || version.completed? }
|
||||||
@versions -= @completed_versions
|
@versions -= @completed_versions
|
||||||
|
|
|
@ -103,7 +103,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/><%= link_to l(:project_module_boards) ,project_boards_path(@project) %></td>
|
<td align="left" width="190px" valign="left"><img src="/images/sidebar/tool_tag.png" width="15" height="15"/><%= link_to l(:project_module_boards) ,project_boards_path(@project) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td align="right" width="240px"><img src="/images/sidebar/tag_title_right.png" width="18" height="18"/></td></tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="user_underline"></div>
|
<div class="user_underline"></div>
|
||||||
|
|
|
@ -1,21 +1,6 @@
|
||||||
<% if version.completed? %>
|
<!--Modified by young-->
|
||||||
<p><%= format_date(version.effective_date) %></p>
|
|
||||||
<% elsif version.effective_date %>
|
|
||||||
<p><strong><%= due_date_distance_in_words(version.effective_date) %></strong> (<%= format_date(version.effective_date) %>)</p>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<p><%=h version.description %></p>
|
|
||||||
<% if version.custom_field_values.any? %>
|
|
||||||
<ul>
|
|
||||||
<% version.custom_field_values.each do |custom_value| %>
|
|
||||||
<% if custom_value.value.present? %>
|
|
||||||
<li><%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %></li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if version.issues_count > 0 %>
|
<% 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)) %>
|
<%= progress_bar([version.closed_percent, version.completed_percent], :width => '40em', :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),
|
||||||
|
|
|
@ -1,56 +1,29 @@
|
||||||
|
<!--modified by young-->
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to l(:label_version_new), new_project_version_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>
|
<%= 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>
|
||||||
|
|
||||||
<h3><%=l(:label_roadmap)%></h3>
|
<h3 style="padding-top:0px;padding-bottom: 0px;"><%=l(:label_roadmap)%></h3>
|
||||||
|
<!--check boxes-->
|
||||||
<% if @versions.empty? %>
|
<fieldset id="filters" class="collapsible collapsed" style="background-color: #FFF">
|
||||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
<legend><%= l(:label_versions_settings)%></legend>
|
||||||
<% else %>
|
|
||||||
<div id="roadmap">
|
|
||||||
<% @versions.each do |version| %>
|
|
||||||
<h3 class="version"><p style="padding-left: 10px;"><%= link_to_version version, :name => version_anchor(version) %></p></h3>
|
|
||||||
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
|
|
||||||
<%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
|
|
||||||
|
|
||||||
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
|
|
||||||
<%= form_tag({}) do -%>
|
|
||||||
<table class="list related-issues">
|
|
||||||
<caption><%= l(:label_related_issues) %></caption>
|
|
||||||
<% issues.each do |issue| -%>
|
|
||||||
<tr class="hascontextmenu">
|
|
||||||
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
|
|
||||||
<td><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
|
|
||||||
</tr>
|
|
||||||
<% end -%>
|
|
||||||
</table>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<%= call_hook :view_projects_roadmap_version_bottom, :version => version %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% content_for :sidebar do %>
|
|
||||||
<%= form_tag({}, :method => :get) do %>
|
<%= form_tag({}, :method => :get) do %>
|
||||||
<h3><%= l(:label_roadmap) %></h3>
|
|
||||||
<% @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><br />
|
<%=h tracker.name %></label>
|
||||||
<% end %>
|
<% end %>
|
||||||
<br />
|
|
||||||
<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 %>
|
||||||
<br /><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 %>
|
||||||
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
|
<%= submit_tag l(:button_apply), :class => 'button-small', :style => "height:20px;padding: 1px 1px;font-size:11px;margin-left:10px;", :name => nil %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<h3><%= l(:label_version_plural) %></h3>
|
<!-- <h3><%= l(:label_version_plural) %></h3>
|
||||||
<% @versions.each do |version| %>
|
<% @versions.each do |version| %>
|
||||||
<%= link_to format_version_name(version), "##{version_anchor(version)}" %><br />
|
<%= link_to format_version_name(version), "##{version_anchor(version)}" %><br />
|
||||||
<% end %>
|
<% end %> -->
|
||||||
<% if @completed_versions.present? %>
|
<% if @completed_versions.present? %>
|
||||||
<p>
|
<p>
|
||||||
<%= link_to_function l(:label_completed_versions),
|
<%= link_to_function l(:label_completed_versions),
|
||||||
|
@ -61,7 +34,64 @@
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</fieldset>
|
||||||
|
<!--check boxes-->
|
||||||
|
|
||||||
|
<% if @versions.empty? %>
|
||||||
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||||
|
<% else %>
|
||||||
|
<div id="roadmap">
|
||||||
|
<% @versions.each do |version| %>
|
||||||
|
<div class="box">
|
||||||
|
<h3 class="version" style="padding-top:0px;padding-bottom:0px;background-color: inherit;">
|
||||||
|
<p style="padding-left: 10px;font-size: 16px;">
|
||||||
|
<%= link_to_version version, :name => version_anchor(version) %>
|
||||||
|
<% if version.completed? %>
|
||||||
|
<span style="font-size:11px;float:right;"><%= format_date(version.effective_date) %></span>
|
||||||
|
<% elsif version.effective_date %>
|
||||||
|
<span style="font-size:11px;float:right;"><strong><%= due_date_distance_in_words(version.effective_date) %></strong> (<%= format_date(version.effective_date) %>)</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</p>
|
||||||
|
</h3>
|
||||||
|
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
|
||||||
|
<%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
|
||||||
|
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
|
||||||
|
<%= form_tag({}) do -%>
|
||||||
|
<table class="list related-issues">
|
||||||
|
<caption>»<%= l(:label_related_issues) %></caption>
|
||||||
|
<% issues.each do |issue| -%>
|
||||||
|
<tr class="hascontextmenu">
|
||||||
|
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
|
||||||
|
<td><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
|
||||||
|
</tr>
|
||||||
|
<% end -%>
|
||||||
|
</table>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<!--Moved by young from _overview.html.erb-->
|
||||||
|
»<%= l(:label_versions_description)%>
|
||||||
|
<p style="font-size:11px;"><%=h version.description %></p>
|
||||||
|
<% if version.custom_field_values.any? %>
|
||||||
|
<ul>
|
||||||
|
<% version.custom_field_values.each do |custom_value| %>
|
||||||
|
<% if custom_value.value.present? %>
|
||||||
|
<li><%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %></li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<!--end by young-->
|
||||||
|
<%= call_hook :view_projects_roadmap_version_bottom, :version => version %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="pagination">
|
||||||
|
<ul>
|
||||||
|
<%= pagination_links_full @versions_pages%>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<% html_title(l(:label_roadmap)) %>
|
<% html_title(l(:label_roadmap)) %>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<!--modified by young-->
|
||||||
<div class="contextual">
|
<div class="contextual">
|
||||||
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
|
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
|
||||||
<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
|
<%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
|
||||||
|
@ -11,7 +12,7 @@
|
||||||
<%= 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 id="version-summary">
|
<div class="splitcontent">
|
||||||
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
|
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
|
||||||
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
|
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
|
||||||
<table>
|
<table>
|
||||||
|
@ -29,7 +30,7 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div id="status_by">
|
<div id="status_by" style="margin-top:10px;"><!--by young-->
|
||||||
<%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
|
<%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -500,6 +500,9 @@ zh:
|
||||||
lastest_respond: 最新反馈
|
lastest_respond: 最新反馈
|
||||||
label_respond_view_all: 其他120个反馈
|
label_respond_view_all: 其他120个反馈
|
||||||
label_news_lastest: 最新动态
|
label_news_lastest: 最新动态
|
||||||
|
label_versions_settings: 显示配置
|
||||||
|
label_versions_progress: 完成进度
|
||||||
|
label_versions_description: 版本描述
|
||||||
#end
|
#end
|
||||||
label_my_page: 我的工作台
|
label_my_page: 我的工作台
|
||||||
label_my_account: 我的帐号
|
label_my_account: 我的帐号
|
||||||
|
|
Loading…
Reference in New Issue