[Vtigercrm-commits] [vtiger-commits] r4070 - in /vtigercrm/trunk: Smarty/templates/Portal.tpl include/utils/DeleteUtils.php modules/Portal/Delete.php modules/Portal/ListView.php modules/Rss/Delete.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Mar 7 13:24:24 EST 2006
Author: saraj
Date: Tue Mar 7 11:24:14 2006
New Revision: 4070
Log:
CRUD Operation added for Portal module
Added:
vtigercrm/trunk/modules/Portal/Delete.php (with props)
vtigercrm/trunk/modules/Rss/Delete.php (with props)
Modified:
vtigercrm/trunk/Smarty/templates/Portal.tpl
vtigercrm/trunk/include/utils/DeleteUtils.php
vtigercrm/trunk/modules/Portal/ListView.php
Modified: vtigercrm/trunk/Smarty/templates/Portal.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Portal.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Portal.tpl Tue Mar 7 11:24:14 2006
@@ -21,9 +21,9 @@
<ul id="tablist" style="margin-left: 40px;">
{section name=portalinfo loop=$PORTALS}
{if $smarty.section.portalinfo.iteration eq '1'}
- <li><a class="current" href="{$PORTALS[portalinfo].portalurl}" onClick="return handlelink(this)">{$PORTALS[portalinfo].portalname}</a></li>
+ <li><a class="current" href="{$PORTALS[portalinfo].portalurl}" onClick="return handlelink(this)">{$PORTALS[portalinfo].portalname}</a><a href="index.php?module=Portal&action=Delete&return_module=Portal&return_action=index&record={$PORTALS[portalinfo].portalid}"><img src='{$IMAGEPATH}/del.gif' border=0 align=absmiddle></a></li>
{else}
- <li><a href="{$PORTALS[portalinfo].portalurl}" onClick="return handlelink(this)">{$PORTALS[portalinfo].portalname}</a></li>
+ <li><a href="{$PORTALS[portalinfo].portalurl}" onClick="return handlelink(this)">{$PORTALS[portalinfo].portalname}</a><a href="index.php?module=Portal&action=Delete&return_module=Portal&return_action=index&record={$PORTALS[portalinfo].portalid}"><img src='{$IMAGEPATH}/del.gif' border=0 align=absmiddle></a></li>
{/if}
{/section}
</ul>
Modified: vtigercrm/trunk/include/utils/DeleteUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/DeleteUtils.php (original)
+++ vtigercrm/trunk/include/utils/DeleteUtils.php Tue Mar 7 11:24:14 2006
@@ -288,13 +288,17 @@
$del_query = "delete from rss where rssid=".$record;
$adb->query($del_query);
break;
+ case Portal:
+ $del_query = "delete from portal where portalid=".$record;
+ $adb->query($del_query);
+ break;
endswitch;
global $current_user;
require_once('include/freetag/freetag.class.php');
$freetag=new freetag();
$freetag->delete_all_object_tags_for_user($current_user->id,$record);
- if($return_module == $module && $return_module !='Rss')
+ if($return_module == $module && $return_module !='Rss' && $return_module !='Portal')
{
$focus->mark_deleted($record);
}
Modified: vtigercrm/trunk/modules/Portal/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Portal/ListView.php (original)
+++ vtigercrm/trunk/modules/Portal/ListView.php Tue Mar 7 11:24:14 2006
@@ -28,6 +28,7 @@
{
$portalname = $adb->query_result($result,$i,'portalname');
$portalurl = $adb->query_result($result,$i,'portalurl');
+ $portal_array['portalid'] = $adb->query_result($result,$i,'portalid');
$portal_array['portalname'] = $portalname;
$portal_array['portalurl'] = $portalurl;
$portal_info[]=$portal_array;
More information about the vtigercrm-commits
mailing list