From 5f6dc365a8445a48156b45912827eac39fd64fc5 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 16 Mar 2014 21:01:42 -0300 Subject: Squashed 'mod/subgroups/' content from commit 835015b git-subtree-dir: mod/subgroups git-subtree-split: 835015b66b9de6dc6de91ab39f95e1f09b2dbf84 --- views/default/icon/default.php | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 views/default/icon/default.php (limited to 'views/default/icon/default.php') diff --git a/views/default/icon/default.php b/views/default/icon/default.php new file mode 100644 index 000000000..3ef1a05a1 --- /dev/null +++ b/views/default/icon/default.php @@ -0,0 +1,58 @@ +name)) { + $title = $entity->name; +} else { + $title = $entity->title; +} +$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8', false); + +$url = $entity->getURL(); +if (isset($vars['href'])) { + $url = $vars['href']; +} + +$img = elgg_view('output/img', array( + 'src' => $entity->getIconURL($vars['size']), + 'alt' => $title, + 'class' => $class, +)); + +if ($url) { + $params = array( + 'href' => $url, + 'text' => $img, + 'title' => $title, + 'is_trusted' => true, + ); + $class = elgg_extract('link_class', $vars, ''); + if ($class) { + $params['class'] = $class; + } + + echo elgg_view('output/url', $params); +} else { + echo $img; +} -- cgit v1.2.3