diff --git a/src/init.php b/src/init.php index 14b9fa7..e5392cb 100644 --- a/src/init.php +++ b/src/init.php @@ -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'); diff --git a/src/themes/default/index.php b/src/themes/default/index.php index a7f9320..f28d455 100644 --- a/src/themes/default/index.php +++ b/src/themes/default/index.php @@ -261,8 +261,8 @@ $().ready(function(){
diff --git a/src/themes/default/style.css b/src/themes/default/style.css index 482a538..f8bf7a3 100644 --- a/src/themes/default/style.css +++ b/src/themes/default/style.css @@ -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;