diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-11 18:07:26 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-11 18:07:26 +0000 |
commit | bdacb612f3fffa967ef6fda89c081fb7a59894d2 (patch) | |
tree | ce26e1209d280025645dfca08d36abcacaadaee3 /mod/groups/views/default | |
parent | a454889d81ed753de06ac6b014ff92ca3c57e039 (diff) | |
download | elgg-bdacb612f3fffa967ef6fda89c081fb7a59894d2.tar.gz elgg-bdacb612f3fffa967ef6fda89c081fb7a59894d2.tar.bz2 |
Added breadcrumb support and updated the mods with old-style breadcrumbs.
git-svn-id: http://code.elgg.org/elgg/trunk@5366 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r-- | mod/groups/views/default/forms/forums/addtopic.php | 56 | ||||
-rw-r--r-- | mod/groups/views/default/forum/viewposts.php | 77 |
2 files changed, 62 insertions, 71 deletions
diff --git a/mod/groups/views/default/forms/forums/addtopic.php b/mod/groups/views/default/forms/forums/addtopic.php index 37075aa6d..e3bc3e1c6 100644 --- a/mod/groups/views/default/forms/forums/addtopic.php +++ b/mod/groups/views/default/forms/forums/addtopic.php @@ -1,13 +1,13 @@ <?php /** * Elgg Groups topic edit/add page - * + * * @package ElggGroups * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider <info@elgg.com> * @copyright Curverider Ltd 2008-2010 * @link http://elgg.com/ - * + * * @uses $vars['object'] Optionally, the topic to edit */ @@ -20,22 +20,20 @@ $message_id = ""; $status = ""; $access_id = ACCESS_DEFAULT; - - // get the group guid - $group_guid = (int) get_input('group_guid'); - - // set breadcrumbs - echo elgg_view('page_elements/breadcrumbs', array( - 'breadcrumb_root_url' => '', - 'breadcrumb_root_text' => 'Parent Group Name', - 'breadcrumb_level1_url' => '#', - 'breadcrumb_level1_text' => elgg_echo('item:object:groupforumtopic'), - 'breadcrumb_currentpage' => elgg_echo("groups:addtopic") - )); - + + // get the group guid + $group_guid = (int) get_input('group_guid'); + + // set breadcrumbs + elgg_push_breadcrumb('', 'Parent Group Name'); + elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), ''); + elgg_push_breadcrumb(elgg_echo("groups:addtopic")); + + echo elgg_view('navigation/breadcrumbs'); + // set the title echo elgg_view_title(elgg_echo("groups:addtopic")); - + ?> <!-- display the input form --> <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post" class="margin_top"> @@ -44,7 +42,7 @@ <p> <label><?php echo elgg_echo("title"); ?><br /> <?php - //display the topic title input + //display the topic title input echo elgg_view("input/text", array( "internalname" => "topictitle", "value" => $title, @@ -52,7 +50,7 @@ ?> </label> </p> - + <!-- display the tag input --> <p> <label><?php echo elgg_echo("tags"); ?><br /> @@ -62,11 +60,11 @@ "internalname" => "topictags", "value" => $tags, )); - + ?> </label> </p> - + <!-- topic message input --> <p class="longtext_editarea"> <label><?php echo elgg_echo("groups:topicmessage"); ?><br /> @@ -79,17 +77,17 @@ ?> </label> </p> - + <!-- set the topic status --> <p> - <label><?php echo elgg_echo("groups:topicstatus"); ?><br /> - <select name="status"> - <option value="open" <?php if($status == "") echo "SELECTED";?>><?php echo elgg_echo('groups:topicopen'); ?></option> - <option value="closed" <?php if($status == "closed") echo "SELECTED";?>><?php echo elgg_echo('groups:topicclosed'); ?></option> - </select> - </label> + <label><?php echo elgg_echo("groups:topicstatus"); ?><br /> + <select name="status"> + <option value="open" <?php if($status == "") echo "SELECTED";?>><?php echo elgg_echo('groups:topicopen'); ?></option> + <option value="closed" <?php if($status == "closed") echo "SELECTED";?>><?php echo elgg_echo('groups:topicclosed'); ?></option> + </select> + </label> </p> - + <!-- access --> <p> <label> @@ -97,7 +95,7 @@ <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?> </label> </p> - + <!-- required hidden info and submit button --> <p> <input type="hidden" name="group_guid" value="<?php echo $group_guid; ?>" /> diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php index efb7e595c..02ed06b62 100644 --- a/mod/groups/views/default/forum/viewposts.php +++ b/mod/groups/views/default/forum/viewposts.php @@ -1,8 +1,8 @@ <?php - /** + /** * Elgg groups plugin display topic posts - * + * * @package ElggGroups * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider @@ -10,55 +10,48 @@ * @link http://elgg.com/ */ -?> + elgg_push_breadcrumb('', 'Parent Group Name'); + elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), ''); + elgg_push_breadcrumb($vars['entity']->title); -<?php - echo elgg_view('page_elements/breadcrumbs', array( - 'breadcrumb_root_url' => '', - 'breadcrumb_root_text' => 'Parent Group Name', - 'breadcrumb_level1_url' => '#', - 'breadcrumb_level1_text' => elgg_echo('item:object:groupforumtopic'), - 'breadcrumb_currentpage' => $vars['entity']->title - )); + echo elgg_view('navigation/breadcrumbs'); - + //display follow up comments + $count = $vars['entity']->countAnnotations('group_topic_post'); + $offset = (int) get_input('offset',0); - //display follow up comments - $count = $vars['entity']->countAnnotations('group_topic_post'); - $offset = (int) get_input('offset',0); - - $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}"; - echo elgg_view('navigation/pagination',array( - 'limit' => 50, - 'offset' => $offset, - 'baseurl' => $baseurl, - 'count' => $count, - )); + $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}"; + echo elgg_view('navigation/pagination',array( + 'limit' => 50, + 'offset' => $offset, + 'baseurl' => $baseurl, + 'count' => $count, + )); ?> <!-- grab the topic title --> <h2><?php echo $vars['entity']->title; ?></h2> <?php - - foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) { - - echo elgg_view("forum/topicposts",array('entity' => $post)); - + + foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) { + + echo elgg_view("forum/topicposts",array('entity' => $post)); + } - + // check to find out the status of the topic and act - if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){ - - //display the add comment form, this will appear after all the existing comments - echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity'])); - - } elseif($vars['entity']->status == "closed") { - - //this topic has been closed by the owner - echo "<h2>" . elgg_echo("groups:topicisclosed") . "</h2>"; - echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>"; - - } else { - } + if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){ + + //display the add comment form, this will appear after all the existing comments + echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity'])); + + } elseif($vars['entity']->status == "closed") { + + //this topic has been closed by the owner + echo "<h2>" . elgg_echo("groups:topicisclosed") . "</h2>"; + echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>"; + + } else { + } ?> |