ACK - Ok for me.
---
Benjamin LAN-SUN-LUK
Le 14 nov. 08 à 12:26, "Darryl L. Pierce" <mcpierce(a)gmail.com> a
écrit :
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/views/items/_list.html.erb | 87 ++++++++++++++++++++++++
+--------------
app/views/items/show.html.erb | 7 +++
2 files changed, 63 insertions(+), 31 deletions(-)
diff --git a/app/views/items/_list.html.erb b/app/views/items/
_list.html.erb
index 639395d..0379bb1 100644
--- a/app/views/items/_list.html.erb
+++ b/app/views/items/_list.html.erb
@@ -3,6 +3,11 @@
<col class="row_id" />
<col class="description" />
<col class="user" />
+
+ <% unless @sprint %>
+ <col class="number" />
+ <% end %>
+
<col class="status" />
<col class="hours" />
<col class="actions" />
@@ -10,12 +15,17 @@
<thead>
<tr>
- <th class="title" colspan="6">Backlog Items</th>
+ <th class="title" colspan="<%= @sprint ? 6 : 7
%>">Backlog
Items</th>
</tr>
<tr>
<th>#</th>
<th>Title</th>
<th>Owner</th>
+
+ <% unless @sprint %>
+ <th>Sprint</th>
+ <% end %>
+
<th>Status</th>
<th>Hours (E/A/R)</th>
<th>Action</th>
@@ -23,38 +33,53 @@
</thead>
<tbody>
- <% @backlog_items.each_with_index do |item, index| %>
- <% row_class = index%2 == 0 ? 'even' : 'odd' %>
- <% sprint = item.sprint %>
- <% product = sprint.product %>
-
- <tr class="<%= row_class %>">
- <td>
- <%= link_to "#{item.id}",
- product_sprint_item_path(product, sprint, item) %>
- </td>
- <td><%= item.user_story.title %></td>
- <td><%= link_to(item.owner.display_name,
user_path(item.owner)) if item.owner %></td>
- <td><%= item.state_text %></td>
- <td><%= show_hours_as_ear(item) %>
- <td>
- <%= link_to(image_tag("icons/item_user_story.png"),
- product_story_path(item.sprint.product,
item.user_story)) %>
- <%= link_to(image_tag("icons/item_accept.png"),
- accept_product_sprint_item_path(product, sprint, item,
- :source => request.request_uri)) if item.can_accept?
(@user) %>
- <%= link_to(image_tag("icons/item_drop.png"),
- drop_product_sprint_item_path(product, sprint,item,
- :source => request.request_uri)) if item.can_drop?
(@user) %>
- <%= link_to(image_tag("icons/item_complete.png"),
- complete_product_sprint_item_path(product, sprint, item,
- :source => request.request_uri)) if item.can_complete?
(@user) %>
- <%= link_to(image_tag("icons/item_reopen.png"),
- reopen_product_sprint_item_path(product, sprint, item,
- :source => request.request_uri)) if item.can_reopen?
(@user) %>
- </td>
+ <% if @backlog_items.empty? %>
+ <tr>
+ <td colspan="<%= @sprint ? 6 : 7 %>">No backlog items
found...</td>
</tr>
+ <% else %>
+ <% @backlog_items.each_with_index do |item, index| %>
+ <% row_class = index%2 == 0 ? 'even' : 'odd' %>
+ <% sprint = item.sprint %>
+ <% product = sprint.product %>
+
+ <tr class="<%= row_class %>">
+ <td>
+ <%= link_to "#{item.id}",
+ product_sprint_item_path(product, sprint, item) %>
+ </td>
+ <td><%= item.user_story.title %></td>
+ <td><%= link_to(item.owner.display_name,
user_path(item.owner)) if item.owner %></td>
+
+ <% unless @sprint %>
+ <td>
+ <div style="overflow: hidden">
+ (<%= link_to "#{item.sprint.id}",
product_sprint_path(item.sprint.product, item.sprint) %>)
+ <%= h item.sprint.title %>
+ </div>
+ </td>
+ <% end %>
+ <td><%= item.state_text %></td>
+ <td><%= show_hours_as_ear(item) %>
+ <td>
+ <%= link_to(image_tag("icons/item_user_story.png"),
+ product_story_path(item.sprint.product,
item.user_story)) %>
+ <%= link_to(image_tag("icons/item_accept.png"),
+ accept_product_sprint_item_path(product, sprint, item,
+ :source => request.request_uri)) if
item.can_accept?(@user) %>
+ <%= link_to(image_tag("icons/item_drop.png"),
+ drop_product_sprint_item_path(product, sprint,item,
+ :source => request.request_uri)) if item.can_drop?
(@user) %>
+ <%= link_to(image_tag("icons/item_complete.png"),
+ complete_product_sprint_item_path(product, sprint,
item,
+ :source => request.request_uri)) if
item.can_complete?(@user) %>
+ <%= link_to(image_tag("icons/item_reopen.png"),
+ reopen_product_sprint_item_path(product, sprint, item,
+ :source => request.request_uri)) if item.can_reopen?
(@user) %>
+ </td>
+ </tr>
+ <% end %>
<% end %>
</tbody>
</table>
diff --git a/app/views/items/show.html.erb b/app/views/items/
show.html.erb
index 96f4be3..4c2b7d4 100644
--- a/app/views/items/show.html.erb
+++ b/app/views/items/show.html.erb
@@ -43,6 +43,13 @@
</tr>
<tr>
+ <td class="label">Sprint:</td>
+ <td class="value">
+ <%= link_to "(#{(a)sprint.id})", product_sprint_path(@product,
@sprint) %>
+ <%= h @sprint.title %>
+ </tr>
+
+ <tr>
<td class="label">Priority:</td>
<td class="value"><%= @backlog_item.user_story.priority
%></td>
</tr>
--
1.6.0.2
_______________________________________________
projxp-devel mailing list
projxp-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/projxp-devel