Created
July 31, 2011 10:31
-
-
Save retorquere/1116682 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/backlogs_hooks.rb b/lib/backlogs_hooks.rb | |
index b25a8d2..b4fc27f 100644 | |
--- a/lib/backlogs_hooks.rb | |
+++ b/lib/backlogs_hooks.rb | |
@@ -64,8 +64,11 @@ module BacklogsPlugin | |
def view_issues_form_details_bottom(context={ }) | |
snippet = '' | |
+ | |
+ puts "VIFDB: Issue?" | |
issue = context[:issue] | |
+ puts "VIFDB: Enabled?" | |
return '' unless issue.project.module_enabled? 'backlogs' | |
#project = context[:project] | |
@@ -74,13 +77,17 @@ module BacklogsPlugin | |
#developers = select_tag("time_entry[user_id]", options_from_collection_for_select(developers, :id, :name, User.current.id)) | |
#developers = developers.gsub(/\n/, '') | |
+ puts "VIFDB: Story?" | |
if issue.is_story? | |
+ puts "VIFDB: Story" | |
snippet += '<p>' | |
#snippet += context[:form].label(:story_points) | |
snippet += context[:form].text_field(:story_points, :size => 3) | |
snippet += '</p>' | |
+ puts "VIFDB: Story children?" | |
if issue.descendants.length != 0 | |
+ puts "VIFDB: Story children" | |
snippet += javascript_include_tag 'jquery/jquery-1.4.2.min.js', :plugin => 'redmine_backlogs' | |
snippet += <<-generatedscript | |
@@ -98,8 +105,11 @@ module BacklogsPlugin | |
end | |
end | |
+ puts "VIFDB: params" | |
params = context[:controller].params | |
+ puts "VIFDB: Copy-from?" | |
if issue.is_story? && params[:copy_from] | |
+ puts "VIFDB: Copy-from" | |
snippet += "<p><label for='link_to_original'>#{l(:rb_label_link_to_original)}</label>" | |
snippet += "#{check_box_tag('link_to_original', params[:copy_from], true)}</p>" | |
@@ -107,14 +117,20 @@ module BacklogsPlugin | |
snippet += "#{radio_button_tag('copy_tasks', 'open:' + params[:copy_from], true)} #{l(:rb_label_copy_tasks_open)}<br />" | |
snippet += "#{radio_button_tag('copy_tasks', 'none', false)} #{l(:rb_label_copy_tasks_none)}<br />" | |
snippet += "#{radio_button_tag('copy_tasks', 'all:' + params[:copy_from], false)} #{l(:rb_label_copy_tasks_all)}</p>" | |
+ puts "VIFDB: Copy-from clear" | |
end | |
+ puts "VIFDB: Task?" | |
if issue.is_task? | |
+ puts "VIFDB: Task" | |
snippet += "<p><label for='initial_estimate'>#{l(:field_initial_estimate)}</label>" | |
snippet += text_field_tag('initial_estimate', issue.initial_estimate, :size => 3) | |
snippet += '</p>' | |
+ puts "VIFDB: Task clear" | |
end | |
+ puts "VIFDB: Done" | |
+ | |
return snippet | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment