Skip to content

Commit d60c8bd

Browse files
committed
_populateTemplateCardMenu
1 parent f1d48fc commit d60c8bd

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

services/static-webserver/client/source/class/osparc/dashboard/AppBrowser.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,16 @@ qx.Class.define("osparc.dashboard.AppBrowser", {
165165
},
166166

167167
_populateCardMenu: function(card) {
168+
const studyData = card.getResourceData();
169+
if (studyData["resourceType"] === "template") {
170+
// The App Browser can also list templates (hypertools)
171+
this._populateTemplateCardMenu(card);
172+
} else {
173+
this._populateServiceCardMenu(card);
174+
}
175+
},
176+
177+
_populateServiceCardMenu: function(card) {
168178
const menu = card.getMenu();
169179
const appData = card.getResourceData();
170180

services/static-webserver/client/source/class/osparc/dashboard/StudyBrowser.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,16 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
15431543
},
15441544

15451545
_populateCardMenu: function(card) {
1546+
const studyData = card.getResourceData();
1547+
if (studyData["resourceType"] === "template") {
1548+
// The Study Browser can also list templates
1549+
this._populateTemplateCardMenu(card);
1550+
} else {
1551+
this.__populateStudyCardMenu(card);
1552+
}
1553+
},
1554+
1555+
__populateStudyCardMenu: function(card) {
15461556
const menu = card.getMenu();
15471557
const studyData = card.getResourceData();
15481558

0 commit comments

Comments
 (0)