user_menu.rhtml
2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<div id="user_menu" class="top_extra_menu AOM_paddingBottom_6"<%=
' help="'+ _('This is your menu, for your personal functionalies.') +'"' if logged_in?
%>>
<% if logged_in? %>
<div id="user_menu_head">
<img src="<%=
(current_user.person.image)?
current_user.person.image.public_filename(:icon) : "/images/icons-bar/photo.png"
%>" alt="<%= current_user.login %> Icon-Photo" title="" height="20" border="0"/>
<span><%= _("%s's Menu") % current_user.login %></span>
</div>
<div id="user_menu_ul">
<ul>
<li><a href="<%= homepage_path(:profile => current_user.login) %>"
help="<%= _('Go to your home page. <p/> Is good to see if it\'s cool enought and you can make this rock! <b>;-)</b>') %>"
><span class="icon-menu-home"></span><%= _('My Home Page') %></a></li>
<!-- li><a href="#"><span class="icon-menu-blog"></span> Meu Blog</a></li -->
<li><%= link_to_myprofile( '<span class="icon-menu-ctrl-panel"></span>'+ _('control panel'),
{}, nil, :id => 'link_edit_profile',
:help => _('The control panel is where you find all <b>cool features</b> to make your site rock! <p/> There you will find how to <b>change your picture</b>, or your <b>personal information</b>, add <b>content to your site</b>, <b>change your look</b>, and <b>more</b>...')
) %></li>
<%=
'<li>'+ link_to( '<span class="icon-menu-"></span>'+ _('Admin'),
{ :controller => 'admin_panel' }, :id => 'link_admin_panel',
:help => _('This link will take you to the page where you can use your <b>super-powers</b>!')
) +
'</li>' if user.is_admin?
%>
<li><%= lightbox_link_to( '<span class="icon-menu-logout"></span>'+ _('Logout'),
{ :controller => 'account', :action => 'logout_popup'},
:id => 'link_logout',
:help => _('If you\'ll not use more this web site (for now), or will exit from this computer, <b>where other peple may use</b>, is better to click on this <i>Logout</i> link.')
) %></li>
</ul>
</div><!-- id="user_menu_ul" -->
<% else %>
<%= lightbox_link_to '<span class="icon-menu-login"></span>'+ _('Login'),
{ :controller => 'account', :action => 'login_popup' },
:id => 'link_login',
:help => _('Open the login box to allow you to be recognized and to use the <b>cool features</b> of this enviroment.') %>
<% end %>
</div><!-- fim id="user_menu" -->
<script> setAutoOpenMenu( $("user_menu") ); </script>