Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Remove the edit icon in the List View

  1. #1
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Remove the edit icon in the List View

    Hi,

    For a module I want to remove the edit button icon (Pencil) that appears to the right of all records when in the list view. I only want to do this for one module - this way I restrict user to edit the module from the Subpanel of the related parent record.

    Where can I do this as it is not an option in the listviewdefs.php.

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  2. #2
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Remove the edit icon in the List View

    Hello,

    Add following line of code in function display in view.list.php of desired module,

    PHP Code:
    $this->lv->quickViewLinks false
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  3. #3
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Remove the edit icon in the List View

    I don't have a view.list.php for this custom module so this is what I created and it didn't work.

    PHP Code:
    <?php
    require_once('include/MVC/View/views/view.list.php');
    class 
    FDC_Accounts_HistoryViewList extends ViewList
    {
        function 
    FDC_Accounts_HistoryViewList()
        {
            
    $this->lv->quickViewLinks false;
            
    parent::ViewList();^
        }
    }
    ?>
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  4. #4
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Remove the edit icon in the List View

    Hello,

    Add that line in function display()
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  5. #5
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Remove the edit icon in the List View

    Hi,

    I've added the function display(){ $this->lv->quickViewLinks = false;} and I left the other function above in place with parent::Viewlist();. Should the other Function be removed? Or do I need to add something else to the function display()

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  6. #6
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Remove the edit icon in the List View

    Hi,

    Just an update but I have this working now. I was missing the
    PHP Code:
    parent::Display(); 
    in my function.

    Everything is working now - no more edit icons. Thanks

    Rgds
    Chris
    Last edited by chrislynch8; 2010-11-09 at 02:48 PM.
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  7. #7
    ivit is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    187

    Default Re: Remove the edit icon in the List View

    Quote Originally Posted by chrislynch8 View Post
    Hi,

    For a module I want to remove the edit button icon (Pencil) that appears to the right of all records when in the list view. I only want to do this for one module - this way I restrict user to edit the module from the Subpanel of the related parent record.

    Where can I do this as it is not an option in the listviewdefs.php.

    Rgds
    Chris
    The easiest way to do this is to remove editbutton from subpanel definition. You may found that code in child record subpanel definition module/metadata/subpanel/subpanelname.php

    PHP Code:
            'edit_button'=>array(
                
    'widget_class' => 'SubPanelEditButton',
                 
    'module' => $module_name,
                 
    'width' => '4%',
            ), 
    If you are using this child subpanel for other parent modules, then create copy of the subpanel definition and put the new name in layoutdefs for the parent module.

    Regards,
    Igor

  8. #8
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Remove the edit icon in the List View

    Quote Originally Posted by ivit View Post
    The easiest way to do this is to remove editbutton from subpanel definition. You may found that code in child record subpanel definition module/metadata/subpanel/subpanelname.php

    PHP Code:
            'edit_button'=>array(
                
    'widget_class' => 'SubPanelEditButton',
                 
    'module' => $module_name,
                 
    'width' => '4%',
            ), 
    If you are using this child subpanel for other parent modules, then create copy of the subpanel definition and put the new name in layoutdefs for the parent module.

    Regards,
    Igor
    This will remove the icon where the module in question is appearing as a subpanel but it will not remove the icon from the list view of the module.

    Rgds
    Chris
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

  9. #9
    ivit is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    187

    Default Re: Remove the edit icon in the List View

    Quote Originally Posted by chrislynch8 View Post
    This will remove the icon where the module in question is appearing as a subpanel but it will not remove the icon from the list view of the module.

    Rgds
    Chris
    Exactly, but that is what you asked for ;-)

    Quote Originally Posted by chrislynch8 View Post
    Hi,
    I only want to do this for one module - this way I restrict user to edit the module from the Subpanel of the related parent record.

  10. #10
    chrislynch8's Avatar
    chrislynch8 is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Cork, Ireland
    Posts
    747

    Default Re: Remove the edit icon in the List View

    Quote Originally Posted by ivit View Post
    Exactly, but that is what you asked for ;-)
    Nope


    For a module I want to remove the edit button icon (Pencil) that appears to the right of all records when in the list view. I only want to do this for one module - this way I restrict user to edit the module from the Subpanel of the related parent record.
    Now a user cannot not edit this module record from its detail view - they can only edit it in the subpanel of the parent record.
    Linkedin Profile:Chris Lynch

    FDC IT Solutions
    FDC House
    Wellington Road
    Cork
    Ireland

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Hide edit icon in list view depending on status
    By mikesolomon in forum Developer Help
    Replies: 6
    Last Post: 2011-03-31, 02:59 PM
  2. Replies: 3
    Last Post: 2011-03-07, 04:45 AM
  3. Replies: 2
    Last Post: 2010-03-12, 07:49 PM
  4. Remove edit button from List View
    By mikesolomon in forum Developer Help
    Replies: 4
    Last Post: 2009-09-16, 03:31 PM
  5. Replies: 1
    Last Post: 2007-09-27, 04:59 AM

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
  •