Admin task tags interface
Review Request #120 - Created Dec. 15, 2009 and submitted
Information | |
---|---|
Savin Tiberiu | |
infoarena | |
Reviewers | |
hackers | |
This change contains the interface for linking tasks with algorithm tags.
-
/trunk/common/db/tags.php (Diff revision 1) -
evil space
-
/trunk/common/tags.php (Diff revision 1) -
Where is this declared? :-s parent_tags_key seems a better name.
-
/trunk/common/tags.php (Diff revision 1) -
I don't think this works properly for other tags anymore (year or round for example). If the tag's parent was changed, you still want to remove the other tags.
-
/trunk/www/controllers/task.php (Diff revision 1) -
You should pass along $task as a parameter here in identity_require. Owners should be able to tag their own tasks.
-
/trunk/www/controllers/task.php (Diff revision 1) -
We should do some validation here though. If it's not an array or one of it's elements is not a tag id, flash an error. We should also check that all of these are "algorithm" tags and that each of them has a "method" parent.
-
/trunk/www/controllers/task.php (Diff revision 1) -
I don't really like using tag_update here especially since we do receive just ids and the modified tag_update breaks the rest of the code. You can just tag_clear all of them and tag_add each tag individually.
-
/trunk/www/controllers/task.php (Diff revision 1) -
Why do you need to add tag_ prefix here? It seems ugly and better to make build_tags_tree not use the tag_ prefix.
-
/trunk/www/views/task_tag_edit.php (Diff revision 1) -
evil empty line
-
/trunk/www/views/task_tag_edit.php (Diff revision 1) -
This is awesome :) didn't know it worked that way.
Regarding coding style, there are a lot of stuff like log_assert( sth) which is inconsistent. There shouldn't be a space after ( or before ).
Regarding coding style, there are a lot of stuff like log_assert( sth) which is inconsistent. There shouldn't be a space after ( or before ).
-
/trunk/common/db/tags.php (Diff revision 3) -
Revert this comment also.
-
/trunk/www/controllers/task.php (Diff revision 3) -
Check that the task exists.
-
/trunk/www/controllers/task.php (Diff revision 3) -
We should also check that the algorithm_tags actually have type "algorithm" (in case of a malevolent user)
-
/trunk/www/controllers/task.php (Diff revision 3) -
for instead of or.
-
/trunk/www/views/task_tag_edit.php (Diff revision 3) -
inline styles are bad, use CSS class. Some left padding for the list items would look nice.
-
/trunk/www/views/task_tag_edit.php (Diff revision 4) -
Add a space after checkbox to make it look better :)