[Vtigercrm-commits] [vtiger-commits] r6094 - in /vtigercrm/trunk: Smarty/templates/UserListView.tpl Smarty/templates/UserListViewContents.tpl modules/Users/ListView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 17 01:51:15 EDT 2006
Author: don
Date: Tue May 16 23:51:09 2006
New Revision: 6094
Log:
navigation in users listView has been ajaxified
Added:
vtigercrm/trunk/Smarty/templates/UserListViewContents.tpl
Modified:
vtigercrm/trunk/Smarty/templates/UserListView.tpl
vtigercrm/trunk/modules/Users/ListView.php
Modified: vtigercrm/trunk/Smarty/templates/UserListView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/UserListView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/UserListView.tpl Tue May 16 23:51:09 2006
@@ -31,7 +31,7 @@
</td>
</tr>
<tr>
- <td style="padding:5px;border-right:1px dashed #CCCCCC;">
+ <td style="padding:5px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="2" align="left"><img src="{$IMAGE_PATH}user.gif" align="absmiddle"> <span class="genHeaderGray">{$MOD.LBL_USER_MANAGEMENT}</span></td>
@@ -40,49 +40,16 @@
</td>
</tr>
<tr><td colspan="3" style="border-bottom:1px dashed #CCCCCC;"> </td></tr>
- <tr>
- <td align="left" style="padding:5px;">{$RECORD_COUNTS}</td>
- <td> </td>
- {$NAVIGATION}
- </tr>
</table>
</td>
- <td width="25%" rowspan="2" class="padTab" align="center">
- <div id="chPhoto" style="display:block;width:80%;">
- <table width="100%" cellspacing="0" cellpadding="5" class="small">
- <tr><td align="left" colspan="2" style="border-bottom:1px dotted #CCCCCC;">
- <b>{$CMOD.LBL_STATISTICS}</b></td></tr>
- <tr><td align="right"><b>{$CMOD.LBL_TOTAL}</b></td>
- <td align="left">{$USER_COUNT.user} {$CMOD.LBL_USERS}</td>
- </tr>
- <tr><td align="right"><b>{$CMOD.LBL_ADMIN} {$CMOD.LBL_COLON}</b></td>
- <td align="left">{$USER_COUNT.admin} {$CMOD.LBL_USERS}</td>
- </tr>
- <tr><td align="right"><b>{$CMOD.LBL_OTHERS}</b></td>
- <td align="left">{$USER_COUNT.nonadmin} {$CMOD.LBL_USERS}</td>
- </tr>
- </table>
- </div></td>
+ <td> </td>
</tr>
- <tr>
- <td width="75%" style="border-right:1px dashed #CCCCCC;padding:5px;">
- <table width="100%" border="0" cellpadding="5" cellspacing="1" class="small" style="background-color: rgb(204, 204, 204);">
- <tbody>
- <tr>
- {foreach item=header from=$LIST_HEADER}
- <td class="lvtCol">{$header}</td>
- {/foreach}
- </tr>
- {section name=entries loop=$LIST_ENTRIES}
- <tr class="lvtColData" onmouseover="this.className='lvtColDataHover'" onmouseout="this.className='lvtColData'" bgcolor="white">
- {foreach item=listvalues from=$LIST_ENTRIES[entries]}
- <td >{$listvalues}</td>
- {/foreach}
- </tr>
- {/section}
- </tbody>
- </table>
- </td>
+ <tr><td colspan=2>
+ <div id="ListViewContents">
+ {include file="UserListViewContents.tpl"}
+ </div>
+
+ </td>
</tr>
</table>
</form>
@@ -95,21 +62,23 @@
</table>
<div id="tempdiv" style="display:block;position:absolute;left:350px;top:200px;"></div>
<div id="status" style="display:none;position:absolute;background-color:#bbbbbb;vertical-align:center;left:887px;top:0px;height:17px;">Processing Request...</div>
+{literal}
<script>
+function getListViewEntries_js(module,url)
+{
+ show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var urlstring ="module=Users&action=UsersAjax&file=ListView&ajax=true&"+url;
+ ajaxObj.process("index.php?",urlstring);
+
+}
function ajaxSaveResponse(response)
-{ldelim}
+{
hide("status");
- document.getElementById("tempdiv").innerHTML=response.responseText;
-{rdelim}
-
-function DeleteProfile(userid)
-{ldelim}
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring = "module=Users&action=UsersAjax&file=UserDeleteStep1&record="+userid;
- ajaxObj.process("index.php?",urlstring);
-{rdelim}
+ document.getElementById("ListViewContents").innerHTML= response.responseText;
+}
</script>
+{/literal}
{include file='SettingsSubMenu.tpl'}
Modified: vtigercrm/trunk/modules/Users/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Users/ListView.php (original)
+++ vtigercrm/trunk/modules/Users/ListView.php Tue May 16 23:51:09 2006
@@ -1,5 +1,20 @@
-<?
+<?php
+/*********************************************************************************
+ * The contents of this file are subject to the SugarCRM Public License Version 1.1.2
+ * ("License"); You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
+ * the specific language governing rights and limitations under the License.
+ * The Original Code is: SugarCRM Open Source
+ * The Initial Developer of the Original Code is SugarCRM, Inc.
+ * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
+ * All Rights Reserved.
+ * Contributor(s): ______________________________________.
+ ********************************************************************************/
+
require_once('include/utils/utils.php');
+require_once('Smarty_setup.php');
global $app_strings;
global $list_max_entries_per_page;
@@ -43,5 +58,10 @@
$smarty->assign("RECORD_COUNTS", $record_string);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("USER_IMAGES",getUserImageNames());
-$smarty->display("UserListView.tpl");
+if($_REQUEST['ajax'] != '')
+ $smarty->display("UserListViewContents.tpl");
+else
+ $smarty->display("UserListView.tpl");
+
+
?>
More information about the vtigercrm-commits
mailing list