1
0
mirror of https://github.com/Hutchy68/pivot.git synced 2024-11-21 18:09:03 +01:00

Allow alternate methods of Login with personal_urls

This commit is contained in:
MW install maintain even with core development 2020-07-24 11:30:48 -04:00
parent 26162eedee
commit 79e00892b4
3 changed files with 10 additions and 14 deletions

View File

@ -116,10 +116,10 @@ class pivotTemplate extends BaseTemplate {
<ul class="off-canvas-list"> <ul class="off-canvas-list">
<li class="has-form"> <li class="has-form">
<form action="<?php $this->text( 'wgScript' ); ?>" id="searchform-offCanvas" class="mw-search"> <form action="<?php $this->text( 'wgScript' ); ?>" id="searchform" class="mw-search">
<div class="row collapse"> <div class="row collapse">
<div class="small-12 columns"> <div class="small-12 columns">
<input type="search" name="search" placeholder="<?php echo wfMessage( 'search' )->text() ?>" title="Search [alt-shift-f]" accesskey="f" class="mw-searchInput" autocomplete="off"> <input type="search" name="search" placeholder="<?php echo wfMessage( 'search' )->text() ?>" title="Search [alt-shift-f]" accesskey="f" id="searchInput-offcanvas" autocomplete="off">
</div> </div>
</div> </div>
</form> </form>
@ -132,16 +132,10 @@ class pivotTemplate extends BaseTemplate {
<aside class="right-off-canvas-menu"> <aside class="right-off-canvas-menu">
<ul class="off-canvas-list"> <ul class="off-canvas-list">
<?php if ($wgUser->isLoggedIn()): ?> <?php if ($wgUser->isLoggedIn()): ?>
<li id="personal-tools"><label><?php echo wfMessage( 'personaltools' )->text() ?></label></li> <li id="personal-tools"><label><?php echo wfMessage( 'pivot-personal-tools' )->text() ?></label></li>
<?php foreach ($this->getPersonalTools() as $key => $item) { echo $this->makeListItem($key, $item); } ?> <?php foreach ($this->getPersonalTools() as $key => $item) { echo $this->makeListItem($key, $item); } ?>
<?php else: ?> <?php else: ?>
<?php if (isset($this->data['personal_urls']['anonlogin'])): ?> <?php foreach ($this->getPersonalTools() as $key => $item) { echo $this->makeListItem($key, $item); } ?>
<li><a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?>"><?php echo wfMessage( 'login' )->text() ?></a></li>
<?php elseif (isset($this->data['personal_urls']['login'])): ?>
<li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?>"><?php echo wfMessage( 'login' )->text() ?></a></li>
<?php else: ?>
<li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage( 'login' )->text()); ?></li>
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
</ul> </ul>
</aside> </aside>
@ -161,10 +155,10 @@ class pivotTemplate extends BaseTemplate {
<img alt="<?php echo $this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" style="max-width: 100%;height: auto;display: inline-block; vertical-align: middle;"></a> <img alt="<?php echo $this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" style="max-width: 100%;height: auto;display: inline-block; vertical-align: middle;"></a>
</li> </li>
<li class="has-form"> <li class="has-form">
<form action="<?php $this->text( 'wgScript' ); ?>" id="searchform-sidebar" class="mw-search"> <form action="<?php $this->text( 'wgScript' ); ?>" id="searchform" class="mw-search">
<div class="row collapse"> <div class="row collapse">
<div class="small-12 columns"> <div class="small-12 columns">
<input type="search" name="search" placeholder="<?php echo wfMessage( 'search' )->text() ?>" title="Search [alt-shift-f]" accesskey="f" class="mw-searchInput" autocomplete="off"> <input type="search" name="search" placeholder="<?php echo wfMessage( 'search' )->text() ?>" title="Search [alt-shift-f]" accesskey="f" id="searchInput" autocomplete="off">
</div> </div>
</div> </div>
</form> </form>

View File

@ -7,5 +7,6 @@
"skinname-pivot": "Pivot", "skinname-pivot": "Pivot",
"pivot-desc": "A mobile skin which \"Pivots\" seamlessly to any size display.", "pivot-desc": "A mobile skin which \"Pivots\" seamlessly to any size display.",
"pivot-browsermsg": "may not look as expected in this version of Internet Explorer. We recommend you upgrade to a newer version of Internet Explorer or switch to a browser like Firefox or Chrome.", "pivot-browsermsg": "may not look as expected in this version of Internet Explorer. We recommend you upgrade to a newer version of Internet Explorer or switch to a browser like Firefox or Chrome.",
"pivot-menutitle": "Menu" "pivot-menutitle": "Menu",
"pivot-personal-tools": "Personal Tools"
} }

View File

@ -7,5 +7,6 @@
"skinname-pivot": "name of skin", "skinname-pivot": "name of skin",
"pivot-desc": "description of skin", "pivot-desc": "description of skin",
"pivot-browsermsg": "old versions of IE not supported message", "pivot-browsermsg": "old versions of IE not supported message",
"pivot-menutitle": "menu title" "pivot-menutitle": "menu title",
"pivot-personal-tools": "logged in title for personal tools"
} }