Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -2,7 +2,7 @@
<%= error_messages_for 'version' %>
<div class="box tabular">
<p><%= f.text_field :name, :size => 60, :required => true %></p>
<p><%= f.text_field :name, :maxlength => 60, :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>
@ -14,7 +14,7 @@
<p><%= f.check_box :default_project_version, :label => :field_default_version %></p>
<% end %>
<% @version.custom_field_values.each do |value| %>
<% @version.visible_custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label :version, value %></p>
<% end %>

View file

@ -4,6 +4,6 @@
<%= 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' %>
<%= link_to_function l(:button_cancel), "hideModal(this);" %>
</p>
<% end %>

View file

@ -14,22 +14,22 @@
</ul>
<% end %>
<% if version.issues_count > 0 %>
<%= progress_bar([version.closed_percent, version.completed_percent],
<% if version.visible_fixed_issues.count > 0 %>
<%= progress_bar([version.visible_fixed_issues.closed_percent, version.visible_fixed_issues.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)) %>
["%s: %i%%" % [l(:label_closed_issues_plural), version.visible_fixed_issues.closed_percent],
"%s: %i%%" % [l(:field_done_ratio), version.visible_fixed_issues.completed_percent]],
:legend => ('%i%%' % version.visible_fixed_issues.completed_percent)) %>
<p class="progress-info">
<%= link_to(l(:label_x_issues, :count => version.issues_count),
<%= link_to(l(:label_x_issues, :count => version.visible_fixed_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),
(<%= link_to_if(version.visible_fixed_issues.closed_count > 0,
l(:label_x_closed_issues_abbr, :count => version.visible_fixed_issues.closed_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),
<%= link_to_if(version.visible_fixed_issues.open_count > 0,
l(:label_x_open_issues_abbr, :count => version.visible_fixed_issues.open_count),
version_filtered_issues_path(version, :status_id => 'o')) %>)
</p>
<% else %>

View file

@ -4,13 +4,14 @@ api.array :versions, api_meta(:total_count => @versions.size) 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
api.name version.name
api.description version.description
api.status version.status
api.due_date version.effective_date
api.sharing version.sharing
api.wiki_page_title version.wiki_page_title
render_api_custom_values version.custom_field_values, api
render_api_custom_values version.visible_custom_field_values, api
api.created_on version.created_on
api.updated_on version.updated_on

View file

@ -1,6 +1,11 @@
<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) %>
<%= actions_dropdown do %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'versions'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_versions, @project) %>
<% end %>
</div>
<h2><%=l(:label_roadmap)%></h2>
@ -18,6 +23,7 @@
<% end %>
<header>
<h3 class="icon icon-package version"><%= link_to_version version, :name => version_anchor(version) %></h3>
<span class="badge badge-status-<%= version.status %>"><%= l("version_status_#{version.status}") %></span>
</header>
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
<%= render(:partial => "wiki/content",
@ -27,9 +33,11 @@
<table class="list related-issues">
<caption><%= l(:label_related_issues) %></caption>
<% issues.each do |issue| -%>
<tr class="hascontextmenu">
<tr class="hascontextmenu <%= issue.css_classes %>">
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
<td class="assigned_to"><%= assignee_avatar(issue.assigned_to, :size => 16) %></td>
<td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
<td class="buttons"><%= link_to_context_menu %></td>
</tr>
<% end -%>
</table>
@ -86,8 +94,8 @@
<% 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' %>
'$("#toggle-completed-versions").toggleClass("icon-collapsed icon-expended"); $("#completed-versions").toggle()',
:id => 'toggle-completed-versions', :class => 'icon icon-collapsed collapsible' %>
<ul id = "completed-versions" style = "display:none;">
<% @completed_versions.each do |version| %>
<li><%= link_to_version version %></li>

View file

@ -2,13 +2,18 @@ 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
api.name @version.name
api.description @version.description
api.status @version.status
api.due_date @version.effective_date
api.sharing @version.sharing
api.wiki_page_title @version.wiki_page_title
if User.current.allowed_to?(:view_time_entries, @project)
api.estimated_hours(@version.visible_fixed_issues.estimated_hours)
api.spent_hours(@version.spent_hours)
end
render_api_custom_values @version.custom_field_values, api
render_api_custom_values @version.visible_custom_field_values, api
api.created_on @version.created_on
api.updated_on @version.updated_on

View file

@ -2,22 +2,24 @@
<%= 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) %>
<%= link_to_new_issue(@version, @project) %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
</div>
<h2><%= @version.name %></h2>
<div id="roadmap" class="<%= @version.css_classes %>">
<h2><%= @version.name %></h2>
<span class="badge badge-status-<%= @version.status %>"><%= l("version_status_#{@version.status}") %></span>
<%= 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) %>
<% if @version.visible_fixed_issues.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)),
<td class="total-hours"><%= link_to html_hours(l_hours(@version.visible_fixed_issues.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) %>
@ -41,9 +43,11 @@
<table class="list related-issues">
<caption><%= l(:label_related_issues) %></caption>
<%- @issues.each do |issue| -%>
<tr class="issue hascontextmenu">
<tr class="hascontextmenu <%= issue.css_classes %>">
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
<td class="assigned_to"><%= assignee_avatar(issue.assigned_to, :size => 16) %></td>
<td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
<td class="buttons"><%= link_to_context_menu %></td>
</tr>
<% end %>
</table>