mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
Template page - make Delete Template available as long as the template is not in downloaded status.
This commit is contained in:
parent
08abc5970d
commit
5810e809da
@ -345,16 +345,26 @@ function templateJsonToDetailsTab() {
|
||||
noAvailableActions = false;
|
||||
}
|
||||
|
||||
// "Download Template", "Delete Template"
|
||||
// "Download Template"
|
||||
if (((isUser() && jsonObj.ispublic == true && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account)))
|
||||
|| (jsonObj.isready == false) || jsonObj.templatetype == "SYSTEM") {
|
||||
//do nothing
|
||||
}
|
||||
else {
|
||||
buildActionLinkForTab("Download Template", templateActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
buildActionLinkForTab("Delete Template", templateActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
buildActionLinkForTab("Download Template", templateActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
noAvailableActions = false;
|
||||
}
|
||||
|
||||
// "Delete Template"
|
||||
if (((isUser() && jsonObj.ispublic == true && !(jsonObj.domainid == g_domainid && jsonObj.account == g_account)))
|
||||
|| (jsonObj.isready == false && jsonObj.status != null && jsonObj.status.indexOf("Downloaded") != -1)
|
||||
|| jsonObj.templatetype == "SYSTEM") {
|
||||
//do nothing
|
||||
}
|
||||
else {
|
||||
buildActionLinkForTab("Delete Template", templateActionMap, $actionMenu, $midmenuItem1, $thisTab);
|
||||
noAvailableActions = false;
|
||||
}
|
||||
|
||||
// no available actions
|
||||
if(noAvailableActions == true) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user