Skip to content

Commit

Permalink
merge with change_4708 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
LuceIt committed Aug 8, 2011
2 parents 8e42cf4 + 5c4d085 commit f6ec6cc
Show file tree
Hide file tree
Showing 10 changed files with 5,489 additions and 277 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Scrum PM v. 0.1.6

This version is compatibile with Redmine 0.9 stable. Previous versions may not work due to differences in new Issue form.
This version is compatibile with Redmine 1.0.3 stable. Previous versions may not work due to differences in new Issue form.

Scrum PM is a plugin for Redmine for Scrum project management. Redmine Version class becomes a sprint and issue becomes task. Most actions support drag and drop, eg. dashboard where you can change status of your task simply by draging it to another column.
Some more interesting stuff planned:
Expand Down
210 changes: 102 additions & 108 deletions app/views/user_stories/_us_for_show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,116 +3,110 @@
<%= link_to image_tag("/plugin_assets/redmine_sprints/images/task_add.png")+" "+l('add_task'),
{:controller => 'issue_sprints',:action => 'new', :project_id => @project, :user_story_id => user_story.id},
{:id => "new_us", :title => l('new_task'),
:onclick => "Modalbox.show(this.href, {title: this.title, width: 900, height: 500}); return false;",
:style => "float:right;padding:3px;"
} %>
<%#= link_to_remote image_tag("/plugin_assets/redmine_sprints/images/task_add.png")+" "+l('add_task'),
:onclick => "Modalbox.show(this.href, {title: this.title, width: 900, height: 500}); return false;",
:style => "float:right;padding:3px;",
:remote => true}
%>
<%#= link_to_remote image_tag("/plugin_assets/redmine_sprints/images/task_add.png")+" "+l('add_task'),
:url => {:controller => 'issues',:action => 'new', :project_id => @project, :user_story_id => user_story.id},
:complete => "Modalbox.show($('hidden_item'), {title: this.title, width: 900, height: 500}); return false;",
:complete => "Modalbox.show($('hidden_item'), {title: this.title, width: 900, height: 500}); return false;",
:update => "hidden_item",
:id => "new_us", :title => l('new_task'),
:style => "float:right;padding:3px;" %>
<%= image_tag("/plugin_assets/redmine_sprints/images/us-top.png") %>

<table>
<tr >
<td><div class="tab_sprint_user_story">#<%= user_story.us_number %></div></td>
<td class="tab_us_name"><%=h user_story.name %>(P<%= user_story.priority %>)</td>
<td class="tab_us_links">
<!--This will be done at some point-->
<%#= link_to_object(user_story, "show", "story") %>
<%= link_to image_tag("/plugin_assets/redmine_sprints/images/story_edit.png"),
{:controller => :user_stories, :action => :edit, :project_id => @project, :id => user_story.id, :target => "show"},
{:id => "edit_us", :title => l('user_story_edit'), :onclick => "Modalbox.show(this.href, {title: this.title, width: 370}); return false;"}
%>
<%= link_to_remote image_tag("/plugin_assets/redmine_sprints/images/delete.png",:title => l('delete')),
:url => {:controller => :user_stories, :action => :destroy, :project_id => @project, :id => user_story.id, :confirm => 'Are you sure?', :method => :post},
:confirm => l('Are you sure?')
%>
</td>
</tr>
<tr>
<td colspan="3">
<%= t("spent_hours") %>: <span><%= sprintf("%.2f", user_story.total_assigned_hours) %></span>
</td>
</tr>
<tr>
<td colspan="3" class="tab_us_description">
<%= user_story.description -%>
</td>

</tr>
<tr>
<td colspan="2" class="tab_us_diagrams">
<div>
<% for diagram in user_story.diagrams %>
<%= link_to image_tag(diagram.public_filename(:thumb)), diagram.public_filename, :rel => "lightbox", :title => diagram.name %>
<span class="delete">
<%= link_to_object(diagram, "destroy", "delete") %>
</span>
<% end %>
</div>
</td>
<td class="tab_us_links">
</td>
</tr>
<tr>
<td colspan="2">
<p>
<%= image_tag("/plugin_assets/redmine_sprints/images/estimation.png", :class => "middle") %> <%= user_story.time_estimate.estimation -%>
</p>
</td>
<td class="tab_us_links">
<%= link_to_new_object("diagram",user_story,"diagram_add") %>
</td>
</tr>
</table>
<%= image_tag("/plugin_assets/redmine_sprints/images/us-bottom.png") %>
</td>
<td></td>
<td class="tab_us_align_top" id="<%= "tasks_1_us_#{user_story.id}" %>">
<% for task in user_story.issues.find_all{|t| t.done_ratio == 0} %>
<%= render(:partial => "shared/task_view", :locals => {:task => task, :issue_statuses => @issue_statuses,
:project_users => @project_users}) %>
<% end %>
<%= image_tag("/plugin_assets/redmine_sprints/images/us-top.png") %>
<table>
<tr >
<td><div class="tab_sprint_user_story">#<%= user_story.us_number %></div></td>
<td class="tab_us_name"><%=h user_story.name %>(P<%= user_story.priority %>)</td>
<td class="tab_us_links">
<!--This will be done at some point-->
<%#= link_to_object(user_story, "show", "story") %>
<%= link_to image_tag("/plugin_assets/redmine_sprints/images/story_edit.png"),
{:controller => :user_stories, :action => :edit, :project_id => @project, :id => user_story.id, :target => "show"},
{:id => "edit_us", :title => l('user_story_edit'), :onclick => "Modalbox.show(this.href, {title: this.title, width: 370}); return false;"}
%>
<%= link_to_remote image_tag("/plugin_assets/redmine_sprints/images/delete.png",:title => l('delete')),
:url => {:controller => :user_stories, :action => :destroy, :project_id => @project, :id => user_story.id, :confirm => 'Are you sure?', :method => :post},
:confirm => l('Are you sure?')
%>
</td>
</tr>
<tr>
<td colspan="3" class="tab_us_description">
<%= user_story.description -%>
</td>
</tr>
<tr>
<td colspan="2" class="tab_us_diagrams">
<div>
<% for diagram in user_story.diagrams %>
<%= link_to image_tag(diagram.public_filename(:thumb)), diagram.public_filename, :rel => "lightbox", :title => diagram.name %>
<span class="delete">
<%= link_to_object(diagram, "destroy", "delete") %>
</span>
<% end %>
</div>
</td>
<td class="tab_us_links">
</td>
</tr>
<tr>
<td colspan="2">
<p>
<%= image_tag("/plugin_assets/redmine_sprints/images/estimation.png", :class => "middle") %> <%= user_story.time_estimate.estimation -%>
</p>
</td>
<td class="tab_us_links">
<%= link_to_new_object("diagram",user_story,"diagram_add") %>
</td>
</tr>
</table>
<%= image_tag("/plugin_assets/redmine_sprints/images/us-bottom.png") %>
</td>
<td class="tab_us_align_top" id="<%= "tasks_2_us_#{user_story.id}" %>">
<% for task in user_story.issues.find_all{|t| t.done_ratio > 0 && t.done_ratio < 100} %>
<%= render(:partial => "shared/task_view", :locals => { :task => task, :issue_statuses => @issue_statuses,
:project_users => @project_users }) %>
<% end %>
</td>
<td class="tab_us_align_top" id="<%= "tasks_3_us_#{user_story.id}" %>">
<% for task in user_story.issues.find_all{|t| t.done_ratio == 100} %>
<%= render(:partial => "shared/task_view", :locals => { :task => task, :issue_statuses => @issue_statuses,
:project_users => @project_users }) %>
<% end %>
</td>
<%= drop_receiving_element("tasks_1_us_#{user_story.id}",
#:before => "element.shrink();element.remove();",
:accept => "us_task",
:before => visual_effect(:highlight, "tasks_1_us_#{user_story.id}"),
:success => "element.remove();",
:with => "'task_id=' + (element.id.split('_').last())",
:hoverclass => 'hover',
:url => {:controller => :issue_sprints, :action => :status_change, :status_id => 1, :project_id => @project, :user_story_id => user_story.id }
#"/projects/#{@project.identifier}/tasks/#{task.id}/status_change/#{task.status_id+1}"
)%>
<%= drop_receiving_element("tasks_2_us_#{user_story.id}",
:accept => "us_task",
:before => visual_effect(:highlight, "tasks_2_us_#{user_story.id}"),
:success => "element.remove();",
:with => "'task_id=' + (element.id.split('_').last())",
:hoverclass => 'hover',
:url => {:controller => :issue_sprints, :action => :status_change, :status_id => 2, :project_id => @project, :user_story_id => user_story.id }
)%>
<%= drop_receiving_element("tasks_3_us_#{user_story.id}",
:accept => "us_task",
:before => visual_effect(:highlight, "tasks_3_us_#{user_story.id}"),
:success => "element.remove();",
:with => "'task_id=' + (element.id.split('_').last())",
:hoverclass => 'hover',
:url => {:controller => :issue_sprints, :action => :status_change, :status_id => 3, :project_id => @project, :user_story_id => user_story.id }
)%>
</tr>
<td></td>
<td class="tab_us_align_top" id="<%= "tasks_1_us_#{user_story.id}" %>">
<% for task in user_story.issues.find_all{|t| t.done_ratio == 0} %>
<%= render(:partial => "shared/task_view", :locals => {:task => task, :issue_statuses => @issue_statuses,
:project_users => @project_users}) %>
<% end %>
</td>
<td class="tab_us_align_top" id="<%= "tasks_2_us_#{user_story.id}" %>">
<% for task in user_story.issues.find_all{|t| t.done_ratio > 0 && t.done_ratio < 100} %>
<%= render(:partial => "shared/task_view", :locals => { :task => task, :issue_statuses => @issue_statuses,
:project_users => @project_users }) %>
<% end %>
</td>
<td class="tab_us_align_top" id="<%= "tasks_3_us_#{user_story.id}" %>">
<% for task in user_story.issues.find_all{|t| t.done_ratio == 100} %>
<%= render(:partial => "shared/task_view", :locals => { :task => task, :issue_statuses => @issue_statuses,
:project_users => @project_users }) %>
<% end %>
</td>
<%= drop_receiving_element("tasks_1_us_#{user_story.id}",
#:before => "element.shrink();element.remove();",
:accept => "us_task",
:before => visual_effect(:highlight, "tasks_1_us_#{user_story.id}"),
:success => "element.remove();",
:with => "'task_id=' + (element.id.split('_').last())",
:hoverclass => 'hover',
:url => {:controller => :issue_sprints, :action => :status_change, :status_id => 1, :project_id => @project, :user_story_id => user_story.id }
#"/projects/#{@project.identifier}/tasks/#{task.id}/status_change/#{task.status_id+1}"
)%>
<%= drop_receiving_element("tasks_2_us_#{user_story.id}",
:accept => "us_task",
:before => visual_effect(:highlight, "tasks_2_us_#{user_story.id}"),
:success => "element.remove();",
:with => "'task_id=' + (element.id.split('_').last())",
:hoverclass => 'hover',
:url => {:controller => :issue_sprints, :action => :status_change, :status_id => 2, :project_id => @project, :user_story_id => user_story.id }
)%>
<%= drop_receiving_element("tasks_3_us_#{user_story.id}",
:accept => "us_task",
:before => visual_effect(:highlight, "tasks_3_us_#{user_story.id}"),
:success => "element.remove();",
:with => "'task_id=' + (element.id.split('_').last())",
:hoverclass => 'hover',
:url => {:controller => :issue_sprints, :action => :status_change, :status_id => 3, :project_id => @project, :user_story_id => user_story.id }
)%>
</tr>
Binary file added assets/images/spinner.gif_old
Binary file not shown.
Loading

0 comments on commit f6ec6cc

Please sign in to comment.