aboutsummaryrefslogtreecommitdiff
path: root/views/default/graphics/icon.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-16 20:26:12 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-16 20:26:12 +0000
commitc66831fa5138a277a9729174caf14c7eb323fb07 (patch)
tree2444b54badf4914b59c88700cc1ce30a57ae7ff1 /views/default/graphics/icon.php
parent8048313e87b9fd5ab6734e29a0e951524fa33e45 (diff)
downloadelgg-c66831fa5138a277a9729174caf14c7eb323fb07.tar.gz
elgg-c66831fa5138a277a9729174caf14c7eb323fb07.tar.bz2
Standardizing views.`
git-svn-id: http://code.elgg.org/elgg/trunk@3555 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/graphics/icon.php')
-rw-r--r--views/default/graphics/icon.php58
1 files changed, 34 insertions, 24 deletions
diff --git a/views/default/graphics/icon.php b/views/default/graphics/icon.php
index ca1bc2054..bc7c36e71 100644
--- a/views/default/graphics/icon.php
+++ b/views/default/graphics/icon.php
@@ -1,30 +1,40 @@
<?php
- /**
- * Generic icon view.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
+/**
+ * Generic icon view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ */
+
+$entity = $vars['entity'];
+
+$sizes = array('small','medium','large','tiny','master','topbar');
+// Get size
+if (!in_array($vars['size'], $sizes)) {
+ $vars['size'] = "medium";
+}
+
+// Get any align and js
+if (!empty($vars['align'])) {
+ $align = " align=\"{$vars['align']}\" ";
+} else {
+ $align = "";
+}
+
- $entity = $vars['entity'];
-
- // Get size
- if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar')))
- $vars['size'] = "medium";
-
- // Get any align and js
- if (!empty($vars['align'])) {
- $align = " align=\"{$vars['align']}\" ";
- } else {
- $align = "";
- }
-
-
?>
<div class="icon">
-<?php if ($vars['link']) { ?><a href="<?php echo $vars['link'] ?>"><?php } ?>
+<?php
+if ($vars['link']) {
+ ?><a href="<?php echo $vars['link'] ?>"><?php
+}
+?>
<img src="<?php echo $entity->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> <?php echo $vars['js']; ?> />
-<?php if ($vars['link']) { ?></a><?php } ?>
+<?php
+if ($vars['link']) {
+ ?></a><?php
+}
+?>
</div> \ No newline at end of file