This is very promising for my use case where I am building a site for other admins to run. I want to leave behind documentation for various roles, including the other admins, and this will help, but I see that users without the "administer cool aid" permissions only see the button when there is a help message to be read, but admins (with that permission) will see the same button on all pages (to easily be able to add one). It would be great if a different button were available when no messages exist yet for a given page so that admins get the same visual clue that help does in fact exist when appropriate.

Something like
button = ? (help message exists)
button = + (add a help message for this page, none exist yet)

Comments

danielb’s picture

I suppose that's a good idea, but don't expect me to do this anytime soon, you can do it yourself by overriding this theme function:

/**
 * Theme function for coolaid help output.
 */
function theme_coolaid($messages, $links) {
  $output = '';
  foreach ($messages as $message) {
    $output .= '<div class="coolaid-message">';
    $output .= $message['help'];
    $output .= '</div>';
  }
  foreach ($links as $link) {
    $output .= '<span>';
    $output .= $link;
    $output .= '</span>';
  }
  return $output;
}

Basically, IIRC, if $messages is empty, but $links is not empty, then we are in a situation where the admin is seeing the link but there are no help messages.

actually i'm not 100% sure if this is enough to do what you want, but surely something with a theme somewhere would let you put in another class or something that you can then make a different icon with CSS.

danielb’s picture

Status: Active » Postponed
danielb’s picture

Status: Postponed » Fixed

Actually I looked into this, and you needed a bit of javascript to make it work too.
I've made the change and committed it with a new + image as well.
Now it shows + when there are no coolaid messages added. However the + thing ignores help messages added by other modules (admin will still see a + indicating they have not put in a coolaid message)

Status: Fixed » Closed (fixed)

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