Basically, what commerce is doing.

Although this makes Views a required dependency, I don't think that would be a big problem.

Comments

berdir’s picture

Category: bug » task
BenK’s picture

Subscribing

valante’s picture

Subscribing.

I'm going to be building these views for my personal use, because I need them now. When I'm done, I can export them as a feature and upload them here if you'd like?

berdir’s picture

Sure, that would be great.

Note that not everything will be possible with Views. For example the current operations column which displays the correct operations (depending on the state of the transaction) with the correct link (depending on the context). We'll need to implement new views handlers for that.

valante’s picture

StatusFileSize
new4.42 KB

I suck at patching things, but here are some new files for your module.

These are views handlers for View and Edit links, as well as a link-able transaction ID field. The info file is edited to include them, and the views.inc file is edited to declare them. (I believe there should also be a "delete" function for transactions, with very carefully-given permissions for it, but that's probably another issue.)

In short, everything you need in order to switch all UP pages over to views.

Actual views coming soon.

berdir’s picture

No, we do not want a delete action. In fact, even edit is now severly limited in 7.x-2.x as it is only possible to change transactions as long as their in pending state.

This is just like accounting, if you want to adjust the total points a user has, you need to create a new transaction to revert another one and not trying to rewrite history.

valante’s picture

Except even in accounting I get to scratch out a receipt if it was wrongly issued . . .

I find I'm missing a couple of other things for views: the referenced entity, and a display-suitable status (currently shows 0 or 1). Will be working on these next.

valante’s picture

StatusFileSize
new6.41 KB

Okay, did the following:

- Added a handler for the status field and filter, to display it as text.
- Added a handler for the description field, to go through the create_description function that links it to the entity.

The info file and the views.inc file are now updated to include all handlers I've listed in this thread. All handlers are contained in the zip file (and should be added to the "views" folder).

Hopefully this bunch will enable me to create meaningful Userpoints views.

Again, sorry for not offering a patch, I'm working on Windows (yeah, I know) and I can't afford the time to look into patching tools.

mradcliffe’s picture

Status: Active » Needs review
StatusFileSize
new21.35 KB

I took most of this and incorporated it into the entity views controller class. Condensed the link handler into one class with a definition in views data and added configuration option for menu router path (admin or myuserpoints).

I didn't include the status, description, transaction field and status filter in this patch.

Originally I had thought just to include VBO modify entity values operation in the Moderate tab of the default view, but I changed it out for the operation links here (this removes VBO as a potential dependency). VBO can always be added in later after all.

Edit: this may not be separatable from the entity field improvement patch I submitted, but I think it should be.

mradcliffe’s picture

Edit: double post.

Edit 2: Typo'd the admin path. So patch is bad.

socialnicheguru’s picture

Issue summary: View changes

@mradcliffe can you share where the typo is?