comfortable_mexican_sofa 1.5.11 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -2
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/app/assets/images/comfortable_mexican_sofa/checkerboard.gif +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/elrte-toolbar.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/google-maps.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/iframe.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/media-director.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/media-flash.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/media-quicktime.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/media-realaudio.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/media-rutube.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/media-vimeo.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/media-winmedia.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/media-youtube.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/outline-div.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/outline-p.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/pagebreak.gif +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/pixel.gif +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/evilgrin.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/grin.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/happy.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/smile.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/surprised.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/tongue.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/unhappy.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/waii.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/elrte/smileys/wink.png +0 -0
- data/app/assets/images/comfortable_mexican_sofa/x.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/application.js +28 -3
- data/app/assets/javascripts/comfortable_mexican_sofa/codemirror/codemirror.js +1 -1
- data/app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.codemirror.js +35 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.js +267 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.sofa_image.js +61 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.sofa_link.js +58 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/jquery.js +4 -18
- data/app/assets/stylesheets/comfortable_mexican_sofa/application.css +3 -0
- data/app/assets/stylesheets/comfortable_mexican_sofa/codemirror.css +6 -0
- data/app/assets/stylesheets/comfortable_mexican_sofa/content.css +0 -65
- data/app/assets/stylesheets/comfortable_mexican_sofa/dialogs.css +45 -0
- data/app/assets/stylesheets/comfortable_mexican_sofa/elrte.css +173 -0
- data/app/assets/stylesheets/comfortable_mexican_sofa/files.css +82 -0
- data/app/assets/stylesheets/comfortable_mexican_sofa/form.css +2 -2
- data/app/assets/stylesheets/comfortable_mexican_sofa/structure.css +1 -1
- data/app/assets/stylesheets/comfortable_mexican_sofa/widgets.css +14 -56
- data/app/controllers/cms_admin/categories_controller.rb +2 -2
- data/app/controllers/cms_admin/dialogs_controller.rb +13 -0
- data/app/controllers/cms_admin/files_controller.rb +4 -1
- data/app/controllers/cms_admin/revisions_controller.rb +2 -2
- data/app/controllers/cms_content_controller.rb +1 -1
- data/app/models/cms/block.rb +2 -2
- data/app/models/cms/category.rb +3 -0
- data/app/models/cms/file.rb +9 -1
- data/app/models/cms/layout.rb +2 -2
- data/app/models/cms/page.rb +7 -5
- data/app/models/cms/site.rb +10 -5
- data/app/models/cms/snippet.rb +5 -3
- data/app/views/cms_admin/categories/_form.html.erb +1 -1
- data/app/views/cms_admin/categories/_index.html.erb +2 -2
- data/app/views/cms_admin/dialogs/image.html.erb +7 -0
- data/app/views/cms_admin/dialogs/link.html.erb +5 -0
- data/app/views/cms_admin/files/_file.html.erb +17 -9
- data/app/views/cms_admin/files/_index.html.erb +8 -18
- data/app/views/cms_admin/files/create.js.erb +1 -1
- data/app/views/cms_admin/layouts/_form.html.erb +1 -1
- data/app/views/cms_admin/layouts/_index_branch.html.erb +1 -1
- data/app/views/cms_admin/pages/_form_blocks.html.erb +1 -1
- data/app/views/cms_admin/revisions/show.html.erb +1 -1
- data/app/views/cms_admin/sites/_form.html.erb +2 -1
- data/app/views/cms_admin/snippets/_form.html.erb +1 -1
- data/app/views/cms_admin/snippets/index.html.erb +1 -1
- data/app/views/layouts/cms_admin/_head.html.erb +7 -6
- data/comfortable_mexican_sofa.gemspec +46 -47
- data/config/initializers/paperclip.rb +0 -25
- data/config/locales/en.yml +6 -0
- data/config/locales/es.yml +6 -0
- data/config/routes.rb +3 -2
- data/db/migrate/01_create_cms.rb +37 -35
- data/db/migrate/upgrades/07_upgrade_to_1_6_0.rb +25 -0
- data/lib/comfortable_mexican_sofa/error.rb +4 -4
- data/lib/comfortable_mexican_sofa/extensions/is_categorized.rb +3 -1
- data/lib/comfortable_mexican_sofa/extensions/is_mirrored.rb +8 -8
- data/lib/comfortable_mexican_sofa/fixtures.rb +19 -19
- data/lib/comfortable_mexican_sofa/form_builder.rb +4 -4
- data/lib/comfortable_mexican_sofa/render_methods.rb +8 -8
- data/lib/comfortable_mexican_sofa/tag.rb +14 -13
- data/lib/comfortable_mexican_sofa/tags/asset.rb +6 -6
- data/lib/comfortable_mexican_sofa/tags/collection.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/field_datetime.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/field_integer.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/field_string.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/field_text.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/file.rb +5 -5
- data/lib/comfortable_mexican_sofa/tags/helper.rb +4 -4
- data/lib/comfortable_mexican_sofa/tags/page_datetime.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/page_file.rb +8 -6
- data/lib/comfortable_mexican_sofa/tags/page_files.rb +6 -4
- data/lib/comfortable_mexican_sofa/tags/page_integer.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/page_rich_text.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/page_string.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/page_text.rb +3 -3
- data/lib/comfortable_mexican_sofa/tags/partial.rb +4 -4
- data/lib/comfortable_mexican_sofa/tags/snippet.rb +5 -4
- data/lib/comfortable_mexican_sofa/view_methods.rb +6 -6
- data/test/fixtures/cms/blocks.yml +2 -2
- data/test/fixtures/cms/categories.yml +1 -0
- data/test/fixtures/cms/layouts.yml +3 -3
- data/test/fixtures/cms/revisions.yml +4 -4
- data/test/fixtures/cms/sites.yml +1 -0
- data/test/fixtures/cms/snippets.yml +1 -1
- data/test/fixtures/files/data.zip +0 -0
- data/test/functional/cms_admin/dialogs_controller_test.rb +24 -0
- data/test/functional/cms_admin/files_controller_test.rb +1 -1
- data/test/functional/cms_admin/layouts_controller_test.rb +7 -7
- data/test/functional/cms_admin/pages_controller_test.rb +34 -35
- data/test/functional/cms_admin/revisions_controller_test.rb +2 -2
- data/test/functional/cms_admin/sites_controller_test.rb +3 -2
- data/test/functional/cms_admin/snippets_controller_test.rb +8 -8
- data/test/functional/cms_content_controller_test.rb +10 -11
- data/test/gemfiles/{Gemfile.rails-3.0.10 → Gemfile.rails-3.0} +1 -1
- data/test/gemfiles/{Gemfile.rails-3.1.1 → Gemfile.rails-3.1} +1 -1
- data/test/integration/fixtures_test.rb +4 -4
- data/test/integration/mirrors_test.rb +1 -1
- data/test/integration/render_cms_test.rb +10 -10
- data/test/integration/sites_test.rb +3 -3
- data/test/test_helper.rb +3 -0
- data/test/unit/fixtures_test.rb +11 -11
- data/test/unit/mirrors_test.rb +25 -25
- data/test/unit/models/block_test.rb +29 -29
- data/test/unit/models/categorization_test.rb +1 -1
- data/test/unit/models/category_test.rb +2 -2
- data/test/unit/models/file_test.rb +18 -0
- data/test/unit/models/layout_test.rb +21 -18
- data/test/unit/models/page_test.rb +3 -3
- data/test/unit/models/site_test.rb +26 -17
- data/test/unit/models/snippet_test.rb +6 -6
- data/test/unit/revisions_test.rb +13 -13
- data/test/unit/tag_test.rb +39 -45
- data/test/unit/tags/asset_test.rb +1 -1
- data/test/unit/tags/collection_test.rb +12 -10
- data/test/unit/tags/field_datetime_test.rb +3 -3
- data/test/unit/tags/field_integer_test.rb +3 -3
- data/test/unit/tags/field_string_test.rb +4 -4
- data/test/unit/tags/field_text_test.rb +3 -3
- data/test/unit/tags/file_test.rb +1 -1
- data/test/unit/tags/helper_test.rb +3 -3
- data/test/unit/tags/page_datetime_test.rb +3 -3
- data/test/unit/tags/page_file_test.rb +7 -4
- data/test/unit/tags/page_files_test.rb +7 -4
- data/test/unit/tags/page_integer_test.rb +3 -3
- data/test/unit/tags/page_rich_text_test.rb +3 -3
- data/test/unit/tags/page_string_test.rb +3 -3
- data/test/unit/tags/page_text_test.rb +4 -4
- data/test/unit/tags/partial_test.rb +4 -4
- data/test/unit/tags/snippet_test.rb +3 -3
- metadata +51 -52
- data/app/assets/images/comfortable_mexican_sofa/wym_icons.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-blockquote.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h1.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h2.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h3.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h4.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h5.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h6.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-p.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-pre.png +0 -0
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/wymiframe.css +0 -52
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/wymiframe.html +0 -26
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/jquery.wymeditor.cms.js +0 -342
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/jquery.wymeditor.embed.js +0 -19
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/jquery.wymeditor.pack.js +0 -1
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/bg.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/ca.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/cs.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/cy.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/de.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/en.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/es.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/fa.js +0 -46
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/fi.js +0 -44
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/fr.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/gl.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/he.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/hr.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/hu.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/it.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/nb.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/nl.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/nn.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/pl.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/pt-br.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/pt.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/ru.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/sv.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/tr.js +0 -45
- data/app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/zh_cn.js +0 -47
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<%= form.text_field :label, :id => (@layout.new_record?? 'slugify' : nil)%>
|
6
|
-
<%= form.text_field :
|
6
|
+
<%= form.text_field :identifier, :id => 'slug' %>
|
7
7
|
<% if (options = Cms::Layout.options_for_select(@site, @layout)).present? %>
|
8
8
|
<%= form.select :parent_id, [["---- #{t('.select_parent_layout')} ----", nil]] + options %>
|
9
9
|
<% end %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<div class='label'>
|
16
16
|
<%= link_to layout.label, edit_cms_admin_site_layout_path(@site, layout) %>
|
17
17
|
<div class='sublabel'>
|
18
|
-
<%= link_to layout.
|
18
|
+
<%= link_to layout.identifier, edit_cms_admin_site_layout_path(@site, layout) %>
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<h1> <%= t('.title') %> <%= @record.class.to_s.demodulize %></h1>
|
2
|
-
<h2> <%= @record.is_a?(Cms::Page) ? "#{t('.full_path')}: #{@record.full_path}" : "#{t('.slug')}: #{@record.
|
2
|
+
<h2> <%= @record.is_a?(Cms::Page) ? "#{t('.full_path')}: #{@record.full_path}" : "#{t('.slug')}: #{@record.identifier}" %> </h2>
|
3
3
|
|
4
4
|
<% content_for :right_column do %>
|
5
5
|
<h2><%= pluralize(@record.revisions.count, t('.revision')) %></h2>
|
@@ -1,4 +1,5 @@
|
|
1
|
-
<%= form.text_field :label %>
|
1
|
+
<%= form.text_field :label, :id => (@site.new_record?? 'slugify' : nil) %>
|
2
|
+
<%= form.text_field :identifier, :id => 'slug' %>
|
2
3
|
<%= form.text_field :hostname %>
|
3
4
|
<%= form.text_field :path %>
|
4
5
|
<%= form.select :locale, ComfortableMexicanSofa.config.locales.to_a.collect{|l| [l[1], l[0]]} %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<%= form.text_field :label, :id => (@snippet.new_record?? 'slugify' : nil) %>
|
6
|
-
<%= form.text_field :
|
6
|
+
<%= form.text_field :identifier, :id => 'slug', :class => 'delimiter-underscore' %>
|
7
7
|
<%= form.text_area :content, :class => 'code' %>
|
8
8
|
|
9
9
|
<%= render :partial => 'cms_admin/categories/form', :object => form %>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<%= link_to snippet.label, edit_cms_admin_site_snippet_path(@site, snippet) %>
|
25
25
|
<%= render :partial => '/cms_admin/categories/categories', :object => snippet %>
|
26
26
|
<div class='sublabel'>
|
27
|
-
<%= link_to snippet.
|
27
|
+
<%= link_to snippet.identifier, edit_cms_admin_site_snippet_path(@site, snippet) %>
|
28
28
|
</div>
|
29
29
|
</div>
|
30
30
|
</div>
|
@@ -5,14 +5,12 @@
|
|
5
5
|
|
6
6
|
<meta name="cms-admin-path" content="<%= ComfortableMexicanSofa.config.admin_route_prefix %>" />
|
7
7
|
<meta name="cms-locale" content="<%= I18n.locale %>" />
|
8
|
-
<meta name="cms-
|
8
|
+
<meta name="cms-site-id" content="<%= @site.try(:id) %>"/>
|
9
9
|
|
10
10
|
<% if ComfortableMexicanSofa.asset_pipeline_enabled? %>
|
11
11
|
|
12
12
|
<%= stylesheet_link_tag 'comfortable_mexican_sofa/application' %>
|
13
13
|
<%= javascript_include_tag 'comfortable_mexican_sofa/application' %>
|
14
|
-
<%= javascript_include_tag 'comfortable_mexican_sofa/wymeditor/jquery.wymeditor.pack.js' %>
|
15
|
-
<%= javascript_include_tag 'comfortable_mexican_sofa/wymeditor/jquery.wymeditor.cms.js' %>
|
16
14
|
|
17
15
|
<% else %>
|
18
16
|
|
@@ -21,6 +19,8 @@
|
|
21
19
|
'comfortable_mexican_sofa/typography',
|
22
20
|
'comfortable_mexican_sofa/form',
|
23
21
|
'comfortable_mexican_sofa/content',
|
22
|
+
'comfortable_mexican_sofa/files',
|
23
|
+
'comfortable_mexican_sofa/elrte',
|
24
24
|
'comfortable_mexican_sofa/codemirror',
|
25
25
|
'comfortable_mexican_sofa/jquery_ui',
|
26
26
|
'comfortable_mexican_sofa/widgets' %>
|
@@ -29,10 +29,11 @@
|
|
29
29
|
'comfortable_mexican_sofa/jquery_ui_timepicker',
|
30
30
|
'comfortable_mexican_sofa/rails',
|
31
31
|
'comfortable_mexican_sofa/codemirror/codemirror',
|
32
|
+
'comfortable_mexican_sofa/elrte/elrte',
|
33
|
+
'comfortable_mexican_sofa/elrte/elrte.codemirror',
|
34
|
+
'comfortable_mexican_sofa/elrte/elrte.sofa_image',
|
35
|
+
'comfortable_mexican_sofa/elrte/elrte.sofa_link',
|
32
36
|
'comfortable_mexican_sofa/application' %>
|
33
|
-
<%= javascript_include_tag 'comfortable_mexican_sofa/wymeditor/jquery.wymeditor.pack',
|
34
|
-
'comfortable_mexican_sofa/wymeditor/jquery.wymeditor.cms',
|
35
|
-
'comfortable_mexican_sofa/wymeditor/jquery.wymeditor.embed' %>
|
36
37
|
|
37
38
|
<% end %>
|
38
39
|
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "comfortable_mexican_sofa"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.6.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov", "The Working Group Inc"]
|
12
|
-
s.date = "2011-
|
12
|
+
s.date = "2011-12-15"
|
13
13
|
s.description = ""
|
14
14
|
s.email = "oleg@theworkinggroup.ca"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -25,6 +25,31 @@ Gem::Specification.new do |s|
|
|
25
25
|
"VERSION",
|
26
26
|
"app/assets/images/comfortable_mexican_sofa/arrow_bottom.gif",
|
27
27
|
"app/assets/images/comfortable_mexican_sofa/arrow_right.gif",
|
28
|
+
"app/assets/images/comfortable_mexican_sofa/checkerboard.gif",
|
29
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/elrte-toolbar.png",
|
30
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/google-maps.png",
|
31
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/iframe.png",
|
32
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/media-director.png",
|
33
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/media-flash.png",
|
34
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/media-quicktime.png",
|
35
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/media-realaudio.png",
|
36
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/media-rutube.png",
|
37
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/media-vimeo.png",
|
38
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/media-winmedia.png",
|
39
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/media-youtube.png",
|
40
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/outline-div.png",
|
41
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/outline-p.png",
|
42
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/pagebreak.gif",
|
43
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/pixel.gif",
|
44
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/evilgrin.png",
|
45
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/grin.png",
|
46
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/happy.png",
|
47
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/smile.png",
|
48
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/surprised.png",
|
49
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/tongue.png",
|
50
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/unhappy.png",
|
51
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/waii.png",
|
52
|
+
"app/assets/images/comfortable_mexican_sofa/elrte/smileys/wink.png",
|
28
53
|
"app/assets/images/comfortable_mexican_sofa/icon_layout.gif",
|
29
54
|
"app/assets/images/comfortable_mexican_sofa/icon_move.gif",
|
30
55
|
"app/assets/images/comfortable_mexican_sofa/icon_regular.gif",
|
@@ -43,55 +68,23 @@ Gem::Specification.new do |s|
|
|
43
68
|
"app/assets/images/comfortable_mexican_sofa/jquery_ui/ui-icons_454545_256x240.png",
|
44
69
|
"app/assets/images/comfortable_mexican_sofa/jquery_ui/ui-icons_888888_256x240.png",
|
45
70
|
"app/assets/images/comfortable_mexican_sofa/jquery_ui/ui-icons_cd0a0a_256x240.png",
|
46
|
-
"app/assets/images/comfortable_mexican_sofa/
|
71
|
+
"app/assets/images/comfortable_mexican_sofa/x.png",
|
47
72
|
"app/assets/javascripts/comfortable_mexican_sofa/application.js",
|
48
73
|
"app/assets/javascripts/comfortable_mexican_sofa/codemirror/codemirror.js",
|
74
|
+
"app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.codemirror.js",
|
75
|
+
"app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.js",
|
76
|
+
"app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.sofa_image.js",
|
77
|
+
"app/assets/javascripts/comfortable_mexican_sofa/elrte/elrte.sofa_link.js",
|
49
78
|
"app/assets/javascripts/comfortable_mexican_sofa/jquery.js",
|
50
79
|
"app/assets/javascripts/comfortable_mexican_sofa/jquery_ui.js",
|
51
80
|
"app/assets/javascripts/comfortable_mexican_sofa/jquery_ui_timepicker.js",
|
52
81
|
"app/assets/javascripts/comfortable_mexican_sofa/rails.js",
|
53
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-blockquote.png",
|
54
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h1.png",
|
55
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h2.png",
|
56
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h3.png",
|
57
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h4.png",
|
58
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h5.png",
|
59
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-h6.png",
|
60
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-p.png",
|
61
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/lbl-pre.png",
|
62
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/wymiframe.css",
|
63
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/iframe/default/wymiframe.html",
|
64
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/jquery.wymeditor.cms.js",
|
65
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/jquery.wymeditor.embed.js",
|
66
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/jquery.wymeditor.pack.js",
|
67
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/bg.js",
|
68
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/ca.js",
|
69
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/cs.js",
|
70
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/cy.js",
|
71
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/de.js",
|
72
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/en.js",
|
73
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/es.js",
|
74
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/fa.js",
|
75
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/fi.js",
|
76
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/fr.js",
|
77
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/gl.js",
|
78
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/he.js",
|
79
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/hr.js",
|
80
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/hu.js",
|
81
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/it.js",
|
82
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/nb.js",
|
83
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/nl.js",
|
84
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/nn.js",
|
85
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/pl.js",
|
86
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/pt-br.js",
|
87
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/pt.js",
|
88
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/ru.js",
|
89
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/sv.js",
|
90
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/tr.js",
|
91
|
-
"app/assets/javascripts/comfortable_mexican_sofa/wymeditor/lang/zh_cn.js",
|
92
82
|
"app/assets/stylesheets/comfortable_mexican_sofa/application.css",
|
93
83
|
"app/assets/stylesheets/comfortable_mexican_sofa/codemirror.css",
|
94
84
|
"app/assets/stylesheets/comfortable_mexican_sofa/content.css",
|
85
|
+
"app/assets/stylesheets/comfortable_mexican_sofa/dialogs.css",
|
86
|
+
"app/assets/stylesheets/comfortable_mexican_sofa/elrte.css",
|
87
|
+
"app/assets/stylesheets/comfortable_mexican_sofa/files.css",
|
95
88
|
"app/assets/stylesheets/comfortable_mexican_sofa/form.css",
|
96
89
|
"app/assets/stylesheets/comfortable_mexican_sofa/jquery_ui.css",
|
97
90
|
"app/assets/stylesheets/comfortable_mexican_sofa/reset.css",
|
@@ -101,6 +94,7 @@ Gem::Specification.new do |s|
|
|
101
94
|
"app/controllers/application_controller.rb",
|
102
95
|
"app/controllers/cms_admin/base_controller.rb",
|
103
96
|
"app/controllers/cms_admin/categories_controller.rb",
|
97
|
+
"app/controllers/cms_admin/dialogs_controller.rb",
|
104
98
|
"app/controllers/cms_admin/files_controller.rb",
|
105
99
|
"app/controllers/cms_admin/layouts_controller.rb",
|
106
100
|
"app/controllers/cms_admin/pages_controller.rb",
|
@@ -126,6 +120,8 @@ Gem::Specification.new do |s|
|
|
126
120
|
"app/views/cms_admin/categories/destroy.js.erb",
|
127
121
|
"app/views/cms_admin/categories/edit.js.erb",
|
128
122
|
"app/views/cms_admin/categories/update.js.erb",
|
123
|
+
"app/views/cms_admin/dialogs/image.html.erb",
|
124
|
+
"app/views/cms_admin/dialogs/link.html.erb",
|
129
125
|
"app/views/cms_admin/files/_file.html.erb",
|
130
126
|
"app/views/cms_admin/files/_form.html.erb",
|
131
127
|
"app/views/cms_admin/files/_index.html.erb",
|
@@ -199,6 +195,7 @@ Gem::Specification.new do |s|
|
|
199
195
|
"db/migrate/upgrades/04_upgrade_to_1_3_0.rb",
|
200
196
|
"db/migrate/upgrades/05_upgrade_to_1_4_0.rb",
|
201
197
|
"db/migrate/upgrades/06_upgrade_to_1_5_0.rb",
|
198
|
+
"db/migrate/upgrades/07_upgrade_to_1_6_0.rb",
|
202
199
|
"db/seeds.rb",
|
203
200
|
"doc/preview.png",
|
204
201
|
"doc/sofa.png",
|
@@ -251,6 +248,7 @@ Gem::Specification.new do |s|
|
|
251
248
|
"test/fixtures/cms/revisions.yml",
|
252
249
|
"test/fixtures/cms/sites.yml",
|
253
250
|
"test/fixtures/cms/snippets.yml",
|
251
|
+
"test/fixtures/files/data.zip",
|
254
252
|
"test/fixtures/files/document.pdf",
|
255
253
|
"test/fixtures/files/image.gif",
|
256
254
|
"test/fixtures/files/image.jpg",
|
@@ -260,6 +258,7 @@ Gem::Specification.new do |s|
|
|
260
258
|
"test/fixtures/views/render_test/render_layout.html.erb",
|
261
259
|
"test/functional/cms_admin/base_controller_test.rb",
|
262
260
|
"test/functional/cms_admin/categories_controller_test.rb",
|
261
|
+
"test/functional/cms_admin/dialogs_controller_test.rb",
|
263
262
|
"test/functional/cms_admin/files_controller_test.rb",
|
264
263
|
"test/functional/cms_admin/layouts_controller_test.rb",
|
265
264
|
"test/functional/cms_admin/pages_controller_test.rb",
|
@@ -267,8 +266,8 @@ Gem::Specification.new do |s|
|
|
267
266
|
"test/functional/cms_admin/sites_controller_test.rb",
|
268
267
|
"test/functional/cms_admin/snippets_controller_test.rb",
|
269
268
|
"test/functional/cms_content_controller_test.rb",
|
270
|
-
"test/gemfiles/Gemfile.rails-3.0
|
271
|
-
"test/gemfiles/Gemfile.rails-3.1
|
269
|
+
"test/gemfiles/Gemfile.rails-3.0",
|
270
|
+
"test/gemfiles/Gemfile.rails-3.1",
|
272
271
|
"test/integration/authentication_test.rb",
|
273
272
|
"test/integration/fixtures_test.rb",
|
274
273
|
"test/integration/mirrors_test.rb",
|
@@ -321,16 +320,16 @@ Gem::Specification.new do |s|
|
|
321
320
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
322
321
|
s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
|
323
322
|
s.add_runtime_dependency(%q<active_link_to>, ["~> 1.0.0"])
|
324
|
-
s.add_runtime_dependency(%q<paperclip>, ["
|
323
|
+
s.add_runtime_dependency(%q<paperclip>, [">= 2.3.0"])
|
325
324
|
else
|
326
325
|
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
327
326
|
s.add_dependency(%q<active_link_to>, ["~> 1.0.0"])
|
328
|
-
s.add_dependency(%q<paperclip>, ["
|
327
|
+
s.add_dependency(%q<paperclip>, [">= 2.3.0"])
|
329
328
|
end
|
330
329
|
else
|
331
330
|
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
332
331
|
s.add_dependency(%q<active_link_to>, ["~> 1.0.0"])
|
333
|
-
s.add_dependency(%q<paperclip>, ["
|
332
|
+
s.add_dependency(%q<paperclip>, [">= 2.3.0"])
|
334
333
|
end
|
335
334
|
end
|
336
335
|
|
@@ -1,28 +1,3 @@
|
|
1
1
|
Paperclip.options[:command_path] = case Rails.env
|
2
2
|
when 'development', 'test' then '/usr/local/bin'
|
3
|
-
end
|
4
|
-
|
5
|
-
if Rails.env.test?
|
6
|
-
class Paperclip::Attachment
|
7
|
-
def self.default_options
|
8
|
-
@default_options = {
|
9
|
-
:url => "/system/:attachment/:id/:style/:filename",
|
10
|
-
:path => ":rails_root/public:url",
|
11
|
-
:styles => {},
|
12
|
-
:only_process => [],
|
13
|
-
:processors => [:thumbnail],
|
14
|
-
:convert_options => {},
|
15
|
-
:source_file_options => {},
|
16
|
-
:default_url => "/:attachment/:style/missing.png",
|
17
|
-
:default_style => :original,
|
18
|
-
:storage => :filesystem,
|
19
|
-
:use_timestamp => false,
|
20
|
-
:whiny => Paperclip.options[:whiny] || Paperclip.options[:whiny_thumbnails],
|
21
|
-
:use_default_time_zone => true,
|
22
|
-
:hash_digest => "SHA1",
|
23
|
-
:hash_data => ":class/:attachment/:id/:style/:updated_at",
|
24
|
-
:preserve_files => false
|
25
|
-
}
|
26
|
-
end
|
27
|
-
end
|
28
3
|
end
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/routes.rb
CHANGED
@@ -27,12 +27,13 @@ Rails.application.routes.draw do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
resources :categories
|
30
|
+
get 'dialog/:type' => 'dialogs#show', :as => 'dialog'
|
30
31
|
end
|
31
32
|
end unless ComfortableMexicanSofa.config.admin_route_prefix.blank?
|
32
33
|
|
33
34
|
scope :controller => :cms_content do
|
34
|
-
get 'cms-css/:site_id/:
|
35
|
-
get 'cms-js/:site_id/:
|
35
|
+
get 'cms-css/:site_id/:identifier' => :render_css, :as => 'cms_css'
|
36
|
+
get 'cms-js/:site_id/:identifier' => :render_js, :as => 'cms_js'
|
36
37
|
get '/' => :render_html, :as => 'cms_html', :path => "(*cms_path)"
|
37
38
|
end
|
38
39
|
|
data/db/migrate/01_create_cms.rb
CHANGED
@@ -3,8 +3,9 @@ class CreateCms < ActiveRecord::Migration
|
|
3
3
|
def self.up
|
4
4
|
# -- Sites --------------------------------------------------------------
|
5
5
|
create_table :cms_sites do |t|
|
6
|
-
t.string :label
|
7
|
-
t.string :
|
6
|
+
t.string :label, :null => false
|
7
|
+
t.string :identifier, :null => false
|
8
|
+
t.string :hostname, :null => false
|
8
9
|
t.string :path
|
9
10
|
t.string :locale, :null => false, :default => 'en'
|
10
11
|
t.boolean :is_mirrored, :null => false, :default => false
|
@@ -14,30 +15,30 @@ class CreateCms < ActiveRecord::Migration
|
|
14
15
|
|
15
16
|
# -- Layouts ------------------------------------------------------------
|
16
17
|
create_table :cms_layouts do |t|
|
17
|
-
t.integer :site_id
|
18
|
+
t.integer :site_id, :null => false
|
18
19
|
t.integer :parent_id
|
19
20
|
t.string :app_layout
|
20
|
-
t.string :label
|
21
|
-
t.string :
|
21
|
+
t.string :label, :null => false
|
22
|
+
t.string :identifier, :null => false
|
22
23
|
t.text :content
|
23
24
|
t.text :css
|
24
25
|
t.text :js
|
25
|
-
t.integer :position,
|
26
|
-
t.boolean :is_shared,
|
26
|
+
t.integer :position, :null => false, :default => 0
|
27
|
+
t.boolean :is_shared, :null => false, :default => false
|
27
28
|
t.timestamps
|
28
29
|
end
|
29
30
|
add_index :cms_layouts, [:parent_id, :position]
|
30
|
-
add_index :cms_layouts, [:site_id, :
|
31
|
+
add_index :cms_layouts, [:site_id, :identifier], :unique => true
|
31
32
|
|
32
33
|
# -- Pages --------------------------------------------------------------
|
33
34
|
create_table :cms_pages do |t|
|
34
|
-
t.integer :site_id
|
35
|
+
t.integer :site_id, :null => false
|
35
36
|
t.integer :layout_id
|
36
37
|
t.integer :parent_id
|
37
38
|
t.integer :target_page_id
|
38
|
-
t.string :label
|
39
|
+
t.string :label, :null => false
|
39
40
|
t.string :slug
|
40
|
-
t.string :full_path
|
41
|
+
t.string :full_path, :null => false
|
41
42
|
t.text :content
|
42
43
|
t.integer :position, :null => false, :default => 0
|
43
44
|
t.integer :children_count, :null => false, :default => 0
|
@@ -50,36 +51,36 @@ class CreateCms < ActiveRecord::Migration
|
|
50
51
|
|
51
52
|
# -- Page Blocks --------------------------------------------------------
|
52
53
|
create_table :cms_blocks do |t|
|
53
|
-
t.integer :page_id
|
54
|
-
t.string :
|
54
|
+
t.integer :page_id, :null => false
|
55
|
+
t.string :identifier, :null => false
|
55
56
|
t.text :content
|
56
57
|
t.timestamps
|
57
58
|
end
|
58
|
-
add_index :cms_blocks, [:page_id, :
|
59
|
+
add_index :cms_blocks, [:page_id, :identifier]
|
59
60
|
|
60
61
|
# -- Snippets -----------------------------------------------------------
|
61
62
|
create_table :cms_snippets do |t|
|
62
|
-
t.integer :site_id
|
63
|
-
t.string :label
|
64
|
-
t.string :
|
63
|
+
t.integer :site_id, :null => false
|
64
|
+
t.string :label, :null => false
|
65
|
+
t.string :identifier, :null => false
|
65
66
|
t.text :content
|
66
|
-
t.integer :position,
|
67
|
-
t.boolean :is_shared,
|
67
|
+
t.integer :position, :null => false, :default => 0
|
68
|
+
t.boolean :is_shared, :null => false, :default => false
|
68
69
|
t.timestamps
|
69
70
|
end
|
70
|
-
add_index :cms_snippets, [:site_id, :
|
71
|
+
add_index :cms_snippets, [:site_id, :identifier], :unique => true
|
71
72
|
add_index :cms_snippets, [:site_id, :position]
|
72
73
|
|
73
74
|
# -- Files --------------------------------------------------------------
|
74
75
|
create_table :cms_files do |t|
|
75
|
-
t.integer :site_id
|
76
|
+
t.integer :site_id, :null => false
|
76
77
|
t.integer :block_id
|
77
|
-
t.string :label
|
78
|
-
t.string :file_file_name
|
79
|
-
t.string :file_content_type
|
80
|
-
t.integer :file_file_size
|
81
|
-
t.string :description,
|
82
|
-
t.integer :position,
|
78
|
+
t.string :label, :null => false
|
79
|
+
t.string :file_file_name, :null => false
|
80
|
+
t.string :file_content_type, :null => false
|
81
|
+
t.integer :file_file_size, :null => false
|
82
|
+
t.string :description, :limit => 2048
|
83
|
+
t.integer :position, :null => false, :default => 0
|
83
84
|
t.timestamps
|
84
85
|
end
|
85
86
|
add_index :cms_files, [:site_id, :label]
|
@@ -89,8 +90,8 @@ class CreateCms < ActiveRecord::Migration
|
|
89
90
|
|
90
91
|
# -- Revisions -----------------------------------------------------------
|
91
92
|
create_table :cms_revisions, :force => true do |t|
|
92
|
-
t.string :record_type
|
93
|
-
t.integer :record_id
|
93
|
+
t.string :record_type, :null => false
|
94
|
+
t.integer :record_id, :null => false
|
94
95
|
t.text :data
|
95
96
|
t.datetime :created_at
|
96
97
|
end
|
@@ -98,15 +99,16 @@ class CreateCms < ActiveRecord::Migration
|
|
98
99
|
|
99
100
|
# -- Categories ---------------------------------------------------------
|
100
101
|
create_table :cms_categories, :force => true do |t|
|
101
|
-
t.string :
|
102
|
-
t.string :
|
102
|
+
t.string :site_id, :null => false
|
103
|
+
t.string :label, :null => false
|
104
|
+
t.string :categorized_type, :null => false
|
103
105
|
end
|
104
|
-
add_index :cms_categories, [:categorized_type, :label], :unique => true
|
106
|
+
add_index :cms_categories, [:site_id, :categorized_type, :label], :unique => true
|
105
107
|
|
106
108
|
create_table :cms_categorizations, :force => true do |t|
|
107
|
-
t.integer :category_id
|
108
|
-
t.string :categorized_type
|
109
|
-
t.integer :categorized_id
|
109
|
+
t.integer :category_id, :null => false
|
110
|
+
t.string :categorized_type, :null => false
|
111
|
+
t.integer :categorized_id, :null => false
|
110
112
|
end
|
111
113
|
add_index :cms_categorizations, [:category_id, :categorized_type, :categorized_id], :unique => true,
|
112
114
|
:name => 'index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id'
|