[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sitemgr inc/class.Categories_BO.inc.php modules... [s
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] sitemgr inc/class.Categories_BO.inc.php modules... [skwashd-16-compat] |
Date: |
Sun, 15 Oct 2006 11:14:12 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: sitemgr
Branch: skwashd-16-compat
Changes by: Dave Hall <skwashd> 06/10/15 11:14:12
Modified files:
inc : class.Categories_BO.inc.php
modules : class.module_index.inc.php
sitemgr-site/inc: class.sitebo.inc.php
Log message:
make index nicer
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/sitemgr/inc/class.Categories_BO.inc.php?cvsroot=phpgroupware&only_with_tag=skwashd-16-compat&r1=1.6.2.2.4.4&r2=1.6.2.2.4.5
http://cvs.savannah.gnu.org/viewcvs/sitemgr/modules/class.module_index.inc.php?cvsroot=phpgroupware&only_with_tag=skwashd-16-compat&r1=1.1.2.2&r2=1.1.2.2.4.1
http://cvs.savannah.gnu.org/viewcvs/sitemgr/sitemgr-site/inc/class.sitebo.inc.php?cvsroot=phpgroupware&only_with_tag=skwashd-16-compat&r1=1.1.2.3.4.6&r2=1.1.2.3.4.7
Patches:
Index: inc/class.Categories_BO.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Categories_BO.inc.php,v
retrieving revision 1.6.2.2.4.4
retrieving revision 1.6.2.2.4.5
diff -u -b -r1.6.2.2.4.4 -r1.6.2.2.4.5
--- inc/class.Categories_BO.inc.php 14 Aug 2006 01:51:13 -0000
1.6.2.2.4.4
+++ inc/class.Categories_BO.inc.php 15 Oct 2006 11:14:10 -0000
1.6.2.2.4.5
@@ -31,7 +31,7 @@
return $retval;
}
- function getpermittedcatsRead($cat_id=False,$recurse=true)
+ function getpermittedcatsRead($cat_id = 0 , $recurse = true)
{
if (!$cat_id)
{
@@ -69,8 +69,9 @@
{
$root_list = $this->so->getChildrenIDList($cat_id);
$permitted_list=array();
- while(list(,$root_cat) = @each($root_list))
+ foreach ( $root_list as $root_cat )
{
+ $permitted = false;
switch ($check)
{
case 'commitable':
@@ -97,7 +98,7 @@
if ($permitted)
{
- $permitted_list[]=$root_cat;
+ $permitted_list[] = $root_cat;
}
//subcategories can be readable/writeable even
when parent is not, but when parent is inactive subcats are too.
elseif ($check == 'active')
@@ -106,7 +107,7 @@
}
if ($recurse)
{
- $sub_list =
$this->getpermittedcats($root_cat,$check,true);
+ $sub_list =
$this->getpermittedcats($root_cat, $check, true);
if (count($sub_list)>0)
{
//array_push($permitted_list,
$sub_list);
@@ -353,7 +354,7 @@
{
//var_dump(debug_backtrace());
echo '<h1 style="color: #f00; font-family:
Arial, Helvetica, sans-serif;">'.lang('Attempt to access information outside
current website').'</h1>';
- echo '<pre>' . print_r($this->currentcats,
true) . '</pre>';
+ //echo '<pre>' . print_r($this->currentcats,
true) . '</pre>';
$GLOBALS['phpgw']->common->phpgw_exit(True);
}
}
Index: modules/class.module_index.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/modules/class.module_index.inc.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.2.4.1
diff -u -b -r1.1.2.2 -r1.1.2.2.4.1
--- modules/class.module_index.inc.php 30 Mar 2004 09:11:04 -0000 1.1.2.2
+++ modules/class.module_index.inc.php 15 Oct 2006 11:14:11 -0000
1.1.2.2.4.1
@@ -13,39 +13,48 @@
{
global $objbo;
$indexarray = $objbo->getIndex();
- $content = "\n".
- '<table border="0" width="100%" align="left"
cellspacing="1" cellpadding="0">
- <tr>';
+ if ( !count($indexarray) )
+ {
+ return lang('<p>You do not have access to any
content on this site.</p>');
+ }
+
+ $content = "\n<div id=\"site_index\">\n";
+
+ $catdepth = 0;
$catname = '';
- foreach($indexarray as $temppage)
+ foreach($indexarray as $page)
+ {
+ if ( $catname != $page['catname'] ) //category
name change
{
- $buffer = str_pad('',
$temppage['catdepth']*24,' ');
- if ($catname!=$temppage['catname']) //category
name change
+ $catname = $page['catname'];
+ if ( true ) //$catname != '' ) //not
the first name change
+ {
+ $content .=
"<h3>{$page['catname']}</h3>\n<p>{$page['catdescrip']}</p>\n";
+ }
+ }
+
+ while ( $page['catdepth'] != $catdepth )
{
- if ($catname!='') //not the first name
change
+ if ( $page['catdepth'] > $catdepth )
{
- $content .=
'<br><br></td></tr></table></td></tr><tr>';
+ $content .= "<ul>\n";
+ ++$catdepth;
}
- $content .= '<td>
- <table border="0" width="100%"
cellspacing="0" align="left" cellpadding="0">
- <tr><td>'.$buffer.'</td>
- <td width="100%">';
- $catname = $temppage['catname'];
- if ($temppage['catdepth'])
+ else
{
- $content .= '· ';
+ $content .= "</ul\n";
+ --$catdepth;
}
- //$content .= '<b>'.$catname.'</b>
– <i>'.
- //
$temppage['catdescrip'].'</i>'."\n";
- $content .= "<b>$catname</b>\n";
}
- $content .=
"\n".'<br> · '.$temppage['pagelink'];
+ $content .= "<li>{$page['pagelink']}</li>\n";
}
- $content .= "\n".'</td></tr></table></td></tr></table>';
- if (count($indexarray)==0)
+ while ( $catdepth <> 0 )
{
- $content=lang('You do not have access to any
content on this site.');
+ $content .= "</ul>\n";
+ --$catdepth;
}
+ $content .= "</div>\n";
+
return $content;
}
}
Index: sitemgr-site/inc/class.sitebo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/sitemgr-site/inc/class.sitebo.inc.php,v
retrieving revision 1.1.2.3.4.6
retrieving revision 1.1.2.3.4.7
diff -u -b -r1.1.2.3.4.6 -r1.1.2.3.4.7
--- sitemgr-site/inc/class.sitebo.inc.php 15 Oct 2006 05:16:34 -0000
1.1.2.3.4.6
+++ sitemgr-site/inc/class.sitebo.inc.php 15 Oct 2006 11:14:11 -0000
1.1.2.3.4.7
@@ -8,7 +8,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\*************************************************************************/
- /* $Id: class.sitebo.inc.php,v 1.1.2.3.4.6 2006/10/15 05:16:34 skwashd
Exp $ */
+ /* $Id: class.sitebo.inc.php,v 1.1.2.3.4.7 2006/10/15 11:14:11 skwashd
Exp $ */
class sitebo
{
@@ -290,7 +290,7 @@
$cats = $this->getCatLinks(0,!$rootonly);
$index = array();
- if (count($cats)>0)
+ if ( count($cats) > 0 )
{
reset($cats);
$content = "\n".'<ul>';
@@ -365,6 +365,7 @@
function getPageLinks($category_id, $showhidden=true)
{
+ $pglinks = array();
$pages=$this->pages_bo->getPageIDList($category_id);
foreach($pages as $page_id)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] sitemgr inc/class.Categories_BO.inc.php modules... [skwashd-16-compat],
Dave Hall <=