shore_stf

Fields Dashboards in View Home

Discussion created by shore_stf on Dec 16, 2016
Latest reply on Dec 20, 2016 by shore_stf

Hi, 

 

I would like to see all the fields of dashboard in dashboard-headerpane in home page (ex: www.domaincrm.com/#Home/314601ae-662c-b4a6-80dd-584e6872a385 ).

Home Page with Dashboards

I have extended the view:

\custom\modules\Home\clients\base\views\dashboard-headerpane\dashboard-headerpane.js 

in this way:

 

({
extendsFrom: 'DashboardHeaderpaneView',
initialize: function (options) {
this._super("initialize", [options]);
},

loadData: function (options) {
this._super('loadData');
console.log('LOAD DATA DASHBOARD-HEADERPANE.JS');
//Access attributes user
var isConfigurator = App.user.attributes.isConfigurator;
userObj= {isConfigurator: isConfigurator};
//pass variable user at dashboard-headerpane.hbs
this.userObj= userObj;
}
})

The 'userObj' variable is correctly passed to the dashboard-headerpane.hbs.

 

To display the data dashboards (date_entered, date_modified,modified_user_id, created_by) in dashboards-headerpane.hbs and in dashboards-headerpane.js

 

  • how to do? 

 

I've also modified the following file:

\custom\modules\Home\clients\base\views\dashboard-headerpane\dashboard-headerpane.php

 

in this way:

 

$viewdefs["Home"]["base"]["view"]["dashboard-headerpane"] = array(
"buttons" => array(
 //etc etc etc
),
"panels" => array(
array(
"name" => "header",
"fields" => array(
array(
"type" => "dashboardtitle",
"name" => "name",
"placeholder" => "LBL_DASHBOARD_TITLE",
),
array(
"type" => "layoutbutton",
"name" => "layout",
),
array(
"type" => "text",
"name" => "date_entered",
),
)
)
)
);

But the date_entred field is visible only doing a foreach on the panels fields, 

  • You can access at date_entred  in the hbs template directly without foreach?
  • You can access at date_entred  in dashboard-headerpane.js before rendering view?

 

Thank you

 

S.

Outcomes