activeadmin-selleo-cms 0.0.18 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- data/app/admin/active_admin/views_helper.rb +4 -0
- data/app/admin/activeadmin_selleo_cms/page.rb +42 -6
- data/app/assets/javascripts/activeadmin-selleo-cms/custom.js +35 -0
- data/app/assets/javascripts/activeadmin-selleo-cms/jquery-ui-timepicker-addon.js +1902 -0
- data/app/assets/javascripts/ckeditor/config.js +12 -1
- data/app/assets/stylesheets/activeadmin-selleo-cms/custom.css +5 -1
- data/app/assets/stylesheets/activeadmin-selleo-cms/jquery-ui-timepicker-addon.css +10 -0
- data/app/controllers/pages_controller.rb +9 -4
- data/app/controllers/searches_controller.rb +1 -1
- data/app/helpers/pages_helper.rb +9 -5
- data/app/models/activeadmin_selleo_cms/asset.rb +7 -1
- data/app/models/activeadmin_selleo_cms/attachment.rb +2 -0
- data/app/models/activeadmin_selleo_cms/image.rb +21 -0
- data/app/models/activeadmin_selleo_cms/layout.rb +27 -3
- data/app/models/activeadmin_selleo_cms/page.rb +33 -33
- data/app/models/activeadmin_selleo_cms/search.rb +1 -0
- data/app/models/activeadmin_selleo_cms/section.rb +33 -1
- data/app/views/admin/pages/_form.html.haml +2 -8
- data/app/views/admin/pages/_translated_fields.html.haml +52 -15
- data/app/views/admin/pages/reorder.html.haml +6 -0
- data/app/views/admin/pages/update_positions.js.erb +6 -0
- data/app/views/searches/show.html.haml +1 -1
- data/config/initializers/active_admin.rb +3 -0
- data/config/initializers/formtastic.rb +7 -0
- data/config/routes.rb +2 -7
- data/db/migrate/20130206173233_change_activeadmin_selleo_cms_searches.rb +29 -0
- data/db/migrate/20130207213528_change_activeadmin_selleo_cms_assets.rb +12 -0
- data/lib/activeadmin-selleo-cms/version.rb +1 -1
- data/lib/generators/activeadmin_selleo_cms/templates/cms.html.erb +7 -3
- data/spec/dummy/app/views/layouts/cms.html.erb +1 -1
- data/spec/dummy/db/snapshots/test_database.sql +1 -1
- data/spec/dummy/log/test.log +79024 -0
- data/spec/dummy/tmp/cache/assets/BEF/CA0/sprockets%2F3335c73d91157a627611592700a9654e +0 -0
- data/spec/dummy/tmp/cache/assets/C5A/610/sprockets%2Fbe898195780d802c102d152255d9e477 +0 -0
- data/spec/dummy/tmp/cache/assets/CB7/190/sprockets%2F136a9350fa75f3336af293952861ed6d +0 -0
- data/spec/dummy/tmp/cache/assets/CBA/D70/sprockets%2F8c5e2f7ea6f160a6792a442f01378479 +0 -0
- data/spec/dummy/tmp/cache/assets/CCF/2E0/sprockets%2Fde5b2bd811d24557c940a2239b7e3130 +0 -0
- data/spec/dummy/tmp/cache/assets/CD3/3E0/sprockets%2F373fa62090ab111ae606b963e1b8c793 +0 -0
- data/spec/dummy/tmp/cache/assets/CD6/930/sprockets%2Fb62a24129369fea572b674303a7fa12f +0 -0
- data/spec/dummy/tmp/cache/assets/CE2/D80/sprockets%2F28a4d5b1a75700c7579e3773f34ccd71 +0 -0
- data/spec/dummy/tmp/cache/assets/CE3/720/sprockets%2F8c9e2817b83ec580831f21b0c352c9c7 +0 -0
- data/spec/dummy/tmp/cache/assets/CED/FB0/sprockets%2Fa675d17ed83804639ec0264b624d98ed +0 -0
- data/spec/dummy/tmp/cache/assets/D2C/2E0/sprockets%2Fa031c32e27ced12f81d4326f8b52fb23 +0 -0
- data/spec/dummy/tmp/cache/assets/D5C/1D0/sprockets%2F0671a22da74f433700c99e13bfaaf0ce +0 -0
- data/spec/dummy/tmp/cache/assets/D63/6C0/sprockets%2F1ae1f1cf9d92d0e61b7006171a39fd4d +0 -0
- data/spec/dummy/tmp/cache/assets/D64/060/sprockets%2F3b86cba556132a40a7e49a7b4c7e17ad +0 -0
- data/spec/dummy/tmp/cache/assets/D92/B20/sprockets%2F871f050bda629a18e11ea8db7c1aca77 +0 -0
- data/spec/dummy/tmp/cache/assets/DB2/EA0/sprockets%2Ffead656b8b83fbae9f69435c33b4649d +0 -0
- data/spec/dummy/tmp/cache/assets/E37/3E0/sprockets%2F9e6d2d17ed6da64a2f1876d4cdfefcd1 +0 -0
- data/spec/dummy/tmp/capybara/capybara-201301312228138539754304.html +152 -0
- data/spec/dummy/tmp/capybara/capybara-201301312228185417992211.html +152 -0
- data/spec/dummy/tmp/capybara/capybara-201301312228232926906843.html +152 -0
- data/spec/dummy/tmp/capybara/capybara-201301312228302851745933.html +176 -0
- data/spec/dummy/tmp/capybara/capybara-20130131222835626927814.html +152 -0
- data/spec/dummy/tmp/capybara/capybara-201301312228403892930584.html +152 -0
- data/spec/dummy/tmp/capybara/capybara-201301312228491329185040.html +152 -0
- data/spec/dummy/tmp/capybara/capybara-201301312232412606495803.html +182 -0
- data/spec/dummy/tmp/capybara/capybara-201301312232508358940406.html +242 -0
- data/spec/dummy/tmp/capybara/capybara-201301312233036556441968.html +182 -0
- data/spec/dummy/tmp/capybara/capybara-201301312233093002404474.html +182 -0
- data/spec/models/activeadmin_selleo_cms/page_spec.rb +9 -0
- data/spec/support/pages_helper.rb +4 -4
- metadata +46 -5
- data/app/models/activeadmin_selleo_cms/header_image.rb +0 -12
- data/app/models/activeadmin_selleo_cms/icon.rb +0 -12
- data/app/modules/active_admin/views/index_as_list.rb +0 -28
@@ -0,0 +1,176 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
3
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-type" />
|
4
|
+
<title>New Page | Dummy</title>
|
5
|
+
<link type="text/css" rel="stylesheet" media="screen" href="/assets/active_admin.css" /><link type="text/css" rel="stylesheet" media="print" href="/assets/active_admin/print.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/jquery-ui.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/custom.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/jquery-ui-timepicker-addon.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/active_admin.css" /><link type="text/css" rel="stylesheet" media="print" href="/assets/active_admin/print.css" /> <script type="text/javascript" src="/assets/active_admin.js"></script>
|
6
|
+
<script type="text/javascript" src="/assets/active_admin/base.js"></script>
|
7
|
+
<script type="text/javascript" src="/assets/ckeditor/init.js"></script>
|
8
|
+
<script type="text/javascript" src="/assets/activeadmin-selleo-cms/custom.js"></script>
|
9
|
+
<script type="text/javascript" src="/assets/activeadmin-selleo-cms/jquery-ui-timepicker-addon.js"></script>
|
10
|
+
<script type="text/javascript" src="/assets/active_admin.js"></script>
|
11
|
+
</head>
|
12
|
+
<body class="new admin_pages active_admin logged_in admin_namespace" onpageshow='event.persisted && (function(){var allInstances = CKEDITOR.instances, editor, doc;for ( var i in allInstances ){ editor = allInstances[ i ]; doc = editor.document; if ( doc ) { doc.$.designMode = "off"; doc.$.designMode = "on"; }}})();'>
|
13
|
+
<div id="wrapper">
|
14
|
+
<div id="header" class="header">
|
15
|
+
<h1 id="site_title" class="site_title">Dummy</h1>
|
16
|
+
<ul id="tabs" class="header-item">
|
17
|
+
<li id="dashboard"><a href="/admin/dashboard">Dashboard</a></li>
|
18
|
+
<li id="assets"><a href="/admin/assets">Assets</a></li>
|
19
|
+
<li id="locales"><a href="/admin/locales">Locales</a></li>
|
20
|
+
<li id="pages" class="current"><a href="/admin/pages">Pages</a></li>
|
21
|
+
<li id="sections"><a href="/admin/sections">Sections</a></li>
|
22
|
+
<li id="translations"><a href="/admin/translations">Translations</a></li>
|
23
|
+
</ul>
|
24
|
+
<p id="utility_nav" class="header-item">
|
25
|
+
<span class="current_user">admin@example.com</span>
|
26
|
+
<a data-method="get" href="/admin/logout">Logout</a> </p>
|
27
|
+
</div>
|
28
|
+
<div id="title_bar" class="title_bar">
|
29
|
+
<div id="titlebar_left">
|
30
|
+
<span class="breadcrumb">
|
31
|
+
<a href="/admin">Admin</a> <span class="breadcrumb_sep">/</span>
|
32
|
+
<a href="/admin/pages">Pages</a> <span class="breadcrumb_sep">/</span>
|
33
|
+
</span>
|
34
|
+
<h2 id="page_title">New Page</h2>
|
35
|
+
</div>
|
36
|
+
<div id="titlebar_right"></div>
|
37
|
+
</div>
|
38
|
+
<div class="without_sidebar" id="active_admin_content">
|
39
|
+
<div id="main_content_wrapper">
|
40
|
+
<div id="main_content"><form novalidate="novalidate" method="post" id="new_page" enctype="multipart/form-data" class="formtastic activeadmin_selleo_cms_page" action="/admin/pages" accept-charset="UTF-8"><div style="margin:0;padding:0;display:inline"><input type="hidden" value="✓" name="utf8" /></div>
|
41
|
+
<input type="hidden" name="_change_layout" />
|
42
|
+
<fieldset class="inputs"><legend><span>General options</span></legend><ol><li id="page_layout_name_input" class="select input required"><label for="page_layout_name" class=" label">Layout name<abbr title="required">*</abbr></label><select name="page[layout_name]" id="page_layout_name"><option value="application">application</option>
|
43
|
+
<option selected="selected" value="cms">cms</option></select>
|
44
|
+
|
45
|
+
<p class="inline-hints">The form will reload on change</p></li>
|
46
|
+
<li id="page_parent_id_input" class="select input optional"><label for="page_parent_id" class=" label">Parent</label><select name="page[parent_id]" id="page_parent_id"><option value=""></option>
|
47
|
+
</select>
|
48
|
+
|
49
|
+
</li>
|
50
|
+
<li id="page_is_published_input" class="boolean input optional"><input type="hidden" value="0" name="page[is_published]" /><label for="page_is_published" class=""><input type="checkbox" value="1" name="page[is_published]" id="page_is_published" />Is published</label>
|
51
|
+
|
52
|
+
</li>
|
53
|
+
<li id="page_redirect_to_first_sub_page_input" class="boolean input optional"><input type="hidden" value="0" name="page[redirect_to_first_sub_page]" /><label for="page_redirect_to_first_sub_page" class=""><input type="checkbox" value="1" name="page[redirect_to_first_sub_page]" id="page_redirect_to_first_sub_page" />Redirect to first sub page</label>
|
54
|
+
|
55
|
+
</li>
|
56
|
+
<li id="page_is_link_url_input" class="boolean input optional"><input type="hidden" value="0" name="page[is_link_url]" /><label for="page_is_link_url" class=""><input type="checkbox" value="1" name="page[is_link_url]" id="page_is_link_url" />Is link url</label>
|
57
|
+
|
58
|
+
</li>
|
59
|
+
<li id="page_link_url_input" class="url input optional stringish" style="display: none;"><label for="page_link_url" class=" label">Link url</label><input type="url" name="page[link_url]" maxlength="255" id="page_link_url" />
|
60
|
+
|
61
|
+
<p class="inline-hints">Enter remote URL including the http part at the beginning</p></li>
|
62
|
+
</ol></fieldset><li id="page_sections_attributes_0_name_input" class="hidden input required"><input type="hidden" value="header" name="page[sections_attributes][0][name]" id="page_sections_attributes_0_name" />
|
63
|
+
|
64
|
+
</li>
|
65
|
+
<li id="page_sections_attributes_1_name_input" class="hidden input required"><input type="hidden" value="content" name="page[sections_attributes][1][name]" id="page_sections_attributes_1_name" />
|
66
|
+
|
67
|
+
</li>
|
68
|
+
<li id="page_sections_attributes_2_name_input" class="hidden input required"><input type="hidden" value="footer" name="page[sections_attributes][2][name]" id="page_sections_attributes_2_name" />
|
69
|
+
|
70
|
+
</li>
|
71
|
+
<div class="language-tabs ui-tabs ui-widget ui-widget-content ui-corner-all">
|
72
|
+
<ul class="language-selection ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" role="tablist">
|
73
|
+
<li class="ui-state-default ui-corner-top ui-tabs-active ui-state-active" role="tab" tabindex="0" aria-controls="lang-en" aria-labelledby="ui-id-1" aria-selected="true"><a href="#lang-en" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-1">English</a></li>
|
74
|
+
<li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="lang-pl" aria-labelledby="ui-id-2" aria-selected="false"><a href="#lang-pl" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-2">Polish</a></li>
|
75
|
+
</ul>
|
76
|
+
<div style="display: none;" id="lang-pl" aria-labelledby="ui-id-2" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="false" aria-hidden="true">
|
77
|
+
<fieldset class="inputs"><legend><span>Polish translation</span></legend><ol><ol>
|
78
|
+
<li id="page_translations_attributes_0_title_input" class="string input optional stringish"><label for="page_translations_attributes_0_title" class=" label">Title</label><input type="text" name="page[translations_attributes][0][title]" maxlength="255" id="page_translations_attributes_0_title" />
|
79
|
+
|
80
|
+
</li>
|
81
|
+
<li id="page_translations_attributes_0_slug_input" class="string input optional stringish"><label for="page_translations_attributes_0_slug" class=" label">Slug</label><input type="text" name="page[translations_attributes][0][slug]" maxlength="255" id="page_translations_attributes_0_slug" />
|
82
|
+
|
83
|
+
</li>
|
84
|
+
<li id="page_translations_attributes_0_browser_title_input" class="string input optional stringish"><label for="page_translations_attributes_0_browser_title" class=" label">Browser title</label><input type="text" name="page[translations_attributes][0][browser_title]" maxlength="255" id="page_translations_attributes_0_browser_title" class="link-url-hide" />
|
85
|
+
|
86
|
+
</li>
|
87
|
+
<li id="page_translations_attributes_0_meta_keywords_input" class="string input optional stringish"><label for="page_translations_attributes_0_meta_keywords" class=" label">Meta keywords</label><input type="text" name="page[translations_attributes][0][meta_keywords]" maxlength="255" id="page_translations_attributes_0_meta_keywords" class="link-url-hide" />
|
88
|
+
|
89
|
+
</li>
|
90
|
+
<li id="page_translations_attributes_0_meta_description_input" class="text input optional"><label for="page_translations_attributes_0_meta_description" class=" label">Meta description</label><textarea rows="3" name="page[translations_attributes][0][meta_description]" id="page_translations_attributes_0_meta_description" class="link-url-hide"></textarea>
|
91
|
+
|
92
|
+
</li>
|
93
|
+
<li id="page_translations_attributes_0_locale_input" class="hidden input required"><input type="hidden" value="pl" name="page[translations_attributes][0][locale]" id="page_translations_attributes_0_locale" />
|
94
|
+
|
95
|
+
</li>
|
96
|
+
</ol>
|
97
|
+
</ol></fieldset>
|
98
|
+
</div>
|
99
|
+
<div style="" id="lang-en" aria-labelledby="ui-id-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="true" aria-hidden="false">
|
100
|
+
<fieldset class="inputs"><legend><span>English translation</span></legend><ol><ol>
|
101
|
+
<li id="page_translations_attributes_1_title_input" class="string input required stringish"><label for="page_translations_attributes_1_title" class=" label">Title<abbr title="required">*</abbr></label><input type="text" name="page[translations_attributes][1][title]" maxlength="255" id="page_translations_attributes_1_title" />
|
102
|
+
|
103
|
+
</li>
|
104
|
+
<li id="page_translations_attributes_1_slug_input" class="string input required stringish"><label for="page_translations_attributes_1_slug" class=" label">Slug<abbr title="required">*</abbr></label><input type="text" name="page[translations_attributes][1][slug]" maxlength="255" id="page_translations_attributes_1_slug" />
|
105
|
+
|
106
|
+
</li>
|
107
|
+
<li id="page_translations_attributes_1_browser_title_input" class="string input optional stringish"><label for="page_translations_attributes_1_browser_title" class=" label">Browser title</label><input type="text" name="page[translations_attributes][1][browser_title]" maxlength="255" id="page_translations_attributes_1_browser_title" class="link-url-hide" />
|
108
|
+
|
109
|
+
</li>
|
110
|
+
<li id="page_translations_attributes_1_meta_keywords_input" class="string input optional stringish"><label for="page_translations_attributes_1_meta_keywords" class=" label">Meta keywords</label><input type="text" name="page[translations_attributes][1][meta_keywords]" maxlength="255" id="page_translations_attributes_1_meta_keywords" class="link-url-hide" />
|
111
|
+
|
112
|
+
</li>
|
113
|
+
<li id="page_translations_attributes_1_meta_description_input" class="text input optional"><label for="page_translations_attributes_1_meta_description" class=" label">Meta description</label><textarea rows="3" name="page[translations_attributes][1][meta_description]" id="page_translations_attributes_1_meta_description" class="link-url-hide"></textarea>
|
114
|
+
|
115
|
+
</li>
|
116
|
+
<li id="page_translations_attributes_1_locale_input" class="hidden input required"><input type="hidden" value="en" name="page[translations_attributes][1][locale]" id="page_translations_attributes_1_locale" />
|
117
|
+
|
118
|
+
</li>
|
119
|
+
</ol>
|
120
|
+
</ol></fieldset>
|
121
|
+
</div>
|
122
|
+
</div>
|
123
|
+
<fieldset class="actions"><ol><li id="page_submit_action" class="action input_action "><input type="submit" value="Create Page" name="commit" /></li>
|
124
|
+
<li class="cancel">
|
125
|
+
<a href="/admin/pages">Cancel</a>
|
126
|
+
</li>
|
127
|
+
</ol></fieldset></form>
|
128
|
+
<script>
|
129
|
+
//<![CDATA[
|
130
|
+
function is_link_url(){
|
131
|
+
if($('input#page_is_link_url').is(':checked')){
|
132
|
+
$('.link-url-hide, textarea').closest('li').hide();
|
133
|
+
$('li#page_link_url_input').show();
|
134
|
+
}else{
|
135
|
+
$('li#page_link_url_input').hide();
|
136
|
+
$('.link-url-hide, textarea').closest('li').show();
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
$(function() {
|
141
|
+
$(".language-tabs").tabs();
|
142
|
+
is_link_url();
|
143
|
+
|
144
|
+
$("input[id$='_title']").blur(function(){
|
145
|
+
slugId = '#' + $(this).attr('id').replace('_title', '_slug');
|
146
|
+
if ($(slugId).attr('value') == '') {
|
147
|
+
$(slugId).attr('value', slug($(this).attr('value')) )
|
148
|
+
}
|
149
|
+
|
150
|
+
browserTitleId = '#' + $(this).attr('id').replace('_title', '_browser_title');
|
151
|
+
if ($(browserTitleId).attr('value') == '') {
|
152
|
+
$(browserTitleId).attr('value', $(this).attr('value') )
|
153
|
+
}
|
154
|
+
});
|
155
|
+
|
156
|
+
$('input#page_is_link_url').change(function(){
|
157
|
+
is_link_url();
|
158
|
+
});
|
159
|
+
|
160
|
+
$('select#page_layout_name').change(function(){
|
161
|
+
$(this).closest('form').find('input[name="_change_layout"]').attr('value','1');
|
162
|
+
$(this).closest('form').submit();
|
163
|
+
});
|
164
|
+
});
|
165
|
+
//]]>
|
166
|
+
</script>
|
167
|
+
</div>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
<div id="footer" class="footer">
|
171
|
+
<p>Powered by <a href="http://www.activeadmin.info">Active Admin</a> 0.5.1</p>
|
172
|
+
</div>
|
173
|
+
</div>
|
174
|
+
|
175
|
+
|
176
|
+
</body></html>
|
@@ -0,0 +1,152 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
3
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-type" />
|
4
|
+
<title>New Page | Dummy</title>
|
5
|
+
<link type="text/css" rel="stylesheet" media="screen" href="/assets/active_admin.css" /><link type="text/css" rel="stylesheet" media="print" href="/assets/active_admin/print.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/jquery-ui.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/custom.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/jquery-ui-timepicker-addon.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/active_admin.css" /><link type="text/css" rel="stylesheet" media="print" href="/assets/active_admin/print.css" /> <script type="text/javascript" src="/assets/active_admin.js"></script>
|
6
|
+
<script type="text/javascript" src="/assets/active_admin/base.js"></script>
|
7
|
+
<script type="text/javascript" src="/assets/ckeditor/init.js"></script>
|
8
|
+
<script type="text/javascript" src="/assets/activeadmin-selleo-cms/custom.js"></script>
|
9
|
+
<script type="text/javascript" src="/assets/activeadmin-selleo-cms/jquery-ui-timepicker-addon.js"></script>
|
10
|
+
<script type="text/javascript" src="/assets/active_admin.js"></script>
|
11
|
+
</head>
|
12
|
+
<body class="new admin_pages active_admin logged_in admin_namespace" onpageshow='event.persisted && (function(){var allInstances = CKEDITOR.instances, editor, doc;for ( var i in allInstances ){ editor = allInstances[ i ]; doc = editor.document; if ( doc ) { doc.$.designMode = "off"; doc.$.designMode = "on"; }}})();'>
|
13
|
+
<div id="wrapper">
|
14
|
+
<div id="header" class="header">
|
15
|
+
<h1 id="site_title" class="site_title">Dummy</h1>
|
16
|
+
<ul id="tabs" class="header-item">
|
17
|
+
<li id="dashboard"><a href="/admin/dashboard">Dashboard</a></li>
|
18
|
+
<li id="assets"><a href="/admin/assets">Assets</a></li>
|
19
|
+
<li id="locales"><a href="/admin/locales">Locales</a></li>
|
20
|
+
<li id="pages" class="current"><a href="/admin/pages">Pages</a></li>
|
21
|
+
<li id="sections"><a href="/admin/sections">Sections</a></li>
|
22
|
+
<li id="translations"><a href="/admin/translations">Translations</a></li>
|
23
|
+
</ul>
|
24
|
+
<p id="utility_nav" class="header-item">
|
25
|
+
<span class="current_user">admin@example.com</span>
|
26
|
+
<a data-method="get" href="/admin/logout">Logout</a> </p>
|
27
|
+
</div>
|
28
|
+
<div id="title_bar" class="title_bar">
|
29
|
+
<div id="titlebar_left">
|
30
|
+
<span class="breadcrumb">
|
31
|
+
<a href="/admin">Admin</a> <span class="breadcrumb_sep">/</span>
|
32
|
+
<a href="/admin/pages">Pages</a> <span class="breadcrumb_sep">/</span>
|
33
|
+
</span>
|
34
|
+
<h2 id="page_title">New Page</h2>
|
35
|
+
</div>
|
36
|
+
<div id="titlebar_right"></div>
|
37
|
+
</div>
|
38
|
+
<div class="without_sidebar" id="active_admin_content">
|
39
|
+
<div id="main_content_wrapper">
|
40
|
+
<div id="main_content"><form novalidate="novalidate" method="post" id="new_page" enctype="multipart/form-data" class="formtastic activeadmin_selleo_cms_page" action="/admin/pages" accept-charset="UTF-8"><div style="margin:0;padding:0;display:inline"><input type="hidden" value="✓" name="utf8" /></div>
|
41
|
+
<input type="hidden" name="_change_layout" />
|
42
|
+
<fieldset class="inputs"><legend><span>General options</span></legend><ol><li id="page_layout_name_input" class="select input required"><label for="page_layout_name" class=" label">Layout name<abbr title="required">*</abbr></label><select name="page[layout_name]" id="page_layout_name"><option value="application">application</option>
|
43
|
+
<option selected="selected" value="cms">cms</option></select>
|
44
|
+
|
45
|
+
<p class="inline-hints">The form will reload on change</p></li>
|
46
|
+
<li id="page_parent_id_input" class="select input optional"><label for="page_parent_id" class=" label">Parent</label><select name="page[parent_id]" id="page_parent_id"><option value=""></option>
|
47
|
+
</select>
|
48
|
+
|
49
|
+
</li>
|
50
|
+
<li id="page_is_published_input" class="boolean input optional"><input type="hidden" value="0" name="page[is_published]" /><label for="page_is_published" class=""><input type="checkbox" value="1" name="page[is_published]" id="page_is_published" />Is published</label>
|
51
|
+
|
52
|
+
</li>
|
53
|
+
<li id="page_redirect_to_first_sub_page_input" class="boolean input optional"><input type="hidden" value="0" name="page[redirect_to_first_sub_page]" /><label for="page_redirect_to_first_sub_page" class=""><input type="checkbox" value="1" name="page[redirect_to_first_sub_page]" id="page_redirect_to_first_sub_page" />Redirect to first sub page</label>
|
54
|
+
|
55
|
+
</li>
|
56
|
+
<li id="page_is_link_url_input" class="boolean input optional"><input type="hidden" value="0" name="page[is_link_url]" /><label for="page_is_link_url" class=""><input type="checkbox" value="1" name="page[is_link_url]" id="page_is_link_url" />Is link url</label>
|
57
|
+
|
58
|
+
</li>
|
59
|
+
<li id="page_link_url_input" class="url input optional stringish" style="display: none;"><label for="page_link_url" class=" label">Link url</label><input type="url" name="page[link_url]" maxlength="255" id="page_link_url" />
|
60
|
+
|
61
|
+
<p class="inline-hints">Enter remote URL including the http part at the beginning</p></li>
|
62
|
+
</ol></fieldset><li id="page_sections_attributes_0_name_input" class="hidden input required"><input type="hidden" value="header" name="page[sections_attributes][0][name]" id="page_sections_attributes_0_name" />
|
63
|
+
|
64
|
+
</li>
|
65
|
+
<li id="page_sections_attributes_1_name_input" class="hidden input required"><input type="hidden" value="content" name="page[sections_attributes][1][name]" id="page_sections_attributes_1_name" />
|
66
|
+
|
67
|
+
</li>
|
68
|
+
<li id="page_sections_attributes_2_name_input" class="hidden input required"><input type="hidden" value="footer" name="page[sections_attributes][2][name]" id="page_sections_attributes_2_name" />
|
69
|
+
|
70
|
+
</li>
|
71
|
+
<div class="language-tabs ui-tabs ui-widget ui-widget-content ui-corner-all">
|
72
|
+
<ul class="language-selection ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" role="tablist">
|
73
|
+
<li class="ui-state-default ui-corner-top ui-tabs-active ui-state-active" role="tab" tabindex="0" aria-controls="lang-en" aria-labelledby="ui-id-1" aria-selected="true"><a href="#lang-en" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-1">English</a></li>
|
74
|
+
</ul>
|
75
|
+
<div style="" id="lang-en" aria-labelledby="ui-id-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="true" aria-hidden="false">
|
76
|
+
<fieldset class="inputs"><legend><span>English translation</span></legend><ol><ol>
|
77
|
+
<li id="page_translations_attributes_0_title_input" class="string input required stringish"><label for="page_translations_attributes_0_title" class=" label">Title<abbr title="required">*</abbr></label><input type="text" name="page[translations_attributes][0][title]" maxlength="255" id="page_translations_attributes_0_title" />
|
78
|
+
|
79
|
+
</li>
|
80
|
+
<li id="page_translations_attributes_0_slug_input" class="string input required stringish"><label for="page_translations_attributes_0_slug" class=" label">Slug<abbr title="required">*</abbr></label><input type="text" name="page[translations_attributes][0][slug]" maxlength="255" id="page_translations_attributes_0_slug" />
|
81
|
+
|
82
|
+
</li>
|
83
|
+
<li id="page_translations_attributes_0_browser_title_input" class="string input optional stringish"><label for="page_translations_attributes_0_browser_title" class=" label">Browser title</label><input type="text" name="page[translations_attributes][0][browser_title]" maxlength="255" id="page_translations_attributes_0_browser_title" class="link-url-hide" />
|
84
|
+
|
85
|
+
</li>
|
86
|
+
<li id="page_translations_attributes_0_meta_keywords_input" class="string input optional stringish"><label for="page_translations_attributes_0_meta_keywords" class=" label">Meta keywords</label><input type="text" name="page[translations_attributes][0][meta_keywords]" maxlength="255" id="page_translations_attributes_0_meta_keywords" class="link-url-hide" />
|
87
|
+
|
88
|
+
</li>
|
89
|
+
<li id="page_translations_attributes_0_meta_description_input" class="text input optional"><label for="page_translations_attributes_0_meta_description" class=" label">Meta description</label><textarea rows="3" name="page[translations_attributes][0][meta_description]" id="page_translations_attributes_0_meta_description" class="link-url-hide"></textarea>
|
90
|
+
|
91
|
+
</li>
|
92
|
+
<li id="page_translations_attributes_0_locale_input" class="hidden input required"><input type="hidden" value="en" name="page[translations_attributes][0][locale]" id="page_translations_attributes_0_locale" />
|
93
|
+
|
94
|
+
</li>
|
95
|
+
</ol>
|
96
|
+
</ol></fieldset>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
<fieldset class="actions"><ol><li id="page_submit_action" class="action input_action "><input type="submit" value="Create Page" name="commit" /></li>
|
100
|
+
<li class="cancel">
|
101
|
+
<a href="/admin/pages">Cancel</a>
|
102
|
+
</li>
|
103
|
+
</ol></fieldset></form>
|
104
|
+
<script>
|
105
|
+
//<![CDATA[
|
106
|
+
function is_link_url(){
|
107
|
+
if($('input#page_is_link_url').is(':checked')){
|
108
|
+
$('.link-url-hide, textarea').closest('li').hide();
|
109
|
+
$('li#page_link_url_input').show();
|
110
|
+
}else{
|
111
|
+
$('li#page_link_url_input').hide();
|
112
|
+
$('.link-url-hide, textarea').closest('li').show();
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
$(function() {
|
117
|
+
$(".language-tabs").tabs();
|
118
|
+
is_link_url();
|
119
|
+
|
120
|
+
$("input[id$='_title']").blur(function(){
|
121
|
+
slugId = '#' + $(this).attr('id').replace('_title', '_slug');
|
122
|
+
if ($(slugId).attr('value') == '') {
|
123
|
+
$(slugId).attr('value', slug($(this).attr('value')) )
|
124
|
+
}
|
125
|
+
|
126
|
+
browserTitleId = '#' + $(this).attr('id').replace('_title', '_browser_title');
|
127
|
+
if ($(browserTitleId).attr('value') == '') {
|
128
|
+
$(browserTitleId).attr('value', $(this).attr('value') )
|
129
|
+
}
|
130
|
+
});
|
131
|
+
|
132
|
+
$('input#page_is_link_url').change(function(){
|
133
|
+
is_link_url();
|
134
|
+
});
|
135
|
+
|
136
|
+
$('select#page_layout_name').change(function(){
|
137
|
+
$(this).closest('form').find('input[name="_change_layout"]').attr('value','1');
|
138
|
+
$(this).closest('form').submit();
|
139
|
+
});
|
140
|
+
});
|
141
|
+
//]]>
|
142
|
+
</script>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
<div id="footer" class="footer">
|
147
|
+
<p>Powered by <a href="http://www.activeadmin.info">Active Admin</a> 0.5.1</p>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
|
152
|
+
</body></html>
|
@@ -0,0 +1,152 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
3
|
+
<meta content="text/html; charset=utf-8" http-equiv="Content-type" />
|
4
|
+
<title>New Page | Dummy</title>
|
5
|
+
<link type="text/css" rel="stylesheet" media="screen" href="/assets/active_admin.css" /><link type="text/css" rel="stylesheet" media="print" href="/assets/active_admin/print.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/jquery-ui.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/custom.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/activeadmin-selleo-cms/jquery-ui-timepicker-addon.css" /><link type="text/css" rel="stylesheet" media="screen" href="/assets/active_admin.css" /><link type="text/css" rel="stylesheet" media="print" href="/assets/active_admin/print.css" /> <script type="text/javascript" src="/assets/active_admin.js"></script>
|
6
|
+
<script type="text/javascript" src="/assets/active_admin/base.js"></script>
|
7
|
+
<script type="text/javascript" src="/assets/ckeditor/init.js"></script>
|
8
|
+
<script type="text/javascript" src="/assets/activeadmin-selleo-cms/custom.js"></script>
|
9
|
+
<script type="text/javascript" src="/assets/activeadmin-selleo-cms/jquery-ui-timepicker-addon.js"></script>
|
10
|
+
<script type="text/javascript" src="/assets/active_admin.js"></script>
|
11
|
+
</head>
|
12
|
+
<body class="new admin_pages active_admin logged_in admin_namespace" onpageshow='event.persisted && (function(){var allInstances = CKEDITOR.instances, editor, doc;for ( var i in allInstances ){ editor = allInstances[ i ]; doc = editor.document; if ( doc ) { doc.$.designMode = "off"; doc.$.designMode = "on"; }}})();'>
|
13
|
+
<div id="wrapper">
|
14
|
+
<div id="header" class="header">
|
15
|
+
<h1 id="site_title" class="site_title">Dummy</h1>
|
16
|
+
<ul id="tabs" class="header-item">
|
17
|
+
<li id="dashboard"><a href="/admin/dashboard">Dashboard</a></li>
|
18
|
+
<li id="assets"><a href="/admin/assets">Assets</a></li>
|
19
|
+
<li id="locales"><a href="/admin/locales">Locales</a></li>
|
20
|
+
<li id="pages" class="current"><a href="/admin/pages">Pages</a></li>
|
21
|
+
<li id="sections"><a href="/admin/sections">Sections</a></li>
|
22
|
+
<li id="translations"><a href="/admin/translations">Translations</a></li>
|
23
|
+
</ul>
|
24
|
+
<p id="utility_nav" class="header-item">
|
25
|
+
<span class="current_user">admin@example.com</span>
|
26
|
+
<a data-method="get" href="/admin/logout">Logout</a> </p>
|
27
|
+
</div>
|
28
|
+
<div id="title_bar" class="title_bar">
|
29
|
+
<div id="titlebar_left">
|
30
|
+
<span class="breadcrumb">
|
31
|
+
<a href="/admin">Admin</a> <span class="breadcrumb_sep">/</span>
|
32
|
+
<a href="/admin/pages">Pages</a> <span class="breadcrumb_sep">/</span>
|
33
|
+
</span>
|
34
|
+
<h2 id="page_title">New Page</h2>
|
35
|
+
</div>
|
36
|
+
<div id="titlebar_right"></div>
|
37
|
+
</div>
|
38
|
+
<div class="without_sidebar" id="active_admin_content">
|
39
|
+
<div id="main_content_wrapper">
|
40
|
+
<div id="main_content"><form novalidate="novalidate" method="post" id="new_page" enctype="multipart/form-data" class="formtastic activeadmin_selleo_cms_page" action="/admin/pages" accept-charset="UTF-8"><div style="margin:0;padding:0;display:inline"><input type="hidden" value="✓" name="utf8" /></div>
|
41
|
+
<input type="hidden" name="_change_layout" />
|
42
|
+
<fieldset class="inputs"><legend><span>General options</span></legend><ol><li id="page_layout_name_input" class="select input required"><label for="page_layout_name" class=" label">Layout name<abbr title="required">*</abbr></label><select name="page[layout_name]" id="page_layout_name"><option value="application">application</option>
|
43
|
+
<option selected="selected" value="cms">cms</option></select>
|
44
|
+
|
45
|
+
<p class="inline-hints">The form will reload on change</p></li>
|
46
|
+
<li id="page_parent_id_input" class="select input optional"><label for="page_parent_id" class=" label">Parent</label><select name="page[parent_id]" id="page_parent_id"><option value=""></option>
|
47
|
+
</select>
|
48
|
+
|
49
|
+
</li>
|
50
|
+
<li id="page_is_published_input" class="boolean input optional"><input type="hidden" value="0" name="page[is_published]" /><label for="page_is_published" class=""><input type="checkbox" value="1" name="page[is_published]" id="page_is_published" />Is published</label>
|
51
|
+
|
52
|
+
</li>
|
53
|
+
<li id="page_redirect_to_first_sub_page_input" class="boolean input optional"><input type="hidden" value="0" name="page[redirect_to_first_sub_page]" /><label for="page_redirect_to_first_sub_page" class=""><input type="checkbox" value="1" name="page[redirect_to_first_sub_page]" id="page_redirect_to_first_sub_page" />Redirect to first sub page</label>
|
54
|
+
|
55
|
+
</li>
|
56
|
+
<li id="page_is_link_url_input" class="boolean input optional"><input type="hidden" value="0" name="page[is_link_url]" /><label for="page_is_link_url" class=""><input type="checkbox" value="1" name="page[is_link_url]" id="page_is_link_url" />Is link url</label>
|
57
|
+
|
58
|
+
</li>
|
59
|
+
<li id="page_link_url_input" class="url input optional stringish" style="display: list-item;"><label for="page_link_url" class=" label">Link url</label><input type="url" name="page[link_url]" maxlength="255" id="page_link_url" />
|
60
|
+
|
61
|
+
<p class="inline-hints">Enter remote URL including the http part at the beginning</p></li>
|
62
|
+
</ol></fieldset><li id="page_sections_attributes_0_name_input" class="hidden input required"><input type="hidden" value="header" name="page[sections_attributes][0][name]" id="page_sections_attributes_0_name" />
|
63
|
+
|
64
|
+
</li>
|
65
|
+
<li id="page_sections_attributes_1_name_input" class="hidden input required"><input type="hidden" value="content" name="page[sections_attributes][1][name]" id="page_sections_attributes_1_name" />
|
66
|
+
|
67
|
+
</li>
|
68
|
+
<li id="page_sections_attributes_2_name_input" class="hidden input required"><input type="hidden" value="footer" name="page[sections_attributes][2][name]" id="page_sections_attributes_2_name" />
|
69
|
+
|
70
|
+
</li>
|
71
|
+
<div class="language-tabs ui-tabs ui-widget ui-widget-content ui-corner-all">
|
72
|
+
<ul class="language-selection ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" role="tablist">
|
73
|
+
<li class="ui-state-default ui-corner-top ui-tabs-active ui-state-active" role="tab" tabindex="0" aria-controls="lang-en" aria-labelledby="ui-id-1" aria-selected="true"><a href="#lang-en" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-1">English</a></li>
|
74
|
+
</ul>
|
75
|
+
<div style="" id="lang-en" aria-labelledby="ui-id-1" class="ui-tabs-panel ui-widget-content ui-corner-bottom" role="tabpanel" aria-expanded="true" aria-hidden="false">
|
76
|
+
<fieldset class="inputs"><legend><span>English translation</span></legend><ol><ol>
|
77
|
+
<li id="page_translations_attributes_0_title_input" class="string input required stringish"><label for="page_translations_attributes_0_title" class=" label">Title<abbr title="required">*</abbr></label><input type="text" name="page[translations_attributes][0][title]" maxlength="255" id="page_translations_attributes_0_title" />
|
78
|
+
|
79
|
+
</li>
|
80
|
+
<li id="page_translations_attributes_0_slug_input" class="string input required stringish"><label for="page_translations_attributes_0_slug" class=" label">Slug<abbr title="required">*</abbr></label><input type="text" name="page[translations_attributes][0][slug]" maxlength="255" id="page_translations_attributes_0_slug" />
|
81
|
+
|
82
|
+
</li>
|
83
|
+
<li id="page_translations_attributes_0_browser_title_input" class="string input optional stringish" style="display: none;"><label for="page_translations_attributes_0_browser_title" class=" label">Browser title</label><input type="text" name="page[translations_attributes][0][browser_title]" maxlength="255" id="page_translations_attributes_0_browser_title" class="link-url-hide" />
|
84
|
+
|
85
|
+
</li>
|
86
|
+
<li id="page_translations_attributes_0_meta_keywords_input" class="string input optional stringish" style="display: none;"><label for="page_translations_attributes_0_meta_keywords" class=" label">Meta keywords</label><input type="text" name="page[translations_attributes][0][meta_keywords]" maxlength="255" id="page_translations_attributes_0_meta_keywords" class="link-url-hide" />
|
87
|
+
|
88
|
+
</li>
|
89
|
+
<li id="page_translations_attributes_0_meta_description_input" class="text input optional" style="display: none;"><label for="page_translations_attributes_0_meta_description" class=" label">Meta description</label><textarea rows="3" name="page[translations_attributes][0][meta_description]" id="page_translations_attributes_0_meta_description" class="link-url-hide"></textarea>
|
90
|
+
|
91
|
+
</li>
|
92
|
+
<li id="page_translations_attributes_0_locale_input" class="hidden input required"><input type="hidden" value="en" name="page[translations_attributes][0][locale]" id="page_translations_attributes_0_locale" />
|
93
|
+
|
94
|
+
</li>
|
95
|
+
</ol>
|
96
|
+
</ol></fieldset>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
<fieldset class="actions"><ol><li id="page_submit_action" class="action input_action "><input type="submit" value="Create Page" name="commit" /></li>
|
100
|
+
<li class="cancel">
|
101
|
+
<a href="/admin/pages">Cancel</a>
|
102
|
+
</li>
|
103
|
+
</ol></fieldset></form>
|
104
|
+
<script>
|
105
|
+
//<![CDATA[
|
106
|
+
function is_link_url(){
|
107
|
+
if($('input#page_is_link_url').is(':checked')){
|
108
|
+
$('.link-url-hide, textarea').closest('li').hide();
|
109
|
+
$('li#page_link_url_input').show();
|
110
|
+
}else{
|
111
|
+
$('li#page_link_url_input').hide();
|
112
|
+
$('.link-url-hide, textarea').closest('li').show();
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
$(function() {
|
117
|
+
$(".language-tabs").tabs();
|
118
|
+
is_link_url();
|
119
|
+
|
120
|
+
$("input[id$='_title']").blur(function(){
|
121
|
+
slugId = '#' + $(this).attr('id').replace('_title', '_slug');
|
122
|
+
if ($(slugId).attr('value') == '') {
|
123
|
+
$(slugId).attr('value', slug($(this).attr('value')) )
|
124
|
+
}
|
125
|
+
|
126
|
+
browserTitleId = '#' + $(this).attr('id').replace('_title', '_browser_title');
|
127
|
+
if ($(browserTitleId).attr('value') == '') {
|
128
|
+
$(browserTitleId).attr('value', $(this).attr('value') )
|
129
|
+
}
|
130
|
+
});
|
131
|
+
|
132
|
+
$('input#page_is_link_url').change(function(){
|
133
|
+
is_link_url();
|
134
|
+
});
|
135
|
+
|
136
|
+
$('select#page_layout_name').change(function(){
|
137
|
+
$(this).closest('form').find('input[name="_change_layout"]').attr('value','1');
|
138
|
+
$(this).closest('form').submit();
|
139
|
+
});
|
140
|
+
});
|
141
|
+
//]]>
|
142
|
+
</script>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
<div id="footer" class="footer">
|
147
|
+
<p>Powered by <a href="http://www.activeadmin.info">Active Admin</a> 0.5.1</p>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
|
152
|
+
</body></html>
|