We created a new module registration_views that exposes three new fields to views so you can show the capacity, availability and number of registered users using views.

Comments

dpi’s picture

Wouldn't this kind of functionality be better suited in Registration core?

attiks’s picture

We tried it to add it to registration core first, but we got a WSOD, probably because the way entity_api makes the fields available to views.

levelos’s picture

Thanks @attiks, appreciate the code and support, but this poses problematic on several fronts. First, this functionality should definitely be in the core module, or at least bundled as a submodule, which should not be a problem when implemented correctly. Second, it's trampling on the module's namespace and prevents us from bundling a registration_views module. Finally, the code is already incompatible with the latest version of Entity Registration. E.g., your exposing a registration_node table, which is no longer part of the schema. In general, the schema and API is still changing substantially, hence the alpha tag. It's too early to be working on dependent modules. Once we have a beta release, the API should be stabilized and we'll provide an upgrade path.

attiks’s picture

@levelos: i know, but we needed it quite urgently, when registration is stable I don't mind merging all together. I'll see if I have time to catch up with the latest changes.

rokr’s picture

Until there is a views solution what would be the best approach to display these values on node view right now?

attiks’s picture

@rokr, fastest is to use hook_node_view and add the fields to the $node object

levelos’s picture

Status: Active » Closed (duplicate)