]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2903 moving theme preview into developers plugin - navigation and titles are...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 14 Feb 2011 00:10:03 +0000 (00:10 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 14 Feb 2011 00:10:03 +0000 (00:10 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8214 36083f99-b078-4883-b0ff-0f9b5a30f544

16 files changed:
documentation/theming/preview/forms.php [deleted file]
documentation/theming/preview/general.php [deleted file]
documentation/theming/preview/icons.php [deleted file]
documentation/theming/preview/index.php [deleted file]
documentation/theming/preview/nav.php [deleted file]
documentation/theming/preview/objects.php [deleted file]
mod/developers/start.php
mod/developers/views/default/page/shells/theme_preview.php [moved from documentation/theming/preview/head.php with 63% similarity]
mod/developers/views/default/theme_preview/forms.php [new file with mode: 0644]
mod/developers/views/default/theme_preview/general.php [new file with mode: 0644]
mod/developers/views/default/theme_preview/grid.php [moved from documentation/theming/preview/grid.php with 95% similarity]
mod/developers/views/default/theme_preview/icons.php [new file with mode: 0644]
mod/developers/views/default/theme_preview/index.php [new file with mode: 0644]
mod/developers/views/default/theme_preview/nav.php [new file with mode: 0644]
mod/developers/views/default/theme_preview/objects.php [new file with mode: 0644]
mod/developers/views/default/theme_preview/widgets.php [moved from documentation/theming/preview/widgets.php with 83% similarity]

diff --git a/documentation/theming/preview/forms.php b/documentation/theming/preview/forms.php
deleted file mode 100644 (file)
index 592f5f8..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-<?php
-/**
- * Form CSS
- */
-
-$title = 'Forms and Buttons';
-
-require dirname(__FILE__) . '/head.php';
-
-$url = current_page_url();
-
-?>
-<body>
-       <div class="elgg-page mal">
-               <h1 class="mbs">
-                       <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
-               </h1>
-               <div class="mbl">
-                       <a href="nav.php">< previous</a>&nbsp;&nbsp;<a href="objects.php">next ></a>
-               </div>
-               <h2>Form</h2>
-               <form action="#">
-                       <fieldset>
-                               <legend>Form legend</legend>
-                               <p>
-                                       <label for="f1">Text input:</label>
-                                       <?php echo elgg_view('input/text', array(
-                                                       'internalname' => 'f1',
-                                                       'internalid' => 'f1',
-                                                       'value' => 'input text',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f2">Password input:</label>
-                                       <?php echo elgg_view('input/password', array(
-                                                       'internalname' => 'f2',
-                                                       'internalid' => 'f2',
-                                                       'value' => 'password',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f3">Radio input:</label><br />
-                                       <?php echo elgg_view('input/radio', array(
-                                                       'internalname' => 'f3',
-                                                       'internalid' => 'f3',
-                                                       'options' => array(1, 2),
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f4">Checkboxes input:</label><br />
-                                       <?php echo elgg_view('input/checkboxes', array(
-                                                       'internalname' => 'f4',
-                                                       'internalid' => 'f4',
-                                                       'options' => array(1, 2),
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f5">Dropdown input:</label><br />
-                                       <?php echo elgg_view('input/dropdown', array(
-                                                       'internalname' => 'f5',
-                                                       'internalid' => 'f5',
-                                                       'options' => array('option 1', 'option 2'),
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f6">Access input:</label>
-                                       <?php echo elgg_view('input/access', array(
-                                                       'internalname' => 'f6',
-                                                       'internalid' => 'f6',
-                                                       'value' => ACCESS_PUBLIC,
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f7">File input:</label>
-                                       <?php echo elgg_view('input/file', array(
-                                                       'internalname' => 'f7',
-                                                       'internalid' => 'f7',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f8">URL input:</label>
-                                       <?php echo elgg_view('input/url', array(
-                                                       'internalname' => 'f8',
-                                                       'internalid' => 'f8',
-                                                       'value' => 'http://elgg.org/',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f9">Tags input:</label>
-                                       <?php echo elgg_view('input/tags', array(
-                                                       'internalname' => 'f9',
-                                                       'internalid' => 'f9',
-                                                       'value' => 'one, two, three',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f10">Email input:</label>
-                                       <?php echo elgg_view('input/email', array(
-                                                       'internalname' => 'f10',
-                                                       'internalid' => 'f10',
-                                                       'value' => 'noone@elgg.org',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f11">Autocomplete input:</label>
-                                       <?php echo elgg_view('input/autocomplete', array(
-                                                       'internalname' => 'f11',
-                                                       'internalid' => 'f11',
-                                                       'match_on' => 'users',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f12">Date picker input:</label>
-                                       <?php echo elgg_view('input/datepicker', array(
-                                                       'internalname' => 'f12',
-                                                       'internalid' => 'f12',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f13">User picker input:</label>
-                                       <?php echo elgg_view('input/userpicker', array(
-                                                       'internalname' => 'f13',
-                                                       'internalid' => 'f13',
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f14">Long text input:</label>
-                                       <?php echo elgg_view('input/longtext', array(
-                                                       'internalname' => 'f14',
-                                                       'internalid' => 'f14',
-                                                       'value' => $ipsum,
-                                                       ));
-                                       ?>
-                               </p>
-                               <p>
-                                       <label for="f15">Plain text input:</label>
-                                       <?php echo elgg_view('input/plaintext', array(
-                                                       'internalname' => 'f15',
-                                                       'internalid' => 'f15',
-                                                       'value' => $ipsum,
-                                                       ));
-                                       ?>
-                               </p>
-                       </fieldset>
-               </form>
-               
-               <div class="mtl">
-                       <h2>Buttons</h2>
-                       <table>
-                               <thead>
-                                       <tr>
-                                               <th>Anchors</th>
-                                               <th>Default</th>
-                                               <th>Hover</th>
-                                               <th>Focus</th>
-                                               <th>Active</th>
-                                               <th>Disabled</th>
-                                               <th>Selected</th>
-                                       </tr>
-                               </thead>
-                               <tbody>
-                                       <tr>
-                                               <th>Default</th>
-                                               <td><a href="#" class="elgg-button">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-state-hover">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-state-focus">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-state-active">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-state-disabled">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-state-selected">anchor</a></td>
-                                       </tr>
-                                       <tr>
-                                               <th>Action</th>
-                                               <td><a href="#" class="elgg-button elgg-button-action">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-action elgg-state-hover">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-action elgg-state-focus">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-action elgg-state-active">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-action elgg-state-disabled">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-action elgg-state-selected">anchor</a></td>
-                                       </tr>
-                                       <tr>
-                                               <th>Default</th>
-                                               <td><a href="#" class="elgg-button elgg-button-submit">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-submit elgg-state-hover">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-submit elgg-state-focus">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-submit elgg-state-active">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-submit elgg-state-disabled">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-submit elgg-state-selected">anchor</a></td>
-                                       </tr>
-                                       <tr>
-                                               <th>Default</th>
-                                               <td><a href="#" class="elgg-button elgg-button-cancel">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-hover">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-focus">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-active">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-disabled">anchor</a></td>
-                                               <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-selected">anchor</a></td>
-                                       </tr>
-                               </tbody>
-                       </table>
-               </div>
-       </div>
-</body>
-</html>
\ No newline at end of file
diff --git a/documentation/theming/preview/general.php b/documentation/theming/preview/general.php
deleted file mode 100644 (file)
index 3e8d2f6..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/**
- * General CSS
- */
-
-$title = 'General CSS';
-
-require dirname(__FILE__) . '/head.php';
-
-$url = current_page_url();
-
-?>
-<body>
-       <div class="elgg-page mal">
-               <h1 class="mbs">
-                       <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
-               </h1>
-               <div class="mbl">
-                       < previous&nbsp;&nbsp;<a href="nav.php">next ></a>
-               </div>
-               <h2>Headings</h2>
-               <div class="mbl">
-                       <h1>Level 1 heading</h1>
-                       <h2>Level 2 heading</h2>
-                       <h3>Level 3 heading</h3>
-                       <h4>Level 4 heading</h4>
-                       <h5>Level 5 heading</h5>
-                       <h6>Level 6 heading</h6>
-               </div>
-               <h2>Paragraph</h2>
-               <div class="mbl">
-               <p>Lorem ipsum dolor sit amet, <a href="#" title="test link">test link</a>
-      adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec
-      faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero
-      nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent
-      mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu
-      volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus
-      eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem,
-      consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue
-      quis tellus.</p>
-
-      <p>Lorem ipsum dolor sit amet, <em>emphasis</em>
-      consectetuer
-      adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec
-      faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero
-      nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent
-      mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu
-      volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus
-      eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem,
-      consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue
-      quis tellus.</p>
-               </div>
-               <h2>Misc</h2>
-                               <p>
-                                       I am <a href="?abc123">the a tag</a> example<br />
-                                       I am <abbr title="test">the abbr tag</abbr> example<br />
-                                       I am <acronym>the acronym tag</acronym> example<br />
-                                       I am <b>the b tag</b> example<br />
-                                       I am <code>the code tag</code> example<br />
-                                       I am <del>the del tag</del> example<br />
-                                       I am <em>the em tag</em> example<br />
-                                       I am <i>the i tag</i> example<br />
-                                       I am <strong>the strong tag</strong> example<br />
-                               </p>
-                               <blockquote><p>Paragraph inside Blockquote: <?php echo $ipsum; ?></p></blockquote>
-                               <pre><strong>Preformated:</strong>Testing one row
-                                and another</pre>
-       </div>
-</body>
-</html>
\ No newline at end of file
diff --git a/documentation/theming/preview/icons.php b/documentation/theming/preview/icons.php
deleted file mode 100644 (file)
index 54de215..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * Icons CSS
- */
-
-$title = 'Icons';
-
-require dirname(__FILE__) . '/head.php';
-
-$url = current_page_url();
-
-?>
-<style>li {margin: 10px; float: left;} ul {background-color: #e0e0e0;}</style>
-<body>
-       <div class="elgg-page mal">
-               <h1 class="mbs">
-                       <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
-               </h1>
-               <div class="mbl">
-                       <a href="widgets.php">< previous</a>&nbsp;&nbsp;next >
-               </div>
-               <h2>Icon Sprites</h2>
-               <ul class="mbl clearfix">
-                       <li><span class="elgg-icon elgg-icon-settings"></span>Settings</li>
-                       <li><span class="elgg-icon elgg-icon-friends"></span>Friends</li>
-                       <li><span class="elgg-icon elgg-icon-help"></span>Help</li>
-                       <li><span class="elgg-icon elgg-icon-delete"></span>Delete</li>
-                       <li><span class="elgg-icon elgg-icon-likes"></span>Likes</li>
-                       <li><span class="elgg-icon elgg-icon-liked"></span>Liked</li>
-                       <li><span class="elgg-icon elgg-icon-following"></span>Following</li>
-                       <li><span class="elgg-icon elgg-icon-dragger"></span>Dragger</li>
-                       <li><span class="elgg-icon elgg-icon-rss"></span>RSS</li>
-                       <li><span class="elgg-icon elgg-icon-arrow-s"></span>Arrow S</li>
-                       <li><span class="elgg-icon elgg-icon-hover-menu"></span>Hover Menu</li>
-               </ul>
-               <h2>Ajax loader</h2>
-               <div class="mbl">
-                       <?php echo elgg_view('graphics/ajax_loader', array('hidden' => false)); ?>
-               </div>
-               <h2>Avatars</h2>
-               <div class="mbl">
-                       <?php
-                               $user = new ElggUser();
-                               $sizes = array('large', 'medium', 'small', 'tiny');
-                               echo '<table>';
-                               echo '<tr>';
-                               foreach ($sizes as $size) {
-                                       echo "<td class=\"center\"><h4>$size</h4></td>";
-                               }
-                               echo '</tr>';
-                               echo '<tr>';
-                               foreach ($sizes as $size) {
-                                       echo '<td class="phs">';
-                                       echo elgg_view_entity_icon($user, $size, array('hover' => false));
-                                       echo '</td>';
-                               }
-                               echo '</tr>';
-                               echo '</table>';
-                       ?>
-               </div>
-       </div>
-</body>
-</html>
\ No newline at end of file
diff --git a/documentation/theming/preview/index.php b/documentation/theming/preview/index.php
deleted file mode 100644 (file)
index ce71d28..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * Main index page
- */
-
-include dirname(__FILE__) . '/head.php';
-
-?>
-<body>
-       <div class="elgg-page mal">
-               <h1 class="mbl"><a href="index.php">Index</a></h1>
-               <ul class="mtl">
-                       <li><a href="general.php">General CSS</a></li>
-                       <li><a href="nav.php">Navigation CSS</a></li>
-                       <li><a href="forms.php">Form CSS</a></li>
-                       <li><a href="objects.php">Lists, modules, image blocks CSS</a></li>
-                       <li><a href="grid.php">Grid CSS</a></li>
-                       <li><a href="widgets.php">Widgets CSS</a></li>
-                       <li><a href="icons.php">Icons CSS</a></li>
-               </ul>
-       </div>
-</body>
-</html>
\ No newline at end of file
diff --git a/documentation/theming/preview/nav.php b/documentation/theming/preview/nav.php
deleted file mode 100644 (file)
index 3a9daea..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/**
- * Navigation CSS
- */
-
-$title = 'Navigation';
-
-require dirname(__FILE__) . '/head.php';
-
-$url = current_page_url();
-
-elgg_push_breadcrumb('First', "$url#");
-elgg_push_breadcrumb('Second', "$url#");
-elgg_push_breadcrumb('Third');
-
-?>
-<body>
-       <div class="elgg-page mal">
-               <h1 class="mbs">
-                       <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
-               </h1>
-               <div class="mbl">
-                       <a href="general.php">< previous</a>&nbsp;&nbsp;<a href="forms.php">next ></a>
-               </div>
-               <h2>Breadcrumbs</h2>
-               <div class="mbl">
-                       <?php echo elgg_view('navigation/breadcrumbs'); ?>
-               </div>
-               <h2>Tabs</h2>
-               <div class="mbl">
-                       <?php
-                       $tabs = array(
-                               array('title' => 'First', 'url' => "$url#"),
-                               array('title' => 'Second', 'url' => "$url#", 'selected' => true),
-                               array('title' => 'Third', 'url' => "$url#"),
-                       );
-                       echo elgg_view('navigation/tabs', array('tabs' => $tabs));
-                       ?>
-               </div>
-               <h2>Pagination</h2>
-               <div class="mbl">
-                       <?php
-                       $params = array(
-                               'count' => 1000,
-                               'limit' => 10,
-                               'offset' => 230,
-                       );
-                       echo elgg_view('navigation/pagination', $params);
-                       ?>
-               </div>
-               <h2>Site Menu</h2>
-               <div class="mbl">
-                       <div class="elgg-page-header" style="height: 40px;">
-               <?php
-                       $params = array();
-                       $params['menu'] = array();
-                       $params['menu']['default'] = array();
-                       for ($i=1; $i<=5; $i++) {
-                               $params['menu']['default'][] = new ElggMenuItem($i, "Page $i", "$url#");
-                       }
-                       $params['menu']['default'][2]->setSelected(true);
-                       echo elgg_view('navigation/menu/site', $params);
-               ?>
-                       </div>
-               </div>
-               <h2>Page Menu</h2>
-               <div class="mbl pam" style="width: 200px; background-color: #cccccc;">
-               <?php
-                       $m = new ElggMenuItem(10, "Child", "$url#");
-                       $m->setParent($params['menu']['default'][1]);
-                       $params['menu']['default'][1]->addChild($m);
-                       echo elgg_view('navigation/menu/page', $params);
-               ?>
-               </div>
-       </div>
-</body>
-</html>
\ No newline at end of file
diff --git a/documentation/theming/preview/objects.php b/documentation/theming/preview/objects.php
deleted file mode 100644 (file)
index 0dc08cd..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-/**
- * CSS Objects: list, module, image_block
- */
-
-$title = 'CSS Objects';
-
-require dirname(__FILE__) . '/head.php';
-
-$url = current_page_url();
-
-?>
-<body>
-       <div class="elgg-page mal">
-               <h1 class="mbs">
-                       <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
-               </h1>
-               <div class="mbl">
-                       <a href="forms.php">< previous</a>&nbsp;&nbsp;<a href="grid.php">next ></a>
-               </div>
-               <h2>Modules</h2>
-               <div class="mbl clearfix">
-                       <div class="elgg-col elgg-col-1of2">
-                               <div class="pam">
-                               <?php
-                                       echo elgg_view_module('aside', 'elgg-module-aside', $ipsum);
-                                       echo elgg_view_module('popup', 'elgg-module-popup', $ipsum);
-                               ?>
-                               </div>
-                       </div>
-                       <div class="elgg-col elgg-col-1of2">
-                               <div class="pam">
-                               <?php
-                                       echo elgg_view_module('info', 'elgg-module-info', $ipsum);
-                                       echo elgg_view_module('featured', 'elgg-module-featured', $ipsum);
-                               ?>
-                               </div>
-                       </div>
-               </div>
-               <h2>Image Block</h2>
-               <div class="mbl clearfix">
-               <?php
-                       $user = new ElggUser();
-                       $image = elgg_view_entity_icon($user, 'small');
-                       echo elgg_view_image_block($image, $ipsum);
-               ?>
-               </div>
-               <h2>List</h2>
-               <div class="mbl clearfix">
-               <?php
-                       $obj1 = new ElggObject();
-                       $obj1->title = "Object 1";
-                       $obj1->description = $ipsum;
-                       $obj2 = new ElggObject();
-                       $obj2->title = "Object 2";
-                       $obj2->description = $ipsum;
-                       echo elgg_view('layout/objects/list', array('items' => array($obj1, $obj2)));
-               ?>
-               </div>
-               <h2>Table</h2>
-               <div class="mbl clearfix">
-                       <table class="elgg-table">
-                       <?php
-                               echo "<thead><tr><th>column 1</th><th>column 2</th></tr></thead>";
-                               for ($i = 1; $i < 5; $i++) {
-                                       echo '<tr>';
-                                       for ($j = 1; $j < 3; $j++) {
-                                               echo "<td>value $j</td>";
-                                       }
-                                       echo '</tr>';
-                               }
-                       ?>
-                       </table>
-               </div>
-               <h2>Messages</h2>
-               <div class="mbl clearfix">
-                       <ul>
-                               <li class="elgg-message elgg-state-success mas">Success message</li>
-                               <li class="elgg-message elgg-state-error mas">Error message</li>
-                               <li class="elgg-message elgg-state-notice mas">Notice message</li>
-                       </ul>
-               </div>
-       </div>
-</body>
-</html>
\ No newline at end of file
index 46cdd8bc2e6eff5458cbd0285c24d1543356c4b1..5763d5d34d7b4a7f82562bae728456b9a475b411 100644 (file)
@@ -10,6 +10,8 @@ function developers_init() {
 
        elgg_extend_view('css/admin', 'developers/css');
 
+       register_page_handler('theme_preview', 'developers_theme_preview_controller');
+
        $action_base = elgg_get_plugins_path() . 'developers/actions/developers';
        elgg_register_action('developers/settings', "$action_base/settings.php", 'admin');
 }
@@ -20,4 +22,20 @@ function developers_setup_menu() {
                elgg_add_admin_menu_item('settings', elgg_echo('admin:developers:settings'), 'developers');
                elgg_add_admin_menu_item('preview', elgg_echo('admin:developers:preview'), 'developers');
        }
+}
+
+/**
+ * Serve the theme preview pages
+ *
+ * @param array $page
+ */
+function developers_theme_preview_controller($page) {
+       if (!isset($page[0])) {
+               $page[0] = 'index';
+       }
+
+       $title = elgg_echo("theme_preview:{$page[0]}");
+       $page =  elgg_view("theme_preview/{$page[0]}");
+
+       echo elgg_view_page($title, $page, 'theme_preview');
 }
\ No newline at end of file
similarity index 63%
rename from documentation/theming/preview/head.php
rename to mod/developers/views/default/page/shells/theme_preview.php
index 360f5664787160f2f393b3261804b16d20b67a55..79dfed60d80ed24ca1c54d9416b7fdc1b76f5b06 100644 (file)
@@ -1,20 +1,12 @@
 <?php
 /**
- * head of the preview pages
+ * Page shell for theme preview
  */
-require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
-
-$ipsum = "Sed scelerisque sagittis lorem. Phasellus sodales. Nulla urna justo, vehicula in, suscipit nec, molestie sed, tellus.";
 
 $screen = elgg_view_get_simplecache_url('css', 'screen');
 $ie_url = elgg_view_get_simplecache_url('css', 'ie');
 $ie6_url = elgg_view_get_simplecache_url('css', 'ie6');
 
-$base = elgg_get_site_url();
-elgg_register_js("{$base}vendors/jquery/jquery-1.4.2.min.js", 'jquery');
-elgg_register_js("{$base}vendors/jquery/jquery-ui-1.7.2.min.js", 'jquery-ui');
-elgg_register_js("{$base}vendors/jquery/jquery.form.js", 'jquery.form');
-
 // Set the content type
 header("Content-type: text/html; charset=UTF-8");
 
@@ -23,15 +15,15 @@ header("Content-type: text/html; charset=UTF-8");
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-       <title><?php echo $title; ?></title>
+       <title><?php echo $vars['title']; ?></title>
        <link rel="stylesheet" href="<?php echo $screen; ?>" type="text/css" />
-       <!--[if IE 6]>
+       <!--[if gt IE 6]>
                <link rel="stylesheet" type="text/css" href="<?php echo $ie_url; ?>" />
        <![endif]-->
-
-       <!--[if gt IE 6]>
+       <!--[if IE 6]>
                <link rel="stylesheet" type="text/css" href="<?php echo $ie6_url; ?>" />
        <![endif]-->
+
 <?php
 foreach (elgg_get_js() as $script) {
 ?>
@@ -39,4 +31,11 @@ foreach (elgg_get_js() as $script) {
 <?php
 }
 ?>
+
 </head>
+<body>
+<?php
+echo $vars['body'];
+?>
+</body>
+</html>
\ No newline at end of file
diff --git a/mod/developers/views/default/theme_preview/forms.php b/mod/developers/views/default/theme_preview/forms.php
new file mode 100644 (file)
index 0000000..90cc5dc
--- /dev/null
@@ -0,0 +1,209 @@
+<?php
+/**
+ * Form CSS
+ */
+
+$url = current_page_url();
+
+?>
+<div class="elgg-page mal">
+       <h1 class="mbs">
+               <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
+       </h1>
+       <div class="mbl">
+               <a href="nav.php">< previous</a>&nbsp;&nbsp;<a href="objects.php">next ></a>
+       </div>
+       <h2>Form</h2>
+       <form action="#">
+               <fieldset>
+                       <legend>Form legend</legend>
+                       <p>
+                               <label for="f1">Text input:</label>
+                               <?php echo elgg_view('input/text', array(
+                                               'internalname' => 'f1',
+                                               'internalid' => 'f1',
+                                               'value' => 'input text',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f2">Password input:</label>
+                               <?php echo elgg_view('input/password', array(
+                                               'internalname' => 'f2',
+                                               'internalid' => 'f2',
+                                               'value' => 'password',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f3">Radio input:</label><br />
+                               <?php echo elgg_view('input/radio', array(
+                                               'internalname' => 'f3',
+                                               'internalid' => 'f3',
+                                               'options' => array(1, 2),
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f4">Checkboxes input:</label><br />
+                               <?php echo elgg_view('input/checkboxes', array(
+                                               'internalname' => 'f4',
+                                               'internalid' => 'f4',
+                                               'options' => array(1, 2),
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f5">Dropdown input:</label><br />
+                               <?php echo elgg_view('input/dropdown', array(
+                                               'internalname' => 'f5',
+                                               'internalid' => 'f5',
+                                               'options' => array('option 1', 'option 2'),
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f6">Access input:</label>
+                               <?php echo elgg_view('input/access', array(
+                                               'internalname' => 'f6',
+                                               'internalid' => 'f6',
+                                               'value' => ACCESS_PUBLIC,
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f7">File input:</label>
+                               <?php echo elgg_view('input/file', array(
+                                               'internalname' => 'f7',
+                                               'internalid' => 'f7',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f8">URL input:</label>
+                               <?php echo elgg_view('input/url', array(
+                                               'internalname' => 'f8',
+                                               'internalid' => 'f8',
+                                               'value' => 'http://elgg.org/',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f9">Tags input:</label>
+                               <?php echo elgg_view('input/tags', array(
+                                               'internalname' => 'f9',
+                                               'internalid' => 'f9',
+                                               'value' => 'one, two, three',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f10">Email input:</label>
+                               <?php echo elgg_view('input/email', array(
+                                               'internalname' => 'f10',
+                                               'internalid' => 'f10',
+                                               'value' => 'noone@elgg.org',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f11">Autocomplete input:</label>
+                               <?php echo elgg_view('input/autocomplete', array(
+                                               'internalname' => 'f11',
+                                               'internalid' => 'f11',
+                                               'match_on' => 'users',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f12">Date picker input:</label>
+                               <?php echo elgg_view('input/datepicker', array(
+                                               'internalname' => 'f12',
+                                               'internalid' => 'f12',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f13">User picker input:</label>
+                               <?php echo elgg_view('input/userpicker', array(
+                                               'internalname' => 'f13',
+                                               'internalid' => 'f13',
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f14">Long text input:</label>
+                               <?php echo elgg_view('input/longtext', array(
+                                               'internalname' => 'f14',
+                                               'internalid' => 'f14',
+                                               'value' => $ipsum,
+                                               ));
+                               ?>
+                       </p>
+                       <p>
+                               <label for="f15">Plain text input:</label>
+                               <?php echo elgg_view('input/plaintext', array(
+                                               'internalname' => 'f15',
+                                               'internalid' => 'f15',
+                                               'value' => $ipsum,
+                                               ));
+                               ?>
+                       </p>
+               </fieldset>
+       </form>
+
+       <div class="mtl">
+               <h2>Buttons</h2>
+               <table>
+                       <thead>
+                               <tr>
+                                       <th>Anchors</th>
+                                       <th>Default</th>
+                                       <th>Hover</th>
+                                       <th>Focus</th>
+                                       <th>Active</th>
+                                       <th>Disabled</th>
+                                       <th>Selected</th>
+                               </tr>
+                       </thead>
+                       <tbody>
+                               <tr>
+                                       <th>Default</th>
+                                       <td><a href="#" class="elgg-button">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-state-hover">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-state-focus">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-state-active">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-state-disabled">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-state-selected">anchor</a></td>
+                               </tr>
+                               <tr>
+                                       <th>Action</th>
+                                       <td><a href="#" class="elgg-button elgg-button-action">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-action elgg-state-hover">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-action elgg-state-focus">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-action elgg-state-active">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-action elgg-state-disabled">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-action elgg-state-selected">anchor</a></td>
+                               </tr>
+                               <tr>
+                                       <th>Default</th>
+                                       <td><a href="#" class="elgg-button elgg-button-submit">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-submit elgg-state-hover">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-submit elgg-state-focus">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-submit elgg-state-active">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-submit elgg-state-disabled">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-submit elgg-state-selected">anchor</a></td>
+                               </tr>
+                               <tr>
+                                       <th>Default</th>
+                                       <td><a href="#" class="elgg-button elgg-button-cancel">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-hover">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-focus">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-active">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-disabled">anchor</a></td>
+                                       <td><a href="#" class="elgg-button elgg-button-cancel elgg-state-selected">anchor</a></td>
+                               </tr>
+                       </tbody>
+               </table>
+       </div>
+</div>
diff --git a/mod/developers/views/default/theme_preview/general.php b/mod/developers/views/default/theme_preview/general.php
new file mode 100644 (file)
index 0000000..e64a607
--- /dev/null
@@ -0,0 +1,62 @@
+<?php
+/**
+ * General CSS
+ */
+
+?>
+
+<div class="elgg-page mal">
+       <h1 class="mbs">
+               <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
+       </h1>
+       <div class="mbl">
+               < previous&nbsp;&nbsp;<a href="nav.php">next ></a>
+       </div>
+       <h2>Headings</h2>
+       <div class="mbl">
+               <h1>Level 1 heading</h1>
+               <h2>Level 2 heading</h2>
+               <h3>Level 3 heading</h3>
+               <h4>Level 4 heading</h4>
+               <h5>Level 5 heading</h5>
+               <h6>Level 6 heading</h6>
+       </div>
+       <h2>Paragraph</h2>
+       <div class="mbl">
+       <p>Lorem ipsum dolor sit amet, <a href="#" title="test link">test link</a>
+  adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec
+  faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero
+  nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent
+  mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu
+  volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus
+  eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem,
+  consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue
+  quis tellus.</p>
+
+  <p>Lorem ipsum dolor sit amet, <em>emphasis</em>
+  consectetuer
+  adipiscing elit. Nullam dignissim convallis est. Quisque aliquam. Donec
+  faucibus. Nunc iaculis suscipit dui. Nam sit amet sem. Aliquam libero
+  nisi, imperdiet at, tincidunt nec, gravida vehicula, nisl. Praesent
+  mattis, massa quis luctus fermentum, turpis mi volutpat justo, eu
+  volutpat enim diam eget metus. Maecenas ornare tortor. Donec sed tellus
+  eget sapien fringilla nonummy. Mauris a ante. Suspendisse quam sem,
+  consequat at, commodo vitae, feugiat in, nunc. Morbi imperdiet augue
+  quis tellus.</p>
+       </div>
+       <h2>Misc</h2>
+                       <p>
+                               I am <a href="?abc123">the a tag</a> example<br />
+                               I am <abbr title="test">the abbr tag</abbr> example<br />
+                               I am <acronym>the acronym tag</acronym> example<br />
+                               I am <b>the b tag</b> example<br />
+                               I am <code>the code tag</code> example<br />
+                               I am <del>the del tag</del> example<br />
+                               I am <em>the em tag</em> example<br />
+                               I am <i>the i tag</i> example<br />
+                               I am <strong>the strong tag</strong> example<br />
+                       </p>
+                       <blockquote><p>Paragraph inside Blockquote: <?php echo $ipsum; ?></p></blockquote>
+                       <pre><strong>Preformated:</strong>Testing one row
+                        and another</pre>
+</div>
similarity index 95%
rename from documentation/theming/preview/grid.php
rename to mod/developers/views/default/theme_preview/grid.php
index bf20804f8abe709d2c506d225b72036a3669ab1d..8e85d5c7294a3cf170ee31fc7e74d655fa3ba43a 100644 (file)
@@ -3,21 +3,15 @@
  * Grid CSS
  */
 
-$title = 'Grid';
-
-require dirname(__FILE__) . '/head.php';
-
-$url = current_page_url();
-
 ?>
-<body>
-       <div class="elgg-page mal">
-               <h1 class="mbs">
-                       <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
-               </h1>
-               <div class="mbl">
-                       <a href="objects.php">< previous</a>&nbsp;&nbsp;<a href="widgets.php">next ></a>
-               </div>
+<div class="elgg-page mal">
+       <h1 class="mbs">
+               <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
+       </h1>
+       <div class="mbl">
+               <a href="objects.php">< previous</a>&nbsp;&nbsp;<a href="widgets.php">next ></a>
+       </div>
+
 <style>
 h3 {text-align: center;}
 .preview-outline {border: 1px solid #cccccc; padding: 5px;}
@@ -87,6 +81,4 @@ h3 {text-align: center;}
        </div>
 </div>
 
-       </div>
-</body>
-</html>
\ No newline at end of file
+</div>
diff --git a/mod/developers/views/default/theme_preview/icons.php b/mod/developers/views/default/theme_preview/icons.php
new file mode 100644 (file)
index 0000000..792818e
--- /dev/null
@@ -0,0 +1,54 @@
+<?php
+/**
+ * Icons CSS
+ */
+
+?>
+<style>li {margin: 10px; float: left;} ul {background-color: #e0e0e0;}</style>
+<div class="elgg-page mal">
+       <h1 class="mbs">
+               <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
+       </h1>
+       <div class="mbl">
+               <a href="widgets.php">< previous</a>&nbsp;&nbsp;next >
+       </div>
+       <h2>Icon Sprites</h2>
+       <ul class="mbl clearfix">
+               <li><span class="elgg-icon elgg-icon-settings"></span>Settings</li>
+               <li><span class="elgg-icon elgg-icon-friends"></span>Friends</li>
+               <li><span class="elgg-icon elgg-icon-help"></span>Help</li>
+               <li><span class="elgg-icon elgg-icon-delete"></span>Delete</li>
+               <li><span class="elgg-icon elgg-icon-likes"></span>Likes</li>
+               <li><span class="elgg-icon elgg-icon-liked"></span>Liked</li>
+               <li><span class="elgg-icon elgg-icon-following"></span>Following</li>
+               <li><span class="elgg-icon elgg-icon-dragger"></span>Dragger</li>
+               <li><span class="elgg-icon elgg-icon-rss"></span>RSS</li>
+               <li><span class="elgg-icon elgg-icon-arrow-s"></span>Arrow S</li>
+               <li><span class="elgg-icon elgg-icon-hover-menu"></span>Hover Menu</li>
+       </ul>
+       <h2>Ajax loader</h2>
+       <div class="mbl">
+               <?php echo elgg_view('graphics/ajax_loader', array('hidden' => false)); ?>
+       </div>
+       <h2>Avatars</h2>
+       <div class="mbl">
+               <?php
+                       $user = new ElggUser();
+                       $sizes = array('large', 'medium', 'small', 'tiny');
+                       echo '<table>';
+                       echo '<tr>';
+                       foreach ($sizes as $size) {
+                               echo "<td class=\"center\"><h4>$size</h4></td>";
+                       }
+                       echo '</tr>';
+                       echo '<tr>';
+                       foreach ($sizes as $size) {
+                               echo '<td class="phs">';
+                               echo elgg_view_entity_icon($user, $size, array('hover' => false));
+                               echo '</td>';
+                       }
+                       echo '</tr>';
+                       echo '</table>';
+               ?>
+       </div>
+</div>
diff --git a/mod/developers/views/default/theme_preview/index.php b/mod/developers/views/default/theme_preview/index.php
new file mode 100644 (file)
index 0000000..5bb554d
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Main index for theme preview
+ */
+
+$url = "pg/theme_preview";
+$url = elgg_normalize_url($url);
+
+echo <<<HTML
+<div class="elgg-page mal">
+       <h1 class="mbl"><a href="$url/index">Index</a></h1>
+       <ul class="mtl">
+               <li><a href="$url/general">General CSS</a></li>
+               <li><a href="$url/nav">Navigation CSS</a></li>
+               <li><a href="$url/forms">Form CSS</a></li>
+               <li><a href="$url/objects">Lists, modules, image blocks CSS</a></li>
+               <li><a href="$url/grid">Grid CSS</a></li>
+               <li><a href="$url/widgets">Widgets CSS</a></li>
+               <li><a href="$url/icons">Icons CSS</a></li>
+       </ul>
+</div>
+HTML;
diff --git a/mod/developers/views/default/theme_preview/nav.php b/mod/developers/views/default/theme_preview/nav.php
new file mode 100644 (file)
index 0000000..7fdf49a
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Navigation CSS
+ */
+
+$url = current_page_url();
+
+elgg_push_breadcrumb('First', "$url#");
+elgg_push_breadcrumb('Second', "$url#");
+elgg_push_breadcrumb('Third');
+
+?>
+<div class="elgg-page mal">
+       <h1 class="mbs">
+               <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
+       </h1>
+       <div class="mbl">
+               <a href="general.php">< previous</a>&nbsp;&nbsp;<a href="forms.php">next ></a>
+       </div>
+       <h2>Breadcrumbs</h2>
+       <div class="mbl">
+               <?php echo elgg_view('navigation/breadcrumbs'); ?>
+       </div>
+       <h2>Tabs</h2>
+       <div class="mbl">
+               <?php
+               $tabs = array(
+                       array('title' => 'First', 'url' => "$url#"),
+                       array('title' => 'Second', 'url' => "$url#", 'selected' => true),
+                       array('title' => 'Third', 'url' => "$url#"),
+               );
+               echo elgg_view('navigation/tabs', array('tabs' => $tabs));
+               ?>
+       </div>
+       <h2>Pagination</h2>
+       <div class="mbl">
+               <?php
+               $params = array(
+                       'count' => 1000,
+                       'limit' => 10,
+                       'offset' => 230,
+               );
+               echo elgg_view('navigation/pagination', $params);
+               ?>
+       </div>
+       <h2>Site Menu</h2>
+       <div class="mbl">
+               <div class="elgg-page-header" style="height: 40px;">
+       <?php
+               $params = array();
+               $params['menu'] = array();
+               $params['menu']['default'] = array();
+               for ($i=1; $i<=5; $i++) {
+                       $params['menu']['default'][] = new ElggMenuItem($i, "Page $i", "$url#");
+               }
+               $params['menu']['default'][2]->setSelected(true);
+               echo elgg_view('navigation/menu/site', $params);
+       ?>
+               </div>
+       </div>
+       <h2>Page Menu</h2>
+       <div class="mbl pam" style="width: 200px; background-color: #cccccc;">
+       <?php
+               $m = new ElggMenuItem(10, "Child", "$url#");
+               $m->setParent($params['menu']['default'][1]);
+               $params['menu']['default'][1]->addChild($m);
+               echo elgg_view('navigation/menu/page', $params);
+       ?>
+       </div>
+</div>
diff --git a/mod/developers/views/default/theme_preview/objects.php b/mod/developers/views/default/theme_preview/objects.php
new file mode 100644 (file)
index 0000000..fc773af
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/**
+ * CSS Objects: list, module, image_block
+ */
+
+$url = current_page_url();
+
+?>
+
+<div class="elgg-page mal">
+       <h1 class="mbs">
+               <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
+       </h1>
+       <div class="mbl">
+               <a href="forms.php">< previous</a>&nbsp;&nbsp;<a href="grid.php">next ></a>
+       </div>
+       <h2>Modules</h2>
+       <div class="mbl clearfix">
+               <div class="elgg-col elgg-col-1of2">
+                       <div class="pam">
+                       <?php
+                               echo elgg_view_module('aside', 'elgg-module-aside', $ipsum);
+                               echo elgg_view_module('popup', 'elgg-module-popup', $ipsum);
+                       ?>
+                       </div>
+               </div>
+               <div class="elgg-col elgg-col-1of2">
+                       <div class="pam">
+                       <?php
+                               echo elgg_view_module('info', 'elgg-module-info', $ipsum);
+                               echo elgg_view_module('featured', 'elgg-module-featured', $ipsum);
+                       ?>
+                       </div>
+               </div>
+       </div>
+       <h2>Image Block</h2>
+       <div class="mbl clearfix">
+       <?php
+               $user = new ElggUser();
+               $image = elgg_view_entity_icon($user, 'small');
+               echo elgg_view_image_block($image, $ipsum);
+       ?>
+       </div>
+       <h2>List</h2>
+       <div class="mbl clearfix">
+       <?php
+               $obj1 = new ElggObject();
+               $obj1->title = "Object 1";
+               $obj1->description = $ipsum;
+               $obj2 = new ElggObject();
+               $obj2->title = "Object 2";
+               $obj2->description = $ipsum;
+               echo elgg_view('layout/objects/list', array('items' => array($obj1, $obj2)));
+       ?>
+       </div>
+       <h2>Table</h2>
+       <div class="mbl clearfix">
+               <table class="elgg-table">
+               <?php
+                       echo "<thead><tr><th>column 1</th><th>column 2</th></tr></thead>";
+                       for ($i = 1; $i < 5; $i++) {
+                               echo '<tr>';
+                               for ($j = 1; $j < 3; $j++) {
+                                       echo "<td>value $j</td>";
+                               }
+                               echo '</tr>';
+                       }
+               ?>
+               </table>
+       </div>
+       <h2>Messages</h2>
+       <div class="mbl clearfix">
+               <ul>
+                       <li class="elgg-message elgg-state-success mas">Success message</li>
+                       <li class="elgg-message elgg-state-error mas">Error message</li>
+                       <li class="elgg-message elgg-state-notice mas">Notice message</li>
+               </ul>
+       </div>
+</div>
similarity index 83%
rename from documentation/theming/preview/widgets.php
rename to mod/developers/views/default/theme_preview/widgets.php
index beef33e167489e9b659552edab9fd9adbd0144ad..7f3fc938c297a4f65d5a4d4972585015ce53d22f 100644 (file)
@@ -3,10 +3,6 @@
  * Widgets CSS
  */
 
-$title = 'Widgets';
-
-require dirname(__FILE__) . '/head.php';
-
 $url = current_page_url();
 
 elgg_register_plugin_hook_handler('view', 'widgets/friends/content', 'css_widget_content');
@@ -24,14 +20,13 @@ function css_permissions_override() {
 
 
 ?>
-<body>
-       <div class="elgg-page mal">
-               <h1 class="mbs">
-                       <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
-               </h1>
-               <div class="mbl">
-                       <a href="grid.php">< previous</a>&nbsp;&nbsp;<a href="icons.php">next ></a>
-               </div>
+<div class="elgg-page mal">
+       <h1 class="mbs">
+               <a href="index.php">Index</a> > <a href="<?php echo $url; ?>"><?php echo $title; ?></a>
+       </h1>
+       <div class="mbl">
+               <a href="grid.php">< previous</a>&nbsp;&nbsp;<a href="icons.php">next ></a>
+       </div>
 <?php
 $w = array();
 for ($i=1; $i<=6; $i++) {
@@ -58,7 +53,7 @@ for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
        echo '</div>';
 }
 ?>
-       </div>
+</div>
 <script type="text/javascript">
        // widgets do not have guids so we override the edit toggle and delete button
        $(document).ready(function() {
@@ -73,5 +68,3 @@ for ($column_index = 1; $column_index <= $num_columns; $column_index++) {
                });
        });
 </script>
-</body>
-</html>
\ No newline at end of file