Results 1 to 6 of 6

Thread: How to hide the SideCreate-View (sidecreateviewdefs)

  1. #1
    ToniFatec is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    64

    Question How to hide the SideCreate-View (sidecreateviewdefs)

    I want to hide the SideCreate-View from every module. Deleting the sidecreateviewdefs.php file generates Smarty erros, and there is no reference to it in Admin module.

    Is there a kind of view.sidecreate.php that could be added in the /module/views in order to just hide this view ? Is there any other way?

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to hide the SideCreate-View (sidecreateviewdefs)

    Hi, Toni.

    You could just comments this line

    PHP Code:
        return get_left_form_header(translate('LBL_NEW_FORM_TITLE'$module))  . $ev->display(falsetrue) . '</table>'
    in the file include/EditView/SideQuickCreate.php, line 53

    Unfortunately the sidequickcreate is managed by themes and there are no upgrade safe way to do that.

    Best regards.
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    schnagga is offline Member
    Join Date
    May 2008
    Posts
    9

    Default Re: How to hide the SideCreate-View (sidecreateviewdefs)

    another upgrade save workaround to disable the sidequickcreate bar per module basis is to add the sidecreateviewdefs.php to the custom folder:

    Code:
    custom/modules/<module>/metadata/sidecreateviewdefs.php
    and change the paths to the template files to empty custom template files:

    i.e for the opportunities module:

    Code:
    $viewdefs['Opportunities']['SideQuickCreate'] = array(
        'templateMeta' => array('form'=>array('buttons'=>array('CANCEL'),
                            'headerTpl'=>'custom/include/EditView/header.tpl',
                            'footerTpl'=>'custom/include/EditView/footer.tpl',
                            'button_location'=>'bottom',
                           ),
                  'maxColumns' => '1',
                  'panelClass'=>'none',
                  'labelsOnTop'=>true,
                  'widths' => array(
                                array('label' => '10', 'field' => '30'),
                              ),
    ),
     'panels' =>array ()
    );

  4. #4
    bhawin13 is offline Sugar Community Member
    Join Date
    Apr 2006
    Posts
    45

    Thumbs up Re: How to hide the SideCreate-View (sidecreateviewdefs)

    Hello there,

    To hide side SideCreate-View
    Create file <module>/views/view.sidequickcreate.php

    Return blank string from function display()

    Like following:
    PHP Code:
    require_once('include/MVC/View/views/view.sidequickcreate.php');

    class 
    NewModuleViewSidequickcreate extends ViewSidequickCreate {

         function 
    NewModuleViewSidequickcreate(){
             
    parent::ViewSidequickcreate();
         }
         
         function 
    display() {
            return 
    '';     
         }

    Hope it is helpful to you.

  5. #5
    jasv is offline Sugar Community Member
    Join Date
    Sep 2008
    Posts
    98

    Default Re: How to hide the SideCreate-View (sidecreateviewdefs)

    Hi,

    I just delete the sidecreateviewdefs.php file from a Module folder and that Module custom folder as well, and the side create isn't showing anymore.

    I don't know if it is a perfect solution, but it works for me....

    Cheers...

  6. #6
    Rust is offline Member
    Join Date
    Mar 2009
    Posts
    17

    Default Re: How to hide the SideCreate-View (sidecreateviewdefs)

    Quote Originally Posted by bhawin13 View Post
    Hello there,

    To hide side SideCreate-View
    Create file <module>/views/view.sidequickcreate.php

    Return blank string from function display()

    Like following:
    PHP Code:
    require_once('include/MVC/View/views/view.sidequickcreate.php');

    class 
    NewModuleViewSidequickcreate extends ViewSidequickCreate {

         function 
    NewModuleViewSidequickcreate(){
             
    parent::ViewSidequickcreate();
         }
         
         function 
    display() {
            return 
    '';     
         }

    Hope it is helpful to you.
    I cannot seem to get this to work... It just seems to ignore the changes i make in the display function. any ideas?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Hide Records in List View??
    By veon in forum Developer Help
    Replies: 2
    Last Post: 2010-01-14, 05:44 PM
  2. Selectively Hide Contact from Contact View
    By Robert685 in forum Help
    Replies: 2
    Last Post: 2008-04-10, 08:50 PM
  3. Replies: 0
    Last Post: 2007-08-09, 06:34 PM
  4. Replies: 0
    Last Post: 2006-08-01, 06:03 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
  •