Hi,
I don't think that you can create a custom Admin GUI view and call it from a metadata file like you do for most other views.
The reference for the view that you want to modify is hard coded in Espo's core code here: https://github.com/espocrm/espocrm/b.../index.js#L208 so you would have to modify the core script which I would not recommend because all your changes will be wiped out in the next update.
Also changing that script would only offer a user the opportunity to specify a custom parameter, but to actually apply that parameter to kanban views code would have to be developed.
What I would recommend instead, is that you develop a custom kanban view and template to render your views the way that you want and specify such view in an Entity's clientDefs metadata specs.
You can check how this is done for "Opportunity" by checking these scripts:
https://github.com/espocrm/espocrm/blob/6a7b7823093c645c3001f6e77373fbebf0830887/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Opportunity.json#L10
https://github.com/espocrm/espocrm/b.../kanban.js#L29
https://github.com/espocrm/espocrm/b.../kanban.js#L33
One last observation is that the kanban display is based on tables, not bootstrap columns but you can modify your custom template to change this of course.
Announcement
Collapse
No announcement yet.
Adding a new option to kanban view
Collapse
X
-
Adding a new option to kanban view
I'm trying to add a new admin option to kanban view items in the layout manager. Below "large font size" I want it to say "column" so that the smaller fields can be displayed in a more organised way on the same line.
I have found the following code on github at espocrm/kanban.js at 124cce55bd598362e67fa4c3d347b84b753b80dc ยท espocrm/espocrm (github.com), and I've changed it to look like this...
Code:define('custom:views/admin/layouts/kanban', 'views/admin/layouts/list', function (Dep) { return Dep.extend({ dataAttributeList: ['name', 'link', 'align', 'view', 'isLarge', 'colClass'], dataAttributesDefs: { link: {type: 'bool'}, isLarge: {type: 'bool'}, width: {type: 'float'}, align: { type: 'enum', options: ["left", "right"] }, view: { type: 'varchar', readOnly: true }, name: { type: 'varchar', readOnly: true }, colClass: { type: 'enum', options: ["col-md-12", "col-md-4", "col-md-6"] } } }); });
1 PhotoTags: None
Leave a comment: