How to display view of nodes indicating which ones a user has already register for?

NID | TITLE | REGISTRATION
------------------------------------------
1 | Event 1 | You have already registered
2 | Event 2 | You have not Registered

Any pointers appreciated

This screenshot from meetup.com is what I want to achieve.

CommentFileSizeAuthor
#4 meetup.png351.54 KBmrpauldriver
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

MrPaulDriver created an issue. See original summary.

caxy4’s picture

@MrPaulDriver, you could create a View with a contextual filter for the User and a relationship to the Registration.

The contextual filter could be at, for example, "/user/%/registrations" where the "%" would be the uid of the current user.
The relationship would be "Registration: User" (i.e. the user who registered) and be required.

Once you have the relationship in place you'll have access to all the fields on the Registration entity and could show any fields you'd like.
This approach would allow users to log in and see all registrations they've made right on their user profile.

Make sense?

mrpauldriver’s picture

Yes that makes a lot of sense @alex-ellison thank you. Having re-read my question I now realise that I was a bit vague.

The view that you suggest appears to only show nodes for which the user has registered. I want a view which shows all nodes including those for which the user has not registered. And for the view to flag these accordingly. This seems a bit trickier

mrpauldriver’s picture

Issue summary: View changes
StatusFileSize
new351.54 KB

I have reviewed this again and still find myself stuck. A contextual filter for the registration user is obviously needed, as is relationship to the registration.

The contextual filter has the effect of only showing entities for which the user has registered. This is a valid use case for a user dashboard as described by @alex-ellison. However this view does not show nodes for which the user as not registered for.

I have attached a screenshot (from meetup.com) to the initial post. It seems like this ought to be straightforward but I am clearly missing something.

mrpauldriver’s picture

Issue summary: View changes
aprilr’s picture

If your users are registered, then that seems like it should be fairly straightforward... I'm trying to do something like this (I want to show a list of what the user has registered for to the right... but I don't require the users to register, so they are anonymous. I'm also trying to limit the number of items the user can register for to two.

mrpauldriver’s picture

Title: How to view nodes indicating which ones a user has already register for? » How to build a view of nodes indicating which a user has already register for and which they haven't?
john.oltman’s picture

Version: 7.x-1.6 » 3.0.x-dev
john.oltman’s picture

Version: 3.0.x-dev » 3.4.x-dev
Assigned: Unassigned » john.oltman
Category: Support request » Feature request

  • john.oltman committed ad492019 on 3.4.x
    #2661920: Add views plugins for determining if a user is registered
    
john.oltman’s picture

Title: How to build a view of nodes indicating which a user has already register for and which they haven't? » Add views plugins for determining if a user is registered
Assigned: john.oltman » Unassigned
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.