Commit 408dcdfb authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1710710: Placement of public search box vs language selector



When we have $cfg->publicsearchallowed = true;
and are viewing the site when logged out and have langpacks installed
we get an overlap of the language selector and searc box.

When we don't have langpacks installed the search box doesn't align to
the right.

This patch tries to align things up correctly

behatnotneeded

Change-Id: I6f2175af0aa9e164f4c4302f4c1e7012423d1235
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 0f01e034
......@@ -678,6 +678,7 @@ EOF;
}
$smarty->assign('LOGGEDIN', $USER->is_logged_in());
$smarty->assign('loggedout', !$USER->is_logged_in());
$publicsearchallowed = false;
$searchplugin = get_config('searchplugin');
if ($searchplugin) {
......
......@@ -63,6 +63,21 @@
}
}
}
// Allowing the public search to sit in right place
// when lang selector exists or not
.loggedout .navbar-form.navbar-collapse {
@media (min-width: $screen-sm-min) {
right: 0px;
margin-right: 15px;
&.with-langform {
right: 270px;
}
&.with-langform-login {
right: 370px;
}
}
}
.navbar-default {
border-left: 0;
......
......@@ -183,7 +183,7 @@
{/if}
{if !$nosearch && ($LOGGEDIN || $publicsearchallowed)}
<div class="navbar-form collapse navbar-collapse">
<div class="navbar-form collapse navbar-collapse{if $languageform} with-langform{if !$LOGGEDIN && !$SHOWLOGINBLOCK && !$LOGINPAGE}-login{/if}{/if}">
{header_search_form}
</div>
{/if}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment