Redmine 3.4.4

This commit is contained in:
Manuel Cillero 2018-02-02 22:19:29 +01:00
commit 64924a6376
2112 changed files with 259028 additions and 0 deletions

View file

@ -0,0 +1,21 @@
<%= back_url_hidden_field_tag %>
<%= error_messages_for 'version' %>
<div class="box tabular">
<p><%= f.text_field :name, :size => 60, :required => true %></p>
<p><%= f.text_field :description, :size => 60 %></p>
<% unless @version.new_record? %>
<p><%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %></p>
<% end %>
<p><%= f.text_field :wiki_page_title, :label => :label_wiki_page, :size => 60, :disabled => @project.wiki.nil? %></p>
<p><%= f.date_field :effective_date, :size => 10 %><%= calendar_for('version_effective_date') %></p>
<p><%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %></p>
<% if @version.new_record? %>
<p><%= f.check_box :default_project_version, :label => :field_default_version %></p>
<% end %>
<% @version.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :version, value %></p>
<% end %>
</div>

View file

@ -0,0 +1,32 @@
<%= form_tag({}, :id => "status_by_form") do -%>
<fieldset>
<legend>
<%= l(:label_issues_by,
select_tag('status_by',
status_by_options_for_select(criteria),
:id => 'status_by_select',
:data => {:remote => true, :method => 'post', :url => status_by_version_path(version)})).html_safe %>
</legend>
<% if counts.empty? %>
<p><em><%= l(:label_no_data) %></em></p>
<% else %>
<table>
<% counts.each do |count| %>
<tr>
<td style="width:130px; text-align:right;">
<% if count[:group] -%>
<%= link_to(count[:group], project_issues_path(version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => version, "#{criteria}_id" => count[:group])) %>
<% else -%>
<%= link_to(l(:label_none), project_issues_path(version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => version, "#{criteria}_id" => "!*")) %>
<% end %>
</td>
<td style="width:240px;">
<%= progress_bar((count[:closed].to_f / count[:total])*100,
:legend => "#{count[:closed]}/#{count[:total]}") %>
</td>
</tr>
<% end %>
</table>
<% end %>
</fieldset>
<% end %>

View file

@ -0,0 +1,9 @@
<h3 class="title"><%=l(:label_version_new)%></h3>
<%= labelled_form_for @version, :url => project_versions_path(@project), :remote => true do |f| %>
<%= render :partial => 'versions/form', :locals => { :f => f } %>
<p class="buttons">
<%= submit_tag l(:button_create), :name => nil %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
</p>
<% end %>

View file

@ -0,0 +1,38 @@
<div class="version-overview">
<% if version.completed? %>
<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>
<% render_custom_field_values(version) do |custom_field, formatted| %>
<li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
<% end %>
</ul>
<% end %>
<% if version.issues_count > 0 %>
<%= progress_bar([version.closed_percent, version.completed_percent],
:titles =>
["%s: %0.0f%%" % [l(:label_closed_issues_plural), version.closed_percent],
"%s: %0.0f%%" % [l(:field_done_ratio), version.completed_percent]],
:legend => ('%0.0f%%' % version.completed_percent)) %>
<p class="progress-info">
<%= link_to(l(:label_x_issues, :count => version.issues_count),
version_filtered_issues_path(version, :status_id => '*')) %>
&nbsp;
(<%= link_to_if(version.closed_issues_count > 0,
l(:label_x_closed_issues_abbr, :count => version.closed_issues_count),
version_filtered_issues_path(version, :status_id => 'c')) %>
&#8212;
<%= link_to_if(version.open_issues_count > 0,
l(:label_x_open_issues_abbr, :count => version.open_issues_count),
version_filtered_issues_path(version, :status_id => 'o')) %>)
</p>
<% else %>
<p class="progress-info"><%= l(:label_roadmap_no_issues) %></p>
<% end %>
</div>

View file

@ -0,0 +1,3 @@
hideModal();
<% select = content_tag('select', content_tag('option') + version_options_for_select(@project.shared_versions.open, @version), :id => 'issue_fixed_version_id', :name => 'issue[fixed_version_id]') %>
$('#issue_fixed_version_id').replaceWith('<%= escape_javascript(select) %>');

View file

@ -0,0 +1,7 @@
<h2><%=l(:label_version)%></h2>
<%= labelled_form_for @version, :html => {:multipart => true} do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
<% end %>

View file

@ -0,0 +1,19 @@
api.array :versions, api_meta(:total_count => @versions.size) do
@versions.each do |version|
api.version do
api.id version.id
api.project(:id => version.project_id, :name => version.project.name) unless version.project.nil?
api.name version.name
api.description version.description
api.status version.status
api.due_date version.effective_date
api.sharing version.sharing
render_api_custom_values version.custom_field_values, api
api.created_on version.created_on
api.updated_on version.updated_on
end
end
end

View file

@ -0,0 +1,102 @@
<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) %>
</div>
<h2><%=l(:label_roadmap)%></h2>
<% if @versions.empty? %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% else %>
<div id="roadmap">
<% @versions.each do |version| %>
<article class="version-article <%= version.css_classes %>">
<% if User.current.allowed_to?(:manage_versions, version.project) %>
<div class="contextual">
<%= link_to l(:button_edit), edit_version_path(version), :title => l(:button_edit), :class => 'icon-only icon-edit' %>
</div>
<% end %>
<header>
<h3 class="icon icon-package version"><%= link_to_version version, :name => version_anchor(version) %></h3>
</header>
<%= 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({}, :data => {:cm_url => issues_context_menu_path}) 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 class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
</tr>
<% end -%>
</table>
<% end %>
<% end %>
<%= call_hook :view_projects_roadmap_version_bottom, :version => version %>
</article>
<% end %>
</div>
<% end %>
<% content_for :sidebar do %>
<%= form_tag({}, :method => :get) do %>
<h3><%= l(:label_roadmap) %></h3>
<ul>
<% @trackers.each do |tracker| %>
<li>
<label>
<%= check_box_tag("tracker_ids[]", tracker.id,
(@selected_tracker_ids.include? tracker.id.to_s),
:id => nil) %>
<%= tracker.name %>
</label>
</li>
<% end %>
</ul>
<p></p>
<ul>
<li>
<label for="completed">
<%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %>
</label>
</li>
<% if @project.descendants.active.any? %>
<li>
<%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
<label>
<%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%>
</label>
</li>
<% end %>
</ul>
<p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p>
<% end %>
<h3><%= l(:label_version_plural) %></h3>
<ul>
<% @versions.each do |version| %>
<li>
<%= link_to(format_version_name(version), "##{version_anchor(version)}") %>
</li>
<% end %>
</ul>
<% if @completed_versions.present? %>
<p>
<%= link_to_function l(:label_completed_versions),
'$("#toggle-completed-versions").toggleClass("collapsed"); $("#completed-versions").toggle()',
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %>
<ul id = "completed-versions" style = "display:none;">
<% @completed_versions.each do |version| %>
<li><%= link_to_version version %></li>
<% end %>
</ul>
</p>
<% end %>
<% end %>
<% html_title(l(:label_roadmap)) %>
<%= context_menu %>

View file

@ -0,0 +1,6 @@
<h2><%=l(:label_version_new)%></h2>
<%= labelled_form_for @version, :url => project_versions_path(@project), :html => {:multipart => true} do |f| %>
<%= render :partial => 'versions/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
<% end %>

View file

@ -0,0 +1,2 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'versions/new_modal') %>');
showModal('ajax-modal', '600px');

View file

@ -0,0 +1,15 @@
api.version do
api.id @version.id
api.project(:id => @version.project_id, :name => @version.project.name) unless @version.project.nil?
api.name @version.name
api.description @version.description
api.status @version.status
api.due_date @version.effective_date
api.sharing @version.sharing
render_api_custom_values @version.custom_field_values, api
api.created_on @version.created_on
api.updated_on @version.updated_on
end

View file

@ -0,0 +1,57 @@
<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_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? %>
<%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div>
<h2><%= @version.name %></h2>
<div id="roadmap" class="<%= @version.css_classes %>">
<%= render :partial => 'versions/overview', :locals => {:version => @version} %>
<%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %>
<div id="version-summary">
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
<table>
<tr>
<th><%= l(:field_estimated_hours) %></th>
<td class="total-hours"><%= link_to html_hours(l_hours(@version.estimated_hours)),
project_issues_path(@version.project, :set_filter => 1, :status_id => '*', :fixed_version_id => @version.id, :c => [:tracker, :status, :subject, :estimated_hours], :t => [:estimated_hours]) %></td>
</tr>
<% if User.current.allowed_to_view_all_time_entries?(@project) %>
<tr>
<th><%= l(:label_spent_time) %></th>
<td class="total-hours"><%= link_to html_hours(l_hours(@version.spent_hours)),
project_time_entries_path(@version.project, :set_filter => 1, :"issue.fixed_version_id" => @version.id) %></td>
</tr>
<% end %>
</table>
</fieldset>
<% end %>
<div id="status_by">
<%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.exists? %>
</div>
</div>
<% if @issues.present? %>
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
<table class="list related-issues">
<caption><%= l(:label_related_issues) %></caption>
<%- @issues.each do |issue| -%>
<tr class="issue hascontextmenu">
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
<td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
</tr>
<% end %>
</table>
<% end %>
<%= context_menu %>
<% end %>
</div>
<%= call_hook :view_versions_show_bottom, :version => @version %>
<% html_title @version.name %>

View file

@ -0,0 +1 @@
$('#status_by').html('<%= escape_javascript(render_issue_status_by(@version, params[:status_by])) %>');