{"action":"created","issue":{"url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/issues/2119","labels_url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/issues/2119/labels{/name}","comments_url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/issues/2119/comments","events_url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/issues/2119/events","html_url":"https://github.com/YetiForceCompany/YetiForceCRM/issues/2119","id":112354996,"number":2119,"title":"How to create custom widget in yetiforce crm 2.2.0","user":{"login":"koeaoe","id":2298044,"avatar_url":"https://avatars.githubusercontent.com/u/2298044?v=3","gravatar_id":"","url":"https://api.github.com/users/koeaoe","html_url":"https://github.com/koeaoe","followers_url":"https://api.github.com/users/koeaoe/followers","following_url":"https://api.github.com/users/koeaoe/following{/other_user}","gists_url":"https://api.github.com/users/koeaoe/gists{/gist_id}","starred_url":"https://api.github.com/users/koeaoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koeaoe/subscriptions","organizations_url":"https://api.github.com/users/koeaoe/orgs","repos_url":"https://api.github.com/users/koeaoe/repos","events_url":"https://api.github.com/users/koeaoe/events{/privacy}","received_events_url":"https://api.github.com/users/koeaoe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/labels/Label::Core","name":"Label::Core","color":"fbca04"},{"url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/labels/Priority::%232%20Normal","name":"Priority::#2 Normal","color":"ff7b7b"},{"url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/labels/Type::Question","name":"Type::Question","color":"BFFFC9"}],"state":"open","locked":false,"assignee":{"login":"TomaszQr","id":14273211,"avatar_url":"https://avatars.githubusercontent.com/u/14273211?v=3","gravatar_id":"","url":"https://api.github.com/users/TomaszQr","html_url":"https://github.com/TomaszQr","followers_url":"https://api.github.com/users/TomaszQr/followers","following_url":"https://api.github.com/users/TomaszQr/following{/other_user}","gists_url":"https://api.github.com/users/TomaszQr/gists{/gist_id}","starred_url":"https://api.github.com/users/TomaszQr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomaszQr/subscriptions","organizations_url":"https://api.github.com/users/TomaszQr/orgs","repos_url":"https://api.github.com/users/TomaszQr/repos","events_url":"https://api.github.com/users/TomaszQr/events{/privacy}","received_events_url":"https://api.github.com/users/TomaszQr/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/milestones/13","html_url":"https://github.com/YetiForceCompany/YetiForceCRM/milestones/YetiForce%202.4%20GA","labels_url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/milestones/13/labels","id":1244414,"number":13,"title":"YetiForce 2.4 GA","description":"","creator":{"login":"bpabiszczak","id":10197525,"avatar_url":"https://avatars.githubusercontent.com/u/10197525?v=3","gravatar_id":"","url":"https://api.github.com/users/bpabiszczak","html_url":"https://github.com/bpabiszczak","followers_url":"https://api.github.com/users/bpabiszczak/followers","following_url":"https://api.github.com/users/bpabiszczak/following{/other_user}","gists_url":"https://api.github.com/users/bpabiszczak/gists{/gist_id}","starred_url":"https://api.github.com/users/bpabiszczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpabiszczak/subscriptions","organizations_url":"https://api.github.com/users/bpabiszczak/orgs","repos_url":"https://api.github.com/users/bpabiszczak/repos","events_url":"https://api.github.com/users/bpabiszczak/events{/privacy}","received_events_url":"https://api.github.com/users/bpabiszczak/received_events","type":"User","site_admin":false},"open_issues":40,"closed_issues":439,"state":"open","created_at":"2015-08-06T19:28:07Z","updated_at":"2016-01-11T08:19:25Z","due_on":"2016-01-31T23:00:00Z","closed_at":null},"comments":1,"created_at":"2015-10-20T12:16:11Z","updated_at":"2016-01-11T08:37:26Z","closed_at":null,"body":"Hello, i am trying to create widget in yetifoce crm 2.2.0. I insert record to vtiger_links( with my custom linkurl), vtiger_module_dashboard and vtiger_module_dashboard_widget. Now i see link in dropdown menu \"Add widget\". After add widget to dashboard i see only  empty box. Is any way to creating the same but with default yetiforce widget ui like close button etc ? "},"comment":{"url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/issues/comments/170466765","html_url":"https://github.com/YetiForceCompany/YetiForceCRM/issues/2119#issuecomment-170466765","issue_url":"https://api.github.com/repos/YetiForceCompany/YetiForceCRM/issues/2119","id":170466765,"user":{"login":"TomaszQr","id":14273211,"avatar_url":"https://avatars.githubusercontent.com/u/14273211?v=3","gravatar_id":"","url":"https://api.github.com/users/TomaszQr","html_url":"https://github.com/TomaszQr","followers_url":"https://api.github.com/users/TomaszQr/followers","following_url":"https://api.github.com/users/TomaszQr/following{/other_user}","gists_url":"https://api.github.com/users/TomaszQr/gists{/gist_id}","starred_url":"https://api.github.com/users/TomaszQr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomaszQr/subscriptions","organizations_url":"https://api.github.com/users/TomaszQr/orgs","repos_url":"https://api.github.com/users/TomaszQr/repos","events_url":"https://api.github.com/users/TomaszQr/events{/privacy}","received_events_url":"https://api.github.com/users/TomaszQr/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T08:37:26Z","updated_at":"2016-01-11T08:37:26Z","body":"How to add a custom widget:\r\n\r\n1. Add an entry to the “vtiger_links”, where:\r\n→ linktype – \"DASHBOARDWIDGET\",\r\n→ linklabel – the name visible in the system,\r\n→ linkurl – widget's URL \r\neg. index.php? module=Accounts&view=ShowWidget&name=History\r\n→ module – name of the module\r\n→ view - always ShowWidget\r\n→ name – name of the widget (any)\r\n\r\n2. Create “widget name”.php file in  /modules/\"module name\"/dashboards/\r\n(If it doesn't exist you have to create it)\r\n\r\n3. Add class Module name_Widget name_Dashboard inheriting after Vtiger_IndexAjax_View\r\n\r\n4. Create a public function process in the class, where you'll get the data to display.\r\n\r\n5. The widget consists of two *.tpl files\r\nfor example:\r\n\r\n $content = $request->get('content');\r\n if (!empty($content)) {\r\n  $viewer->view('dashboards/TimeControlContents.tpl', $moduleName);\r\n } else {\r\n  $viewer->view('dashboards/TimeControl.tpl', $moduleName);\r\n }\r\n\r\nTimeControlContents.tpl is responsible for displaying the widget content\r\nTimeControl.tpl is responsible for displaying the widget window and its header."}}