mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-10 09:24:22 +01:00
applied the patch from Peter Suschlik in #641. Changed the badge count for completed actions to the number of actions shown in stead of the total number of completed actions. Thanks Peter for the patch
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@705 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
67c79ba5a6
commit
da63b552ce
2 changed files with 52 additions and 49 deletions
|
|
@ -2,6 +2,7 @@ class NotesController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@all_notes = current_user.notes
|
@all_notes = current_user.notes
|
||||||
|
@count = @all_notes.size
|
||||||
@page_title = "TRACKS::All notes"
|
@page_title = "TRACKS::All notes"
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
|
|
||||||
|
|
@ -244,11 +244,13 @@ class TodosController < ApplicationController
|
||||||
@done_today = @done.completed_within current_user.time - 1.day
|
@done_today = @done.completed_within current_user.time - 1.day
|
||||||
@done_this_week = @done.completed_within current_user.time - 1.week
|
@done_this_week = @done.completed_within current_user.time - 1.week
|
||||||
@done_this_month = @done.completed_within current_user.time - 4.week
|
@done_this_month = @done.completed_within current_user.time - 4.week
|
||||||
|
@count = @done_today.size + @done_this_week.size + @done_this_month.size
|
||||||
end
|
end
|
||||||
|
|
||||||
def completed_archive
|
def completed_archive
|
||||||
@page_title = "TRACKS::Archived completed tasks"
|
@page_title = "TRACKS::Archived completed tasks"
|
||||||
@done = current_user.completed_todos
|
@done = current_user.completed_todos
|
||||||
|
@count = @done.size
|
||||||
@done_archive = @done.completed_more_than current_user.time - 28.days
|
@done_archive = @done.completed_more_than current_user.time - 28.days
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue