diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-06 10:28:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-06 10:28:20 +0000 |
commit | 5f8e9d71182040473d4072241ce81fcadada497f (patch) | |
tree | 7701b9fed7aed50afd4dbf7fd34ec5ef08d40e5f /app/views/projects | |
parent | e1781235696fe23851154ebbdc913e970d3c0f3a (diff) | |
download | redmine-5f8e9d71182040473d4072241ce81fcadada497f.tar.gz redmine-5f8e9d71182040473d4072241ce81fcadada497f.zip |
Version sharing (#465) + optional inclusion of subprojects in the roadmap view (#2666).
Each version of a project can be shared with:
* subprojects
* projects in the project hierarchy: ancestors + descendants (needs versions management permission on the root project)
* projects in the project tree: root project + all its descendants (same as above)
* all projects (can be set by admin users only)
Notes:
* when sharing a version of a private project with others projects, its name will be visible within the other projects
* a project with versions used by non descendant projects can not be archived
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3123 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/activity.rhtml | 2 | ||||
-rw-r--r-- | app/views/projects/changelog.rhtml | 16 | ||||
-rw-r--r-- | app/views/projects/roadmap.rhtml | 16 | ||||
-rw-r--r-- | app/views/projects/settings/_versions.rhtml | 2 |
4 files changed, 20 insertions, 16 deletions
diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml index efec01f14..03cc8c681 100644 --- a/app/views/projects/activity.rhtml +++ b/app/views/projects/activity.rhtml @@ -50,8 +50,8 @@ <br /> <% end %></p> <% if @project && @project.descendants.active.any? %> + <%= hidden_field_tag 'with_subprojects', 0 %> <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p> - <%= hidden_field_tag 'with_subprojects', 0 %> <% end %> <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %> <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p> diff --git a/app/views/projects/changelog.rhtml b/app/views/projects/changelog.rhtml index a1cd99b7d..0779e069f 100644 --- a/app/views/projects/changelog.rhtml +++ b/app/views/projects/changelog.rhtml @@ -6,15 +6,15 @@ <% @versions.each do |version| %> <%= tag 'a', :name => version.name %> - <h3 class="icon22 icon22-package"><%= link_to h(version.name), :controller => 'versions', :action => 'show', :id => version %></h3> + <h3 class="icon22 icon22-package"><%= link_to_version version %></h3> <% if version.effective_date %> <p><%= format_date(version.effective_date) %></p> <% end %> <p><%=h version.description %></p> - <% issues = version.fixed_issues.find(:all, - :include => [:status, :tracker, :priority], - :conditions => ["#{IssueStatus.table_name}.is_closed=? AND #{Issue.table_name}.tracker_id in (#{@selected_tracker_ids.join(',')})", true], - :order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty? + <% issues = version.fixed_issues.visible.find(:all, + :include => [:status, :tracker, :priority], + :conditions => ["#{Issue.table_name}.project_id = ? AND #{IssueStatus.table_name}.is_closed=? AND #{Issue.table_name}.tracker_id in (?)", @project.id, true, @selected_tracker_ids], + :order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty? issues ||= [] %> <% if !issues.empty? %> @@ -33,11 +33,15 @@ <label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s) %> <%= tracker.name %></label><br /> <% end %> +<% if @project.descendants.active.any? %> + <%= hidden_field_tag 'with_subprojects', 0 %> + <br /><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label> +<% end %> <p><%= submit_tag l(:button_apply), :class => 'button-small' %></p> <% end %> <h3><%= l(:label_version_plural) %></h3> <% @versions.each do |version| %> -<%= link_to version.name, :anchor => version.name %><br /> +<%= link_to format_version_name(version), :anchor => version.name %><br /> <% end %> <% end %> diff --git a/app/views/projects/roadmap.rhtml b/app/views/projects/roadmap.rhtml index 00d4a215c..7b0a11dc6 100644 --- a/app/views/projects/roadmap.rhtml +++ b/app/views/projects/roadmap.rhtml @@ -6,17 +6,11 @@ <div id="roadmap"> <% @versions.each do |version| %> <%= tag 'a', :name => version.name %> - <h3 class="icon22 icon22-package"><%= link_to h(version.name), :controller => 'versions', :action => 'show', :id => version %></h3> + <h3 class="icon22 icon22-package"><%= link_to_version version %></h3> <%= render :partial => 'versions/overview', :locals => {:version => version} %> <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> - <% issues = version.fixed_issues.find(:all, - :include => [:status, :tracker, :priority], - :conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"], - :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") unless @selected_tracker_ids.empty? - issues ||= [] - %> - <% if issues.size > 0 %> + <% if (issues = @issues_by_version[version]) && issues.size > 0 %> <fieldset class="related-issues"><legend><%= l(:label_related_issues) %></legend> <ul> <%- issues.each do |issue| -%> @@ -39,12 +33,16 @@ <% end %> <br /> <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 %> + <br /><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label> +<% end %> <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p> <% end %> <h3><%= l(:label_version_plural) %></h3> <% @versions.each do |version| %> -<%= link_to version.name, "##{version.name}" %><br /> +<%= link_to format_version_name(version), "##{version.name}" %><br /> <% end %> <% end %> diff --git a/app/views/projects/settings/_versions.rhtml b/app/views/projects/settings/_versions.rhtml index 9bca58cf7..4fb5e9375 100644 --- a/app/views/projects/settings/_versions.rhtml +++ b/app/views/projects/settings/_versions.rhtml @@ -5,6 +5,7 @@ <th><%= l(:field_effective_date) %></th> <th><%= l(:field_description) %></th> <th><%= l(:field_status) %></th> + <th><%= l(:field_sharing) %></th> <th><%= l(:label_wiki_page) unless @project.wiki.nil? %></th> <th style="width:15%"></th> </thead> @@ -15,6 +16,7 @@ <td align="center"><%= format_date(version.effective_date) %></td> <td><%=h version.description %></td> <td><%= l("version_status_#{version.status}") %></td> + <td><%=h format_version_sharing(version.sharing) %></td> <td><%= link_to(h(version.wiki_page_title), :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td> <td class="buttons"> <%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => version }, :class => 'icon icon-edit' %> |