Today, 'This Week', 'Next Week' Dashboard hack
Page: 1, 2
Jim Morrison
on Feb 28. 2007. 8:41 pm
Hi,
Hope this is the right place to post this?
A collegue installed activeCollab last night and we've been playing today - guys brill, really! very slick..
One of the things I was hoping for was being able to see a synopsis of the day/week/month ahead on the front page - as soon as you log in... which it seems it doesn't do..
.. so I've hacked about and added "This Week" and "Next Week" to the front page.
I've tried to change as little as possible:
-------
views/dashboard/index.php - I've just copied the "Today" block twice. This week uses the "success" class to put in green, Next Week is classless so no CSS changes..
DateTimeValue.class.php - I've duplicated 'advance()'s functionality to take a posix'ish string rather than an offset.
( so "next monday" gives you the end of the week timstamp, "next monday +1 week" gives you the end of the next ... if you're Mon-Sun week kinda guy.. should add Sun-Sat format too really? :-/ .. )
User.class.php - duplicated the getTodayMilestones() functionality for getThisWeekMilestones() etc...
... which uses a modified getTodayMilestonesByUser() as:
getPosixMilestonesByUser(User $user, $from, $to) {} ... where $from/$to are "next monday" etc..
Lastly, added the two strings "This Week", "Next Week" to the EN_US locale..
--------
Anyhow - hands up - I know this is a complete hack!! ... but from looking about earlier it seems some folk might find it useful so I'd be happy to share... just not sure how?
What's policy on this sort of thing? Am I right there's a code freeze pending a re-write? ..
Cheers,
Jim
Hope this is the right place to post this?
A collegue installed activeCollab last night and we've been playing today - guys brill, really! very slick..
One of the things I was hoping for was being able to see a synopsis of the day/week/month ahead on the front page - as soon as you log in... which it seems it doesn't do..
.. so I've hacked about and added "This Week" and "Next Week" to the front page.
I've tried to change as little as possible:
-------
views/dashboard/index.php - I've just copied the "Today" block twice. This week uses the "success" class to put in green, Next Week is classless so no CSS changes..
DateTimeValue.class.php - I've duplicated 'advance()'s functionality to take a posix'ish string rather than an offset.
( so "next monday" gives you the end of the week timstamp, "next monday +1 week" gives you the end of the next ... if you're Mon-Sun week kinda guy.. should add Sun-Sat format too really? :-/ .. )
User.class.php - duplicated the getTodayMilestones() functionality for getThisWeekMilestones() etc...
... which uses a modified getTodayMilestonesByUser() as:
getPosixMilestonesByUser(User $user, $from, $to) {} ... where $from/$to are "next monday" etc..
Lastly, added the two strings "This Week", "Next Week" to the EN_US locale..
--------
Anyhow - hands up - I know this is a complete hack!! ... but from looking about earlier it seems some folk might find it useful so I'd be happy to share... just not sure how?
What's policy on this sort of thing? Am I right there's a code freeze pending a re-write? ..
Cheers,
Jim
Hi, could you upload your changed files anywhere? I don't completely understand your changes but want to apply them :)
regards
johannes
regards
johannes
Jim Morrison
on Mar 1. 2007. 9:12 am
Sorry - didn't explain it very well.
Basically, the Dashboard is now 3x boxes, not 1x
- Red -> "Late" & "Today"
- Green -> "This Week"
- Blue -> "Next Week"
... and it's pretty easy to add more, like "This Month" and "Next Month" etc..
I'll post some .diffs and a screenshot when I get to the office ( this afternoon )
:-)
Basically, the Dashboard is now 3x boxes, not 1x
- Red -> "Late" & "Today"
- Green -> "This Week"
- Blue -> "Next Week"
... and it's pretty easy to add more, like "This Month" and "Next Month" etc..
I'll post some .diffs and a screenshot when I get to the office ( this afternoon )
:-)
Still hoping you'll expand on the exact changes you made. Sounds like a great hack.
tranzparency
on Mar 26. 2007. 8:04 pm
jim, thanks for working on this. Please share the code you've got with some more description. I could really use this on my dashboard.
Also, how can I duplicate the CSS for the success class so the "Next Week" box can be blue? I tried but there are so many references to success in the CSS is tough to nail it down.
Thanks!
Also, how can I duplicate the CSS for the success class so the "Next Week" box can be blue? I tried but there are so many references to success in the CSS is tough to nail it down.
Thanks!
Brady J. Frey
on Jun 18. 2007. 8:20 pm
Does anyone have a more detailed explanation of the above adjustment? The directions are a big vague in the middle. Thank you!
jimbomorrison,
Can you post your .diffs and screenshot? Thanks!
Jeff
Can you post your .diffs and screenshot? Thanks!
Jeff
Brady J. Frey
on Jun 21. 2007. 5:28 pm
I haven't had time, and the original poster to this thread has left it dead - but I just made it a project for our inside developer to do. I'm leaving the July 4th week, so I'm hoping to finish by next week (end of week) otherwise I'll have it when I get back. Regardless, when I get it, I'm going to ask our developer to post up a how-to as a patch walk through + files. This is actually causing us some headache because we can't project our projects a week+, and I can't wait for 1.0. We've just overlapped and used Basecamp for the time being.
Regardless, I'll post up here with the stuff and on my site!
Regardless, I'll post up here with the stuff and on my site!
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.



