]> gitweb.fluxo.info Git - lorea/saravea_theme.git/commitdiff
Updated pages and pads icons.
authorSem <sembrestels@riseup.net>
Fri, 5 Oct 2012 01:01:00 +0000 (03:01 +0200)
committerSem <sembrestels@riseup.net>
Fri, 5 Oct 2012 01:01:00 +0000 (03:01 +0200)
_graphics/icons/pad_lrg.gif [new file with mode: 0644]
_graphics/icons/pad_small.gif [new file with mode: 0644]
_graphics/icons/pad_tiny.gif [new file with mode: 0644]
_graphics/icons/pages_lrg.gif [new file with mode: 0644]
_graphics/icons/pages_small.gif [new file with mode: 0644]
_graphics/icons/pages_tiny.gif [new file with mode: 0644]
_graphics/pages_icons/pages_small.gif [deleted file]
_graphics/pages_icons/pages_tiny.gif [deleted file]
start.php

diff --git a/_graphics/icons/pad_lrg.gif b/_graphics/icons/pad_lrg.gif
new file mode 100644 (file)
index 0000000..213d9b0
Binary files /dev/null and b/_graphics/icons/pad_lrg.gif differ
diff --git a/_graphics/icons/pad_small.gif b/_graphics/icons/pad_small.gif
new file mode 100644 (file)
index 0000000..594a51b
Binary files /dev/null and b/_graphics/icons/pad_small.gif differ
diff --git a/_graphics/icons/pad_tiny.gif b/_graphics/icons/pad_tiny.gif
new file mode 100644 (file)
index 0000000..29efe67
Binary files /dev/null and b/_graphics/icons/pad_tiny.gif differ
diff --git a/_graphics/icons/pages_lrg.gif b/_graphics/icons/pages_lrg.gif
new file mode 100644 (file)
index 0000000..838bdfd
Binary files /dev/null and b/_graphics/icons/pages_lrg.gif differ
diff --git a/_graphics/icons/pages_small.gif b/_graphics/icons/pages_small.gif
new file mode 100644 (file)
index 0000000..58facea
Binary files /dev/null and b/_graphics/icons/pages_small.gif differ
diff --git a/_graphics/icons/pages_tiny.gif b/_graphics/icons/pages_tiny.gif
new file mode 100644 (file)
index 0000000..216ef38
Binary files /dev/null and b/_graphics/icons/pages_tiny.gif differ
diff --git a/_graphics/pages_icons/pages_small.gif b/_graphics/pages_icons/pages_small.gif
deleted file mode 100644 (file)
index 902bff5..0000000
Binary files a/_graphics/pages_icons/pages_small.gif and /dev/null differ
diff --git a/_graphics/pages_icons/pages_tiny.gif b/_graphics/pages_icons/pages_tiny.gif
deleted file mode 100644 (file)
index f7349fa..0000000
Binary files a/_graphics/pages_icons/pages_tiny.gif and /dev/null differ
index 21d4b91b47b6d83222e4fbff4fb8c018bbf1312f..60c2aa919658285119822f5007ed764fe2650a47 100644 (file)
--- a/start.php
+++ b/start.php
@@ -32,7 +32,7 @@ function n1_theme_front_page($hook, $type, $returnvalue, $params) {
 }\r
 \r
 /**\r
- * Override the default entity icon for pages\r
+ * Override the default entity icon for pages and pads\r
  *\r
  * @return string Relative URL\r
  */\r
@@ -40,17 +40,23 @@ function n1_theme_pages_icon_url_override($hook, $type, $returnvalue, $params) {
        $entity = $params['entity'];\r
        if (elgg_instanceof($entity, 'object', 'page_top') ||\r
                elgg_instanceof($entity, 'object', 'page')) {\r
-               switch ($params['size']) {\r
-                       case 'topbar':\r
-                       case 'tiny':\r
-                               return 'mod/n1_theme/_graphics/pages_icons/pages_tiny.gif';\r
-                               break;\r
-                       case 'small':\r
-                               return 'mod/n1_theme/_graphics/pages_icons/pages_small.gif';\r
-                               break;\r
-                       default:\r
-                               return 'mod/pages/images/pages_lrg.gif';\r
-                               break;\r
-               }\r
+               $icon = 'pages';\r
+       } elseif (elgg_instanceof($entity, 'object', 'etherpad') ||\r
+                         elgg_instanceof($entity, 'object', 'subpad')) {\r
+               $icon = 'pad';\r
+       } else {\r
+               return false;\r
+       }\r
+       switch ($params['size']) {\r
+               case 'topbar':\r
+               case 'tiny':\r
+                       return "mod/n1_theme/_graphics/icons/{$icon}_tiny.gif";\r
+                       break;\r
+               case 'small':\r
+                       return "mod/n1_theme/_graphics/icons/{$icon}_small.gif";\r
+                       break;\r
+               default:\r
+                       return "mod/n1_theme/_graphics/icons/{$icon}_lrg.gif";\r
+                       break;\r
        }\r
 }\r