aboutsummaryrefslogtreecommitdiff
path: root/views/default/graphics
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-31 14:38:48 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-31 14:38:48 +0000
commitdf08e57a53a4d99a39b0f3d9dcafea4c6eefb24e (patch)
tree068c7eecc433c47839fc761474d274fa45d1bb0e /views/default/graphics
parentd24ea04c56a519aa15be0d4d3d9ff4b894daf237 (diff)
downloadelgg-df08e57a53a4d99a39b0f3d9dcafea4c6eefb24e.tar.gz
elgg-df08e57a53a4d99a39b0f3d9dcafea4c6eefb24e.tar.bz2
Refs #151: graphics/icon view
git-svn-id: https://code.elgg.org/elgg/trunk@1632 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/graphics')
-rw-r--r--views/default/graphics/icon.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/views/default/graphics/icon.php b/views/default/graphics/icon.php
new file mode 100644
index 000000000..58af98295
--- /dev/null
+++ b/views/default/graphics/icon.php
@@ -0,0 +1,30 @@
+<?php
+ /**
+ * Generic icon view.
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ $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">
+<img src="<?php echo $entity->getIcon($vars['size']); ?>" border="0" <?php echo $align; ?> <?php echo $vars['js']; ?> />
+</div> \ No newline at end of file