1 |
<!DOCTYPE html> |
2 |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> |
3 |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> |
4 |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> |
5 |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> |
6 |
<head> |
7 |
<meta charset="utf-8"> |
8 |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
9 |
<title> Editing.. | {{title}} </title> |
10 |
<meta name="description" content=""> |
11 |
<meta name="viewport" content="width=device-width"> |
12 |
|
13 |
<!-- Place favicon.ico in the root directory --> |
14 |
|
15 |
<link rel="stylesheet" href="{{url_for('static', filename='css/normalize.css')}}"> |
16 |
<link rel="stylesheet" href="{{url_for('static', filename='css/bootstrap.css')}}"> |
17 |
<link rel="stylesheet" href="{{url_for('static', filename='css/editor.css')}}"> |
18 |
<script src="{{url_for('static', filename='js/lib/modernizr-2.6.1.min.js')}}"></script> |
19 |
</head> |
20 |
<body> |
21 |
<!--[if lt IE 7]> |
22 |
<p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p> |
23 |
<![endif]--> |
24 |
|
25 |
<div class="container" id="container"> |
26 |
<div id="header"> |
27 |
<div id="hud"> |
28 |
<span class="pull-right">Howdy! | <a href="/logout">Logout</a></span> |
29 |
</div> |
30 |
<div id="notifications"></div> |
31 |
</div> |
32 |
<div id="content-container"> |
33 |
</div> |
34 |
<div id="footer"> |
35 |
</div> |
36 |
</div> |
37 |
|
38 |
<script> |
39 |
// initialize editor |
40 |
window.M = window.M || {}; |
41 |
M.MenuURL = function() { return "{{ url_for('insertMenu') }}"}; |
42 |
M.PageURL = function() { return "{{ url_for('insertPage') }}"}; |
43 |
M.site_content = {{ content|tojson|safe }}; |
44 |
window.onload = function() { |
45 |
M.editor.init(); |
46 |
}; |
47 |
</script> |
48 |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> |
49 |
<script>window.jQuery || document.write('<script src="{{url_for('static', filename='js/lib/jquery-1.8.0.min.js')}}"><\/script>')</script> |
50 |
<script src="{{url_for('static', filename='js/lib/underscore.js')}}"></script> |
51 |
<script src="{{url_for('static', filename='js/lib/backbone-1.0.0.js')}}"></script> |
52 |
<script src="{{url_for('static', filename='js/lib/bootstrap.js')}}"></script> |
53 |
<script src="{{url_for('static', filename='js/lib/tinymce/tinymce.min.js')}}"></script> |
54 |
<script src="{{url_for('static', filename='js/lib/tinymce/jquery.tinymce.min.js')}}"></script> |
55 |
<script src="{{url_for('static', filename='js/plugins.js')}}"></script> |
56 |
<script src="{{url_for('static', filename='js/mouchak.js')}}"></script> |
57 |
<script src="{{url_for('static', filename='js/models.js')}}"></script> |
58 |
<script src="{{url_for('static', filename='js/editor.js')}}"></script> |
59 |
|
60 |
<!-- Underscore templates --> |
61 |
<script type="text/template" id="menu-config-template"> |
62 |
<div class="page"> |
63 |
<div class="menu-config"> |
64 |
<h4> Menu Config </h4> |
65 |
|
66 |
<div class="control-group" id="menu-order-wrap"> |
67 |
<div class="input-prepend"> |
68 |
<span class="add-on"> <strong> Menu Order</strong></span> |
69 |
<input id="menu-order" type="text" class="span4" |
70 |
placeholder="list,page,names,for,menu,order" value="<%= menu_order %>"> |
71 |
</div> |
72 |
</div> |
73 |
|
74 |
<div class="control-group"> |
75 |
<input id="custom-menu" type="checkbox"> |
76 |
<span class=""><strong> Custom Menu </strong></span> |
77 |
</div> |
78 |
|
79 |
<div class="menu-options" style="display: none;"> |
80 |
<div class="control-group"> |
81 |
<div class="input-prepend"> |
82 |
<span class="add-on"> <strong> Position </strong></span> |
83 |
<input id="pos" type="text" placeholder="[left, top]" |
84 |
value="<%= pos %>"> |
85 |
</div> |
86 |
</div> |
87 |
<label><strong> HTML for menu: </strong></label> |
88 |
<textarea cols="25" rows="8" id="menu"><%= menu %></textarea> |
89 |
</div> |
90 |
|
91 |
</div> |
92 |
<button id="updateMenu" class="btn btn-primary pull-right"> Update </button> |
93 |
<div class="clearfix"></div> |
94 |
</div> |
95 |
</script> |
96 |
|
97 |
<script type="text/template" id="page-list-template"> |
98 |
<div id="pagelistview"> |
99 |
<h4> List of Pages </h4> |
100 |
<div id="pagelist"></div> |
101 |
<button class="btn btn-primary" id="addPage">Add Page</button> |
102 |
<hr> |
103 |
<p> <a href="javascript:void(0);" id="menu-config"> Site Menu </a> </p> |
104 |
<p><a href="{{ url_for('index') }}"> Go to site </a></p> |
105 |
</div> |
106 |
</script> |
107 |
|
108 |
<script type="text/template" id="page-list-item-template"> |
109 |
<div class="pagename"> |
110 |
<a class="disp" id="<%= id %>" href="javascript:void(0);"><%= name %></a> |
111 |
<span class="pull-right"> |
112 |
<a href="javascript:void(0);" class="remove" for="<%= id %>"> |
113 |
<i class="icon-trash"></i> |
114 |
</a> |
115 |
</span> |
116 |
<span class="clearfix"></span> |
117 |
</div> |
118 |
</script> |
119 |
|
120 |
<script type="text/template" id="page-template"> |
121 |
<div class="page"> |
122 |
<h4> Page Properties </h4> |
123 |
<form class="form-horizontal"> |
124 |
<div class="control-group"> |
125 |
<div class="input-prepend"> |
126 |
<span class="add-on"> <strong> Name </strong></span> |
127 |
<input id="name" type="text" placeholder="name of the page" value="<%= name %>"> |
128 |
</div> |
129 |
</div> |
130 |
<div class="control-group"> |
131 |
<div class="input-prepend"> |
132 |
<span class="add-on"> <strong>Title</strong> </span> |
133 |
<input id="title" type="text" placeholder="title of the page" |
134 |
value="<%= title %>"> |
135 |
</div> |
136 |
</div> |
137 |
<div class="control-group"> |
138 |
<div class="input-prepend"> |
139 |
<span class="add-on"> <strong>Children</strong> </span> |
140 |
<input id="children" type="text" placeholder="csv of child pages" |
141 |
value="<%= children %>"> |
142 |
</div> |
143 |
</div> |
144 |
<div class="control-group"> |
145 |
<div class="input-prepend"> |
146 |
<span class="add-on"><strong> Show Navigation </strong></span> |
147 |
<input id="showNav" type="checkbox" <%=checked%>> |
148 |
</div> |
149 |
</div> |
150 |
<label><strong> Content </strong></label> |
151 |
<div id="content" class="content well"> |
152 |
<%= content %> |
153 |
<p></p> |
154 |
<button class="addContent btn btn-mini btn-primary">Add Content</button> |
155 |
</div> |
156 |
<button id="updatePage" type="submit" class="btn btn-primary pull-right"> Update </button> |
157 |
<div class="clearfix"></div> |
158 |
</form> |
159 |
</div> |
160 |
</script> |
161 |
|
162 |
<script type="text/template" id="content-list-template"> |
163 |
<div class="content-item-wrapper"> |
164 |
<span class="content-item" id="content-<%= no %>"> |
165 |
<span class="label label-info"> <%= type %> </span> |
166 |
<span class=""> |
167 |
[ <small> <%= title %> <%= more %> </small> ] |
168 |
</span> |
169 |
</span> |
170 |
<span class="pull-right"> |
171 |
<a href="javascript:void(0);" class="remove" for="<%=no%>"><i class="icon-trash"></i></a> |
172 |
</span> |
173 |
<span class="clearfix"></span> |
174 |
</div> |
175 |
</script> |
176 |
|
177 |
<script type="text/template" id="content-template"> |
178 |
<div class="contentview"> |
179 |
<div class=""> |
180 |
<label><b>Type</b></label> |
181 |
<select> |
182 |
<% _.each(M.contentTypes, function(type) { %> |
183 |
<option><%= type %></option> |
184 |
<% }); %> |
185 |
</select> |
186 |
<div class="control-group"> |
187 |
<div class="input-prepend"> |
188 |
<span class="add-on"> <b>Title</b> </span> |
189 |
<input type="text" placeholder="title of the content" value="<%= |
190 |
title %>" m-data-target="title"> |
191 |
</div> |
192 |
</div> |
193 |
<div class="control-group"> |
194 |
<div class="input-prepend"> |
195 |
<span class="add-on"> <strong>Tags</strong> </span> |
196 |
<input type="text" placeholder="csv of tags for this content" |
197 |
value="<%= tags %>" m-data-target="tags"> |
198 |
</div> |
199 |
</div> |
200 |
</div> |
201 |
<div id="specific-content"></div> |
202 |
<button class="btn btn-info" id="done">Done</button> |
203 |
<button class="btn btn-primary" id="updateContent">Update</button> |
204 |
</div> |
205 |
</script> |
206 |
|
207 |
<script type="text/template" id="media-template"> |
208 |
<div class="data"> |
209 |
<div class="control-group"> |
210 |
<div class="input-prepend"> |
211 |
<span class="add-on"><strong>path to file</strong></span> |
212 |
<input type="text" placeholder="src" value="<%= src %>" |
213 |
m-data-target="src"> |
214 |
</div> |
215 |
</div> |
216 |
<div class="preview"></div> |
217 |
</div> |
218 |
</script> |
219 |
|
220 |
<script type="text/template" id="text-template"> |
221 |
<div class="data"> |
222 |
<label><b> Content </b></label> |
223 |
<p> |
224 |
<span class="label label-important">Tip</span> |
225 |
<span><small> You can unleash your HTML power here </small></span> |
226 |
</p> |
227 |
<textarea id="edit" m-data-target="data"> |
228 |
<%= data %> |
229 |
</textarea> |
230 |
</div> |
231 |
</script> |
232 |
|
233 |
<!-- notification templates --> |
234 |
<script type="text/template" id="success-notif"> |
235 |
<div class="alert alert-success"> |
236 |
<button type="button" class="close" data-dismiss="alert">×</button> |
237 |
<h4> <%= title %> </h4> |
238 |
<%= msg %> |
239 |
</div> |
240 |
</script> |
241 |
|
242 |
<script type="text/template" id="fail-notif"> |
243 |
<div class="alert alert-error"> |
244 |
<button type="button" class="close" data-dismiss="alert">×</button> |
245 |
<h4> <%= title %> </h4> |
246 |
<%= msg %> |
247 |
</div> |
248 |
</script> |
249 |
|
250 |
</body> |
251 |
</html> |