Browse Source

+ includes/auth_block

master
Alex 'AdUser' Z 10 years ago
parent
commit
e27111d210
  1. 10
      templates/includes/auth_block.html.ep
  2. 4
      templates/layouts/default.html.ep

10
templates/includes/auth_block.html.ep

@ -0,0 +1,10 @@
% my $user = session 'useruid';
<ul class="ui-block">
% if ($user) {
<li><span style="color: black;"><%= $user %></span></li>
<li><a href="/user/profile" rel="nofollow">Профиль</a></li>
<li><a href="/user/logout" rel="nofollow">Выйти</a></li>
% } else {
<li><a href="/user/login" rel="nofollow">Войти</a></li>
% }
</ul>

4
templates/layouts/default.html.ep

@ -35,9 +35,7 @@
<li><a href="/wiki/wiki/index">Служебные</a></li> <li><a href="/wiki/wiki/index">Служебные</a></li>
<li><a href="/forum/">Форум</a></li> <li><a href="/forum/">Форум</a></li>
</ul> </ul>
<ul class="ui-block"> %= include 'includes/auth_block';
<li><a href="/user/login" rel="nofollow">Войти</a></li>
</ul>
</div> </div>
<div id="content" class="ui-block"> <div id="content" class="ui-block">

Loading…
Cancel
Save