Allow reinstalls from a search not just prev apps

pull/11/head
Squidly271 2021-10-30 23:05:47 -04:00
parent cbf1156a68
commit 4dbb738754
3 changed files with 10 additions and 7 deletions

View File

@ -22,4 +22,4 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
62fa68c6f6a42cdb79dd0d60b5f8a3f6 ./skins/Narrow/css.php
4ff34c148d3dde1a420303faecd414ae ./skins/Narrow/skin.html
109a70f36a452479a0cb4bfb905ab2dc ./skins/Narrow/skin.php
f57e302392666058ac2c81140f6f2d54 ./skins/Narrow/skin.php

View File

@ -139,10 +139,16 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
$actionsContext[] = array("icon"=>"ca_fa-delete","text"=>tr("Remove from Previous Apps"),"action"=>"removeApp('{$template['InstallPath']}','{$template['Name']}');");
} else {
if ( ! $template['BranchID'] ) {
$template['newInstallAction'] = "popupInstallXML('".addslashes($template['Path'])."','default');";
if ( is_file("{$caPaths['dockerManTemplates']}/my-{$template['Name']}.xml") ) {
$test = readXmlFile("{$caPaths['dockerManTemplates']}/my-{$template['Name']}.xml",true);
if ( $template['Repository'] == $test['Repository'] ) {
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>"<span class='ca_red'>".tr("Reinstall From Previous Apps")."</span>","action"=>"popupInstallXML('".addslashes($template['InstallPath'])."','user');");
$actionsContext[] = array("divider"=>true);
}
}
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>"Install","action"=>"popupInstallXML('".addslashes($template['Path'])."','default');");
} else {
$template['newInstallAction'] = "displayTags('{$template['ID']}');";
$actionsContext[] = array("icon"=>"ca_fa-install","text"=>"Install","action"=>"displayTags('{$template['ID']}');");
}
}
}
@ -868,9 +874,6 @@ function displayCard($template) {
else
$card .= "<div class='actionsButton actionsButtonContext' id='actions$ID' data-context='".json_encode($actionsContext,JSON_HEX_QUOT | JSON_HEX_APOS)."'>".tr("Actions")."</div>";
}
if ( $newInstallAction ) {
$card .= "<div class='actionsButton' onclick=$newInstallAction>".tr("Install")."</div>";
}
}
if ( count($supportContext) == 1)