From: cash Date: Mon, 14 Feb 2011 00:10:03 +0000 (+0000) Subject: Refs #2903 moving theme preview into developers plugin - navigation and titles are... X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=d3c49d7ee73a6f0bc680868147cc68cccba611a9;p=lorea%2Felgg.git Refs #2903 moving theme preview into developers plugin - navigation and titles are broken git-svn-id: http://code.elgg.org/elgg/trunk@8214 36083f99-b078-4883-b0ff-0f9b5a30f544 --- diff --git a/documentation/theming/preview/forms.php b/documentation/theming/preview/forms.php deleted file mode 100644 index 592f5f844..000000000 --- a/documentation/theming/preview/forms.php +++ /dev/null @@ -1,216 +0,0 @@ - - -
-

- Index > -

- -

Form

-
-
- Form legend -

- - 'f1', - 'internalid' => 'f1', - 'value' => 'input text', - )); - ?> -

-

- - 'f2', - 'internalid' => 'f2', - 'value' => 'password', - )); - ?> -

-

-
- 'f3', - 'internalid' => 'f3', - 'options' => array(1, 2), - )); - ?> -

-

-
- 'f4', - 'internalid' => 'f4', - 'options' => array(1, 2), - )); - ?> -

-

-
- 'f5', - 'internalid' => 'f5', - 'options' => array('option 1', 'option 2'), - )); - ?> -

-

- - 'f6', - 'internalid' => 'f6', - 'value' => ACCESS_PUBLIC, - )); - ?> -

-

- - 'f7', - 'internalid' => 'f7', - )); - ?> -

-

- - 'f8', - 'internalid' => 'f8', - 'value' => 'http://elgg.org/', - )); - ?> -

-

- - 'f9', - 'internalid' => 'f9', - 'value' => 'one, two, three', - )); - ?> -

-

- - 'f10', - 'internalid' => 'f10', - 'value' => 'noone@elgg.org', - )); - ?> -

-

- - 'f11', - 'internalid' => 'f11', - 'match_on' => 'users', - )); - ?> -

-

- - 'f12', - 'internalid' => 'f12', - )); - ?> -

-

- - 'f13', - 'internalid' => 'f13', - )); - ?> -

-

- - 'f14', - 'internalid' => 'f14', - 'value' => $ipsum, - )); - ?> -

-

- - 'f15', - 'internalid' => 'f15', - 'value' => $ipsum, - )); - ?> -

-
-
- -
-

Buttons

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AnchorsDefaultHoverFocusActiveDisabledSelected
Defaultanchoranchoranchoranchoranchoranchor
Actionanchoranchoranchoranchoranchoranchor
Defaultanchoranchoranchoranchoranchoranchor
Defaultanchoranchoranchoranchoranchoranchor
-
-
- - \ No newline at end of file diff --git a/documentation/theming/preview/general.php b/documentation/theming/preview/general.php deleted file mode 100644 index 3e8d2f6e9..000000000 --- a/documentation/theming/preview/general.php +++ /dev/null @@ -1,70 +0,0 @@ - - -
-

- Index > -

-
- < previous  next > -
-

Headings

-
-

Level 1 heading

-

Level 2 heading

-

Level 3 heading

-

Level 4 heading

-
Level 5 heading
-
Level 6 heading
-
-

Paragraph

-
-

Lorem ipsum dolor sit amet, test link - 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.

- -

Lorem ipsum dolor sit amet, emphasis - 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.

-
-

Misc

-

- I am the a tag example
- I am the abbr tag example
- I am the acronym tag example
- I am the b tag example
- I am the code tag example
- I am the del tag example
- I am the em tag example
- I am the i tag example
- I am the strong tag example
-

-

Paragraph inside Blockquote:

-
Preformated:Testing one row
-				 and another
-
- - \ No newline at end of file diff --git a/documentation/theming/preview/icons.php b/documentation/theming/preview/icons.php deleted file mode 100644 index 54de2157c..000000000 --- a/documentation/theming/preview/icons.php +++ /dev/null @@ -1,63 +0,0 @@ - - - -
-

- Index > -

-
- < previous  next > -
-

Icon Sprites

- -

Ajax loader

-
- false)); ?> -
-

Avatars

-
- '; - echo ''; - foreach ($sizes as $size) { - echo "

$size

"; - } - echo ''; - echo ''; - foreach ($sizes as $size) { - echo ''; - echo elgg_view_entity_icon($user, $size, array('hover' => false)); - echo ''; - } - echo ''; - echo ''; - ?> -
-
- - \ No newline at end of file diff --git a/documentation/theming/preview/index.php b/documentation/theming/preview/index.php deleted file mode 100644 index ce71d28df..000000000 --- a/documentation/theming/preview/index.php +++ /dev/null @@ -1,23 +0,0 @@ - - -
-

Index

- -
- - \ No newline at end of file diff --git a/documentation/theming/preview/nav.php b/documentation/theming/preview/nav.php deleted file mode 100644 index 3a9daea98..000000000 --- a/documentation/theming/preview/nav.php +++ /dev/null @@ -1,77 +0,0 @@ - - -
-

- Index > -

- -

Breadcrumbs

-
- -
-

Tabs

-
- 'First', 'url' => "$url#"), - array('title' => 'Second', 'url' => "$url#", 'selected' => true), - array('title' => 'Third', 'url' => "$url#"), - ); - echo elgg_view('navigation/tabs', array('tabs' => $tabs)); - ?> -
-

Pagination

-
- 1000, - 'limit' => 10, - 'offset' => 230, - ); - echo elgg_view('navigation/pagination', $params); - ?> -
-

Site Menu

-
-
- setSelected(true); - echo elgg_view('navigation/menu/site', $params); - ?> -
-
-

Page Menu

-
- setParent($params['menu']['default'][1]); - $params['menu']['default'][1]->addChild($m); - echo elgg_view('navigation/menu/page', $params); - ?> -
-
- - \ No newline at end of file diff --git a/documentation/theming/preview/objects.php b/documentation/theming/preview/objects.php deleted file mode 100644 index 0dc08cd98..000000000 --- a/documentation/theming/preview/objects.php +++ /dev/null @@ -1,85 +0,0 @@ - - -
-

- Index > -

- -

Modules

-
-
-
- -
-
-
-
- -
-
-
-

Image Block

-
- -
-

List

-
- 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))); - ?> -
-

Table

-
- - "; - for ($i = 1; $i < 5; $i++) { - echo ''; - for ($j = 1; $j < 3; $j++) { - echo ""; - } - echo ''; - } - ?> -
column 1column 2
value $j
-
-

Messages

-
-
    -
  • Success message
  • -
  • Error message
  • -
  • Notice message
  • -
-
-
- - \ No newline at end of file diff --git a/mod/developers/start.php b/mod/developers/start.php index 46cdd8bc2..5763d5d34 100644 --- a/mod/developers/start.php +++ b/mod/developers/start.php @@ -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 diff --git a/documentation/theming/preview/head.php b/mod/developers/views/default/page/shells/theme_preview.php similarity index 63% rename from documentation/theming/preview/head.php rename to mod/developers/views/default/page/shells/theme_preview.php index 360f56647..79dfed60d 100644 --- a/documentation/theming/preview/head.php +++ b/mod/developers/views/default/page/shells/theme_preview.php @@ -1,20 +1,12 @@ - <?php echo $title; ?> + <?php echo $vars['title']; ?> - - - + @@ -39,4 +31,11 @@ foreach (elgg_get_js() as $script) { + + + + + \ 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 index 000000000..90cc5dcc8 --- /dev/null +++ b/mod/developers/views/default/theme_preview/forms.php @@ -0,0 +1,209 @@ + +
+

+ Index > +

+ +

Form

+
+
+ Form legend +

+ + 'f1', + 'internalid' => 'f1', + 'value' => 'input text', + )); + ?> +

+

+ + 'f2', + 'internalid' => 'f2', + 'value' => 'password', + )); + ?> +

+

+
+ 'f3', + 'internalid' => 'f3', + 'options' => array(1, 2), + )); + ?> +

+

+
+ 'f4', + 'internalid' => 'f4', + 'options' => array(1, 2), + )); + ?> +

+

+
+ 'f5', + 'internalid' => 'f5', + 'options' => array('option 1', 'option 2'), + )); + ?> +

+

+ + 'f6', + 'internalid' => 'f6', + 'value' => ACCESS_PUBLIC, + )); + ?> +

+

+ + 'f7', + 'internalid' => 'f7', + )); + ?> +

+

+ + 'f8', + 'internalid' => 'f8', + 'value' => 'http://elgg.org/', + )); + ?> +

+

+ + 'f9', + 'internalid' => 'f9', + 'value' => 'one, two, three', + )); + ?> +

+

+ + 'f10', + 'internalid' => 'f10', + 'value' => 'noone@elgg.org', + )); + ?> +

+

+ + 'f11', + 'internalid' => 'f11', + 'match_on' => 'users', + )); + ?> +

+

+ + 'f12', + 'internalid' => 'f12', + )); + ?> +

+

+ + 'f13', + 'internalid' => 'f13', + )); + ?> +

+

+ + 'f14', + 'internalid' => 'f14', + 'value' => $ipsum, + )); + ?> +

+

+ + 'f15', + 'internalid' => 'f15', + 'value' => $ipsum, + )); + ?> +

+
+
+ +
+

Buttons

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AnchorsDefaultHoverFocusActiveDisabledSelected
Defaultanchoranchoranchoranchoranchoranchor
Actionanchoranchoranchoranchoranchoranchor
Defaultanchoranchoranchoranchoranchoranchor
Defaultanchoranchoranchoranchoranchoranchor
+
+
diff --git a/mod/developers/views/default/theme_preview/general.php b/mod/developers/views/default/theme_preview/general.php new file mode 100644 index 000000000..e64a60748 --- /dev/null +++ b/mod/developers/views/default/theme_preview/general.php @@ -0,0 +1,62 @@ + + +
+

+ Index > +

+
+ < previous  next > +
+

Headings

+
+

Level 1 heading

+

Level 2 heading

+

Level 3 heading

+

Level 4 heading

+
Level 5 heading
+
Level 6 heading
+
+

Paragraph

+
+

Lorem ipsum dolor sit amet, test link + 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.

+ +

Lorem ipsum dolor sit amet, emphasis + 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.

+
+

Misc

+

+ I am the a tag example
+ I am the abbr tag example
+ I am the acronym tag example
+ I am the b tag example
+ I am the code tag example
+ I am the del tag example
+ I am the em tag example
+ I am the i tag example
+ I am the strong tag example
+

+

Paragraph inside Blockquote:

+
Preformated:Testing one row
+			 and another
+
diff --git a/documentation/theming/preview/grid.php b/mod/developers/views/default/theme_preview/grid.php similarity index 95% rename from documentation/theming/preview/grid.php rename to mod/developers/views/default/theme_preview/grid.php index bf20804f8..8e85d5c72 100644 --- a/documentation/theming/preview/grid.php +++ b/mod/developers/views/default/theme_preview/grid.php @@ -3,21 +3,15 @@ * Grid CSS */ -$title = 'Grid'; - -require dirname(__FILE__) . '/head.php'; - -$url = current_page_url(); - ?> - -
-

- Index > -

- +
+

+ Index > +

+ + +
+

+ Index > +

+
+ < previous  next > +
+

Icon Sprites

+
    +
  • Settings
  • +
  • Friends
  • +
  • Help
  • +
  • Delete
  • +
  • Likes
  • +
  • Liked
  • +
  • Following
  • +
  • Dragger
  • +
  • RSS
  • +
  • Arrow S
  • +
  • Hover Menu
  • +
+

Ajax loader

+
+ false)); ?> +
+

Avatars

+
+ '; + echo ''; + foreach ($sizes as $size) { + echo "

$size

"; + } + echo ''; + echo ''; + foreach ($sizes as $size) { + echo ''; + echo elgg_view_entity_icon($user, $size, array('hover' => false)); + echo ''; + } + echo ''; + echo ''; + ?> +
+
diff --git a/mod/developers/views/default/theme_preview/index.php b/mod/developers/views/default/theme_preview/index.php new file mode 100644 index 000000000..5bb554d06 --- /dev/null +++ b/mod/developers/views/default/theme_preview/index.php @@ -0,0 +1,22 @@ + +

Index

+ +
+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 index 000000000..7fdf49a8e --- /dev/null +++ b/mod/developers/views/default/theme_preview/nav.php @@ -0,0 +1,70 @@ + +
+

+ Index > +

+ +

Breadcrumbs

+
+ +
+

Tabs

+
+ 'First', 'url' => "$url#"), + array('title' => 'Second', 'url' => "$url#", 'selected' => true), + array('title' => 'Third', 'url' => "$url#"), + ); + echo elgg_view('navigation/tabs', array('tabs' => $tabs)); + ?> +
+

Pagination

+
+ 1000, + 'limit' => 10, + 'offset' => 230, + ); + echo elgg_view('navigation/pagination', $params); + ?> +
+

Site Menu

+
+
+ setSelected(true); + echo elgg_view('navigation/menu/site', $params); + ?> +
+
+

Page Menu

+
+ setParent($params['menu']['default'][1]); + $params['menu']['default'][1]->addChild($m); + echo elgg_view('navigation/menu/page', $params); + ?> +
+
diff --git a/mod/developers/views/default/theme_preview/objects.php b/mod/developers/views/default/theme_preview/objects.php new file mode 100644 index 000000000..fc773afb9 --- /dev/null +++ b/mod/developers/views/default/theme_preview/objects.php @@ -0,0 +1,79 @@ + + +
+

+ Index > +

+ +

Modules

+
+
+
+ +
+
+
+
+ +
+
+
+

Image Block

+
+ +
+

List

+
+ 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))); + ?> +
+

Table

+
+ + "; + for ($i = 1; $i < 5; $i++) { + echo ''; + for ($j = 1; $j < 3; $j++) { + echo ""; + } + echo ''; + } + ?> +
column 1column 2
value $j
+
+

Messages

+
+
    +
  • Success message
  • +
  • Error message
  • +
  • Notice message
  • +
+
+
diff --git a/documentation/theming/preview/widgets.php b/mod/developers/views/default/theme_preview/widgets.php similarity index 83% rename from documentation/theming/preview/widgets.php rename to mod/developers/views/default/theme_preview/widgets.php index beef33e16..7f3fc938c 100644 --- a/documentation/theming/preview/widgets.php +++ b/mod/developers/views/default/theme_preview/widgets.php @@ -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() { ?> - -
-

- Index > -

- +
+

+ Index > +

+ '; } ?> -
+
- - \ No newline at end of file