socialforge/app/views/versions/index.html.erb

79 lines
4.0 KiB
Plaintext
Raw Normal View History

2016-09-26 11:20:49 +08:00
<div class="project_r_h" style="width:730px;">
2015-04-16 03:54:07 +08:00
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
</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 %>
2016-09-22 16:12:32 +08:00
<!--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 %>
<%= 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 %>
</fieldset>
2015-04-16 03:54:07 +08:00
<% if @versions.empty? %>
<p class="nodata mt10"><%= l(:label_no_data) %></p>
<% else %>
2015-04-16 03:54:07 +08:00
<% @versions.each do |version| %>
2016-09-26 11:20:49 +08:00
<div class="roadmap_box" style="width:710px;">
2016-09-28 10:04:20 +08:00
<p><a class=" f16 fb c_dblue ">
<a class=" f16 fb c_dblue " ><%= version_anchor(version)%></a>
2016-09-22 16:12:32 +08:00
<%#= 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 %>
2015-04-16 03:54:07 +08:00
</div><!--roadmap_pro end-->
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
<div class="roadmap_list">
<%= form_tag({}) do -%>
<p class="f14 mb5">&#187;<%= 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)) %>
2016-09-09 16:37:24 +08:00
<span class="mr5 fr" >指派给:<%= link_to "#{User.find(issue.try(:assigned_to_id)).show_name}", user_path(issue.try(:assigned_to_id)), :class => "c_blue hidden fr", :style => "width:50px;" %></span>
</li>
<% end -%>
</ul>
<% end %>
</div>
<% end %><!--roadmap_list end-->
<div class="roadmap_list">
<p class="f14 mb5">&#187;<%= l(:label_versions_description)%></p>
<p><%=h version.description %></p>
2016-09-27 19:44:24 +08:00
<!--p class="f14 mb5">&#187;<%#= link_to "导出Excel", version_path(version, :format => 'xls') %></p-->
</div><!--roadmap_list end-->
</div><!--roadmap_box end-->
<% end %>
<ul class="wlist" >
<%= pagination_links_full @versions_pages%>
</ul>
<div class="cl"></div>
2015-04-16 03:54:07 +08:00
<% end %>
</div><!--roadmap end-->
2013-08-01 10:33:49 +08:00
<% html_title(l(:label_roadmap)) %>
<%= context_menu issues_context_menu_path %>
2016-09-26 11:20:49 +08:00
<script>
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
2016-09-26 11:20:49 +08:00
</script>