Commits

Tatham Oddie committed 74f303d

Added total effort column.

Comments (0)

Files changed (2)

Web/Content/Site.css

 
         ol.backlog li .story-id,
         ol.backlog li .estimated-effort,
+        ol.backlog li .total-effort,
         ol.backlog li div
         {
             position: absolute;
         ol.backlog li.story-color-green .story-id  { background-color: #dbffb7; }
         ol.backlog li.story-color-blue .story-id   { background-color: #c6d7e8; }
 
-        ol.backlog li .estimated-effort
+        ol.backlog li .estimated-effort,
+        ol.backlog li .total-effort
         {
-            right: 0;
             width: 3em;
             padding: 0.5em;
             height: 2em;
             vertical-align: middle;
             text-align: center;
         }
+        
+        ol.backlog li .estimated-effort { right: 4em; }
+        ol.backlog li .total-effort { right: 0; }
 
         ol.backlog li .unestimated { color: #f88; }
 
             padding: 0.25em 0;
             height: 2.5em;
             left: 5em;
-            margin-right: 4em;
+            margin-right: 8em;
         }
 
         ol.backlog li div span

Web/Views/Story/Backlog.cshtml

 @if (Model.Any())
 {
     <ol class="backlog">
+        @{ var totalEffort = 0d; var totalIsComplete = true; }
         @foreach (var story in Model)
         {
+            if (story.EstimatedEffort.HasValue)
+            {
+                totalEffort += story.EstimatedEffort.Value;
+            }
+            else
+            {
+                totalIsComplete = false;
+            }
             <li class="story-color-@story.ColorKey.ToLowerInvariant()" data-story-id="@story.Id">
                 <span class="story-id">#@story.Id</span>
                 <span class="estimated-effort @(story.EstimatedEffort.HasValue ? "" : "unestimated")">@(story.EstimatedEffort.HasValue ? story.EstimatedEffort.ToString() : "?")</span>
+                <span class="total-effort">@(totalEffort > 0 ? totalEffort.ToString() : "")@(totalIsComplete ? "" : "?")</span>
                 <div>
                     <span>@story.Name</span>
                     <span class="description">@story.Description</span>