Permalink
Browse files

switch order work units show in list views to be reverse chronologica…

…l, and factor out common tableview for them.
  • Loading branch information...
1 parent c2ec94a commit 1a43e8493c25ba6d9faf45278da9e1f2c5bd7111 @knewter knewter committed Aug 30, 2012
View
@@ -1,3 +1,9 @@
+08/30/2012
+
+ - Separete clients from normal users in admin report
+ - fix issue where ticket show page was not rendering work units in descending
+ order of scheduled date.
+
03/23/2012
- Add totals to weekly time report
@@ -21,7 +21,7 @@ def create
# GET /tickets/:id
def show
- @work_units = WorkUnit.order("id").for_ticket(@ticket).sort_by_scheduled_at
+ @work_units = WorkUnit.for_ticket(@ticket).sort_by_scheduled_at
unless @ticket.estimated_hours
flash.now[:notice] = "NOTE: The estimated amount of time to complete this ticket has not been entered."
end
@@ -8,7 +8,7 @@
%th= t(:hours_type)
%th= t(:hours)
%tbody
- - @work_units.each do |work_unit|
+ - work_units.each do |work_unit|
%tr{ :class => cycle("odd", "even") }
%td= work_unit.id
%td= link_to work_unit.description, work_unit_path(work_unit)
@@ -22,7 +22,7 @@
%b Hours Worked:
= @ticket.hours
-= render "shared/work_unit_index"
+= render "shared/work_unit_index", work_units: @work_units
- unless current_user.client
= render "shared/files_and_comments", :items => @ticket.files_and_comments.reverse, :id => 'ticket'
@@ -3,4 +3,5 @@
.gradient_border_wrap
.gradient_border_content
%h3= "All work units containing: " + @search
-= render "shared/work_unit_index"
+
+= render "shared/work_unit_index", work_units: @work_units

0 comments on commit 1a43e84

Please sign in to comment.