mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* do not show all tasks menu item for readonly user
This commit is contained in:
parent
e10955fca7
commit
caf05208c5
3 changed files with 9 additions and 3 deletions
|
|
@ -69,6 +69,13 @@ function is_logged()
|
|||
return true;
|
||||
}
|
||||
|
||||
function is_readonly()
|
||||
{
|
||||
$needAuth = (Config::get('password') != '') ? 1 : 0;
|
||||
if($needAuth && !is_logged()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function timestampToDatetime($timestamp)
|
||||
{
|
||||
$format = Config::get('dateformat') .' '. (Config::get('clock') == 12 ? 'g:i A' : 'H:i');
|
||||
|
|
|
|||
|
|
@ -261,8 +261,8 @@ $().ready(function(){
|
|||
|
||||
<div id="slmenucontainer" class="mtt-menu-container" style="display:none">
|
||||
<ul>
|
||||
<li id="slmenu_list:-1" class="list-id--1"><div class="menu-icon"></div><a href="#alltasks"><?php _e('alltasks'); ?></a></li>
|
||||
<li class="mtt-menu-delimiter slmenu-lists-begin"></li>
|
||||
<li id="slmenu_list:-1" class="list-id--1" <?php if(is_readonly()) echo 'style="display:none"' ?>><div class="menu-icon"></div><a href="#alltasks"><?php _e('alltasks'); ?></a></li>
|
||||
<li class="mtt-menu-delimiter slmenu-lists-begin" <?php if(is_readonly()) echo 'style="display:none"' ?>></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
.mtt-tabs-alltasks { margin:1px 3px 0 3px; float:right; border-right:1px solid #ededed; background:#fbfbfb url(images/tab_hover.gif) no-repeat top left; }
|
||||
.mtt-tabs-alltasks a { position:relative; margin:0; font-size:0.9em; font-weight:bold; text-decoration:none; text-align:center; white-space:nowrap; color:#444444; display:block; height:21px; padding:6px 2px 0px 6px; outline:none; vertical-align:top; }
|
||||
.mtt-tabs-alltasks.mtt-tabs-selected { border-left:none; border-right:1px solid #ededed; background:#ededed url(images/corner_left.gif) no-repeat top left; }
|
||||
#page_tasks.readonly .mtt-tabs-alltasks { display:none; }
|
||||
|
||||
#tabs_buttons {
|
||||
float:right;
|
||||
|
|
|
|||
Loading…
Reference in a new issue