Closed (fixed)
Project:
User Points
Version:
7.x-1.x-dev
Component:
Code: userpoints
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2011 at 01:07 UTC
Updated:
10 May 2011 at 23:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
berdirOk, so here is my suggestion:
We do the very exact thing that Privatemsg and UR are already doing.
We move viewing other user's points and transactions to user/%uid/points. That will also get us a nice breadcrumb (#1020126: Incorrect breadcrumb on points transaction view page).
Any objections? ;)
Comment #2
BenK commentedMakes sense to me! :-)
Comment #3
berdirOk, attaching a first patch.
- Adds Points local tasks (with list, view, edit, approve, decline local tasks just like in the admin listing)
- details link on /userpoints now shows for all users if you have the necessary permissions and points to the corresponding page.
Do we also want to unify the myuserpoints page with the same local tasks? I guess so, but not yet done.
Comment #4
BenK commentedBerdir,
I just tested your patch and things seem to work well if you click "(details)" from the "User by Points" page (/userpoints). But if you click "(details)" from the "Totals" tab in the admin section (admin/config/people/userpoints), then you get the following errors:
Notice: Trying to get property of non-object in userpoints_list_my_userpoints() (line 40 of /Users/benkaplan/git/drupal-7.0b/sites/all/modules/userpoints/userpoints.pages.inc).
Notice: Trying to get property of non-object in userpoints_get_categories() (line 1613 of /Users/benkaplan/git/drupal-7.0b/sites/all/modules/userpoints/userpoints.module).
Notice: Trying to get property of non-object in userpoints_get_categories() (line 1629 of /Users/benkaplan/git/drupal-7.0b/sites/all/modules/userpoints/userpoints.module).
Notice: Trying to get property of non-object in userpoints_list_my_userpoints() (line 51 of /Users/benkaplan/git/drupal-7.0b/sites/all/modules/userpoints/userpoints.pages.inc).
Notice: Trying to get property of non-object in userpoints_list_my_userpoints() (line 60 of /Users/benkaplan/git/drupal-7.0b/sites/all/modules/userpoints/userpoints.pages.inc).
Notice: Trying to get property of non-object in userpoints_list_my_userpoints() (line 117 of /Users/benkaplan/git/drupal-7.0b/sites/all/modules/userpoints/userpoints.pages.inc).
Also, when you click the details link from this page, you are linked to a "!Points for Anonymous" page instead of a points page for the specific user who was clicked.
Also, I'm not seeing the Points local tasks (with list, view, edit, approve, decline local tasks just like in the admin listing). Where are these supposed to show up? I agree that we should unify the /myuserpoints page with the same local tasks as used elsewhere.
--Ben
Comment #5
berdirOk, here is a new patch.
- Unified the local tasks for all 3 locations where transactions are shown (admin, user/%user/points, myuserpoints), the view/edit links are now always get built so that you stay where you are.
- Fixed the link on the admin points listing
- Note that the category select filter is currently broken. Fixing that wouldn't be easy and there is no point in doing so, because it is going to be refactored in #1134644: Rewrite the category filter form to use #ajax after this issue anyway. So don't bother testing :)
Comment #6
BenK commentedHey Berdir,
This latest patch rocks! It's so nice to have local tasks that keep you where you are in context. Awesome work!
So I tested everything out and this is RTBC. :-)
--Ben
P.S. I'd suggest that we next tackle http://drupal.org/node/1070134 (Make the view transaction page match the edit transaction page). That issue should be a very quick fix and it's more noticeable that the view and edit pages don't match now that we have such nice and consistent local tasks. ;-)
Comment #7
berdirOk, commited.