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

79 lines
4.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="project_r_h" style="width:730px;">
<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 %>
<!--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>
<% if @versions.empty? %>
<p class="nodata mt10"><%= l(:label_no_data) %></p>
<% else %>
<% @versions.each do |version| %>
<div class="roadmap_box" style="width:710px;">
<p><a class=" f16 fb c_dblue ">
<a class=" f16 fb c_dblue " ><%= version_anchor(version)%></a>
<%#= 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">&#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)) %>
<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>
<!--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>
<% end %>
</div><!--roadmap end-->
<% html_title(l(:label_roadmap)) %>
<%= context_menu issues_context_menu_path %>
<script>
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
</script>