[Vtigercrm-developers] DETAILVIEWWIDGET

Sreenivas Kanumuru svk at vtiger.com
Mon Oct 20 13:26:37 GMT 2014


We plan to allow users to add related tab data as summary widgets (like
Activities, Updates widgets that are present now). We  hope to have it in
time for 6.2 release.

On Mon, Oct 20, 2014 at 5:34 PM, IT-Solutions4You <info at its4you.sk> wrote:

> DETAILVIEWWIDGET like in 5.x version is planned for 6.2, or this will be
> never more supported ?
>
> Dňa 15. 10. 2014 11:49 Prasad  wrote / napísal(a):
>
>> Workaround:
>> Create summarized version - add as sidebar widget. Provide option
>> to open the advanced version of the widget in the modal / popup.
>>
>> Regards,
>> Prasad
>>
>> *Connect with us on: *Twitter <http://twitter.com/vtigercrm> *I*
>> Facebook <http://www.facebook.com/pages/vtiger/226866697333578?sk=wall>
>> *I* Blog <https://blogs.vtiger.com/>* I* Wiki
>> <http://wiki.vtiger.com/vtiger6/index.php/Main_Page> *I* Website
>> <https://www.vtiger.com/>
>>
>> On Wed, Oct 15, 2014 at 1:49 PM, IT-Solutions4You <info at its4you.sk
>> <mailto:info at its4you.sk>> wrote:
>>
>>     Yes, I know this, but I need to show more informations and this was
>>     very nice possible in 5.x version with DETAILVIEWWIDGET.
>>
>>     Matus
>>
>>     Dňa 14. 10. 2014 15:30 Prasad  wrote / napísal(a):
>>
>>         Please use DETAILVIEWSIDEBARWIDGET instead - refer Google Maps
>>         on Contacts.
>>
>>         *Connect with us on: *Twitter <http://twitter.com/vtigercrm> *I*
>>         Facebook
>>         <http://www.facebook.com/__pages/vtiger/226866697333578?__sk=wall
>> <http://www.facebook.com/pages/vtiger/226866697333578?sk=wall>>
>>         *I* Blog <https://blogs.vtiger.com/>* I* Wiki
>>         <http://wiki.vtiger.com/__vtiger6/index.php/Main_Page
>>         <http://wiki.vtiger.com/vtiger6/index.php/Main_Page>> *I* Website
>>         <https://www.vtiger.com/>
>>
>>         On Tue, Oct 14, 2014 at 6:29 PM, Sreenivas Kanumuru
>>         <svk at vtiger.com <mailto:svk at vtiger.com>
>>         <mailto:svk at vtiger.com <mailto:svk at vtiger.com>>> wrote:
>>
>>              Sorry, it is not currently possible to customize summary
>>         widgets in
>>              Vtiger CRM. We will review this further and update this
>> thread.
>>
>>
>>              On Tue, Oct 14, 2014 at 1:40 PM, IT-Solutions4You
>>         <info at its4you.sk <mailto:info at its4you.sk>
>>              <mailto:info at its4you.sk <mailto:info at its4you.sk>>> wrote:
>>
>>                  I'm talking about vtiger CRM.
>>
>>
>>
>>                  Dňa 13. 10. 2014 17:36 Pabiszczak, Błażej  wrote /
>>         napísal(a):
>>
>>                      Do you see "*_/Widgets/_*" module in settings in
>>         our Yetiforce?
>>         https://test.yetiforce.com/____index.php?module=Widgets&____
>> parent=Settings&view=Index&____block=2&fieldid=58
>>         <https://test.yetiforce.com/__index.php?module=Widgets&__
>> parent=Settings&view=Index&__block=2&fieldid=58>
>>
>>         <https://test.yetiforce.com/__index.php?module=Widgets&__
>> parent=Settings&view=Index&__block=2&fieldid=58
>>         <https://test.yetiforce.com/index.php?module=Widgets&
>> parent=Settings&view=Index&block=2&fieldid=58>>
>>
>>
>>                      Z poważaniem / Regards
>>                      Błażej Pabiszczak
>>                      M: +48.884999123 <tel:%2B48.884999123>
>>                      E: b.pabiszczak at opensaas.pl
>>         <mailto:b.pabiszczak at opensaas.pl>
>>         <mailto:b.pabiszczak at opensaas.__pl
>>         <mailto:b.pabiszczak at opensaas.pl>>
>>                      <mailto:b.pabiszczak at opensaas.
>>         <mailto:b.pabiszczak at opensaas.>____pl
>>                      <mailto:b.pabiszczak at opensaas.__pl
>>         <mailto:b.pabiszczak at opensaas.pl>>>
>>
>>                      2014-10-13 15:31 GMT+02:00 IT-Solutions4You
>>                      <info at its4you.sk <mailto:info at its4you.sk>
>>         <mailto:info at its4you.sk <mailto:info at its4you.sk>>
>>                      <mailto:info at its4you.sk <mailto:info at its4you.sk>
>>         <mailto:info at its4you.sk <mailto:info at its4you.sk>>>>:
>>
>>                           And what's now? How can we (community) help
>>         vtiger to
>>                      implement this:
>>
>>         https://discussions.vtiger.______com/index.php?p=/
>> discussion/______171186/detail-view-widgets-______implementation/p1
>>
>>
>>         <https://discussions.vtiger.____com/index.php?p=/discussion/
>> ____171186/detail-view-widgets-____implementation/p1
>>
>>         <https://discussions.vtiger.__com/index.php?p=/discussion/__
>> 171186/detail-view-widgets-__implementation/p1
>>         <https://discussions.vtiger.com/index.php?p=/discussion/
>> 171186/detail-view-widgets-implementation/p1>>>
>>
>>                           Matus.
>>
>>                           Dňa 13. 10. 2014 13:04 Alan Lord  wrote /
>>         napísal(a):
>>
>>                               Ah,
>>
>>                               I think you might be right about
>>         vtiger_links &
>>                      DETALVIEWWIDGETS...
>>
>>                               I've started looking at creating a module
>>         which
>>                      allows the user
>>                               to add a
>>                               custom widget to other modules via my
>>         extension
>>                      module...
>>
>>                               But looking at the code in the standard
>>         models in
>>
>>
>>         /modules/Vtiger/models/{______Detail.php,DetailView.php} it
>>
>>
>>                      looks like
>>                               getDetailViewLinks() and getWidgets() will
>>         only
>>                      *ever* return
>>                               specific
>>                               widgets and will override information in the
>>                      vtiger_links table
>>                               such as
>>                               linkurl for example.
>>
>>                               Is this really the case or am I missing
>>         something?
>>                      Is there no
>>                               way for
>>                               me to add a new entry in the vtiger_links
>>         table
>>                      such that, for
>>                               example,
>>                               I could add a new "Libertus" widget that
>> gets
>>                      displayed on the
>>                               Contacts
>>                               module Summary page or DetailView page?
>>
>>                                        /**
>>                                         * Function to get the detail
>>         view links
>>                      (links and
>>                                   widgets)
>>                                         * @param <array> $linkParams -
>>         parameters
>>                      which will
>>                                   be used to
>>                                   calicaulate the params
>>                                         * @return <array> - array of
>>         link models
>>                      in the format
>>                                   as below
>>                                         *
>>                        array('linktype'=>list of link
>>                                   models);
>>                                         */
>>                                        public function
>>                      getDetailViewLinks($______linkParams) {
>>                                            $linkTypes =
>>                      array('DETAILVIEWBASIC','______DETAILVIEW');
>>                                            $moduleModel =
>>         $this->getModule();
>>                                            $recordModel =
>>         $this->getRecord();
>>
>>                                            $moduleName =
>>         $moduleModel->getName();
>>                                            $recordId =
>>         $recordModel->getId();
>>
>>                                            $detailViewLink = array();
>>
>>
>>
>>         if(Users_Privileges_Model::______isPermitted($moduleName,
>>                                   'EditView', $recordId)) {
>>                                                $detailViewLinks[] = array(
>>                                                        'linktype' =>
>>                      'DETAILVIEWBASIC',
>>                                                        'linklabel' =>
>>         'LBL_EDIT',
>>                                                        'linkurl' =>
>>                                   $recordModel->getEditViewUrl()______,
>>                                                        'linkicon' => ''
>>                                                );
>>
>>                                                foreach ($detailViewLinks
>> as
>>                      $detailViewLink) {
>>
>>                        $linkModelList['______DETAILVIEWBASIC'][] =
>>
>>
>>         Vtiger_Link_Model::______getInstanceFromValues($______
>> detailViewLink);
>>                                                }
>>                                            }
>>
>>                                            $linkModelListDetails =
>>
>>
>>         Vtiger_Link_Model::______getAllByType($moduleModel->___
>> ___getId(),$linkTypes,$______linkParams);
>>
>>                                            //Mark all detail view basic
>>         links as
>>                      detail view
>>                                   links.
>>                                            //Since ui will be look ugly
>>         if you
>>                      need many basic
>>                                   links
>>                                            $detailViewBasiclinks =
>>
>>           $linkModelListDetails['______DETAILVIEWBASIC'];
>>
>>
>>         unset($linkModelListDetails['______DETAILVIEWBASIC']);
>>
>>
>>
>>
>>         if(Users_Privileges_Model::______isPermitted($moduleName,
>>                      'Delete',
>>                                   $recordId)) {
>>                                                $deletelinkModel = array(
>>                                                        'linktype' =>
>>         'DETAILVIEW',
>>                                                        'linklabel' =>
>>         sprintf("%s
>>                      %s",
>>
>>           getTranslatedString('LBL_______DELETE', $moduleName),
>>                                   vtranslate('SINGLE_'.
>>                                   $moduleName, $moduleName)),
>>                                                        'linkurl' =>
>>
>>
>>         'javascript:Vtiger_Detail_Js.______deleteRecord("'.$__
>> recordModel-__>__getDeleteUrl(__).'")',
>>
>>                                                        'linkicon' => ''
>>                                                );
>>
>>         $linkModelList['DETAILVIEW'][] =
>>
>>
>>         Vtiger_Link_Model::______getInstanceFromValues($______
>> deletelinkModel);
>>                                            }
>>
>>
>>
>>         if(Users_Privileges_Model::______isPermitted($moduleName,
>>                                   'EditView', $recordId)) {
>>                                                $duplicateLinkModel =
>> array(
>>                                                            'linktype' =>
>>                      'DETAILVIEWBASIC',
>>                                                            'linklabel' =>
>>                      'LBL_DUPLICATE',
>>                                                            'linkurl' =>
>>
>>           $recordModel->______getDuplicateRecordUrl(),
>>                                                            'linkicon' =>
>> ''
>>                                                    );
>>
>>         $linkModelList['DETAILVIEW'][] =
>>
>>
>>         Vtiger_Link_Model::______getInstanceFromValues($______
>> duplicateLinkModel);
>>                                            }
>>
>>
>>         if(!empty($______detailViewBasiclinks)) {
>>
>>         foreach($detailViewBasiclinks as
>>                      $linkModel) {
>>                                                    // Remove view
>>         history, needed
>>                      in vtiger5
>>                                   to see
>>                                   history but not in vtiger6
>>
>>         if($linkModel->linklabel ==
>>                      'View History') {
>>                                                        continue;
>>                                                    }
>>
>>         $linkModelList['DETAILVIEW'][]
>>                      = $linkModel;
>>                                                }
>>                                            }
>>
>>                                            $relatedLinks =
>>                      $this->______getDetailViewRelatedLinks();
>>
>>                                            foreach($relatedLinks as
>>                      $relatedLinkEntry) {
>>                                                $relatedLink =
>>
>>
>>         Vtiger_Link_Model::______getInstanceFromValues($______
>> relatedLinkEntry);
>>
>>                        $linkModelList[$relatedLink->______getType()][] =
>>                                   $relatedLink;
>>                                            }
>>
>>                                            $widgets = $this->getWidgets();
>>                                            foreach($widgets as
>>         $widgetLinkModel) {
>>
>>                        $linkModelList['______DETAILVIEWWIDGET'][] =
>>                                   $widgetLinkModel;
>>                                            }
>>
>>                                            $currentUserModel =
>>
>>           Users_Record_Model::______getCurrentUserModel();
>>
>>         if($currentUserModel->______isAdminUser()) {
>>                                                $settingsLinks =
>>                      $moduleModel->getSettingLinks(______);
>>                                                foreach($settingsLinks as
>>                      $settingsLink) {
>>
>>                        $linkModelList['______DETAILVIEWSETTING'][] =
>>
>>
>>         Vtiger_Link_Model::______getInstanceFromValues($______
>> settingsLink);
>>                                                }
>>                                            }
>>
>>                                            return $linkModelList;
>>                                        }
>>
>>
>>
>>
>>                                        /**
>>                                         * Function to get the detail
>>         view widgets
>>                                         * @return <Array> - List of
>>         widgets ,
>>                      where each
>>                                   widget is an
>>                                   Vtiger_Link_Model
>>                                         */
>>                                        public function getWidgets() {
>>                                            $moduleModel =
>>         $this->getModule();
>>                                            $widgets = array();
>>
>>                                            $modCommentsModel =
>>
>>                      Vtiger_Module_Model::______
>> getInstance('ModComments');
>>
>>         if($moduleModel->______isCommentEnabled() &&
>>
>>           $modCommentsModel->______isPermitted('DetailView')) {
>>                                                $widgets[] = array(
>>                                                        'linktype' =>
>>                      'DETAILVIEWWIDGET',
>>                                                        'linklabel' =>
>>         'ModComments',
>>                                                        'linkurl' =>
>>
>>
>>         'module='.$this->______getModuleName().'&view=Detail&
>> ______record='.$this->getRecord(__)-__>__getId().
>>
>>
>>
>>           '&mode=showRecentComments&______page=1&limit=5'
>>                                                );
>>                                            }
>>
>>
>>                        if($moduleModel->______isTrackingEnabled()) {
>>                                                $widgets[] = array(
>>                                                        'linktype' =>
>>                      'DETAILVIEWWIDGET',
>>                                                        'linklabel' =>
>>         'LBL_UPDATES',
>>                                                        'linkurl' =>
>>
>>
>>         'module='.$this->______getModuleName().'&view=Detail&
>> ______record='.$this->getRecord(__)-__>__getId().
>>
>>
>>
>>           '&mode=showRecentActivities&______page=1&limit=5',
>>                                                );
>>                                            }
>>
>>                                            $widgetLinks = array();
>>                                            foreach ($widgets as
>>         $widgetDetails) {
>>                                                $widgetLinks[] =
>>
>>
>>         Vtiger_Link_Model::______getInstanceFromValues($______
>> widgetDetails);
>>                                            }
>>                                            return $widgetLinks;
>>                                        }
>>
>>
>>                               Al
>>
>>
>>
>>           _____________________________________________________
>>         http://www.vtiger.com/
>>
>>
>>
>>
>>           _____________________________________________________
>>         http://www.vtiger.com/
>>
>>
>>
>>
>>                      ___________________________________________________
>>         http://www.vtiger.com/
>>
>>
>>
>>                  ___________________________________________________
>>         http://www.vtiger.com/
>>
>>
>>
>>              _________________________________________________
>>         http://www.vtiger.com/
>>
>>
>>
>>
>>         _________________________________________________
>>         http://www.vtiger.com/
>>
>>
>>
>>     _________________________________________________
>>     http://www.vtiger.com/
>>
>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>>
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141020/f490336f/attachment-0001.html>


More information about the vtigercrm-developers mailing list