[Vtigercrm-commits] [vtiger-commits] r5341 - /vtigercrm/trunk/modules/Users/User.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 25 06:47:31 EDT 2006
Author: saraj
Date: Tue Apr 25 04:47:26 2006
New Revision: 5341
Log:
Made the User List View Proper with Proper Links including putting a check that the default admin and standarduser cannot be deleted. refs #144.
Modified:
vtigercrm/trunk/modules/Users/User.php
Modified: vtigercrm/trunk/modules/Users/User.php
==============================================================================
--- vtigercrm/trunk/modules/Users/User.php (original)
+++ vtigercrm/trunk/modules/Users/User.php Tue Apr 25 04:47:26 2006
@@ -505,8 +505,8 @@
function getUserListViewEntries($navigation_array)
{
global $theme;
- $theme_path="themes/".$theme."/";
- $image_path=$theme_path."images/";
+ $theme_path="themes/".$theme."/";
+ $image_path=$theme_path."images/";
$query = "SELECT * from users where deleted=0";
$result =$this->db->query($query);
$entries_list = array();
@@ -516,12 +516,19 @@
{
$entries=array();
$id=$this->db->query_result($result,$i-1,'id');
- $entries[]='<a href="index.php?action=EditView&return_action=ListView&return_module=Users&module=Users&parenttab=Settings&record='.$id.'"><img src="'.$image_path.'edit.gif" border="0" alt="Edit" title="Edit"/></a> <a href="#" onClick=DeleteProfile("'.$id.'");><img src="'.$image_path.'del.gif" border="0" alt="Delete" title="Delete"/></a>';
+
+ if($this->db->query_result($result,$i-1,'user_name') == 'admin' || $this->db->query_result($result,$i-1,'user_name') == 'standarduser' )
+ {
+ $entries[]='<a href="index.php?action=EditView&return_action=ListView&return_module=Users&module=Users&parenttab=Settings&record='.$id.'"><img src="'.$image_path.'edit.gif" border="0" alt="Edit" title="Edit"/></a> ';
+ }
+ else
+
+ $entries[]='<a href="index.php?action=EditView&return_action=ListView&return_module=Users&module=Users&parenttab=Settings&record='.$id.'"><img src="'.$image_path.'edit.gif" border="0" alt="Edit" title="Edit"/></a> <a href="#" onClick=DeleteProfile("'.$id.'");><img src="'.$image_path.'del.gif" border="0" alt="Delete" title="Delete"/></a>';
+
$entries[]='<a href="index.php?action=DetailView&module=Users&parenttab=Settings&record='.$id.'">'.$this->db->query_result($result,$i-1,'user_name').'</a>';
$rolecode= fetchUserRole($this->db->query_result($result,$i-1,'id'));
- $entries[]='<a href="index.php?action=RoleDetailView&module=Users&roleid='.$rolecode.'">'.$roleinfo[
-$rolecode][0];
+ $entries[]='<a href="index.php?action=RoleDetailView&module=Users&parenttab=Settings&roleid='.$rolecode.'">'.$roleinfo[$rolecode][0];
$entries[]='<a href="mailto:'.$this->db->query_result($result,$i-1,'email1').'">'.$this->db->query_result($result,$i-1,'email1').' </a>';
More information about the vtigercrm-commits
mailing list