comfortable_mexican_sofa 0.0.18 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -8
- data/Gemfile +11 -0
- data/Gemfile.lock +91 -0
- data/README.md +4 -0
- data/Rakefile +28 -57
- data/VERSION +1 -1
- data/app/controllers/application_controller.rb +5 -0
- data/app/controllers/cms_admin/base_controller.rb +1 -21
- data/app/controllers/cms_admin/layouts_controller.rb +23 -38
- data/app/controllers/cms_admin/pages_controller.rb +24 -40
- data/app/controllers/cms_admin/snippets_controller.rb +26 -34
- data/app/controllers/cms_admin/uploads_controller.rb +27 -0
- data/app/controllers/cms_content_controller.rb +22 -19
- data/app/models/cms_block.rb +20 -6
- data/app/models/cms_layout.rb +34 -80
- data/app/models/cms_page.rb +44 -102
- data/app/models/cms_snippet.rb +12 -7
- data/app/models/cms_upload.rb +36 -0
- data/app/views/cms_admin/layouts/_form.html.erb +6 -0
- data/app/views/cms_admin/layouts/_index_branch.html.erb +24 -0
- data/app/views/cms_admin/layouts/edit.html.erb +6 -0
- data/app/views/cms_admin/layouts/index.html.erb +6 -0
- data/app/views/cms_admin/layouts/new.html.erb +6 -0
- data/app/views/cms_admin/pages/_form.html.erb +14 -0
- data/app/views/cms_admin/pages/_form_blocks.html.erb +7 -0
- data/app/views/cms_admin/pages/_index_branch.html.erb +27 -0
- data/app/views/cms_admin/pages/edit.html.erb +6 -0
- data/app/views/cms_admin/pages/form_blocks.js.erb +1 -0
- data/app/views/cms_admin/pages/index.html.erb +6 -0
- data/app/views/cms_admin/pages/new.html.erb +6 -0
- data/app/views/cms_admin/snippets/_form.html.erb +2 -0
- data/app/views/cms_admin/snippets/edit.html.erb +6 -0
- data/app/views/cms_admin/snippets/index.html.erb +3 -0
- data/app/views/cms_admin/snippets/new.html.erb +6 -0
- data/app/views/cms_admin/uploads/_index.html.erb +8 -0
- data/app/views/cms_admin/uploads/_upload.html.erb +11 -0
- data/app/views/cms_admin/uploads/destroy.js.erb +3 -0
- data/app/views/cms_admin/uploads/index.html.erb +2 -0
- data/app/views/layouts/cms_admin.html.erb +36 -0
- data/comfortable_mexican_sofa.gemspec +141 -197
- data/config.ru +4 -0
- data/config/application.rb +44 -0
- data/config/boot.rb +13 -0
- data/{test/rails_root/config → config}/database.yml +0 -0
- data/config/environment.rb +5 -0
- data/config/environments/development.rb +22 -0
- data/config/environments/production.rb +49 -0
- data/config/environments/test.rb +35 -0
- data/{test/rails_root/config → config}/initializers/backtrace_silencers.rb +2 -2
- data/{test/rails_root/config → config}/initializers/inflections.rb +1 -1
- data/{test/rails_root/config → config}/initializers/mime_types.rb +0 -0
- data/config/initializers/paperclip.rb +3 -0
- data/config/initializers/secret_token.rb +7 -0
- data/config/initializers/session_store.rb +8 -0
- data/{test/rails_root/config → config}/locales/en.yml +1 -1
- data/config/routes.rb +20 -0
- data/db/migrate/01_create_cms.rb +73 -0
- data/db/seeds.rb +7 -0
- data/doc/README_FOR_APP +95 -0
- data/lib/comfortable_mexican_sofa.rb +34 -39
- data/lib/comfortable_mexican_sofa/cms_acts_as_tree.rb +42 -49
- data/lib/comfortable_mexican_sofa/cms_form_builder.rb +107 -0
- data/lib/comfortable_mexican_sofa/cms_rails_extensions.rb +25 -5
- data/lib/comfortable_mexican_sofa/cms_tag.rb +90 -85
- data/lib/comfortable_mexican_sofa/cms_tag/field_datetime.rb +26 -0
- data/lib/comfortable_mexican_sofa/cms_tag/field_integer.rb +26 -0
- data/lib/comfortable_mexican_sofa/cms_tag/field_string.rb +26 -0
- data/lib/comfortable_mexican_sofa/cms_tag/field_text.rb +26 -0
- data/lib/comfortable_mexican_sofa/cms_tag/page_datetime.rb +22 -0
- data/lib/comfortable_mexican_sofa/cms_tag/page_integer.rb +22 -0
- data/lib/comfortable_mexican_sofa/cms_tag/page_string.rb +22 -0
- data/lib/comfortable_mexican_sofa/cms_tag/page_text.rb +22 -0
- data/lib/comfortable_mexican_sofa/cms_tag/partial.rb +20 -0
- data/lib/comfortable_mexican_sofa/cms_tag/snippet.rb +18 -0
- data/{generators/cms/templates → lib/generators}/README +0 -20
- data/lib/generators/cms_generator.rb +28 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/{test/rails_root/public → public}/favicon.ico +0 -0
- data/public/images/comfortable_mexican_sofa/body_bg.jpg +0 -0
- data/{generators/cms/templates/images → public/images/comfortable_mexican_sofa}/icon_regular.gif +0 -0
- data/public/javascripts/comfortable_mexican_sofa/cms.js +53 -0
- data/public/javascripts/comfortable_mexican_sofa/jquery-ui.js +325 -0
- data/public/javascripts/comfortable_mexican_sofa/jquery.js +154 -0
- data/public/javascripts/comfortable_mexican_sofa/plupload/plupload.full.min.js +1 -0
- data/public/javascripts/comfortable_mexican_sofa/plupload/plupload.html4.min.js +1 -0
- data/public/javascripts/comfortable_mexican_sofa/plupload/plupload.html5.min.js +1 -0
- data/public/javascripts/comfortable_mexican_sofa/rails.js +132 -0
- data/public/javascripts/comfortable_mexican_sofa/uploader.js +47 -0
- data/{test/rails_root/public → public}/robots.txt +0 -0
- data/public/stylesheets/comfortable_mexican_sofa/jquery-ui.css +305 -0
- data/public/stylesheets/comfortable_mexican_sofa/reset.css +1 -0
- data/public/stylesheets/comfortable_mexican_sofa/structure.css +194 -0
- data/public/stylesheets/comfortable_mexican_sofa/typography.css +20 -0
- data/script/rails +6 -0
- data/test/fixtures/README.md +22 -0
- data/test/fixtures/cms_blocks.yml +10 -34
- data/test/fixtures/cms_layouts.yml +37 -33
- data/test/fixtures/cms_pages.yml +11 -32
- data/test/fixtures/cms_snippets.yml +2 -6
- data/test/fixtures/cms_uploads.yml +4 -0
- data/test/fixtures/files/invalid_file.gif +9 -0
- data/test/fixtures/files/valid_image.jpg +0 -0
- data/test/functional/cms_admin/base_controller_test.rb +9 -0
- data/test/functional/cms_admin/layouts_controller_test.rb +61 -46
- data/test/functional/cms_admin/pages_controller_test.rb +201 -102
- data/test/functional/cms_admin/snippets_controller_test.rb +46 -39
- data/test/functional/cms_admin/uploads_controller_test.rb +32 -0
- data/test/functional/cms_content_controller_test.rb +37 -32
- data/test/test_helper.rb +29 -9
- data/test/unit/cms_block_test.rb +60 -0
- data/test/unit/cms_layout_test.rb +48 -0
- data/test/unit/cms_page_test.rb +122 -0
- data/test/unit/cms_snippet_test.rb +23 -0
- data/test/unit/cms_tag_test.rb +149 -0
- data/test/unit/cms_tags/field_datetime_test.rb +36 -0
- data/test/unit/cms_tags/field_integer_test.rb +35 -0
- data/test/unit/cms_tags/field_string_test.rb +35 -0
- data/test/unit/cms_tags/field_text_test.rb +34 -0
- data/test/unit/cms_tags/page_datetime_test.rb +36 -0
- data/test/unit/cms_tags/page_integer_test.rb +35 -0
- data/test/unit/cms_tags/page_string_test.rb +35 -0
- data/test/unit/cms_tags/page_text_test.rb +36 -0
- data/test/unit/cms_tags/partial_test.rb +30 -0
- data/test/unit/cms_tags/snippet_test.rb +34 -0
- data/test/unit/cms_upload_test.rb +30 -0
- metadata +176 -215
- data/CHANGELOG.rdoc +0 -2
- data/LICENSE +0 -20
- data/README.rdoc +0 -55
- data/app/controllers/cms_admin/attachments_controller.rb +0 -55
- data/app/controllers/cms_admin/categories_controller.rb +0 -69
- data/app/controllers/cms_admin/sections_controller.rb +0 -17
- data/app/controllers/cms_common/render_page.rb +0 -47
- data/app/helpers/cms_helper.rb +0 -12
- data/app/models/cms_attachment.rb +0 -17
- data/app/models/cms_attachment_categorization.rb +0 -5
- data/app/models/cms_category.rb +0 -36
- data/app/models/cms_page_categorization.rb +0 -6
- data/app/views/cms_admin/attachments/_details.html.haml +0 -27
- data/app/views/cms_admin/attachments/_form.html.haml +0 -24
- data/app/views/cms_admin/attachments/edit.html.haml +0 -10
- data/app/views/cms_admin/attachments/index.html.haml +0 -36
- data/app/views/cms_admin/attachments/new.html.haml +0 -8
- data/app/views/cms_admin/categories/_category.html.haml +0 -21
- data/app/views/cms_admin/categories/_category_subform.html.haml +0 -12
- data/app/views/cms_admin/categories/_form.html.haml +0 -18
- data/app/views/cms_admin/categories/_new.html.haml +0 -7
- data/app/views/cms_admin/categories/_toggle_link.html.haml +0 -9
- data/app/views/cms_admin/categories/_tree_branch.html.haml +0 -36
- data/app/views/cms_admin/categories/children.js.rjs +0 -10
- data/app/views/cms_admin/categories/create.js.rjs +0 -9
- data/app/views/cms_admin/categories/edit.html.haml +0 -10
- data/app/views/cms_admin/categories/index.html.haml +0 -7
- data/app/views/cms_admin/categories/new.html.haml +0 -8
- data/app/views/cms_admin/categories/show.html.haml +0 -17
- data/app/views/cms_admin/layouts/_details.html.haml +0 -6
- data/app/views/cms_admin/layouts/_form.html.haml +0 -19
- data/app/views/cms_admin/layouts/_toggle_link.html.haml +0 -9
- data/app/views/cms_admin/layouts/_tree_branch.html.haml +0 -39
- data/app/views/cms_admin/layouts/children.js.rjs +0 -10
- data/app/views/cms_admin/layouts/edit.html.haml +0 -10
- data/app/views/cms_admin/layouts/index.html.haml +0 -7
- data/app/views/cms_admin/layouts/new.html.haml +0 -8
- data/app/views/cms_admin/pages/_details.html.haml +0 -25
- data/app/views/cms_admin/pages/_form.html.haml +0 -45
- data/app/views/cms_admin/pages/_form_blocks.html.haml +0 -48
- data/app/views/cms_admin/pages/_toggle_link.html.haml +0 -10
- data/app/views/cms_admin/pages/_tree_branch.html.haml +0 -41
- data/app/views/cms_admin/pages/children.js.rjs +0 -10
- data/app/views/cms_admin/pages/edit.html.haml +0 -11
- data/app/views/cms_admin/pages/form_blocks.js.rjs +0 -1
- data/app/views/cms_admin/pages/index.html.haml +0 -6
- data/app/views/cms_admin/pages/new.html.haml +0 -9
- data/app/views/cms_admin/sections/show.html.haml +0 -23
- data/app/views/cms_admin/snippets/_form.html.haml +0 -10
- data/app/views/cms_admin/snippets/edit.html.haml +0 -10
- data/app/views/cms_admin/snippets/index.html.haml +0 -26
- data/app/views/cms_admin/snippets/new.html.haml +0 -8
- data/app/views/cms_content/show.xml.rxml +0 -27
- data/app/views/cms_content/sitemap.xml.rxml +0 -16
- data/app/views/layouts/cms_admin.html.haml +0 -44
- data/config/cms_routes.rb +0 -25
- data/generators/cms/cms_generator.rb +0 -55
- data/generators/cms/templates/images/arrow_bottom.gif +0 -0
- data/generators/cms/templates/images/arrow_right.gif +0 -0
- data/generators/cms/templates/images/icon_attachment.gif +0 -0
- data/generators/cms/templates/images/icon_category.gif +0 -0
- data/generators/cms/templates/images/icon_draft.gif +0 -0
- data/generators/cms/templates/images/icon_layout.gif +0 -0
- data/generators/cms/templates/images/icon_move.gif +0 -0
- data/generators/cms/templates/images/icon_snippet.gif +0 -0
- data/generators/cms/templates/images/logo.png +0 -0
- data/generators/cms/templates/initializers/cms.rb +0 -14
- data/generators/cms/templates/initializers/paperclip.rb +0 -14
- data/generators/cms/templates/javascripts/codemirror_init.js +0 -16
- data/generators/cms/templates/javascripts/mce_init.js +0 -17
- data/generators/cms/templates/javascripts/utilities.js +0 -27
- data/generators/cms/templates/migrations/create_cms.rb +0 -113
- data/generators/cms/templates/stylesheets/cms_master.sass +0 -414
- data/init.rb +0 -1
- data/lib/comfortable_mexican_sofa/acts_as_categorized.rb +0 -87
- data/lib/comfortable_mexican_sofa/acts_as_published.rb +0 -60
- data/lib/comfortable_mexican_sofa/cms_tags/attachment.rb +0 -3
- data/lib/comfortable_mexican_sofa/cms_tags/block.rb +0 -117
- data/lib/comfortable_mexican_sofa/cms_tags/helper.rb +0 -3
- data/lib/comfortable_mexican_sofa/cms_tags/page_block.rb +0 -119
- data/lib/comfortable_mexican_sofa/cms_tags/partial.rb +0 -19
- data/lib/comfortable_mexican_sofa/cms_tags/snippet.rb +0 -19
- data/rails/init.rb +0 -1
- data/test/fixtures/cms_attachment_categorizations.yml +0 -7
- data/test/fixtures/cms_attachments.yml +0 -6
- data/test/fixtures/cms_categories.yml +0 -19
- data/test/fixtures/cms_page_categorizations.yml +0 -15
- data/test/fixtures/files/upload_file.txt +0 -1
- data/test/functional/cms_admin/attachments_controller_test.rb +0 -63
- data/test/functional/cms_admin/categories_controller_test.rb +0 -86
- data/test/functional/cms_admin/sections_controller_test.rb +0 -9
- data/test/models/cms_attachment_test.rb +0 -16
- data/test/models/cms_block_test.rb +0 -11
- data/test/models/cms_categorization_test.rb +0 -39
- data/test/models/cms_category_test.rb +0 -71
- data/test/models/cms_layout_test.rb +0 -44
- data/test/models/cms_page_test.rb +0 -55
- data/test/models/cms_snippet_test.rb +0 -16
- data/test/models/cms_tag_test.rb +0 -70
- data/test/rails_root/README +0 -243
- data/test/rails_root/Rakefile +0 -10
- data/test/rails_root/app/controllers/application_controller.rb +0 -10
- data/test/rails_root/app/helpers/application_helper.rb +0 -3
- data/test/rails_root/app/views/cms/under-development.html.haml +0 -1
- data/test/rails_root/app/views/complex_page/_example.html.erb +0 -1
- data/test/rails_root/config/boot.rb +0 -110
- data/test/rails_root/config/environment.rb +0 -48
- data/test/rails_root/config/environments/development.rb +0 -17
- data/test/rails_root/config/environments/production.rb +0 -28
- data/test/rails_root/config/environments/test.rb +0 -28
- data/test/rails_root/config/initializers/new_rails_defaults.rb +0 -19
- data/test/rails_root/config/initializers/session_store.rb +0 -15
- data/test/rails_root/config/routes.rb +0 -43
- data/test/rails_root/doc/README_FOR_APP +0 -2
- data/test/rails_root/public/404.html +0 -30
- data/test/rails_root/public/422.html +0 -30
- data/test/rails_root/public/500.html +0 -30
- data/test/rails_root/public/images/rails.png +0 -0
- data/test/rails_root/public/index.html +0 -275
- data/test/rails_root/public/javascripts/application.js +0 -2
- data/test/rails_root/public/javascripts/controls.js +0 -963
- data/test/rails_root/public/javascripts/dragdrop.js +0 -973
- data/test/rails_root/public/javascripts/effects.js +0 -1128
- data/test/rails_root/public/javascripts/prototype.js +0 -4320
- data/test/rails_root/public/stylesheets/sass/cms_master.sass +0 -414
- data/test/rails_root/script/about +0 -4
- data/test/rails_root/script/console +0 -3
- data/test/rails_root/script/dbconsole +0 -3
- data/test/rails_root/script/destroy +0 -3
- data/test/rails_root/script/generate +0 -3
- data/test/rails_root/script/performance/benchmarker +0 -3
- data/test/rails_root/script/performance/profiler +0 -3
- data/test/rails_root/script/plugin +0 -3
- data/test/rails_root/script/runner +0 -3
- data/test/rails_root/script/server +0 -3
@@ -0,0 +1 @@
|
|
1
|
+
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}
|
@@ -0,0 +1,194 @@
|
|
1
|
+
/* -- Containers --------------------------------------------------------- */
|
2
|
+
html, body {
|
3
|
+
height: 100%;
|
4
|
+
background: url(/images/comfortable_mexican_sofa/body_bg.jpg);
|
5
|
+
}
|
6
|
+
.body_wrapper {
|
7
|
+
height: 100%;
|
8
|
+
}
|
9
|
+
.left_column {
|
10
|
+
width: 200px;
|
11
|
+
float: left;
|
12
|
+
}
|
13
|
+
.center_column {
|
14
|
+
margin: 0px 200px;
|
15
|
+
min-height: 100%;
|
16
|
+
background-color: #ececec;
|
17
|
+
box-shadow: inset 0px 0px 3px #000;
|
18
|
+
-moz-box-shadow: inset 0px 0px 3px #000;
|
19
|
+
}
|
20
|
+
.center_column_content {
|
21
|
+
padding: 25px;
|
22
|
+
}
|
23
|
+
.right_column {
|
24
|
+
width: 200px;
|
25
|
+
float: right;
|
26
|
+
}
|
27
|
+
.right_column_content {
|
28
|
+
padding: 25px;
|
29
|
+
width: 150px;
|
30
|
+
position: fixed;
|
31
|
+
}
|
32
|
+
.left_column_content {
|
33
|
+
padding: 25px 0px 25px 25px;
|
34
|
+
width: 175px;
|
35
|
+
position: fixed;
|
36
|
+
}
|
37
|
+
.left_column_content a {
|
38
|
+
display: block;
|
39
|
+
background-color: #fff;
|
40
|
+
padding: 0px 10px;
|
41
|
+
margin-bottom: 10px;
|
42
|
+
font: 18px/30px Georgia, serif;
|
43
|
+
color: #1C1F22;
|
44
|
+
border-top-left-radius: 5px;
|
45
|
+
border-bottom-left-radius: 5px ;
|
46
|
+
-moz-border-radius-topleft: 5px;
|
47
|
+
-moz-border-radius-bottomleft: 5px;
|
48
|
+
opacity: 0.8;
|
49
|
+
}
|
50
|
+
.left_column_content a:hover,
|
51
|
+
.left_column_content a.active {
|
52
|
+
opacity: 1;
|
53
|
+
}
|
54
|
+
|
55
|
+
/* -- Common Elements ---------------------------------------------------- */
|
56
|
+
.flash {
|
57
|
+
text-align: center;
|
58
|
+
line-height: 25px;
|
59
|
+
color: #fff;
|
60
|
+
background-color: #066B12;
|
61
|
+
margin: 0px 2px;
|
62
|
+
}
|
63
|
+
.flash.error {
|
64
|
+
background-color: #9e0b0f;
|
65
|
+
}
|
66
|
+
.big_button {
|
67
|
+
float: right;
|
68
|
+
padding: 6px 10px;
|
69
|
+
font-size: 10px;
|
70
|
+
text-transform: uppercase;
|
71
|
+
background: url(/images/comfortable_mexican_sofa/body_bg.jpg);
|
72
|
+
border-radius: 3px;
|
73
|
+
-moz-border-radius: 3px;
|
74
|
+
letter-spacing: 0.5px;
|
75
|
+
}
|
76
|
+
.big_button span {
|
77
|
+
color: #fff;
|
78
|
+
}
|
79
|
+
|
80
|
+
/* -- Forms -------------------------------------------------------------- */
|
81
|
+
.form_element {
|
82
|
+
overflow: hidden;
|
83
|
+
margin-bottom: 10px;
|
84
|
+
}
|
85
|
+
.form_element .label {
|
86
|
+
width: 137px;
|
87
|
+
float: left;
|
88
|
+
text-align: right;
|
89
|
+
font: 15px/21px Georgia, serif;
|
90
|
+
text-shadow: #fff 1px 1px;
|
91
|
+
padding-right: 10px;
|
92
|
+
background-color: #e0e0e0;
|
93
|
+
border-top-left-radius: 3px;
|
94
|
+
border-bottom-left-radius: 3px ;
|
95
|
+
-moz-border-radius-topleft: 3px;
|
96
|
+
-moz-border-radius-bottomleft: 3px;
|
97
|
+
border-right: 3px solid #bbb;
|
98
|
+
}
|
99
|
+
.form_element .value {
|
100
|
+
margin-left: 160px;
|
101
|
+
}
|
102
|
+
.form_element .value input,
|
103
|
+
.form_element .value textarea,
|
104
|
+
.form_element .value select {
|
105
|
+
width: 98%;
|
106
|
+
}
|
107
|
+
.form_element .value input,
|
108
|
+
.form_element .value textarea {
|
109
|
+
border: 1px solid #ccc;
|
110
|
+
padding: 2px;
|
111
|
+
font-family: 'Courier New', Courier, monospace;
|
112
|
+
}
|
113
|
+
.form_element .value textarea {
|
114
|
+
height: 300px;
|
115
|
+
}
|
116
|
+
.form_element.submit_element {
|
117
|
+
margin-left: 160px;
|
118
|
+
}
|
119
|
+
.page_form_extras {
|
120
|
+
margin-bottom: 25px;
|
121
|
+
}
|
122
|
+
.form_element.cms_tag_field_datetime .label,
|
123
|
+
.form_element.cms_tag_field_integer .label,
|
124
|
+
.form_element.cms_tag_field_string .label,
|
125
|
+
.form_element.cms_tag_field_text .label {
|
126
|
+
border-color: #48699C;
|
127
|
+
}
|
128
|
+
.form_element.cms_tag_page_datetime .label,
|
129
|
+
.form_element.cms_tag_page_integer .label,
|
130
|
+
.form_element.cms_tag_page_string .label,
|
131
|
+
.form_element.cms_tag_page_text .label {
|
132
|
+
border-color: #3F7300;
|
133
|
+
}
|
134
|
+
.form_error {
|
135
|
+
background-color: #9e0b0f;
|
136
|
+
font-size: 14px;
|
137
|
+
color: #fff;
|
138
|
+
padding: 5px;
|
139
|
+
text-align: center;
|
140
|
+
margin-bottom: 10px;
|
141
|
+
}
|
142
|
+
.form_element .value .field_with_errors input,
|
143
|
+
.form_element .value .field_with_errors textarea {
|
144
|
+
border-color: #9e0b0f;
|
145
|
+
}
|
146
|
+
|
147
|
+
/* -- Tree Listings ------------------------------------------------------ */
|
148
|
+
ul.tree li .item {
|
149
|
+
overflow: hidden;
|
150
|
+
padding: 5px;
|
151
|
+
border-bottom: 1px solid #fff;
|
152
|
+
}
|
153
|
+
ul.tree li .icon {
|
154
|
+
width: 28px;
|
155
|
+
height: 28px;
|
156
|
+
background: url(/images/comfortable_mexican_sofa/icon_regular.gif);
|
157
|
+
float: left;
|
158
|
+
}
|
159
|
+
ul.tree li .action_links {
|
160
|
+
float: right;
|
161
|
+
opacity: 0.1;
|
162
|
+
}
|
163
|
+
ul.tree .action_links a {
|
164
|
+
margin-left: 3px;
|
165
|
+
float: left;
|
166
|
+
background-color: #272A2D;
|
167
|
+
color: #fff;
|
168
|
+
padding: 3px 5px;
|
169
|
+
font-size: 9px;
|
170
|
+
text-transform: uppercase;
|
171
|
+
border-radius: 3px;
|
172
|
+
-moz-border-radius: 3px;
|
173
|
+
}
|
174
|
+
ul.tree li .label {
|
175
|
+
margin-left: 35px;
|
176
|
+
font: 16px/18px Georgia, serif;
|
177
|
+
color: #1C1F22;
|
178
|
+
}
|
179
|
+
ul.tree li .label .url {
|
180
|
+
margin-left: 15px;
|
181
|
+
font: 11px/14px Arial, sans-serif;
|
182
|
+
color: #1C1F22;
|
183
|
+
}
|
184
|
+
|
185
|
+
ul.tree li ul {
|
186
|
+
margin-left: 30px;
|
187
|
+
}
|
188
|
+
|
189
|
+
ul.tree li .item:hover {
|
190
|
+
background-color: #fff;
|
191
|
+
}
|
192
|
+
ul.tree li .item:hover .action_links {
|
193
|
+
opacity: 1;
|
194
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
body {
|
2
|
+
font: 13px Arial, sans-serif;
|
3
|
+
}
|
4
|
+
|
5
|
+
h1 {
|
6
|
+
font: bold 25px/25px Georgia, serif;
|
7
|
+
margin-bottom: 25px;
|
8
|
+
padding-bottom: 5px;
|
9
|
+
color: #1C1F22;
|
10
|
+
text-shadow: #fff 1px 1px;
|
11
|
+
border-bottom: 2px groove #ccc;
|
12
|
+
}
|
13
|
+
|
14
|
+
a {
|
15
|
+
text-decoration: none;
|
16
|
+
color: #384E66;
|
17
|
+
}
|
18
|
+
a:hover {
|
19
|
+
color: #1C2733;
|
20
|
+
}
|
data/script/rails
ADDED
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Default Test Application Data Structure
|
2
|
+
=======================================
|
3
|
+
Layout
|
4
|
+
------
|
5
|
+
<cms:field:default_field:text>
|
6
|
+
layout_content_a
|
7
|
+
<cms:page:default_page:text>
|
8
|
+
layout_content_b
|
9
|
+
<cms:snippet:default_snippet>
|
10
|
+
layout_content_c
|
11
|
+
Page
|
12
|
+
----
|
13
|
+
### CmsBlock::FieldText
|
14
|
+
default_field_content
|
15
|
+
### CmsBlock::PageText
|
16
|
+
default_page_content_a
|
17
|
+
<cms:snippet:default_snippet>
|
18
|
+
default_page_content_a
|
19
|
+
Snippets
|
20
|
+
-------
|
21
|
+
### Snippet
|
22
|
+
default_snippet_content
|
@@ -1,38 +1,14 @@
|
|
1
|
-
|
1
|
+
default_field_text:
|
2
2
|
cms_page: default
|
3
|
-
|
4
|
-
|
3
|
+
type: CmsTag::FieldText
|
4
|
+
label: default_field_text
|
5
|
+
content_text: default_field_text_content
|
5
6
|
|
6
|
-
|
7
|
+
default_page_text:
|
7
8
|
cms_page: default
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
default_page_block_footer:
|
12
|
-
cms_page: default
|
13
|
-
label: footer
|
14
|
-
content_text: /page_block:footer/
|
15
|
-
|
16
|
-
complex_page_block_header:
|
17
|
-
cms_page: complex
|
18
|
-
label: header
|
19
|
-
content_string: /block:header/
|
20
|
-
|
21
|
-
complex_page_block_left_column:
|
22
|
-
cms_page: complex
|
23
|
-
label: left_column
|
9
|
+
type: CmsTag::PageText
|
10
|
+
label: default_page_text
|
24
11
|
content_text: |-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
cms_page: complex
|
29
|
-
label: right_column
|
30
|
-
content_text: |-
|
31
|
-
/page_block:right_column/ {{ cms_partial:complex_page/example }}
|
32
|
-
|
33
|
-
complex_page_block_footer:
|
34
|
-
cms_page: complex
|
35
|
-
label: footer
|
36
|
-
content_text: /page_block:footer/
|
37
|
-
|
38
|
-
|
12
|
+
default_page_text_content_a
|
13
|
+
<cms:snippet:default>
|
14
|
+
default_page_text_content_b
|
@@ -1,41 +1,45 @@
|
|
1
1
|
default:
|
2
|
+
id: 1
|
2
3
|
label: Default Layout
|
3
|
-
parent:
|
4
|
-
children_count: 1
|
5
|
-
position: 0
|
6
|
-
is_extendable: 1
|
4
|
+
parent:
|
7
5
|
content: |-
|
8
|
-
|
9
|
-
|
6
|
+
<cms:field:default_field_text:text>
|
7
|
+
layout_content_a
|
8
|
+
<cms:page:default_page_text:text>
|
9
|
+
layout_content_b
|
10
|
+
<cms:snippet:default>
|
11
|
+
layout_content_c
|
12
|
+
css: |-
|
13
|
+
body { background-color: red }
|
14
|
+
p { color: #fff }
|
15
|
+
js: |-
|
16
|
+
$(document).ready(function() {
|
17
|
+
alert('hi');
|
18
|
+
})
|
19
|
+
|
10
20
|
nested:
|
11
21
|
label: Nested Layout
|
12
|
-
parent:
|
13
|
-
content: |-
|
14
|
-
{{ cms_page_block:left_column:text }}{{ cms_page_block:right_column:text }}{{ cms_snippet:complex_snippet }}
|
15
|
-
|
16
|
-
identical_tags:
|
17
|
-
label: Layout with identical tags
|
22
|
+
parent:
|
18
23
|
content: |-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
{
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
and a proper, singular one
|
28
|
-
{{ cms_block:my_block_3:boolean}}
|
24
|
+
<cms:page:header/>
|
25
|
+
<cms:page:content/>
|
26
|
+
css: |-
|
27
|
+
body { background-color: red }
|
28
|
+
js: |-
|
29
|
+
$(document).ready(function() {
|
30
|
+
alert('hi');
|
31
|
+
})
|
29
32
|
|
30
|
-
|
31
|
-
label: Layout
|
33
|
+
child:
|
34
|
+
label: Child Layout
|
35
|
+
parent: nested
|
32
36
|
content: |-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
<cms:page:left_column>
|
38
|
+
<cms:page:right_column>
|
39
|
+
css: |-
|
40
|
+
body { p: #fff }
|
41
|
+
js: |-
|
42
|
+
js: |-
|
43
|
+
$(document).ready(function() {
|
44
|
+
alert('sup');
|
45
|
+
})
|
data/test/fixtures/cms_pages.yml
CHANGED
@@ -1,38 +1,17 @@
|
|
1
|
-
default:
|
2
|
-
label: Home Page
|
3
|
-
cms_layout: default
|
1
|
+
default:
|
4
2
|
parent:
|
3
|
+
cms_layout_id: 1
|
4
|
+
label: Default Page
|
5
5
|
slug:
|
6
|
-
full_path: ''
|
6
|
+
full_path: '/'
|
7
7
|
children_count: 1
|
8
8
|
position: 0
|
9
|
-
published_at: <%= 10.days.ago %>
|
10
|
-
unpublished_at:
|
11
|
-
is_section: 0
|
12
9
|
|
13
|
-
|
14
|
-
<<: *page
|
10
|
+
child:
|
15
11
|
parent: default
|
16
|
-
|
17
|
-
|
18
|
-
slug:
|
19
|
-
full_path: '
|
20
|
-
|
21
|
-
|
22
|
-
unpublished:
|
23
|
-
<<: *page
|
24
|
-
parent: default
|
25
|
-
label: Unpublished Page
|
26
|
-
cms_layout: default
|
27
|
-
slug: unpublished
|
28
|
-
full_path: 'unpublished'
|
29
|
-
published_at: <%= 10.days.from_now %>
|
30
|
-
|
31
|
-
under_development:
|
32
|
-
<<: *page
|
33
|
-
parent: default
|
34
|
-
label: Page under development
|
35
|
-
slug: 'under-development'
|
36
|
-
full_path: 'under-development'
|
37
|
-
|
38
|
-
|
12
|
+
cms_layout_id: 1
|
13
|
+
label: Child Page
|
14
|
+
slug: 'child-page'
|
15
|
+
full_path: '/child-page'
|
16
|
+
children_count: 0
|
17
|
+
position: 0
|