diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-07 10:26:07 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-07 10:26:07 +0000 |
commit | 3c44aac1f50cfee83e87baa21d758620749c01e0 (patch) | |
tree | 3dfbb0892524bac3e2953de6825a8e763f287fbc /app/views | |
parent | 355289fa677f6a9a26e252e640861497a34cada6 (diff) | |
download | redmine-3c44aac1f50cfee83e87baa21d758620749c01e0.tar.gz redmine-3c44aac1f50cfee83e87baa21d758620749c01e0.zip |
Added version details view accessible from the roadmap.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@955 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/roadmap.rhtml | 66 | ||||
-rw-r--r-- | app/views/projects/settings/_versions.rhtml | 2 | ||||
-rw-r--r-- | app/views/versions/_issue_counts.rhtml | 35 | ||||
-rw-r--r-- | app/views/versions/_overview.rhtml | 24 | ||||
-rw-r--r-- | app/views/versions/show.rhtml | 14 |
5 files changed, 98 insertions, 43 deletions
diff --git a/app/views/projects/roadmap.rhtml b/app/views/projects/roadmap.rhtml index 7c3544a53..daf7639fc 100644 --- a/app/views/projects/roadmap.rhtml +++ b/app/views/projects/roadmap.rhtml @@ -5,48 +5,28 @@ <% end %> <% @versions.each do |version| %> - <a name="<%= version.name %>"><h3 class="icon22 icon22-package"><%= version.name %></h3></a> - <% if version.completed? %> - <p><%= format_date(version.effective_date) %></p> - <% elsif version.overdue? %> - <p><strong><%= l(:label_roadmap_overdue, distance_of_time_in_words(Time.now, version.effective_date)) %> (<%= format_date(version.effective_date) %>)</strong></p> - <% elsif version.effective_date %> - <p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p> - <% end %> - <p><%=h version.description %></p> - - <% if version.fixed_issues.count > 0 %> - <%= progress_bar([version.closed_pourcent, version.completed_pourcent], :width => '40em', :legend => ('%0.0f%' % version.completed_pourcent)) %> - <p class="progress-info"> - <%= link_to(version.closed_issues_count, :controller => 'issues', :action => 'index', :project_id => @project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1) %> - <%= lwr(:label_closed_issues, version.closed_issues_count) %> - (<%= '%0.0f' % (version.closed_issues_count.to_f / version.fixed_issues.count * 100) %>%) -   - <%= link_to(version.open_issues_count, :controller => 'issues', :action => 'index', :project_id => @project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1) %> - <%= lwr(:label_open_issues, version.open_issues_count)%> - (<%= '%0.0f' % (version.open_issues_count.to_f / version.fixed_issues.count * 100) %>%) - </p> - <%= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %> - <% issues = version.fixed_issues.find(:all, - :include => [:status, :tracker], - :conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"], - :order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty? - issues ||= [] - %> - <ul> - <% if issues.size > 0 %> - <% issues.each do |issue| %> - <li> - <%= link = link_to_issue(issue) - issue.status.is_closed? ? content_tag("del", link) : link %>: <%=h issue.subject %> - <%= content_tag "em", "(#{l(:label_closed_issues)})" if issue.status.is_closed? %> - </li> - <% end %> - <% end %> - </ul> - <% else %> - <p><em><%= l(:label_roadmap_no_issues) %></em></p> - <% end %> + <%= tag 'a', :name => version.name %> + <h3 class="icon22 icon22-package"><%= link_to h(version.name), :controller => 'versions', :action => 'show', :id => 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], + :conditions => ["tracker_id in (#{@selected_tracker_ids.join(',')})"], + :order => "#{Tracker.table_name}.position") unless @selected_tracker_ids.empty? + issues ||= [] + %> + <ul> + <% if issues.size > 0 %> + <% issues.each do |issue| %> + <li> + <%= link = link_to_issue(issue) + issue.status.is_closed? ? content_tag("del", link) : link %>: <%=h issue.subject %> + <%= content_tag "em", "(#{l(:label_closed_issues)})" if issue.status.is_closed? %> + </li> + <% end %> + <% end %> + </ul> <% end %> <% content_for :sidebar do %> @@ -66,3 +46,5 @@ <%= link_to version.name, :anchor => version.name %><br /> <% end %> <% end %> + +<% set_html_title l(:label_roadmap) %> diff --git a/app/views/projects/settings/_versions.rhtml b/app/views/projects/settings/_versions.rhtml index 63c408b0d..7329c7f3b 100644 --- a/app/views/projects/settings/_versions.rhtml +++ b/app/views/projects/settings/_versions.rhtml @@ -11,7 +11,7 @@ <tbody> <% for version in @project.versions.sort %> <tr class="<%= cycle 'odd', 'even' %>"> - <td><%=h version.name %></td> + <td><%= link_to h(version.name), :controller => 'versions', :action => 'show', :id => version %></td> <td align="center"><%= format_date(version.effective_date) %></td> <td><%=h version.description %></td> <td><%= link_to(version.wiki_page_title, :controller => 'wiki', :page => Wiki.titleize(version.wiki_page_title)) unless version.wiki_page_title.blank? || @project.wiki.nil? %></td> diff --git a/app/views/versions/_issue_counts.rhtml b/app/views/versions/_issue_counts.rhtml new file mode 100644 index 000000000..4bab5c659 --- /dev/null +++ b/app/views/versions/_issue_counts.rhtml @@ -0,0 +1,35 @@ +<form id="status_by_form"> +<fieldset> +<legend> +<%= l(:label_issues_by, + select_tag('status_by', + status_by_options_for_select(criteria), + :id => 'status_by_select', + :onchange => remote_function(:url => { :action => :status_by, :id => version }, + :with => "Form.serialize('status_by_form')"))) %> +</legend> +<% if counts.empty? %> + <p><em><%= l(:label_no_data) %></em></p> +<% else %> + <table> + <% counts.each do |count| %> + <tr> + <td width="130px" align="right" > + <%= link_to count[:group], {:controller => 'issues', + :action => 'index', + :project_id => version.project, + :set_filter => 1, + :fixed_version_id => version, + "#{criteria}_id" => count[:group]} %> + </td> + <td width="240px"> + <%= progress_bar((count[:closed].to_f / count[:total])*100, + :legend => "#{count[:closed]}/#{count[:total]}", + :width => "#{(count[:total].to_f / max * 200).floor}px;") %> + </td> + </tr> + <% end %> + </table> +<% end %> +</fieldset> +</form> diff --git a/app/views/versions/_overview.rhtml b/app/views/versions/_overview.rhtml new file mode 100644 index 000000000..d3aa6b18f --- /dev/null +++ b/app/views/versions/_overview.rhtml @@ -0,0 +1,24 @@ +<% if version.completed? %> + <p><%= format_date(version.effective_date) %></p> +<% elsif version.overdue? %> + <p><strong><%= l(:label_roadmap_overdue, distance_of_time_in_words(Time.now, version.effective_date)) %> (<%= format_date(version.effective_date) %>)</strong></p> +<% elsif version.effective_date %> + <p><strong><%=l(:label_roadmap_due_in)%> <%= distance_of_time_in_words Time.now, version.effective_date %> (<%= format_date(version.effective_date) %>)</strong></p> +<% end %> + +<p><%=h version.description %></p> + +<% if version.fixed_issues.count > 0 %> + <%= progress_bar([version.closed_pourcent, version.completed_pourcent], :width => '40em', :legend => ('%0.0f%' % version.completed_pourcent)) %> + <p class="progress-info"> + <%= link_to(version.closed_issues_count, :controller => 'issues', :action => 'index', :project_id => version.project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1) %> + <%= lwr(:label_closed_issues, version.closed_issues_count) %> + (<%= '%0.0f' % (version.closed_issues_count.to_f / version.fixed_issues.count * 100) %>%) +   + <%= link_to(version.open_issues_count, :controller => 'issues', :action => 'index', :project_id => version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1) %> + <%= lwr(:label_open_issues, version.open_issues_count)%> + (<%= '%0.0f' % (version.open_issues_count.to_f / version.fixed_issues.count * 100) %>%) + </p> +<% else %> + <p><em><%= l(:label_roadmap_no_issues) %></em></p> +<% end %> diff --git a/app/views/versions/show.rhtml b/app/views/versions/show.rhtml new file mode 100644 index 000000000..d8e2d243d --- /dev/null +++ b/app/views/versions/show.rhtml @@ -0,0 +1,14 @@ +<div class="contextual"> +<%= link_to_if_authorized l(:button_edit), {:controller => 'versions', :action => 'edit', :id => @version}, :class => 'icon icon-edit' %> +</div> + +<h2><%= h(@version.name) %></h2> + +<div id="status_by" style="float:right;"> +<%= render_issue_status_by(@version, params[:status_by]) if @version.fixed_issues.count > 0 %> +</div> + +<%= render :partial => 'versions/overview', :locals => {:version => @version} %> +<%= render(:partial => "wiki/content", :locals => {:content => @version.wiki_page.content}) if @version.wiki_page %> + +<% set_html_title h(@version.name) %> |