forked from insoshi/insoshi
/
admin.html.erb
81 lines (78 loc) · 2.68 KB
/
admin.html.erb
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%- if global_prefs.app_name.blank? -%>
<title>Insoshi Open Source Social Networking Platform</title>
<%- else -%>
<title><%= global_prefs.app_name %></title>
<%- end -%>
<%= stylesheet_link_tag "default" %>
<%= javascript_include_tag :defaults %>
<%= active_scaffold_includes %>
<%= calendar_date_select_includes :default %>
<%= stylesheet_link_tag 'calendar/blue/style' %>
<%= yield :jquery_support %>
<%= yield :head %>
</head>
<body class="<%= @body %>">
<div id="header-wrap">
<div id="header">
<h1>
<%= global_prefs.app_name %>
</h1>
<ul id="nav">
<%- menu.each do |link| -%>
<%= menu_li link %>
<%- end -%>
</ul>
<p class="welcome">
<%- if logged_in? -%>
Welcome, <%= h current_person.name %>!
(<%= link_to "Sign out", logout_path %>)
<%- if current_person.admin? -%>
<br />
<%- if admin_view? -%>
<%= link_to("Refresh Blog Feed", '/refreshblog') %> |
<%= link_to("Standard view", home_path) %>
<%- else -%>
<%= link_to("Admin view", admin_preferences_path) %>
<%- end -%>
<%- end -%>
<%- else -%>
<%= link_to "Sign in", login_path %> or
<%= link_to "Sign up", signup_path %>
<%- if global_prefs.can_send_email? -%>
<br />
<%= link_to "I forgot my password",
new_password_reminder_path %>
<%- end -%>
<%- end -%>
</p>
</div>
</div>
<div id="wrap">
<div id="content">
<%- if global_prefs.demo? -%>
<p class="error" style="font-weight: bold;">
This is a demonstration site.
Data may be modified or removed without warning.
</p>
<%- end -%>
<% flash.each do |key, msg| %>
<%= content_tag :p, msg, :class => "flash #{key}" %>
<% end %>
<%= yield %>
<div id="footer">
<p>
<%= render :partial => 'shared/powered_by' %>
</p>
</div>
</div>
<%- if development? -%>
<div><%= render :partial => 'shared/debug' %></div>
<%- end -%>
</div>
<%= global_prefs.analytics %>
</body>
</html>