Commit graph

435 commits

Author SHA1 Message Date
Matt Rogers
3365b7e79f Merge pull request #162 from kytrinyx/projects-stats
Extract duplicate top projects query from stats controller
2013-03-01 21:58:34 -08:00
Katrina Owen
a23d2eb070 Extract duplicate context query from controller 2013-03-01 23:29:54 -05:00
Katrina Owen
6de4713d38 Extract top projects query object
This removed a bit of duplication from the stats controller.
2013-03-01 23:11:44 -05:00
Matt Rogers
f375c06964 Merge pull request #160 from kytrinyx/tag-counts
Extract duplicated query from stats controller
2013-03-01 18:52:52 -08:00
Katrina Owen
4dff7538ea Extract duplicated query
This includes a bit of a simplification which assumes that there aren't
any orphan taggings for a user.
2013-03-01 21:27:58 -05:00
Katrina Owen
0aa6ea183b Extract chart value object
This simplifies the views (slightly).
2013-03-01 20:38:24 -05:00
Matt Rogers
8b0f3e986a Merge branch 'tag-cloud' of https://github.com/kytrinyx/tracks 2013-03-01 16:49:53 -06:00
Katrina Owen
a13199cdda Add unit test for tag cloud 2013-03-01 16:03:35 -05:00
Katrina Owen
a81f5b76f3 Separate query from cloud
This will make testing easier
2013-03-01 13:14:27 -05:00
Reinier Balt
4df340bd7b add ui for changing state of context to closed. This fixes #645 2013-03-01 16:22:30 +01:00
Reinier Balt
1e7e925c39 fix failing test 2013-03-01 16:22:29 +01:00
Reinier Balt
1e84adc91b get tests running and fix editing context state 2013-03-01 16:22:29 +01:00
Katrina Owen
0f5b402427 Use minimum of tag count for tag cloud
The tag cloud minimum used to start at 0, then repeatedly compared to
the lowest count and chose the smallest, which is bound to be zero in
every case.

Discussed
[here](8c26ea7cb5 (commitcomment-2719199)).
2013-03-01 00:13:41 -05:00
Katrina Owen
b5868d5c70 Use tag cloud objects in view
This allows us to not set the individual instance variables for the tag
cloud attributes.
2013-02-28 22:00:23 -05:00
Katrina Owen
61e04a8258 Extract methods in tag cloud
This gets rid of the compute method, and makes each value that got set
in it its own little method.
2013-02-28 21:53:19 -05:00
Katrina Owen
447178bd7d Collapse duplication in tag cloud model 2013-02-28 21:30:36 -05:00
Katrina Owen
edc793e703 Rename variables
The current user isn't necessarily current when it is in the model
layer.

The exposed attributes on the tag cloud no longer need to contain type
information.
2013-02-28 21:18:00 -05:00
Katrina Owen
8f6d57014a Extract tag cloud class from stats controller 2013-02-28 21:08:48 -05:00
Katrina Owen
ce9db80743 Correct typo in variable name 2013-02-28 20:34:46 -05:00
Reinier Balt
48e47fc009 remove dynamic finders from cucumber scenarios 2013-02-27 20:02:01 +01:00
Reinier Balt
ef91dd0c64 another set of dynamic finder migrations. All non-cucumber tests pass 2013-02-27 11:50:49 +01:00
Reinier Balt
583664be36 remove some dynamic finders (they are deprecated for rails4) and add test for untested method of context.rb 2013-02-25 10:21:04 +01:00
Reinier Balt
3482af5072 fix #1393 by calculating todo count for hidden projects too 2013-02-20 20:08:15 +01:00
Reinier Balt
c61d0cbdb7 fix #1395 and speedup context.autocomplete a lot 2013-02-18 16:44:46 +01:00
Reinier Balt
6fa70db39e fix updating dependency trees when changin a name. Including invalidating cache when
necessary
2013-02-17 17:37:44 +01:00
Reinier Balt
1b0d08bbb5 fix timing issues on failing scenarios. Fix deprecated jquery functions and update jqueryui
Signed-off-by: Reinier Balt <lrbalt@gmail.com>
2013-02-15 22:27:39 +01:00
Reinier Balt
7eccf79ab6 fix regressions and use timecop to fix time in tests. Thanks Dan and Hans! 2013-01-06 16:04:07 +01:00
Reinier Balt
4b7bd1c414 include predecessors and successors in xml export of todos. Fixes #1377 2013-01-01 23:08:47 +01:00
Reinier Balt
bd656ee1c7 fix #1350 by removing admin_email from preferences model and add it as a site option in
site.yml.tmpl. This one needs running migrations
2012-12-23 21:03:37 +01:00
Dan Rice
c838272622 Fix redirect to home page after open signup
Fixes #1349
2012-11-29 16:27:28 -05:00
Matt Rogers
4d2f25ab20 Refactor the fetching of done todos
Move the get_done_today, get_done_this_week, and get_done_this month
methods into their own class in lib/tracks and use the new class in the
context, project, and todo controllers.

This removes the complexity from the application controller, silos it
off, and slightly reduces the complexity of the other controllers so
that they don't have to duplicate as much code.

The tradeoff here is that the code that was moved out into its own class
was also duplicated in the todos controller due to a different use case
that I didn't see before. This is still an improvement however and so
I'm ok with going back and tackling the extra complexity added to
TodoController at a later date.
2012-11-27 23:07:46 -06:00
Dan Rice
504d03f989 Fix wrong page title when adding a user
Title still says "admin user" even though subsequent users are not admins.
Add a new string to correct this.
2012-10-26 17:19:40 -04:00
Dan Rice
5b6cbf566a Don't sort todos when counting them
Grouping isn't as lax in PostgreSQL as it is in MySQL or SQLite. All
sort fields also need to be in the GROUP BY, or be aggregated. The order
isn't relevant when counting, so simply don't order in that case.

Fix #1336
2012-10-04 10:43:22 -04:00
Matt Rogers
b89062913f remove code duplication 2012-09-08 13:31:22 -05:00
Matt Rogers
f9bd923205 Use a local variable instead of an instance variable
@all_actions_per_context is not used anywhere except for in the
StatsController. It's only used in two functions and it's not used by
anything in the view.

Make it a local variable instead.
2012-09-08 13:12:35 -05:00
Matt Rogers
d9f4226fbe Use a constant for seconds per day
Using an instance variable for this just seems wrong.
2012-09-08 12:55:06 -05:00
Stefan Hacker
e6afd0ac0a Fix max_actions being nil when actions_open_per_week list is empty 2012-09-03 20:43:25 +02:00
Stefan Hacker
7f4065b16b Remove explicit mentioning of application layout where not needed 2012-09-03 20:24:20 +02:00
Reinier Balt
8a8dc47ab8 Try the cache_digests gem for Tracks
cache_digests will be part of Rails 4
2012-09-02 15:13:28 +02:00
Stefan Hacker
27adccb6e9 Remove unused layout and clear up naming
* scaffold.css is only used by login -> rename to login.css
* standard.html.erb is the default application layout -> rename to application.html.erb
* scaffold.html.erb is unused -> deleted
2012-09-02 14:20:17 +02:00
Reinier Balt
10b6a9ea69 fix ordering of completed todos in context view 2012-08-12 11:27:37 +02:00
Matt Rogers
306d501e20 remove duplication in mobile cookie handling 2012-08-15 22:14:00 -05:00
Matt Rogers
b01c7878d1 Push conversion of a todo to a project down.
Refactor the conversion of a todo to a project and move it from the
TodosController to the Project model.
2012-08-14 19:33:54 -05:00
Reinier Balt
a37d10f57a fix #1314. Fixed security issue too 2012-07-18 12:26:46 +02:00
Reinier Balt
4e29bf69f7 fix failing tests and small refactorings 2012-07-18 11:42:26 +02:00
Reinier Balt
7c1cd2a144 fix #1310. Add test for this
Found that I had a lot of tests commented out. They have some regressions I will fix later
2012-07-15 21:28:42 +02:00
Reinier Balt
82bb67f518 small refactorings 2012-07-12 13:14:21 +02:00
Matt Rogers
7d0c716366 Fix a few typos in the comment 2012-07-13 20:55:53 -05:00
Reinier Balt
23b92d853a Merge pull request #84 from sukima/fix_projects_api_crash
Fix projects api crash
2012-07-11 06:36:51 -07:00
Reinier Balt
bd8498f39c fix #1287. Fix various small bugs and some small improvements 2012-06-29 16:48:30 +02:00