* [ADD] New user preference to show accounts search results as cards.

* [MOD] UI tweaks to display search results as cards.
* [FIX] Fixed issue when account link was set.
This commit is contained in:
nuxsmin
2017-01-23 15:30:20 +01:00
parent 834e567598
commit 522220a716

View File

@@ -145,11 +145,13 @@ class MainController extends ControllerBase implements ActionsInterface
$this->view->append('jsLinks', Init::$WEBROOT . '/js/js.php?f=' . $themeJsFiles . '&b=' . $themeJsBase . '&v=' . $jsVersionHash);
}
$cssVersionHash = md5(implode(Util::getVersion()) . Checks::resultsCardsIsEnabled() . Session::getUserPreferences()->isResultsAsCards());
$resultsAsCards = Init::isLoggedIn() && Session::getUserPreferences()->isResultsAsCards();
$cssVersionHash = md5(implode(Util::getVersion()) . Checks::resultsCardsIsEnabled() . $resultsAsCards);
$this->view->append('cssLinks', Init::$WEBROOT . '/css/css.php?v=' . $cssVersionHash);
if (isset($themeInfo['css'])) {
if (Checks::resultsCardsIsEnabled() || Session::getUserPreferences()->isResultsAsCards()) {
if (Checks::resultsCardsIsEnabled() || $resultsAsCards) {
$themeInfo['css'][] = 'search-card.min.css';
} else {
$themeInfo['css'][] = 'search-grid.min.css';