]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3041 adds tags and tagcloud to theme sandbox
authorCash Costello <cash.costello@gmail.com>
Sat, 30 Jun 2012 02:40:43 +0000 (22:40 -0400)
committerCash Costello <cash.costello@gmail.com>
Sat, 30 Jun 2012 02:40:43 +0000 (22:40 -0400)
mod/developers/views/default/page/theme_preview.php
mod/developers/views/default/theme_preview/components.php
mod/developers/views/default/theme_preview/components/tagcloud.php [new file with mode: 0644]
mod/developers/views/default/theme_preview/components/tags.php [new file with mode: 0644]
mod/developers/views/default/theme_preview/general.php
mod/developers/views/default/theme_preview/navigation.php

index 5b31fd7891c009a72c03487d1d36aec88303ae53..584387ec1684871166d5f8c6ecd1937310f7a28c 100644 (file)
@@ -20,7 +20,7 @@ header("Content-type: text/html; charset=UTF-8");
 <div class="elgg-page elgg-page-default">
        <div class="elgg-page-header">
                <div class="elgg-inner">
-                       <h1 class="elgg-heading-site">Theme Preview</h1>
+                       <h1 class="elgg-heading-site">Theme Sandbox</h1>
                </div>
        </div>
        <div class="elgg-page-body">
index 45f520f2c32175c064fa9516a780ba3efc4ea4f6..2f414cd881e136bb5ac4d2f503f975aa9fc642be 100644 (file)
@@ -15,5 +15,11 @@ echo elgg_view_module('info', 'Table (.elgg-table)', $body);
 $body = elgg_view('theme_preview/components/table', array('class' => 'elgg-table-alt'));
 echo elgg_view_module('info', 'Table Alternate (.elgg-table-alt)', $body);
 
+$body = elgg_view('theme_preview/components/tagcloud');
+echo elgg_view_module('info', 'Tag cloud (.elgg-tagcloud)', $body);
+
+$body = elgg_view('theme_preview/components/tags');
+echo elgg_view_module('info', 'Tags (.elgg-tag)', $body);
+
 $body = elgg_view('theme_preview/components/messages');
 echo elgg_view_module('info', 'Messages (.elgg-message)', $body);
diff --git a/mod/developers/views/default/theme_preview/components/tagcloud.php b/mod/developers/views/default/theme_preview/components/tagcloud.php
new file mode 100644 (file)
index 0000000..3cbf347
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+$tags = array(
+       (object)array('tag' => 'php', 'total' => 2),
+       (object)array('tag' => 'elgg', 'total' => 8),
+       (object)array('tag' => 'javascript', 'total' => 3),
+       (object)array('tag' => 'css', 'total' => 4),
+       (object)array('tag' => 'html', 'total' => 1),
+       (object)array('tag' => 'framework', 'total' => 4),
+       (object)array('tag' => 'social', 'total' => 3),
+       (object)array('tag' => 'web', 'total' => 7),
+       (object)array('tag' => 'code', 'total' => 2),
+);
+
+echo '<div style="width: 200px;">';
+echo elgg_view('output/tagcloud', array('value' => $tags));
+echo '</div>';
diff --git a/mod/developers/views/default/theme_preview/components/tags.php b/mod/developers/views/default/theme_preview/components/tags.php
new file mode 100644 (file)
index 0000000..04df951
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+
+echo elgg_view('output/tags', array(
+       'value' => array('one', 'two', 'three', 'four', 'cinco'),
+));
index 35d8ccbfdaf7b415ab6255a5a23a58ff51849367..6294628732f55288521788890de4de091bfaf4b2 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 /**
- * Quick introduction to the theme preview
+ * Quick introduction to the theme sandbox
  *
  * @todo links to resources?
  */
 ?>
 
-<p>This theme preview provides a visual catalog for many of the theming elements
+<p>This theme sandbox provides a visual catalog for many of the theming elements
        that Elgg uses. The primary css selector is listed with each theme element.
        The preview is divided into sections that are listed in the page menu
        (usually in the sidebar but depends on your current theme).
index 61f9392460c819ac4733d0e515c9667687bfce34..5d3060d102b60d25b5e8f98a39ebfbfc665fb244 100644 (file)
@@ -2,9 +2,9 @@
 /**
  * Navigation CSS
  */
-echo elgg_view_module('info', "Tabs", elgg_view('theme_preview/navigation/tabs'));
+echo elgg_view_module('info', "Tabs (.elgg-tabs)", elgg_view('theme_preview/navigation/tabs'));
 
-echo elgg_view_module('info', "Pagination", elgg_view('theme_preview/navigation/pagination'));
+echo elgg_view_module('info', "Pagination (.elgg-pagination)", elgg_view('theme_preview/navigation/pagination'));
 
 echo elgg_view_module('info', "Site Menu (.elgg-menu-site)", elgg_view('theme_preview/navigation/site'));