ACK – Ok ;-)

--
Benjamin LAN-SUN-LUK



Le 08/11/08 23:15, « Darryl L. Pierce » <mcpierce@gmail.com> a écrit :



Signed-off-by: Darryl L. Pierce <mcpierce@gmail.com>
---
 app/views/items/show.html.erb        |   28 +++++++++++++++++++++++++---
 app/views/products/_details.html.erb |    2 +-
 app/views/projects/_details.html.erb |    2 +-
 app/views/sprints/show.html.erb      |    2 +-
 app/views/stories/show.html.erb      |   27 ++++++++++++++++++++++++++-
 app/views/tasks/show.html.erb        |   10 ++++------
 app/views/users/show.html.erb        |    3 +--
 public/stylesheets/details.css       |   27 +++++++++++++++++----------
 8 files changed, 76 insertions(+), 25 deletions(-)

diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb
index 0d2d5cd..aab97b3 100644
--- a/app/views/items/show.html.erb
+++ b/app/views/items/show.html.erb
@@ -1,11 +1,33 @@
-<table class="details">
+<table class="detail">
   <tr>
     <td class="label">Owner:</td>
     <td class="value"><%= @backlog_item.owner.display_name if @backlog_item.owner %>
   </tr>
-</table>

-<%= render(:partial => 'stories/show', :object => @backlog_item.user_story) %>
+  <tr>
+    <td class="label">Project:</td>
+    <td class="value"><%= link_to @product.project.name, project_path(@product.project) %></td>
+  </tr>
+
+  <tr>
+    <td class="label">Product:</td>
+    <td class="value"><%= link_to @product.name, product_path(@product) %></td>
+  </tr>
+
+  <tr>
+    <td class="label">Title:</td>
+    <td class="value"><%= @backlog_item.user_story.title  %></td>
+  </tr>
+
+  <tr>
+    <td class="label">Priority:</td>
+    <td class="value"><%= @backlog_item.user_story.priority %></td>
+  </tr>
+
+  <tr>
+    <td class="text" colspan="2"><%= simple_format @backlog_item.user_story.description %></td>
+  </tr>
+</table>

 <% if @backlog_item.can_add_tasks?(@user)  %>
   <%= link_to "Add Task", new_user_task_path(@user, :item => @backlog_item) %>
diff --git a/app/views/products/_details.html.erb b/app/views/products/_details.html.erb
index 0275d57..c1b3433 100644
--- a/app/views/products/_details.html.erb
+++ b/app/views/products/_details.html.erb
@@ -1,4 +1,4 @@
-<table class="details">
+<table class="detail">
   <thead>
     <tr>
       <th class="title" colspan="2"><%= "Details For #{@product.name}" %></th>
diff --git a/app/views/projects/_details.html.erb b/app/views/projects/_details.html.erb
index 9d3a5fe..a54b89b 100644
--- a/app/views/projects/_details.html.erb
+++ b/app/views/projects/_details.html.erb
@@ -1,4 +1,4 @@
-<table class="details">
+<table class="detail">
   <thead>
     <tr>
       <th class="title" colspan="2"><%=  "Details For #{@project.name}" %></th>
diff --git a/app/views/sprints/show.html.erb b/app/views/sprints/show.html.erb
index 0bfb308..6a92c74 100644
--- a/app/views/sprints/show.html.erb
+++ b/app/views/sprints/show.html.erb
@@ -6,7 +6,7 @@
 <%= link_to "Plan", plan_product_sprint_path(@product, @sprint) %>
 <% end %>

-<table class="details">
+<table class="detail">
   <thead>
     <tr>
       <th class="title" colspan="2"><%= @sprint.title %></th>
diff --git a/app/views/stories/show.html.erb b/app/views/stories/show.html.erb
index ef7466a..989edb1 100644
--- a/app/views/stories/show.html.erb
+++ b/app/views/stories/show.html.erb
@@ -1,4 +1,29 @@
-<%= render(:partial => 'show', :object => @user_story) %>
+<table class="details">
+  <tr>
+    <td class="label">Project:</td>
+    <td class="value"><%= link_to @product.project.name, project_path(@product.project) %></td>
+  </tr>
+
+  <tr>
+    <td class="label">Product:</td>
+    <td class="value"><%= link_to @product.name, product_path(@product) %></td>
+  </tr>
+
+  <tr>
+    <td class="label">Title:</td>
+    <td class="value"><%= @product.user_story.title  %></td>
+  </tr>
+
+  <tr>
+    <td class="label">Description:</td>
+    <td class="value"><%= simple_format @product.user_story.description %></td>
+  </tr>
+
+  <tr>
+    <td class="label">Priority:</td>
+    <td class="value"><%= @product.user_story.priority %></td>
+  </tr>
+</table>

 <% if @user_story.can_edit?(@user) %>
   <%= link_to "Edit", edit_product_story_path(@product, @user_story) %>
diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb
index e84cb70..dfeb4a9 100644
--- a/app/views/tasks/show.html.erb
+++ b/app/views/tasks/show.html.erb
@@ -1,9 +1,4 @@
-<table class="details">
-  <tr>
-    <td class="label">Description:</td>
-    <td class="value"><%= simple_format @task.description %></td>
-  </tr>
-
+<table class="detail">
   <tr>
     <td class="label">When:</td>
     <td class="value"><%= @task.when %></td>
@@ -24,6 +19,9 @@
     <td class="label"><%= link_to(@task.backup.display_name,user_path(@task.backup)) if @task.backup %></td>
   </tr>

+  <tr>
+    <td class="text" colspan="2"><%= simple_format @task.description %></td>
+  </tr>
 </table>

 <%= link_to "Back", user_tasks_path(@task.primary) %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 776a7e3..f2fdd88 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,7 +1,6 @@
 <table class="detail">
   <tr>
-    <td class="label">Name:</td>
-    <td class="value"><%= @this_user.display_name %></td>
+    <td class="title" colspan="2"><%= @this_user.display_name %></td>
   </tr>
  
   <tr>
diff --git a/public/stylesheets/details.css b/public/stylesheets/details.css
index 632f6fd..dc839db 100644
--- a/public/stylesheets/details.css
+++ b/public/stylesheets/details.css
@@ -1,23 +1,30 @@
-table.details {
-    width: 100%;
-   
-    padding: 2px 3px 2px 3px;
+table.detail {
+    width: 600px;
+    border: 1px outset #000000;
+    padding: 5px 15px 5px 15px;
+    margin: 15px 0px 0px 15px;
 }

-table.details th.title {
+table.detail th.title, table.detail td.title {
     font-weight: bold;
     text-align: center;   
     border-bottom: 1px solid #000000;
     background-color: #f3f3f3;
 }

-table.details td.label {
-    width: 25%;
+table.detail td.label {
     padding-left: 50px;
-    color: #707070;
+    background-color: #ffffff;
+    color: #070707;
+    font-weight: bold;
+    text-align: right;
+}
+
+table.detail td.value {
+    width: 100%;
 }

-table.details td.text {
+table.detail td.text {
     font-size: 90%;
     padding: 5px 10px 1px 10px;
-}
\ No newline at end of file
+}
--
1.6.0.2

_______________________________________________
projxp-devel mailing list
projxp-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/projxp-devel