dpi / courier

Courier is a Drupal module providing a framework to send messages to entities.
https://drupal.org/project/courier
GNU General Public License v2.0
8 stars 3 forks source link

Add delimiters to "Available tokens" on Courier Compose form? #18

Closed mccrodp closed 8 years ago

mccrodp commented 8 years ago

token-delimiters

It's not entirely obvious to me what the tokens are here or how someone would use them in D8.

"Available tokens: identity, site, date, current-user"

i.e. - To use current-user, is it [current-user]?

Should this be "Available tokens: [identity], [site], [date], [current-user]"?

dpi commented 8 years ago

If you have Token module installed you will get an improved UI for token lists!

The fallback token list can use improvement with square brackets. In addition to better documentation for suggesting site builder to install Token contrib module.

tokenui
mccrodp commented 8 years ago

Sounds good to me, thanks! Great job in general by the way, some body of work in all of this. I'll be looking through the Access Control you have in place here when I eventually get back to Message UI! :)

dpi commented 8 years ago

Thanks! These are good UX improvements.

There is not a lot of access control as Courier is mostly an API module. The only access specific code that comes to mind is if you take advantage of the Template Collection UI. The AJAX form callback requires you to add your own hook_entity_access checking for $operation == 'templates'. RNG's rng.module and Courier System's courier_system.module implements this access check.

mccrodp commented 8 years ago

Oh ok...I saw the ComposeAccessCheck class and presumed this may be useful. Will take a proper look then at some stage at the above mentions.

dpi commented 8 years ago

Ah, I would avoid anything in the submodules as I dont expect them to be enabled.

edurenye commented 8 years ago

What about having something like the following when you don't have the token module installed: detailed-tokens

Also I agree to add a suggestion to install the token module.

dpi commented 8 years ago

@edurenye its a reasonable suggestion, if overwhelming. I'd prefer if site builders would just install Token module. Since site users may get confused about the purpose of many tokens.

dpi commented 8 years ago

rawtoken

Improved raw global token list (when token.module unavailable) and documented integration of token.module in README.