forked from vufind-org/vufind
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Bootstrap 5 as the base theme. (#3135)
(cherry picked from commit 8ac1afc)
- Loading branch information
1 parent
06c1ece
commit 47d8bca
Showing
144 changed files
with
2,643 additions
and
1,253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
* | ||
* PHP version 8 | ||
* | ||
* Copyright (C) The National Library of Finland 2014. | ||
* Copyright (C) The National Library of Finland 2014-2025. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2, | ||
|
@@ -23,6 +23,7 @@ | |
* @category VuFind | ||
* @package View_Helpers | ||
* @author Samuli Sillanpää <[email protected]> | ||
* @author Ere Maijala <[email protected]> | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License | ||
* @link http://vufind.org Main Site | ||
*/ | ||
|
@@ -42,6 +43,7 @@ | |
* @category VuFind | ||
* @package View_Helpers | ||
* @author Samuli Sillanpää <[email protected]> | ||
* @author Ere Maijala <[email protected]> | ||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License | ||
* @link http://vufind.org Main Site | ||
*/ | ||
|
@@ -194,20 +196,25 @@ public function getMenuItemUrl(array $data) | |
*/ | ||
public function getLanguageUrl($lng) | ||
{ | ||
$url = $this->view->serverUrl(true); | ||
$parts = parse_url($url); | ||
|
||
$params = []; | ||
if (isset($parts['query'])) { | ||
parse_str($parts['query'], $params); | ||
$url = substr($url, 0, strpos($url, '?')); | ||
} | ||
$url = $this->router->getRequestUri(); | ||
$params = $url->getQueryAsArray(); | ||
$params['lng'] = $lng; | ||
$url .= '?' . http_build_query($params); | ||
if (isset($parts['fragment'])) { | ||
$url .= '#' . $parts['fragment']; | ||
} | ||
return $url; | ||
$url->setQuery(http_build_query($params)); | ||
return $url->toString(); | ||
} | ||
|
||
/** | ||
* Check if a URL points to the current page | ||
* | ||
* @param string $url URL | ||
* | ||
* @return bool | ||
*/ | ||
public function isCurrentPage(string $url): bool | ||
{ | ||
$requestUri = $this->router->getRequestUri(); | ||
return $url === (string)$requestUri | ||
|| $url === $requestUri->getPath(); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
themes/custom/templates/content/Additions/header-navibar.phtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.