Index: ./README.rdoc
===================================================================
--- ./README.rdoc (revision 1)
+++ ./README.rdoc (revision 2)
@@ -1,6 +1,6 @@
= redmine_issue_control_panel
-switch issue statuses from sidebar - without opening the Update screen.
+Switch issue statuses and assignees from the sidebar - without opening the Update screen.
Credits:
Authors: Konstantin Zaitcev (kos@axmor.com), Alexandr Poplavsky (poplavsky@axmor.com)
Index: ./config/locales/en.yml
===================================================================
--- ./config/locales/en.yml (revision 1)
+++ ./config/locales/en.yml (revision 2)
@@ -1,3 +1,5 @@
en:
label_issue_change_status: "Change status"
label_issue_change_assigned: "Reassign"
+ label_issue_remove_assignee: "Remove current assignee"
+ label_issue_edit: "Edit"
Index: ./config/locales/ru.yml
===================================================================
--- ./config/locales/ru.yml (revision 1)
+++ ./config/locales/ru.yml (revision 2)
@@ -1,3 +1,5 @@
ru:
- label_issue_change_status: "Изменить статус"
- label_issue_change_assigned: "Переназначить"
\ No newline at end of file
+ label_issue_change_status: "Изменить статус"
+ label_issue_change_assigned: "Переназначить"
+ label_issue_remove_assignee: "Remove current assignee"
+ label_issue_edit: "Edit"
Index: ./config/locales/nl.yml
===================================================================
--- ./config/locales/nl.yml (revision 0)
+++ ./config/locales/nl.yml (revision 2)
@@ -0,0 +1,5 @@
+nl:
+ label_issue_change_status: "Verander status"
+ label_issue_change_assigned: "Opnieuw toewijzen"
+ label_issue_remove_assignee: "Verwijder huidige toewijzing"
+ label_issue_edit: "Bewerk"
Index: ./init.rb
===================================================================
--- ./init.rb (revision 1)
+++ ./init.rb (revision 2)
@@ -6,5 +6,5 @@
name 'Redmine Issue Control Panel plugin'
author 'Konstantin Zaitsev, Alexandr Poplavsky'
description 'Switch issue statuses from sidebar - without opening the Update screen.'
- version '0.1.0'
+ version '0.2.0'
end
Index: ./lib/panel_issue_hooks.rb
===================================================================
--- ./lib/panel_issue_hooks.rb (revision 1)
+++ ./lib/panel_issue_hooks.rb (revision 2)
@@ -5,64 +5,68 @@
def protect_against_forgery?
false
end
-
- def view_layouts_base_html_head(context)
- stylesheet_link_tag('issue_control_panel.css', :plugin => :redmine_issue_control_panel)
+
+ def view_layouts_base_html_head(context)
+ stylesheet_link_tag('issue_control_panel.css', :plugin => :redmine_issue_control_panel)
end
-
- def view_issues_sidebar_issues_bottom(context = { })
+
+ def view_issues_sidebar_planning_bottom(context = { })
project = context[:project]
request = context[:request]
issue_id = request.symbolized_path_parameters[:id]
- back = request.env['HTTP_REFERER']
-
+ back = request.env['HTTP_REFERER']
+
if (issue_id)
issue = Issue.find(issue_id, :include => [:status])
- if (issue)
- if (User.current.allowed_to?(:edit_issues, project))
- o = ''
+ if (issue)
+ if (User.current.allowed_to?(:edit_issues, project))
+ o = ''
statuses = issue.new_statuses_allowed_to(User.current)
if (!statuses.empty?)
- o << "
#{l(:label_issue_change_status)}
"
- o << ''
- statuses.each do |s|
- if (s != issue.status)
- o << ''
- o << link_to(s.name, {:controller => 'issues', :action => 'edit', :id => issue, :issue => {:status_id => s}, :back_to => "/issues/show/"+issue_id, :authenticity_token => form_authenticity_token(request.session)}, :method => :post, :class => 'icon icon-move' )
- o << ' | '
- o << link_to("Edit", {:controller => 'issues', :action => 'edit', :id => issue, :issue => {:status_id => s}}, :class => 'icon icon-edit' )
- o << ' |
'
- end
- end
- o << "
"
+ o << "#{l(:label_issue_change_status)}
"
+ o << ''
+ statuses.each do |s|
+ if (s != issue.status)
+ o << ''
+ o << link_to(s.name, {:controller => 'issues', :action => 'update', :id => issue, :issue => {:status_id => s}, :back_to => "/issues/show/"+issue_id, :authenticity_token => form_authenticity_token(request.session)}, :method => :put, :class => 'icon icon-move' )
+ o << ' | '
+ o << link_to(l(:label_issue_edit), {:controller => 'issues', :action => 'edit', :id => issue, :issue => {:status_id => s}}, :class => 'icon icon-edit' )
+ o << ' |
'
+ end
+ end
+ o << "
"
end
- assignables = project.assignable_users
- if (!assignables.empty?)
- o << "#{l(:label_issue_change_assigned)}
"
- o << ' 10 ? ' class="issue_control_panel_scroll">' : '>')
- o << '
'
- assignables.each do |u|
- if (u != issue.assigned_to)
- o << ''
- o << avatar(u, :size => "14", :style => "float: left; margin-right: 2px;") if avatar(u, :size => "14") != nil
- o << link_to(u.name, {:controller => 'issues', :action => 'edit', :id => issue, :issue => {:assigned_to_id => u}, :back_to => "/issues/show/"+issue_id, :authenticity_token => form_authenticity_token(request.session)}, :method => :post)
- o << ' |
'
- end
- end
- o << "
"
+ assignables = project.assignable_users
+ if (!assignables.empty?) || (!issue.assigned_to.nil?)
+ o << "#{l(:label_issue_change_assigned)}
"
+ o << ' 10 ? ' class="issue_control_panel_scroll">' : '>')
+ o << '
'
+ assignables.each do |u|
+ if (u != issue.assigned_to)
+ o << ''
+ o << avatar(u, :size => "14", :style => "float: left; margin-right: 2px;") if avatar(u, :size => "14") != nil
+ o << link_to(u.name, {:controller => 'issues', :action => 'update', :id => issue, :issue => {:assigned_to_id => u}, :back_to => "/issues/show/"+issue_id, :authenticity_token => form_authenticity_token(request.session)}, :method => :put)
+ o << ' |
'
+ end
+ end
+ if (!issue.assigned_to.nil?)
+ o << ''
+ o << link_to(l(:label_issue_remove_assignee), {:controller => 'issues', :action => 'update', :id => issue, :issue => {:assigned_to_id => nil}, :back_to => "/issues/show/"+issue_id, :authenticity_token => form_authenticity_token(request.session)}, :method => :put, :class => 'icon icon-del' )
+ o << ' |
'
+ end
+ o << "
"
end
- o << "Planning
"
- end
- end
- return o
+ end
+ end
+ return o
end
end
-
+
#TODO it is not clear how to resolve ActionController or more specific
#TODO controller from the hook. For now this method just copied from
#TODO RequestForgeryProtection module (actionpack-2.3.5)
def form_authenticity_token(session)
session[:_csrf_token] ||= ActiveSupport::SecureRandom.base64(32)
end
-
+
end
Index: ./CHANGELOG
===================================================================
--- ./CHANGELOG (revision 0)
+++ ./CHANGELOG (revision 2)
@@ -0,0 +1,15 @@
+0.2.0 (16-08-2010) - Tested against Redmine 1.0.0
+ * Feature: Added functionality to allow removal of issue assignee when current issues assignee is set only.
+ * Fix: Changed the direct links for one-click issue status changes and assignee assignments to be compatible with Redmine 1.0.0.
+ * Fix: Removed the planning header in the sidebar and reordered the plugins additions below the old planning links (as in stock Redmine 1.0.0).
+ * Enhancement: Made some small code markup enhancements (replaced tabs with spaces, removed superfluous spaces, etc.).
+ * Enhancement: Made all the used text-strings i18n'able and added English stubs for Russian language.
+ * Enhancement: Added up-to-date translation for the Dutch language.
+ * Task: Added CHANGELOG file
+ * Task: Added CONTRIBUTORS file
+
+0.1.0 (21-05-2010) - Tested against Redmine 0.9.4
+ * Feature: Added functionality to allow issue assignment to available project members from the sidebar in a similar manner.
+
+0.0.3 (07-05-2010) - Tested against Redmine 0.9.2
+ Initial public release of the plugin featuring the issue statuses switch functionality in the sidebar.
Index: ./CONTRIBUTORS
===================================================================
--- ./CONTRIBUTORS (revision 0)
+++ ./CONTRIBUTORS (revision 2)
@@ -0,0 +1,2 @@
+List of Open-Source contributors:
+ * Mischa The Evil (http://www.redmine.org/users/1565)