Index: inc/class.boacl.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/inc/class.boacl.inc.php,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 class.boacl.inc.php
--- inc/class.boacl.inc.php	9 Jul 2003 05:02:55 -0000	1.1.2.3
+++ inc/class.boacl.inc.php	17 Jan 2005 12:08:19 -0000
@@ -28,7 +28,6 @@
 		function boacl($session=False)
 		{
 			$this->so = CreateObject('news_admin.soacl');
-			$this->accounts = $GLOBALS['phpgw']->accounts->get_list();
 			$this->debug = False;
 			//all this is only needed when called from uiacl. not from ui,
 			if($session)
@@ -106,6 +105,7 @@
 			$writecat = $write ? $write : array();
 
 			$this->so->remove_location('L' . $cat_id);
+			$this->accounts = $GLOBALS['phpgw']->accounts->get_list();
 			reset($this->accounts);
 			while (list($null,$account) = each($this->accounts))
 			{
Index: inc/class.bonews.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/inc/Attic/class.bonews.inc.php,v
retrieving revision 1.1.2.1.2.8
diff -u -r1.1.2.1.2.8 class.bonews.inc.php
--- inc/class.bonews.inc.php	19 Mar 2004 15:52:20 -0000	1.1.2.1.2.8
+++ inc/class.bonews.inc.php	17 Jan 2005 12:08:19 -0000
@@ -32,7 +32,7 @@
 		{
 			$this->acl = CreateObject('news_admin.boacl');
 			$this->sonews = CreateObject('news_admin.sonews');
-			$this->accounts = $GLOBALS['phpgw']->accounts->get_list();
+/*			$this->accounts = $GLOBALS['phpgw']->accounts->get_list(); */
 			$this->debug = False;
 			if($session)
 			{
Index: inc/class.sonews.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/inc/Attic/class.sonews.inc.php,v
retrieving revision 1.1.2.1.2.10
diff -u -r1.1.2.1.2.10 class.sonews.inc.php
--- inc/class.sonews.inc.php	19 Mar 2004 15:52:30 -0000	1.1.2.1.2.10
+++ inc/class.sonews.inc.php	17 Jan 2005 12:08:19 -0000
@@ -70,6 +70,7 @@
 					'teaser'	=> htmlentities($this->db->f('news_teaser', True)),
 					'content'	=> $this->db->f('news_content',True),
 					'is_html'	=> ($this->db->f('is_html') ? True : False),
+					'cat_id'	=> $this->db->f('news_cat'),
 				);
 			}
 			return $news;
Index: inc/class.uiacl.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/inc/class.uiacl.inc.php,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 class.uiacl.inc.php
--- inc/class.uiacl.inc.php	23 Jun 2003 19:20:52 -0000	1.1.2.1
+++ inc/class.uiacl.inc.php	17 Jan 2005 12:08:19 -0000
@@ -107,8 +107,8 @@
 
 		function selectlist($right)
 		{
-			reset($this->bo->accounts);
-			while (list($null,$account) = each($this->bo->accounts))
+			reset($this->accounts);
+			while (list($null,$account) = each($this->accounts))
 			{
  				$selectlist .= '<option value="' . $account['account_id'] . '"';
   				if($this->rights[$account['account_id']] & $right)
Index: inc/class.uinews.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/inc/Attic/class.uinews.inc.php,v
retrieving revision 1.10.2.6.2.10
diff -u -r1.10.2.6.2.10 class.uinews.inc.php
--- inc/class.uinews.inc.php	20 Dec 2004 13:41:52 -0000	1.10.2.6.2.10
+++ inc/class.uinews.inc.php	17 Jan 2005 12:08:19 -0000
@@ -57,6 +57,12 @@
 			$right = ($type == 'read') ? PHPGW_ACL_READ : PHPGW_ACL_ADD;
 			$selectlist = ($default === false) ? ('<option>' . lang($type . ' news') . '</option>') : '';
 			$cats = is_array($this->bo->cats) ? $this->bo->cats : array();
+			if (!$default)
+			{
+				$link_data['cat_id'] = 'all';
+				$selectlist .= '<option style="font-weight:bold" value="' . $GLOBALS['phpgw']->link('/index.php',$link_data)  
+					. '">' . lang('All news') . '</option>'  . "\n";
+			}
 			foreach($cats as $cat)
 			{
 				if($this->bo->acl->is_permitted($cat['id'],$right))
@@ -70,12 +76,6 @@
 					$selectlist .= '>' . $cat['name'] . '</option>' . "\n";
 				}
 			}
-			if (!$default)
-			{
-				$link_data['cat_id'] = 'all';
-				$selectlist .= '<option style="font-weight:bold" value="' . $GLOBALS['phpgw']->link('/index.php',$link_data)  
-					. '">' . lang('All news') . '</option>'  . "\n";
-			}
 			return $selectlist;
 		}
 
@@ -99,6 +99,9 @@
 			$GLOBALS['phpgw']->common->phpgw_header();
 			echo parse_navbar();
 			$this->template->set_block('main','category');
+			$this->template->set_block('main','category_name_tpl');
+			$this->template->set_block('main','category_icon_tpl');
+			
 			$var['lang_read'] = lang('Read');
 			$var['lang_write'] = lang('Write');
 			$var['readable'] = $this->selectlist('read');
@@ -119,7 +122,26 @@
 					'submitedby'	=> 'Submitted by ' . $GLOBALS['phpgw']->accounts->id2name($newsitem['submittedby']) . ' on ' . $GLOBALS['phpgw']->common->show_date($newsitem['date']),
 					'content'	=> ($newsitem['is_html'] ? $newsitem['content'] : nl2br($newsitem['content'])),
 				);
-
+				if ( $this->cat_id == 'all' )
+				{
+					$cat_name = $this->bo->catbo->id2name($newsitem['cat_id']);
+					$cat_img = $GLOBALS['phpgw']->common->image('news_admin','news-'.$cat_name); //without the .gif/.png image give the right one
+					if ( empty($cat_img) )
+					{
+						$val = array('category_name' => $cat_name .':&nbsp;');
+						$this->template->set_var($val);
+						$this->template->fp('category_icon','category_name_tpl',False);
+					}
+					else
+					{
+						$val = array(
+							'category_name' => $cat_name,
+							'category_img' => $cat_img
+							);
+						$this->template->set_var($val);
+						$this->template->fp('category_icon','category_icon_tpl',False);
+					}
+				}
 				$this->template->set_var($var);
 				$this->template->parse('rows','row',True);
 			}
Index: templates/default/read.tpl
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/templates/default/read.tpl,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 read.tpl
--- templates/default/read.tpl	23 Jun 2003 19:20:52 -0000	1.1.2.1
+++ templates/default/read.tpl	17 Jan 2005 12:08:19 -0000
@@ -13,7 +13,10 @@
     <td width="13" valign="top" valign="top">
      <img src="{icon}" align="top">
     </td>
-    <td align="left" width="99%">
+	<td width="5%" align="center">
+	 {category_icon}
+	</td>
+    <td align="left" width="95%">
      <b>{subject}</b>&nbsp;
     </td>
     <td align="left" width="1%" bgcolor="#FFFFFF">
@@ -21,7 +24,7 @@
     </td>
    </tr>
    <tr>
-    <td width="100%" colspan="3">
+    <td width="100%" colspan="4">
      {submitedby}
      <p>{content}</p>
      <p>&nbsp;</p>
@@ -42,3 +45,11 @@
  {maintainlink}
 </form>
 <!-- END category -->
+
+<!-- BEGIN category_icon_tpl -->
+	<img src="{category_img}" alt="{category_name}" longdesc="This news is in the category {category_name}" title="{category_name}" style="width:15px;" />
+<!-- END category_icon_tpl -->
+
+<!-- BEGIN category_name_tpl -->
+	<strong>{category_name}</strong>
+<!-- END category_name_tpl -->
