[Fusionforge-commits] r12859 - trunk/src/www/my

Franck VILLAUME nerville at fusionforge.org
Sun Mar 20 20:04:24 CET 2011


Author: nerville
Date: 2011-03-20 20:04:24 +0100 (Sun, 20 Mar 2011)
New Revision: 12859

Modified:
   trunk/src/www/my/index.php
Log:
reactivate submenu for layout configuration

Modified: trunk/src/www/my/index.php
===================================================================
--- trunk/src/www/my/index.php	2011-03-20 19:03:48 UTC (rev 12858)
+++ trunk/src/www/my/index.php	2011-03-20 19:04:24 UTC (rev 12859)
@@ -5,6 +5,7 @@
  * Copyright 1999-2001, VA Linux Systems, Inc.
  * Copyright 2002-2004, GForge Team
  * Copyright 2009, Roland Mas
+ * Copyright 2011, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge.
  *
@@ -31,17 +32,32 @@
 require_once $gfcommon.'tracker/ArtifactsForUser.class.php';
 require_once $gfcommon.'forum/ForumsForUser.class.php';
 require_once $gfcommon.'pm/ProjectTasksForUser.class.php';
-require_once('common/widget/WidgetLayoutManager.class.php');
+require_once $gfcommon.'widget/WidgetLayoutManager.class.php';
+
 if (!session_loggedin()) { // || $sf_user_hash) {
-
 	exit_not_logged_in();
-
 }
 
 use_javascript('/tabber/tabber.js');
+site_user_header(array('title'=>sprintf(_('Personal Page For %s'), user_getname())));
 
-site_user_header(array('title'=>sprintf(_('Personal Page For %s'),user_getname())));
+$sql = "SELECT l.*
+		FROM layouts AS l INNER JOIN owner_layouts AS o ON(l.id = o.layout_id)
+		WHERE o.owner_type = $1
+		AND o.owner_id = $2
+		AND o.is_default = 1
+		";
+$res = db_query_params($sql,array('u', user_getid()));
+$layout_id = db_result($res, 0 , 'id');
 
+echo '<ul class="widget_toolbar">';
+$url = "/widgets/widgets.php?owner=u".user_getid().
+	"&layout_id=".$layout_id;
+echo '	<li ><a href="'. $url .'">'. _("Add widgets") .'</a></li>';
+echo '	<li><a href="'. $url.'&update=layout' .'">'. _("Customize layout") .'</a></li>';
+echo '</ul>';
+
+
 $lm = new WidgetLayoutManager();
 $lm->displayLayout(user_getid(), WidgetLayoutManager::OWNER_TYPE_USER);
 




More information about the Fusionforge-commits mailing list