}
/* Search for Packages */
+.packageSearchResultRow {
+ .columnText {
+ padding: 15px 10px;
+ }
+
+ td.columnIcon {
+ position: relative;
+ width: 44px;
+
+ a {
+ align-items: center;
+ bottom: 5px;
+ display: flex;
+ justify-content: center;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 5px;
+ }
+ }
+}
+
.packageSearchName {
@include wcfFontHeadline;
@include wcfFontBold;
.packageSearchVersion {
color: $wcfContentDimmedText;
font-weight: 400;
- padding-left: 5px;
+}
+
+.packageSearchDescription {
+ margin-top: 3px;
}
.packageSearchPackage {
color: $wcfContentDimmedText;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
- font-weight: 400;
-
- @include wcfFontSmall;
+}
+
+.packageSearchAuthor,
+.packageSearchLicense {
+ white-space: nowrap;
+}
+
+.packageSearchAuthorWoltlab::before {
+ background-image: url(../images/woltlabLogo-tiny.png);
+ background-size: contain;
+ content: "";
+ display: inline-block;
+ height: 12px;
+ margin-right: 2px;
+ position: relative;
+ top: 1px;
+ width: 22px;
}
#packageSearchResultContainer {
</thead>
<tbody>
- <tr>
- <td colspan="5"><small>{lang count=$trustedSources|count}wcf.acp.package.search.result.trusted{/lang}</small></td>
- </tr>
- {foreach from=$trustedSources item=$package}
- <tr class="jsPackageRow">
- <td class="columnIcon">
- <a href="#" class="jsInstallPackage" data-confirm-message="{lang __encode=true}wcf.acp.package.install.confirmMessage{/lang}" data-package="{$package->package}" data-package-version="{$package->getAccessibleVersion()->packageVersion}"><span class="icon icon16 fa-plus jsTooltip" title="{lang}wcf.acp.package.button.installPackage{/lang}"></span></a>
- </td>
- <td class="columnTitle" title="{$package->packageDescription}">
- <div class="packageSearchName">{$package->packageName} <span class="packageSearchVersion">{$package->getAccessibleVersion()->packageVersion}</span></div>
- <span class="packageSearchPackage">{$package->package}</span>
- </td>
- <td class="columnText">{if $package->authorURL}<a href="{$package->authorURL}" class="externalURL">{$package->author}</a>{else}{$package->author}{/if}</td>
- <td class="columnText">{if $package->getAccessibleVersion()->licenseURL}<a href="{$package->getAccessibleVersion()->licenseURL}" class="externalURL">{$package->getAccessibleVersion()->license}</a>{else}{$package->getAccessibleVersion()->license}{/if}</td>
- <td class="columnDate">{@$package->getAccessibleVersion()->packageDate|time}</td>
+ {if $officialPackages|count}
+ <tr>
+ <td colspan="5"><small>{lang count=$officialPackages|count}wcf.acp.package.search.result.official{/lang}</small></td>
+ </tr>
+ {include file='packageSearchResultListItems' packages=$officialPackages}
+ {/if}
+ {if $trustedSources|count}
+ <tr>
+ <td colspan="5"><small>{lang count=$trustedSources|count}wcf.acp.package.search.result.trusted{/lang}</small></td>
</tr>
- {/foreach}
- {hascontent}
+ {include file='packageSearchResultListItems' packages=$trustedSources}
+ {/if}
+ {if $thirdPartySources|count}
<tr>
- <td colspan="5"><small>{lang count=$thirdPartySources|count}wcf.acp.package.search.result.thirdParty{/lang}</small></td>
+ <td colspan="5"><small>{lang count=$thirdPartySources|count}wcf.acp.package.search.result.trusted{/lang}</small></td>
</tr>
- {content}
- {foreach from=$thirdPartySources item=$package}
- <tr class="jsPackageRow">
- <td class="columnIcon">
- <a href="#" class="jsInstallPackage" data-confirm-message="{lang __encode=true}wcf.acp.package.install.confirmMessage{/lang}" data-package="{$package->package}" data-package-version="{$package->getAccessibleVersion()->packageVersion}"><span class="icon icon16 fa-plus jsTooltip" title="{lang}wcf.acp.package.button.installPackage{/lang}"></span></a>
- </td>
- <td class="columnTitle" title="{$package->packageDescription}">
- <div class="packageSearchName">{$package->packageName} <span class="packageSearchVersion">{$package->getAccessibleVersion()->packageVersion}</span></div>
- <span class="packageSearchPackage">{$package->package}</span>
- </td>
- <td class="columnText">{if $package->authorURL}<a href="{$package->authorURL}" class="externalURL">{$package->author}</a>{else}{$package->author}{/if}</td>
- <td class="columnText">{if $package->getAccessibleVersion()->licenseURL}<a href="{$package->getAccessibleVersion()->licenseURL}" class="externalURL">{$package->getAccessibleVersion()->license}</a>{else}{$package->getAccessibleVersion()->license}{/if}</td>
- <td class="columnDate">{@$package->getAccessibleVersion()->packageDate|time}</td>
- </tr>
- {/foreach}
- {/content}
- {/hascontent}
+ {include file='packageSearchResultListItems' packages=$thirdPartySources}
+ {/if}
</tbody>
</table>
--- /dev/null
+{foreach from=$packages item=$package}
+ <tr class="jsPackageRow packageSearchResultRow">
+ <td class="columnIcon">
+ <a href="#" class="jsInstallPackage jsTooltip" data-confirm-message="{lang __encode=true}wcf.acp.package.install.confirmMessage{/lang}" data-package="{$package->package}" data-package-version="{$package->getAccessibleVersion()->packageVersion}" title="{lang}wcf.acp.package.button.installPackage{/lang}"><span class="icon icon24 fa-plus"></span></a>
+ </td>
+ <td class="columnText">
+ <div class="packageSearchName">{$package->packageName} <span class="packageSearchVersion">{$package->getAccessibleVersion()->packageVersion}</span></div>
+ <div class="packageSearchDescription small">{$package->packageDescription}</div>
+ <span class="packageSearchPackage small">{$package->package}</span>
+ {if $package->pluginStoreFileID}
+ <span class="packageSearchPluginStorePage separatorLeft small"><a href="https://pluginstore.woltlab.com/file/{@$package->pluginStoreFileID}/" class="externalURL jsTooltip" title="{lang}wcf.acp.pluginStore.file.link{/lang}">{lang}wcf.acp.pluginStore.file{/lang}</a></span>
+ {/if}
+ </td>
+ <td class="columnText small packageSearchAuthor{if $package->getUpdateServer()->isWoltLabUpdateServer()} packageSearchAuthorWoltlab{/if}" title="{$package->author}">{if $package->authorURL}<a href="{$package->authorURL}" class="externalURL">{$package->author|truncate:30}</a>{else}{$package->author|truncate:30}{/if}</td>
+ <td class="columnText small packageSearchLicense" title="{$package->getAccessibleVersion()->license}">{if $package->getAccessibleVersion()->licenseURL}<a href="{$package->getAccessibleVersion()->licenseURL}" class="externalURL">{$package->getAccessibleVersion()->license|truncate:30}</a>{else}{$package->getAccessibleVersion()->license|truncate:30}{/if}</td>
+ <td class="columnDate packageSearchDate">{@$package->getAccessibleVersion()->packageDate|time}</td>
+ </tr>
+{/foreach}
// there are no available package update servers
if (empty($availableUpdateServers)) {
WCF::getTPL()->assign([
+ 'officialPackages' => [],
'thirdPartySources' => [],
'trustedSources' => [],
]);
// no matches found
if (empty($packageUpdateIDs)) {
WCF::getTPL()->assign([
+ 'officialPackages' => [],
'thirdPartySources' => [],
'trustedSources' => [],
]);
// no matches found
if (empty($packageUpdates)) {
WCF::getTPL()->assign([
+ 'officialPackages' => [],
'thirdPartySources' => [],
'trustedSources' => [],
]);
// assign versions
/**
+ * @var ViewablePackageUpdate[] $officialPackages
* @var ViewablePackageUpdate[] $thirdPartySources
* @var ViewablePackageUpdate[] $trustedSources
*/
- $thirdPartySources = $trustedSources = [];
+ $officialPackages = $thirdPartySources = $trustedSources = [];
/**
* @var int $packageUpdateID
* @var ViewablePackageUpdate $packageUpdate
$packageUpdate->setLatestVersion($updateVersions[$versionIDs['existing']]);
$packageUpdate->setUpdateServer($updateServers[$packageUpdate->packageUpdateServerID]);
- if ($packageUpdate->getUpdateServer()->isTrustedServer() || $packageUpdate->getUpdateServer()->isWoltLabStoreServer()) {
+ if ($packageUpdate->getUpdateServer()->isWoltLabUpdateServer()) {
+ $officialPackages[] = $packageUpdate;
+ }
+ else if ($packageUpdate->getUpdateServer()->isTrustedServer() || $packageUpdate->getUpdateServer()->isWoltLabStoreServer()) {
$trustedSources[] = $packageUpdate;
}
else {
}
}
+ uasort($officialPackages, function(ViewablePackageUpdate $a, ViewablePackageUpdate $b) {
+ return strnatcasecmp($a->getName(), $b->getName());
+ });
uasort($thirdPartySources, function(ViewablePackageUpdate $a, ViewablePackageUpdate $b) {
return strnatcasecmp($a->getName(), $b->getName());
});
});
WCF::getTPL()->assign([
+ 'officialPackages' => $officialPackages,
'thirdPartySources' => $thirdPartySources,
'trustedSources' => $trustedSources,
]);
return [
- 'count' => count($thirdPartySources) + count($trustedSources),
+ 'count' => count($officialPackages) + count($thirdPartySources) + count($trustedSources),
'template' => WCF::getTPL()->fetch('packageSearchResultList'),
];
}
<item name="wcf.acp.package.search.status.loading"><![CDATA[Suche läuft …]]></item>
<item name="wcf.acp.package.search.status.noResults"><![CDATA[Die Suche ergab keine Treffer.]]></item>
<item name="wcf.acp.package.search.status.refreshDatabase"><![CDATA[Die Paketlisten werden aktualisiert …]]></item>
+ <item name="wcf.acp.package.search.result.official"><![CDATA[{if $count === 0}Keine{elseif $count === 1}Ein{else}{#$count}{/if} Treffer in offiziellen WoltLab®-Paketen]]></item>
<item name="wcf.acp.package.search.result.thirdParty"><![CDATA[{if $count === 0}Keine{elseif $count === 1}Ein{else}{#$count}{/if} Treffer in Paketquellen von Drittanbietern]]></item>
<item name="wcf.acp.package.search.result.trusted"><![CDATA[{if $count === 0}Keine{elseif $count === 1}Ein{else}{#$count}{/if} Treffer in offiziellen Paketquellen]]></item>
<item name="wcf.acp.package.error.databaseChange"><![CDATA[Das Datenbanklayout konnte aufgrund folgender Fehler nicht aktualisiert werden:
<item name="wcf.acp.package.search.status.loading"><![CDATA[Searching…]]></item>
<item name="wcf.acp.package.search.status.noResults"><![CDATA[There were no matches.]]></item>
<item name="wcf.acp.package.search.status.refreshDatabase"><![CDATA[Retrieving the package lists…]]></item>
+ <item name="wcf.acp.package.search.result.official"><![CDATA[{if $count === 0}No matches{elseif $count === 1}One match{else}{#$count} matches{/if} in official WoltLab® packages]]></item>
<item name="wcf.acp.package.search.result.thirdParty"><![CDATA[{if $count === 0}No matches{elseif $count === 1}One match{else}{#$count} matches{/if} in package sources maintained by third parties]]></item>
<item name="wcf.acp.package.search.result.trusted"><![CDATA[{if $count === 0}No matches{elseif $count === 1}One match{else}{#$count} matches{/if} in official package sources]]></item>
<item name="wcf.acp.package.error.databaseChange"><![CDATA[The database layout could not be changed because of the following errors: