]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated documentation for page_elements/content_header
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 23 Jun 2010 16:14:51 +0000 (16:14 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 23 Jun 2010 16:14:51 +0000 (16:14 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6555 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/page_elements/content_header.php

index 79e1ce279d0e35a0b70a57daa80fd7056914852e..1591c2267fa840dae3044e58617d1e1bba194704 100644 (file)
@@ -3,12 +3,19 @@
  * Displays the Add New button, and the All, Mine, My Friends tabs for plugins
  * If a user is not logged in, this only displays the All tab.
  * If this is in a group context, it doesn't display any tabs
+ * 
+ * @uses string $vars['type'] The section type.  Should be the same as the page handler.  Used for generating URLs.
+ * @uses string $vars['context'] Which filter we're looking at: all, mine, friends, or action. Nothing to do with get_context().
+ * 
+ * @uses string $vars['all_link'] Optional. The URL to use for the "All" tab link.  Defaults to mod/$type/all.php
+ * @uses string $vars['mine_link'] Optional. The URL to use for the "Mine" tab link.  Defaults to pg/$type/$username
+ * @uses string $vars['friends_link'] Optional. The URL to use for the "Friends" tab link.  Defaults to pg/$type/$username/friends
+ * @uses string $vars['new_link'] Optional. The URL to use for the "New" button.  Defaults to pg/$type/$username/new
+ * @uses array $vars['tabs'] Optional. Override all tab generation.  See view:navgiation/tabs for formatting
  *
  * @package Elgg
  * @subpackage Core
- * @author Curverider Ltd
  * @link http://elgg.org/
- *
  */
 
 $page_owner = page_owner_entity();
@@ -62,10 +69,10 @@ if (isloggedin()) {
                $tab_list = '';
        } else {
                // @todo remove the hard coded reference to the videolist plugin
-               if(get_context() == "videolist"){
+               if (get_context() == "videolist"){
                        $video_link = $CONFIG->wwwroot . "pg/videolist/browse/$username/";
                        $new_button = "<a href=\"{$video_link}\" class='action_button'>" . elgg_echo('videolist:browsemenu') . '</a>';
-               }else{
+               } else {
                        $new_link = (isset($vars['new_link'])) ? $vars['new_link'] : "{$CONFIG->wwwroot}pg/$type/$username/new";
                        $new_button = "<a href=\"{$new_link}\" class='action_button'>" . elgg_echo($type . ':new') . '</a>';
                }