link back to template if it exists on dockerHub search

pull/11/head
Squidly271 2022-02-27 15:02:54 -05:00
parent ed6f64ff70
commit e906c5dd4a
3 changed files with 4 additions and 3 deletions

View File

@ -20,4 +20,4 @@ e19c8f05c687dcf03ea0ba2ed7099a6e ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
2da35d3042b93459f171595811d534b3 ./skins/Narrow/css.php
e9244df3418ca3e7fa206d9b6e94c6b1 ./skins/Narrow/skin.html
0d179377fb4a5e8ddc940a0fd1342cb4 ./skins/Narrow/skin.php
2e236adfd396daa8668951034eb3534e ./skins/Narrow/skin.php

View File

@ -882,11 +882,12 @@ function displaySearchResults($pageNumber) {
if ( $templateSearch === false )
$templateSearch = searchArray($templates,"Repository","{$result['Repository']}.latest");
if ( $templateSearch !== false ) {
if ( $templateSearch !== false && ! $templates[$templateSearch]['Deprecated'] && ! $templates[$templateSearch]['Blacklist']) {
$result['caTemplateExists'] = true;
$result['Icon'] = $templates[$templateSearch]['Icon'];
$result['Description'] = $templates[$templateSearch]['Overview'] ?: $templates[$templateSearch]['Description'];
unset($result['IconFA']);
unset($result['actionsContext']);
$result['actionsContext'] = [["icon"=>"ca_fa-template","text"=>tr("Show Template"),"action"=>"doSearch(false,'{$templates[$templateSearch]['Repository']}');"]];
}
$ct .= displayCard($result);
$count++;