From 434223ef35bd67cdece1ce8cb0fc829a0811daf7 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 22 Feb 2011 00:59:57 +0000 Subject: Refs #2950: Moved /layout/ views into /page/ dir -- still not satisfied with page/components/list/body, page/layouts/content/* and page/layouts/widgets/add_button git-svn-id: http://code.elgg.org/elgg/trunk@8400 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/layout/objects/list/body.php | 53 -------------------- views/default/layout/objects/list/metadata.php | 54 -------------------- views/default/layout/shells/content/filter.php | 43 ---------------- views/default/layout/shells/content/footer.php | 8 --- views/default/layout/shells/content/header.php | 49 ------------------ views/default/layout/shells/content/sidebar.php | 8 --- views/default/layout/shells/widgets/add_button.php | 10 ---- views/default/layout/shells/widgets/add_panel.php | 58 ---------------------- views/default/page/components/list/body.php | 53 ++++++++++++++++++++ views/default/page/layouts/content/filter.php | 43 ++++++++++++++++ views/default/page/layouts/content/footer.php | 8 +++ views/default/page/layouts/content/header.php | 49 ++++++++++++++++++ views/default/page/layouts/content/sidebar.php | 8 +++ views/default/page/layouts/widgets/add_button.php | 10 ++++ views/default/page/layouts/widgets/add_panel.php | 58 ++++++++++++++++++++++ 15 files changed, 229 insertions(+), 283 deletions(-) delete mode 100644 views/default/layout/objects/list/body.php delete mode 100644 views/default/layout/objects/list/metadata.php delete mode 100644 views/default/layout/shells/content/filter.php delete mode 100644 views/default/layout/shells/content/footer.php delete mode 100644 views/default/layout/shells/content/header.php delete mode 100644 views/default/layout/shells/content/sidebar.php delete mode 100644 views/default/layout/shells/widgets/add_button.php delete mode 100644 views/default/layout/shells/widgets/add_panel.php create mode 100644 views/default/page/components/list/body.php create mode 100644 views/default/page/layouts/content/filter.php create mode 100644 views/default/page/layouts/content/footer.php create mode 100644 views/default/page/layouts/content/header.php create mode 100644 views/default/page/layouts/content/sidebar.php create mode 100644 views/default/page/layouts/widgets/add_button.php create mode 100644 views/default/page/layouts/widgets/add_panel.php (limited to 'views') diff --git a/views/default/layout/objects/list/body.php b/views/default/layout/objects/list/body.php deleted file mode 100644 index ef62df198..000000000 --- a/views/default/layout/objects/list/body.php +++ /dev/null @@ -1,53 +0,0 @@ -
  • Public
  • Like this
  • - *

    Title

    - *

    Posted 3 hours ago by George

    - *

    one, two

    - *
    Excerpt text
    - * - * @uses $vars['entity'] ElggEntity - * @uses $vars['title'] Title link (optional) false = no title, '' = default - * @uses $vars['metadata'] HTML for entity metadata and actions (optional) - * @uses $vars['subtitle'] HTML for the subtitle (optional) - * @uses $vars['tags'] HTML for the tags (optional) - * @uses $vars['content'] HTML for the entity content (optional) - */ - -$entity = $vars['entity']; - -$title_link = elgg_extract('title', $vars, ''); -if ($title_link === '') { - if (isset($entity->title)) { - $text = $entity->title; - } else { - $text = $entity->name; - } - $params = array( - 'text' => $text, - 'href' => $entity->getURL(), - ); - $title_link = elgg_view('output/url', $params); -} - -$metadata = elgg_extract('metadata', $vars, ''); -$subtitle = elgg_extract('subtitle', $vars, ''); -$content = elgg_extract('content', $vars, ''); - -$tags = elgg_extract('tags', $vars, ''); -if ($tags !== false) { - $tags = elgg_view('output/tags', array('tags' => $entity->tags)); -} - -if ($metadata) { - echo $metadata; -} -echo "

    $title_link

    "; -echo "

    $subtitle

    "; -echo $tags; -if ($content) { - echo "
    $content
    "; -} diff --git a/views/default/layout/objects/list/metadata.php b/views/default/layout/objects/list/metadata.php deleted file mode 100644 index 3ce3573b9..000000000 --- a/views/default/layout/objects/list/metadata.php +++ /dev/null @@ -1,54 +0,0 @@ - - diff --git a/views/default/layout/shells/content/filter.php b/views/default/layout/shells/content/filter.php deleted file mode 100644 index 9daee6d71..000000000 --- a/views/default/layout/shells/content/filter.php +++ /dev/null @@ -1,43 +0,0 @@ -username; - $filter_context = elgg_extract('filter_context', $vars, 'all'); - - // generate a list of default tabs - $tabs = array( - 'all' => array( - 'title' => elgg_echo('all'), - 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : "pg/$context/all/", - 'selected' => ($filter_context == 'all'), - ), - 'mine' => array( - 'title' => elgg_echo('mine'), - 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "pg/$context/owner/$username/", - 'selected' => ($filter_context == 'mine'), - ), - 'friend' => array( - 'title' => elgg_echo('friends'), - 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "pg/$context/friends/$username/", - 'selected' => ($filter_context == 'friends'), - ), - ); - - echo elgg_view('navigation/tabs', array('tabs' => $tabs)); -} diff --git a/views/default/layout/shells/content/footer.php b/views/default/layout/shells/content/footer.php deleted file mode 100644 index 66f5d3ff8..000000000 --- a/views/default/layout/shells/content/footer.php +++ /dev/null @@ -1,8 +0,0 @@ -getGUID(); - } else { - $guid = elgg_get_logged_in_user_guid(); - } - $new_link = elgg_extract('new_link', $vars, "pg/$context/add/$guid/"); - $params = array( - 'href' => $new_link = elgg_normalize_url($new_link), - 'text' => elgg_echo("$context:add"), - 'class' => 'elgg-button-action', - ); - $buttons = elgg_view('output/url', $params); - } - } - echo << -

    $title

    $buttons - -HTML; -} diff --git a/views/default/layout/shells/content/sidebar.php b/views/default/layout/shells/content/sidebar.php deleted file mode 100644 index 86ca8435f..000000000 --- a/views/default/layout/shells/content/sidebar.php +++ /dev/null @@ -1,8 +0,0 @@ - -
    - - - -
    diff --git a/views/default/layout/shells/widgets/add_panel.php b/views/default/layout/shells/widgets/add_panel.php deleted file mode 100644 index 38c133c4a..000000000 --- a/views/default/layout/shells/widgets/add_panel.php +++ /dev/null @@ -1,58 +0,0 @@ -handler; - } -} - -?> - diff --git a/views/default/page/components/list/body.php b/views/default/page/components/list/body.php new file mode 100644 index 000000000..ef62df198 --- /dev/null +++ b/views/default/page/components/list/body.php @@ -0,0 +1,53 @@ +
  • Public
  • Like this
  • + *

    Title

    + *

    Posted 3 hours ago by George

    + *

    one, two

    + *
    Excerpt text
    + * + * @uses $vars['entity'] ElggEntity + * @uses $vars['title'] Title link (optional) false = no title, '' = default + * @uses $vars['metadata'] HTML for entity metadata and actions (optional) + * @uses $vars['subtitle'] HTML for the subtitle (optional) + * @uses $vars['tags'] HTML for the tags (optional) + * @uses $vars['content'] HTML for the entity content (optional) + */ + +$entity = $vars['entity']; + +$title_link = elgg_extract('title', $vars, ''); +if ($title_link === '') { + if (isset($entity->title)) { + $text = $entity->title; + } else { + $text = $entity->name; + } + $params = array( + 'text' => $text, + 'href' => $entity->getURL(), + ); + $title_link = elgg_view('output/url', $params); +} + +$metadata = elgg_extract('metadata', $vars, ''); +$subtitle = elgg_extract('subtitle', $vars, ''); +$content = elgg_extract('content', $vars, ''); + +$tags = elgg_extract('tags', $vars, ''); +if ($tags !== false) { + $tags = elgg_view('output/tags', array('tags' => $entity->tags)); +} + +if ($metadata) { + echo $metadata; +} +echo "

    $title_link

    "; +echo "

    $subtitle

    "; +echo $tags; +if ($content) { + echo "
    $content
    "; +} diff --git a/views/default/page/layouts/content/filter.php b/views/default/page/layouts/content/filter.php new file mode 100644 index 000000000..9daee6d71 --- /dev/null +++ b/views/default/page/layouts/content/filter.php @@ -0,0 +1,43 @@ +username; + $filter_context = elgg_extract('filter_context', $vars, 'all'); + + // generate a list of default tabs + $tabs = array( + 'all' => array( + 'title' => elgg_echo('all'), + 'url' => (isset($vars['all_link'])) ? $vars['all_link'] : "pg/$context/all/", + 'selected' => ($filter_context == 'all'), + ), + 'mine' => array( + 'title' => elgg_echo('mine'), + 'url' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "pg/$context/owner/$username/", + 'selected' => ($filter_context == 'mine'), + ), + 'friend' => array( + 'title' => elgg_echo('friends'), + 'url' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "pg/$context/friends/$username/", + 'selected' => ($filter_context == 'friends'), + ), + ); + + echo elgg_view('navigation/tabs', array('tabs' => $tabs)); +} diff --git a/views/default/page/layouts/content/footer.php b/views/default/page/layouts/content/footer.php new file mode 100644 index 000000000..66f5d3ff8 --- /dev/null +++ b/views/default/page/layouts/content/footer.php @@ -0,0 +1,8 @@ +getGUID(); + } else { + $guid = elgg_get_logged_in_user_guid(); + } + $new_link = elgg_extract('new_link', $vars, "pg/$context/add/$guid/"); + $params = array( + 'href' => $new_link = elgg_normalize_url($new_link), + 'text' => elgg_echo("$context:add"), + 'class' => 'elgg-button-action', + ); + $buttons = elgg_view('output/url', $params); + } + } + echo << +

    $title

    $buttons + +HTML; +} diff --git a/views/default/page/layouts/content/sidebar.php b/views/default/page/layouts/content/sidebar.php new file mode 100644 index 000000000..86ca8435f --- /dev/null +++ b/views/default/page/layouts/content/sidebar.php @@ -0,0 +1,8 @@ + +
    + + + +
    diff --git a/views/default/page/layouts/widgets/add_panel.php b/views/default/page/layouts/widgets/add_panel.php new file mode 100644 index 000000000..38c133c4a --- /dev/null +++ b/views/default/page/layouts/widgets/add_panel.php @@ -0,0 +1,58 @@ +handler; + } +} + +?> + -- cgit v1.2.3