Commit Graph

4 Commits

Author SHA1 Message Date
Bertocq
dff966d9b3 Show valuation comment thread @ Valuation show/edit
Why:

Budget Investment's valuators should be able to see internal valuation
comments thread at both show and edit views.

How:

At Valuation::BudgetInvestmentsController:
* Include CommentableActions to gain access to the entire feature, with
required resource_model & resource_name methods.
* Add the only possible order (oldest to newest)
* Load comments on both show & edit actions, passing `valuations` flag
to the CommentTree in order to only list those.

At CommentTree:
* Use `valuations` flag as instance variable to decide wich
comment threat to load: valuations (if relation exists) or comments.
2018-01-31 01:53:33 +01:00
rgarcia
35704f2be9 refactors comment tree 2016-01-07 15:18:45 +01:00
kikito
0cf592af71 Fixes two issues in comment_tree
* The descendants list for a comment was not being built correctly
* The root comments must be ordered “newest first”, but their
descendants must be ordered “newest last”
2015-10-30 20:06:36 +01:00
kikito
60b3c65b05 Refactor comment tree calculation using a PORO 2015-10-30 17:00:32 +01:00