diff options
Diffstat (limited to 'views/default/output/access.php')
| -rw-r--r-- | views/default/output/access.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/views/default/output/access.php b/views/default/output/access.php index cb1ffc94c..5c8d62c4d 100644 --- a/views/default/output/access.php +++ b/views/default/output/access.php @@ -9,8 +9,9 @@ //sort out the access level for display if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) { $access_id = $vars['entity']->access_id; - $access_class = 'access_level'; + $access_class = 'elgg-access'; $access_id_string = get_readable_access_level($access_id); + $access_id_string = htmlspecialchars($access_id_string, ENT_QUOTES, 'UTF-8', false); // if within a group or shared access collection display group name and open/closed membership status // @todo have a better way to do this instead of checking against subtype / class. @@ -20,20 +21,22 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) { // we decided to show that the item is in a group, rather than its actual access level // not required. Group ACLs are prepended with "Group: " when written. //$access_id_string = elgg_echo('groups:group') . $container->name; - $membership = $is_group->membership; + $membership = $container->membership; if ($membership == ACCESS_PUBLIC) { - $access_class .= ' group_open'; + $access_class .= ' elgg-access-group-open'; } else { - $access_class .= ' group_closed'; + $access_class .= ' elgg-access-group-closed'; } + + // @todo this is plugin specific code in core. Should be removed. } elseif ($container && $container->getSubtype() == 'shared_access') { - $access_level .= ' shared_collection'; + $access_class .= ' shared_collection'; } elseif ($access_id == ACCESS_PRIVATE) { - $access_level .= ' private'; - } else { - $access_level .= ' entity_access'; + $access_class .= ' elgg-access-private'; } - echo "<span class=\"$access_class\">$access_id_string</span>"; -}
\ No newline at end of file + $help_text = elgg_echo('access:help'); + + echo "<span title=\"$help_text\" class=\"$access_class\">$access_id_string</span>"; +} |
