-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.html.erb
More file actions
70 lines (60 loc) · 3.15 KB
/
Copy pathheader.html.erb
File metadata and controls
70 lines (60 loc) · 3.15 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
<%= javascript_include_tag '/designs/themes/escambo/javascripts/escambo.js' %>
<%= javascript_include_tag '/designs/themes/escambo/javascripts/jquery.cookie.js' %>
<% content_for :active_organization do %>
<%= render file: "#{Rails.root}/public/designs/themes/escambo/profile_line.html.erb", locals: {profile: @active_organization, active_organization: true} %>
<% end %>
<% content_for :profile_line do %>
<% if profile %>
<%= render file: "#{Rails.root}/public/designs/themes/escambo/profile_line.html.erb", locals: {profile: profile, active_organization: false} %>
<% end %>
<% end %>
<div id="theme-header-wrap" class="<%= user ? 'logged' : 'not-logged' %>">
<div id="logo"></div>
<div id='header-links'>
<%= link_to _('home'), '/' %>
<%= link_to _('culture points'), controller: :search, action: :enterprises %>
<%= link_to _('offers, knowledges and interests'), controller: :search, action: :index %>
<%# link_to _('how it works'), controller: :home, action: :how_it_works %>
</div>
<div id="user">
<% if user %>
<span class='logged-in'>
<span class="user-logged-left">
<a href="<%= url_for controller: :profile_editor, profile: user.identifier, action: :edit %>">
<%= profile_image user, :portrait, class: 'profile-image' %>
</a>
</span>
<span class="user-logged-right">
<div>
<%= link_to user.name, controller: :profile_editor, profile: user.identifier, action: :edit %>
<% task_count = Task.to(user).pending.count %>
<%= link_to task_count.to_s, {controller: :tasks, profile: user.identifier}, id: 'pending-tasks-count', title: _("Manage your pending tasks") %>
</div>
<div>
<%= select_tag "enterprise[selected]",
options_for_select(user.memberships.collect{ |p| [ p.name, p.id ] } + [[_('New enterprise'), 'new']], cookies[:active_organization]),
id: 'select-organization', onchange: "escambo_theme.user.select()", onkeyup: "escambo_theme.user.select()" %>
</div>
<div>
<%= link_to _('Log out'), controller: :account, action: :logout %>
</div>
</span>
</span>
<% else %>
<span class='not-logged-in'>
<%= _("<span class='login'>%s</span>") % 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("") %>
<div id='inlineLoginBox' style='display: none;'>
<%= render :file => 'account/login', :locals => { :is_popin => true } %>
</div>
<% end %>
<div class="clean"></div>
</div>
<div class="clean"></div>
</div>
<% javascript_tag do %>
<% if user %>
escambo_theme.user.select_organization_url = '<%= url_for controller: :escambo_plugin_myprofile, profile: user.identifier, action: :select_active_organization %>';
escambo_theme.user.new_enterprise_url = '<%= url_for controller: :escambo_plugin_myprofile, profile: user.identifier, action: :new_enterprise %>';
<% end %>
<% end %>