diff --git a/tracks/app/helpers/todo_helper.rb b/tracks/app/helpers/todo_helper.rb index 011a7680..f616e213 100644 --- a/tracks/app/helpers/todo_helper.rb +++ b/tracks/app/helpers/todo_helper.rb @@ -94,7 +94,7 @@ module TodoHelper case @days # overdue or due very soon! sound the alarm! - when -365..-1 + when -1000..-1 "Overdue by " + (@days * -1).to_s + " days " when 0 "Due Today " @@ -102,7 +102,11 @@ module TodoHelper "Due Tomorrow " # due 2-7 days away when 2..7 - "Due in " + @days.to_s + " days " + if app_configurations["formats"]["due_style"] == 1 + "Due on " + due.strftime("%A") + " " + else + "Due in " + @days.to_s + " days " + end # more than a week away - relax else "Due in " + @days.to_s + " days " diff --git a/tracks/config/settings.yml.tmpl b/tracks/config/settings.yml.tmpl index 664b2209..0c24af42 100644 --- a/tracks/config/settings.yml.tmpl +++ b/tracks/config/settings.yml.tmpl @@ -3,12 +3,15 @@ # week_starts is the day you want the calendar to display first (0=Sunday, 1=Monday etc.) # hp_completed is the number of completed items you want displayed on the home page # staleness_starts is the number of days before actions start to go yellow with age! +# due_style 0 is "due in N days" for N=2..7 +# due_style 1 is "due on weekdayname" for N=2..7 # formats: date: %d/%m/%Y week_starts: 1 hp_completed: 5 staleness_starts: 7 + due_style: 0 admin: email: butshesagirl@rousette.org.uk loginhash: change-me