-
Notifications
You must be signed in to change notification settings - Fork 41
/
page.rhtml
78 lines (72 loc) · 3.36 KB
/
page.rhtml
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
<% unless @partial_page || @output.partial -%>
<%= @output.doctype || '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' %>
<%= tag 'html', {:xmlns => "http://www.w3.org/1999/xhtml"}.merge(@output.includes[:html_tag] || {}), true %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><%= @cms_module_page_title || @output.title %></title>
<meta http-equiv='Content-Language' content='<%= @output.language %>' />
<% if @output.meta_description || @output.includes[:meta_description] -%>
<meta name='DESCRIPTION' content='<%= vh (@output.includes[:meta_description] || @output.meta_description).to_s %>'/>
<% end -%>
<% if @output.meta_keywords || @output.includes[:meta_keywords] %>
<meta name='KEYWORDS' content='<%= vh (@output.includes[:meta_keywords] || @output.meta_keywords).to_s %>'/>
<% end -%>
<% if @robots.length > 0 %>
<meta name='ROBOTS' content='<%= @robots.join(',') %>'/>
<% end -%>
<%= javascript_include_tag 'swfobject' %>
<%= @output.includes[:head_html].join("\n") if @output.includes[:head_html] -%>
<% if @output.includes[:js] || @js_header -%>
<% if @js_header; @output.includes[:js] ||= []; @output.includes[:js] += @js_header; end -%>
<% @output.includes[:js].uniq.each do |js| -%>
<%= javascript_include_tag js %>
<% end -%>
<% end -%>
<% if @output.includes[:css] || @css_header -%>
<% if @css_header; @output.includes[:css] ||= []; @output.includes[:css] += @css_header; end -%>
<% @output.includes[:css].uniq.each do |css| -%>
<%= stylesheet_link_tag css %>
<% end -%>
<% end -%>
<%= @output.includes[:extra_head_html].join("\n") if @output.includes[:extra_head_html] -%>
<%= @extra_header.uniq.join("\n") if @extra_header -%>
<link href="/stylesheet/<%= @output.css_site_template_id.to_s + ".css" %>" rel="Stylesheet" type="text/css" />
<%= stylesheet_link_tag 'edit_page_link', :media => :all if page_editor? && !@output.lightweight-%>
<%= @output.head -%>
</head>
<body>
<% unless @output.lightweight -%>
<div id="overDiv" style="position:absolute; left:0px; top:0px; visibility:hidden; z-index:1000;"></div>
<% if page_editor? -%>
<div id='cms_edit_page_link' style='width:0px;' onmouseover='this.style.width="auto";' onmouseout='this.style.width="0px"'>
<%= content_node_links(@output.content_nodes) -%>
<a href='/website/edit/page/page/<%= @page.id %>?return_to_site=1'><%= "Edit Page".t %></a><br/>
<a href='/website/dashboard#cms_page_title'><%= "Dashboard".t %></a><br/>
<a href='/website/structure'><%= "Structure".t %></a><br/>
</div>
<% end -%>
<% end -%>
<%= @output.includes[:body_start] -%>
<% end -%>
<% render_output(@page,@output) do-%>
<%= yield %>
<% end -%>
<% unless @partial_page || @output.partial -%>
<% if @google_analytics[:enabled] == 'enabled' -%>
<script type='text/javascript'>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '<%= @google_analytics[:code] %>']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.src = ('https:' == document.location.protocol ? 'https://ssl' :
'http://www') + '.google-analytics.com/ga.js';
ga.setAttribute('async', 'true');
document.documentElement.firstChild.appendChild(ga);
})();
</script>
<% end -%>
<%= @output.includes[:body_end] -%>
</body>
</html>
<% end -%>