mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 13:54:26 -07:00
Move 'Logged in as' dialog to footer.html
This commit is contained in:
parent
37fb304942
commit
42dfd762d9
5 changed files with 49 additions and 123 deletions
|
@ -72,29 +72,9 @@
|
||||||
if ($key == $user) {
|
if ($key == $user) {
|
||||||
?>
|
?>
|
||||||
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
||||||
<?
|
<?php
|
||||||
if (!empty($_SESSION['look_alert'])) {
|
} else {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
|
||||||
$( "#dialog-message" ).dialog({
|
|
||||||
modal: true,
|
|
||||||
buttons: {
|
|
||||||
Ok: function() {
|
|
||||||
$( this ).dialog( "close" );
|
|
||||||
},
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<div id="dialog-message" title="<?=__('Welcome')?>">
|
|
||||||
<p class="confirmation"><?=__('LOGGED_IN_AS',$key)?></p>
|
|
||||||
</div>
|
|
||||||
<?
|
|
||||||
unset($_SESSION['look_alert']);
|
|
||||||
}
|
|
||||||
} else { ?>
|
|
||||||
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$data[$key]['USER']?>&token=<?=$_SESSION['token']?>""><?=__('login as')?> <i></i></a><span class="shortcut"> L</span></div>
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$data[$key]['USER']?>&token=<?=$_SESSION['token']?>""><?=__('login as')?> <i></i></a><span class="shortcut"> L</span></div>
|
||||||
<? }
|
<? }
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,38 +92,9 @@ sort-bandwidth="<?=$data[$key]['U_BANDWIDTH']?>" sort-disk="<?=$data[$key]['U_DI
|
||||||
if ($key == $user) {
|
if ($key == $user) {
|
||||||
?>
|
?>
|
||||||
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
||||||
<?
|
<?php
|
||||||
if (!empty($_SESSION['look_alert'])) {
|
} else {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
|
||||||
$( "#dialog-message" ).dialog({
|
|
||||||
modal: true,
|
|
||||||
buttons: {
|
|
||||||
Ok: function() {
|
|
||||||
$( this ).dialog( "close" );
|
|
||||||
},
|
|
||||||
},
|
|
||||||
create:function () {
|
|
||||||
$(this).closest(".ui-dialog")
|
|
||||||
.find(".ui-button:first")
|
|
||||||
.addClass("submit");
|
|
||||||
$(this).closest(".ui-dialog")
|
|
||||||
.find(".ui-button")
|
|
||||||
.eq(1) // the first button
|
|
||||||
.addClass("cancel");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<div id="dialog-message" title="<?=__('Welcome')?>">
|
|
||||||
<p class="confirmation"><?=__('LOGGED_IN_AS',$key)?></p>
|
|
||||||
</div>
|
|
||||||
<?
|
|
||||||
unset($_SESSION['look_alert']);
|
|
||||||
}
|
|
||||||
} else { ?>
|
|
||||||
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$key?>&token=<?=$_SESSION['token']?>""><?=__('login as').' '.$key?> <i></i></a><span class="shortcut"> L</span></div>
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$key?>&token=<?=$_SESSION['token']?>""><?=__('login as').' '.$key?> <i></i></a><span class="shortcut"> L</span></div>
|
||||||
<?}?>
|
<?}?>
|
||||||
<div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/user/?user=<?=$key?>&token=<?=$_SESSION['token']?>"><?=__('edit')?> <i></i></a><span class="shortcut enter"> ↵</span></div>
|
<div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/user/?user=<?=$key?>&token=<?=$_SESSION['token']?>"><?=__('edit')?> <i></i></a><span class="shortcut enter"> ↵</span></div>
|
||||||
|
|
|
@ -17,13 +17,33 @@
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (!empty($_SESSION['error_msg'])):
|
// todo: display all the dialogs?
|
||||||
|
|
||||||
|
if (!empty($_SESSION['look_alert'])):
|
||||||
|
?>
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('#dialog:ui-dialog').dialog('destroy');
|
||||||
|
$('#dialog-message').dialog({
|
||||||
|
modal: true,
|
||||||
|
buttons: {
|
||||||
|
Ok: function() {
|
||||||
|
$(this).dialog('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div id="dialog-message" title="<?=__('Welcome')?>">
|
||||||
|
<p class="confirmation"><?=__('LOGGED_IN_AS', $_SESSION['look'])?></p>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
unset($_SESSION['look_alert']);
|
||||||
|
elseif (!empty($_SESSION['error_msg'])):
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<div id="dialog-message" title="">
|
|
||||||
<p><?=htmlentities($_SESSION['error_msg'])?></p>
|
|
||||||
</div>
|
|
||||||
<script>
|
<script>
|
||||||
|
$(function() {
|
||||||
$('#dialog:ui-dialog').dialog('destroy');
|
$('#dialog:ui-dialog').dialog('destroy');
|
||||||
$('#dialog-message').dialog({
|
$('#dialog-message').dialog({
|
||||||
modal: true,
|
modal: true,
|
||||||
|
@ -39,7 +59,11 @@ if (!empty($_SESSION['error_msg'])):
|
||||||
.addClass('submit');
|
.addClass('submit');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<div id="dialog-message" title="">
|
||||||
|
<p><?=htmlentities($_SESSION['error_msg'])?></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
unset($_SESSION['error_msg']);
|
unset($_SESSION['error_msg']);
|
||||||
|
|
|
@ -74,29 +74,9 @@
|
||||||
if ($key == $user) {
|
if ($key == $user) {
|
||||||
?>
|
?>
|
||||||
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
||||||
<?
|
<?php
|
||||||
if (!empty($_SESSION['look_alert'])) {
|
} else {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
|
||||||
$( "#dialog-message" ).dialog({
|
|
||||||
modal: true,
|
|
||||||
buttons: {
|
|
||||||
Ok: function() {
|
|
||||||
$( this ).dialog( "close" );
|
|
||||||
},
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<div id="dialog-message" title="<?=__('Welcome')?>">
|
|
||||||
<p class="confirmation"><?=__('LOGGED_IN_AS',$key)?></p>
|
|
||||||
</div>
|
|
||||||
<?
|
|
||||||
unset($_SESSION['look_alert']);
|
|
||||||
}
|
|
||||||
} else { ?>
|
|
||||||
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$data[$key]['USER']?>&token=<?=$_SESSION['token']?>""><?=__('login as')?> <i></i></a><span class="shortcut"> L</span></div>
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$data[$key]['USER']?>&token=<?=$_SESSION['token']?>""><?=__('login as')?> <i></i></a><span class="shortcut"> L</span></div>
|
||||||
<? }
|
<? }
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,38 +90,9 @@ sort-disk="<?=$data[$key]['U_DISK']?>" sort-star="<?if($_SESSION['favourites']['
|
||||||
if ($key == $user) {
|
if ($key == $user) {
|
||||||
?>
|
?>
|
||||||
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/logout"><?=__('logout')?> <i></i></a><span class="shortcut"> L</span></div>
|
||||||
<?
|
<?php
|
||||||
if (!empty($_SESSION['look_alert'])) {
|
} else {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
|
||||||
$( "#dialog-message" ).dialog({
|
|
||||||
modal: true,
|
|
||||||
buttons: {
|
|
||||||
Ok: function() {
|
|
||||||
$( this ).dialog( "close" );
|
|
||||||
},
|
|
||||||
},
|
|
||||||
create:function () {
|
|
||||||
$(this).closest(".ui-dialog")
|
|
||||||
.find(".ui-button:first")
|
|
||||||
.addClass("submit");
|
|
||||||
$(this).closest(".ui-dialog")
|
|
||||||
.find(".ui-button")
|
|
||||||
.eq(1) // the first button
|
|
||||||
.addClass("cancel");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<div id="dialog-message" title="<?=__('Welcome')?>">
|
|
||||||
<p class="confirmation"><?=__('LOGGED_IN_AS',$key)?></p>
|
|
||||||
</div>
|
|
||||||
<?
|
|
||||||
unset($_SESSION['look_alert']);
|
|
||||||
}
|
|
||||||
} else { ?>
|
|
||||||
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$key?>""><?=__('login as')?> <i></i></a><span class="shortcut"> L</span></div>
|
<div class="actions-panel__col actions-panel__loginas shortcut-l" key-action="href"><a href="/login/?loginas=<?=$key?>""><?=__('login as')?> <i></i></a><span class="shortcut"> L</span></div>
|
||||||
<?}?>
|
<?}?>
|
||||||
<div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/user/?user=<?=$key?>"><?=__('edit')?> <i></i></a><span class="shortcut enter"> ↵</span></div>
|
<div class="actions-panel__col actions-panel__edit shortcut-enter" key-action="href"><a href="/edit/user/?user=<?=$key?>"><?=__('edit')?> <i></i></a><span class="shortcut enter"> ↵</span></div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue