Add views fields:

Registration

  • View (link)
  • Edit (link)
  • Delete (link)

Registration Entity

  • Edit registration settings (link)
  • Open Date
  • Closed Date
  • Status [and/or]
  • Evaluated Status (using registration_status())
  • Capacity (Raw slots (total slots))
  • Slots Used (count registrations (slots)

Comments

dpi’s picture

StatusFileSize
new14.31 KB

Patch depends on changes in #1472250: View and edit own registration permissions to fix arguments of registration_entity_access.

dpi’s picture

Status: Active » Needs review
attiks’s picture

Status: Needs review » Needs work

Patch applies, but filters aren't implemented?

views-more-fields-1488604-1.patch:105: trailing whitespace.
<?php
views-more-fields-1488604-1.patch:106: trailing whitespace.
/**
views-more-fields-1488604-1.patch:107: trailing whitespace.
* @file
views-more-fields-1488604-1.patch:108: trailing whitespace.
* Display maximum slots for an entity.
views-more-fields-1488604-1.patch:109: trailing whitespace.
*/
Checking patch includes/registration.views.inc...
Checking patch includes/views/registration_handler_field_entity_capacity_total.inc...
Checking patch includes/views/registration_handler_field_entity_capacity_used.inc...
Checking patch includes/views/registration_handler_field_entity_datetime.inc...
Checking patch includes/views/registration_handler_field_entity_registration_status.inc...
Checking patch includes/views/registration_handler_field_entity_settings_link.inc...
Checking patch includes/views/registration_handler_field_registration_link.inc...
Checking patch includes/views/registration_handler_field_registration_link_delete.inc...
Checking patch includes/views/registration_handler_field_registration_link_edit.inc...
Checking patch registration.info...
Checking patch registration.module...
Hunk #1 succeeded at 717 (offset 35 lines).
Applied patch includes/registration.views.inc cleanly.
Applied patch includes/views/registration_handler_field_entity_capacity_total.inc cleanly.
Applied patch includes/views/registration_handler_field_entity_capacity_used.inc cleanly.
Applied patch includes/views/registration_handler_field_entity_datetime.inc cleanly.
Applied patch includes/views/registration_handler_field_entity_registration_status.inc cleanly.
Applied patch includes/views/registration_handler_field_entity_settings_link.inc cleanly.
Applied patch includes/views/registration_handler_field_registration_link.inc cleanly.
Applied patch includes/views/registration_handler_field_registration_link_delete.inc cleanly.
Applied patch includes/views/registration_handler_field_registration_link_edit.inc cleanly.
Applied patch registration.info cleanly.
Applied patch registration.module cleanly.
warning: squelched 169 whitespace errors
warning: 174 lines add whitespace errors.

jelle_s’s picture

Patch committed to the latest dev version of Registration Views Support. We're hoping to merge that module into registration somewhere in the future

levelos’s picture

How do you guys feel about moving this patch, along with the existing Views integration, into a submodule called registration_views that comes bundled with the core download (in a modules directory)?

dpi’s picture

How do you guys feel about moving this patch, along with the existing Views integration, into a submodule called registration_views that comes bundled with the core download (in a modules directory)?

Works for me

On adding filters, for:

  • capacity used
  • total
  • datetime

Are easy enough.

Adding status is going to be hard, as it is not actually a field in the database. Rather the value is fetched each load. Perhaps we should re-think about implementing a registration status update hook to update the database value, instead of relying on a live value.

seanberto’s picture

+1 for a submodule.

attiks’s picture

@levelos I gave you access to http://drupal.org/project/registration_views, but if you prefer to bundle it, feel free to do so.

@dpi what do you mean by status: enabled/disabled or something else? registration_entity has a status column?

Warning:the code needs some cleanup, for now it's a mix of entity based fields and count/sum queries on the database, the first work for small datasets, but for larger datasets they will be too slow, because all entities have to be loaded to access the properties.

levelos’s picture

@dpi, you interested in taking your patch from #1 and the other current Views code in the core module and patching it into a submodule? Just want to clarify and avoid duplicate effort. Thx.

levelos’s picture

Status: Needs work » Fixed

Patch from #1 committed, thanks @dpi. Next I'm going to move all Views code into a separate submodule.

jelle_s’s picture

Registration Views Support was cleaned up after this patch, to make sure we don't provide fields that this module already provides by itself.

levelos’s picture

@Jelle_S, That modules shares a namespace and will not work with the core Registration module. What fields are you providing that are not already included?

attiks’s picture

Component: Code » Registration Core

@levelos: the main difference is that we use sql to calculate the capacity and the available space, we don't need to load the entity, so it's much faster. We also added sort and filter for those 2 fields.

Use case: we have a site with over 2000 courses, we needed to display those with free space, loading all 2000 entities to do this would be a performance problem.

levelos’s picture

@attiks, fair enough, but those seem like fairly minor differences that can be merged. And there's still the significant issue of namespace conflicts.

attiks’s picture

Status: Fixed » Needs work

@levelos off course, I (or Jelle_S) will make a patch to add these. Marking this is NW so I don't forget.

Our module will be deleted afterwards.

kevinquillen’s picture

Has any more work been done here? I can't find a way to hide the form or the 'Add to Cart' field (Commerce Registration) based on these settings:

  • Registration is enabled
  • Registration Open Date
  • Registration Closed Date

I would like to filter a View to restrict returning anything from a Product Reference field, or even at the view mode Display level.

levelos’s picture

Status: Needs work » Closed (fixed)
levelos’s picture

Issue summary: View changes

listify

annetee’s picture

Issue summary: View changes

@atticks or @levelos, Can anyone tell me what was done to resolve this issue? From the looks of the Registration Views page the namespace conflict still exists so I'm assuming I can't use that submodule, and the patch in #1 doesn't seem to apply to the Registration module as it currently stands.

I'm using Registration with Commerce Registration and the view at /admin/commerce/registrations is missing the view link in the first column because of a broken/missing handler. Enabling Registration Views fixes this issue but I'm concerned about the namespace conflict. Any advice on how to proceed?

attiks’s picture

@annetee we're no longer using any of those modules, so no idea what the best way is to proceed, best to open a new issue and asking one of the maintainers.

igorik’s picture

StatusFileSize
new38.6 KB

I am missing in registration views field like "action links"
where would be "View | Accept | Decline"
(picture included)
These links are regular part of list of registrations created by Entity Registration module,
but it is not possible to have it using views.

markusd1984’s picture

Could we have one for wait list max configured and possible X of Z used?

This really helps for a events admin ui across events to look at the most important settings to cross check.