I was wondering if you have plans to make a block option for this module. It would be nice if I could have a block that lists the applications in queue to be processed. Right now, there is no easy way for anyone to easily see when someone applies for a role. If there was a block that would list the people who's applications are awaiting review and a link to the admin/user/apply_for_role page, that would be very helpful. Ideally, it would show up only when there are applications in queue, and it would disappear when nothing was in queue.

Thanks!

Comments

Soren Jones’s picture

Title: Block option? » add an apply for role block
Anonymous’s picture

Version: » 7.x-1.x-dev

+1 it would be useful to have a block in order to use it in the Admin Dashboard

Anonymous’s picture

Views integration was a good start for this module, though. Here's my exported view for an Apply for Role Block: http://drupalbin.com/18451

Soren Jones’s picture

Title: add an apply for role block » Add an apply for role block
Status: Active » Needs review

Thank you :)

vlooivlerke’s picture

Hi

When I saw the title of this node I thought it was a block where you can click to apply for a role.

But your block is more intense.

Is a block that I have in mind possible?
For D6

jnicola’s picture

Issue summary: View changes
Status: Needs review » Closed (duplicate)

Duplicate issue. Already integrated a block for applying for role into the 7.x-2.x dev branch. Try that out and report back please :)

denisev’s picture

I am getting following error for anonymous users instead seeing the block: Notice: Undefined property: stdClass::$name in apply_for_role_apply_form() (line 266 of sites\all\modules\apply_for_role\apply_for_role.module).

For authenticated users which successfully applied for a role earlier I see the status message:
"No new roles are available to you at this time."

When logged in as main admin I can see the apply for role block.

All three users/roles have the apply for role permission.

Questions:
Is there a way disable the "No new roles are available to you at this time" status message without installing another module or modifying the code?

Can I do something to fix the error for anonymous users?

And thank you :) for your hard work on this useful module.

jnicola’s picture

Are you hoping for the block to simply not display anything if a user has no roles available to apply for?

denisev’s picture

Yes, since I plan not to later change or add new role types for users after giving them one/two options in the beginning, I would think it made more sense to not display the status message, or have the option to disable/change it.

jnicola’s picture

Okay, let's proceed as follows:

1- Create a new issue. An apply for role block exists and this was handled. You want additional functionality for the blocks.
2- Detail the issue specifically to your notes about wanting the option on the block to hide if no options are available
3- You can take a stab at fixing this yourself. Submit a patch using hook_block_configure() to add the option for the block, and then in the block rendering check if that value is set and there are no options, then do not display the block.

It may be some time before I can get to this myself, but this is a good beginner tasks. Please create the new issue, and include the link above to hook_block_configure() incase anyone else wants to tackle this :)

denisev’s picture

Alright then, you're maybe right. I might just as well tackle my code phobia and fear of failing and try to handle it myself at some point in the near future :)