header.html.erb
4.63 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<% user = (session[:user] && User.find_by_id(session[:user])) || nil %>
<%= theme_include "user_menu", :locals => {:person => user.person} if user %>
<%= render :file => File.join(File.dirname(__FILE__), "/top_search_bar") %>
<% if controller_name != 'home' %>
<%= render :file => File.join(File.dirname(__FILE__), "/user_bar") %>
<%= render :file => File.join(File.dirname(__FILE__), "/user_menu_bar") %>
<%= render :file => File.join(File.dirname(__FILE__), "/user_chat_bar") %>
<!-- Nova Barra de usuário -->
<div id="top-bar" class="top" >
<div class="btn_control_panel btn_control" title="Painel de Controle" alt="menu">
<div class="layout_user">
<%= render :partial => 'layouts/user' %>
</div>
</div>
<!--
<div id="categories_menu">
<%= theme_include 'categories' %>
</div>
-->
<span class="btn_home" title="Página Inicial"><a href="<%=environment.top_url%>"> </a></span>
</div>
<!-- FIM Nova Barra de usuário -->
<% else %>
<header>
<div id="header-left">
<div id="logo">
<%= link_to(image_tag("/designs/themes/participa-web/images/medium-logo.png"), environment.top_url) %>
</div>
</div><!-- #header-left -->
<div id="header-right">
<div id="header-right-1">
<%= link_to(image_tag("/designs/themes/participa-web/images/tile-forum.png") + "<span class='tile-title'>" + _('CONTENT') + "</span>", {:controller => 'search', :action => 'contents', :filter => 'more_recent'}, :class => 'tile tile-forum') %>
<%= link_to(image_tag("/designs/themes/participa-web/images/tile-groups.png") + "<span class='tile-title'>" + _('GROUPS') + "</span>", {:controller => 'search', :action => 'communities', :filter => 'more_active'}, :class => 'tile tile-groups') %>
<%= link_to(image_tag("/designs/themes/participa-web/images/tile-info.png") + "<span class='tile-title'>" + _('ABOUT US') + "</span>", {:profile => 'save-organic-food'}, :class => 'tile tile-info') %>
<%= link_to(image_tag("/designs/themes/participa-web/images/tile-members.png") + "<span class='tile-title'>" + _('MEMBERS') + "</span>", {:controller => 'search', :action => 'people', :filter => 'more_recent'}, :class => 'tile tile-users')%>
</div><!-- #header-right-1 -->
<div id="header-right-2">
<div class="tile2">
<div id="tile-user">
<% if logged_in? %>
<span class='not-logged-in'>
<div class="tile-avatar"> <%= link_to(profile_image(current_person), current_person.url) %></div>
<div class="tile-username"><%= _('Hello,') %> <br/><%= current_person.name %> </div>
<span class='tile-title'>
<%= admin_link %>
<span> <%= _('or') %> </span>
<%= link_to(_('Logout'), :controller => :account, :action => :logout) %>
</span>
<% else %>
<span class='not-logged-in'>
<div class="tile-avatar"> <%= image_tag("/designs/themes/participa-web/images/avatar.gif") %></div>
<div class="tile-username"><%= _('Hello') %> <br/><%= _('Guest') %> </div>
<span class='tile-title'>
<%= modal_inline_link_to('<i class="icon-menu-login"></i><strong>' + _('Login') + '</strong>', login_url, 'inlineLoginBox', :id => 'link_login') %>
<%= @plugins.dispatch(:alternative_authentication_link).collect { |content| instance_exec(&content) }.join("") %>
<% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
<span> <%= _('or') %> </span>
<span class='tile-register'>
<%= link_to('<strong>' + _('Sign up') + '</strong>', :controller => 'account', :action => 'signup')%>
</span>
<% end %>
<div id='inlineLoginBox' style='display: none;'>
<%= render :file => 'account/login', :locals => { :is_thickbox => true } %>
</div>
</span>
<% end %>
</div>
</div><!-- .tile2 -->
<div class="header-right-2-bottom">
<% if logged_in? %>
<%= link_to(image_tag("/designs/themes/participa-web/images/tile-activities.png") + "<span class='tile-title'>" + _('ACTIVITY') + "</span>", {:controller => 'profile', :profile => current_person.identifier, :anchor => 'profile-network'}, :class => 'tile tile-activities') %>
<%= link_to(image_tag("/designs/themes/participa-web/images/tile-blog.png") + "<span class='tile-title'>" + _('BLOG') + "</span>", {:controller => 'profile', :profile => current_person.identifier}, :class => 'tile tile-blog') %>
<% end %>
</div><!-- .header-right-2-bottom -->
</div><!-- .header-right-2 -->
</div><!-- #header-right -->
</header>
<% end %>