Results 1 to 2 of 2

Thread: listview override help

  1. #1
    marketadvantage is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Orlando, FL
    Posts
    140

    Default listview override help

    I am attempting to hide the delete button in listview for a particular module. I have a listview override file in a views folder with some code to handle shortcuts I added some lines to try and hide the delete button:
    $lv = new ListViewSmarty();
    $lv->delete = false;

    This does not seem to help. Any thoughts? Thanks in advance.


    <?php
    require_once('include/MVC/View/views/view.list.php');

    class cust1_HouseholdsViewList extends ViewList {

    function cust1_HouseholdsViewList(){

    parent::ViewList();
    }
    function displayHeader(){
    $lv = new ListViewSmarty();
    $lv->delete = false;
    if (!empty($GLOBALS['mod_strings']['LNK_NEW_RECORD'])) {
    $GLOBALS['module_menu'][] = Array("index.php?module=$this->module&action=index",
    $GLOBALS['mod_strings']['LNK_LIST'], $this->module, $this->module);
    $GLOBALS['module_menu'][]=Array("index.php?module=Reports&action=index&view =cust1_households",
    $GLOBALS['mod_strings']['LNK_HOUSEHOLD_REPORTS'],AccountReports, $this->module);
    }
    $this->includeClassicFile('themes/' . $GLOBALS['theme'] . '/header.php');
    $this->includeClassicFile('modules/Administration/DisplayWarnings.php');
    }
    }
    Keith Heald
    Market Advantage - Harte Hanks
    Sugar Pro 6.2
    Windows 2003
    MS SQL2008

  2. #2
    marketadvantage is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Orlando, FL
    Posts
    140

    Default Re: listview override help

    Problem solve thanks to a post from andopes. I simply copied the view.list.php file from the include\mvc\view\views folder into my custom\module\views folder and added the

    $lv->delete = false;

    below the

    $lv = new ListViewSmarty();

    line in the file and the delete button for that module in listview is gone

    andopes thanks for all your contributions to this forum.
    Keith Heald
    Market Advantage - Harte Hanks
    Sugar Pro 6.2
    Windows 2003
    MS SQL2008

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Same record multible times in Listview
    By jones70 in forum Help
    Replies: 5
    Last Post: 2011-01-28, 04:47 AM
  2. HOWTO: Add custom button in ListView
    By kenneth.thorman in forum Developer Help
    Replies: 10
    Last Post: 2010-12-08, 07:35 PM
  3. Replies: 2
    Last Post: 2009-09-13, 11:22 AM
  4. Create listview with stored procedure
    By ivit in forum Developer Help
    Replies: 2
    Last Post: 2008-07-31, 11:26 AM
  5. Bug - Tasks ListView
    By dtokeefe in forum Developer Help
    Replies: 0
    Last Post: 2005-09-27, 11:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •