imagine_cms 3.0.0.beta8 → 3.0.0.beta9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. data/.gitignore +9 -4
  2. data/.rvmrc +19 -0
  3. data/Gemfile +14 -1
  4. data/Gemfile.lock +111 -0
  5. data/README.rdoc +44 -28
  6. data/Rakefile +39 -1
  7. data/app/controllers/management/cms_controller.rb +13 -4
  8. data/app/helpers/cms_application_helper.rb +3 -3
  9. data/app/models/cms_page.rb +1 -6
  10. data/app/views/{management/cms → imagine_cms}/_dialogs.html.erb +4 -3
  11. data/app/views/imagine_cms/_header.html.erb +40 -0
  12. data/app/views/imagine_cms/_toolbar.html.erb +26 -0
  13. data/app/views/layouts/management.html.erb +5 -0
  14. data/imagine_cms.gemspec +6 -1
  15. data/lib/imagine_cms/version.rb +1 -1
  16. data/license.txt +661 -0
  17. data/script/rails +8 -0
  18. data/test/dummy/app/assets/stylesheets/application.css +1 -1
  19. data/test/dummy/config/application.rb +5 -2
  20. data/test/dummy/config/environments/production.rb +1 -1
  21. data/test/dummy/config/initializers/secret_token.rb +1 -1
  22. data/test/dummy/config/initializers/session_store.rb +1 -1
  23. data/test/dummy/config/initializers/wrap_parameters.rb +1 -1
  24. data/test/dummy/config/routes.rb +2 -56
  25. data/test/imagine_cms_test.rb +7 -0
  26. data/test/integration/navigation_test.rb +10 -0
  27. data/test/test_helper.rb +5 -0
  28. metadata +30 -44
  29. data/doc/Gemfile.html +0 -89
  30. data/doc/ImagineCms.html +0 -137
  31. data/doc/README_rdoc.html +0 -137
  32. data/doc/Rakefile.html +0 -87
  33. data/doc/created.rid +0 -6
  34. data/doc/images/add.png +0 -0
  35. data/doc/images/brick.png +0 -0
  36. data/doc/images/brick_link.png +0 -0
  37. data/doc/images/bug.png +0 -0
  38. data/doc/images/bullet_black.png +0 -0
  39. data/doc/images/bullet_toggle_minus.png +0 -0
  40. data/doc/images/bullet_toggle_plus.png +0 -0
  41. data/doc/images/date.png +0 -0
  42. data/doc/images/delete.png +0 -0
  43. data/doc/images/find.png +0 -0
  44. data/doc/images/loadingAnimation.gif +0 -0
  45. data/doc/images/macFFBgHack.png +0 -0
  46. data/doc/images/package.png +0 -0
  47. data/doc/images/page_green.png +0 -0
  48. data/doc/images/page_white_text.png +0 -0
  49. data/doc/images/page_white_width.png +0 -0
  50. data/doc/images/plugin.png +0 -0
  51. data/doc/images/ruby.png +0 -0
  52. data/doc/images/tag_blue.png +0 -0
  53. data/doc/images/tag_green.png +0 -0
  54. data/doc/images/transparent.png +0 -0
  55. data/doc/images/wrench.png +0 -0
  56. data/doc/images/wrench_orange.png +0 -0
  57. data/doc/images/zoom.png +0 -0
  58. data/doc/index.html +0 -82
  59. data/doc/js/darkfish.js +0 -153
  60. data/doc/js/jquery.js +0 -18
  61. data/doc/js/navigation.js +0 -142
  62. data/doc/js/search.js +0 -94
  63. data/doc/js/search_index.js +0 -1
  64. data/doc/js/searcher.js +0 -228
  65. data/doc/rdoc.css +0 -543
  66. data/doc/table_of_contents.html +0 -65
  67. data/test/test123_test.rb +0 -7
data/.gitignore CHANGED
@@ -1,5 +1,10 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ rdoc/
5
+ test/dummy/db/*.sqlite3
6
+ test/dummy/log/*.log
7
+ test/dummy/tmp/
8
+ test/dummy/.sass-cache
9
+
1
10
  *.gem
2
- .bundle
3
- Gemfile.lock
4
- gems
5
- pkg/*
data/.rvmrc ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bash
2
+
3
+ ruby_string="ruby-1.9.3-p286"
4
+ gemset_name="imagine_cms"
5
+
6
+ alias rails='bundle exec rails'
7
+
8
+ if rvm list strings | grep -q "${ruby_string}" ; then
9
+ # Load or create the specified environment
10
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
11
+ && -s "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}" ]] ; then
12
+ \. "${rvm_path:-$HOME/.rvm}/environments/${ruby_string}@${gemset_name}"
13
+ else
14
+ rvm --create "${ruby_string}@${gemset_name}"
15
+ fi
16
+ else
17
+ # Notify the user to install the desired interpreter before proceeding.
18
+ echo "${ruby_string} was not found, please run 'rvm install ${ruby_string}' and then cd back into the project directory."
19
+ fi
data/Gemfile CHANGED
@@ -1,4 +1,17 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in imagine_cms.gemspec
3
+ # Declare your gem's dependencies in imagine_cms.gemspec.
4
+ # Bundler will treat runtime dependencies like base dependencies, and
5
+ # development dependencies will be added by default to the :development group.
4
6
  gemspec
7
+
8
+ # jquery-rails is used by the dummy application
9
+ gem "jquery-rails"
10
+
11
+ # Declare any dependencies that are still in development here instead of in
12
+ # your gemspec. These might include edge Rails or gems from your path or
13
+ # Git. Remember to move these dependencies to your gemspec before releasing
14
+ # your gem to rubygems.org.
15
+
16
+ # To use debugger
17
+ # gem 'debugger'
data/Gemfile.lock ADDED
@@ -0,0 +1,111 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ imagine_cms (3.0.0.beta9)
5
+ acts_as_tree (~> 1.2)
6
+ mini_magick (~> 3.4)
7
+ net-dns (~> 0.7.1)
8
+ prototype-rails
9
+ rails (~> 3.2.8)
10
+ rinku (~> 1.7.2)
11
+
12
+ GEM
13
+ remote: http://rubygems.org/
14
+ specs:
15
+ actionmailer (3.2.8)
16
+ actionpack (= 3.2.8)
17
+ mail (~> 2.4.4)
18
+ actionpack (3.2.8)
19
+ activemodel (= 3.2.8)
20
+ activesupport (= 3.2.8)
21
+ builder (~> 3.0.0)
22
+ erubis (~> 2.7.0)
23
+ journey (~> 1.0.4)
24
+ rack (~> 1.4.0)
25
+ rack-cache (~> 1.2)
26
+ rack-test (~> 0.6.1)
27
+ sprockets (~> 2.1.3)
28
+ activemodel (3.2.8)
29
+ activesupport (= 3.2.8)
30
+ builder (~> 3.0.0)
31
+ activerecord (3.2.8)
32
+ activemodel (= 3.2.8)
33
+ activesupport (= 3.2.8)
34
+ arel (~> 3.0.2)
35
+ tzinfo (~> 0.3.29)
36
+ activeresource (3.2.8)
37
+ activemodel (= 3.2.8)
38
+ activesupport (= 3.2.8)
39
+ activesupport (3.2.8)
40
+ i18n (~> 0.6)
41
+ multi_json (~> 1.0)
42
+ acts_as_tree (1.2.0)
43
+ activerecord (>= 3.0.0)
44
+ arel (3.0.2)
45
+ builder (3.0.4)
46
+ erubis (2.7.0)
47
+ hike (1.2.1)
48
+ i18n (0.6.1)
49
+ journey (1.0.4)
50
+ jquery-rails (2.1.3)
51
+ railties (>= 3.1.0, < 5.0)
52
+ thor (~> 0.14)
53
+ json (1.7.5)
54
+ mail (2.4.4)
55
+ i18n (>= 0.4.0)
56
+ mime-types (~> 1.16)
57
+ treetop (~> 1.4.8)
58
+ mime-types (1.19)
59
+ mini_magick (3.4)
60
+ subexec (~> 0.2.1)
61
+ multi_json (1.3.7)
62
+ net-dns (0.7.1)
63
+ polyglot (0.3.3)
64
+ prototype-rails (3.2.1)
65
+ rails (~> 3.2)
66
+ rack (1.4.1)
67
+ rack-cache (1.2)
68
+ rack (>= 0.4)
69
+ rack-ssl (1.3.2)
70
+ rack
71
+ rack-test (0.6.2)
72
+ rack (>= 1.0)
73
+ rails (3.2.8)
74
+ actionmailer (= 3.2.8)
75
+ actionpack (= 3.2.8)
76
+ activerecord (= 3.2.8)
77
+ activeresource (= 3.2.8)
78
+ activesupport (= 3.2.8)
79
+ bundler (~> 1.0)
80
+ railties (= 3.2.8)
81
+ railties (3.2.8)
82
+ actionpack (= 3.2.8)
83
+ activesupport (= 3.2.8)
84
+ rack-ssl (~> 1.3.2)
85
+ rake (>= 0.8.7)
86
+ rdoc (~> 3.4)
87
+ thor (>= 0.14.6, < 2.0)
88
+ rake (0.9.2.2)
89
+ rdoc (3.12)
90
+ json (~> 1.4)
91
+ rinku (1.7.2)
92
+ sprockets (2.1.3)
93
+ hike (~> 1.2)
94
+ rack (~> 1.0)
95
+ tilt (~> 1.1, != 1.3.0)
96
+ sqlite3 (1.3.6)
97
+ subexec (0.2.2)
98
+ thor (0.16.0)
99
+ tilt (1.3.3)
100
+ treetop (1.4.12)
101
+ polyglot
102
+ polyglot (>= 0.3.1)
103
+ tzinfo (0.3.35)
104
+
105
+ PLATFORMS
106
+ ruby
107
+
108
+ DEPENDENCIES
109
+ imagine_cms!
110
+ jquery-rails
111
+ sqlite3
data/README.rdoc CHANGED
@@ -1,39 +1,55 @@
1
1
  =About Imagine CMS
2
2
 
3
- Imagine CMS is a content management system originally developed for internal use at Bigger Bird
4
- Creative (biggerbird.com). However, it was so strongly bound to Rails that it became difficult to
5
- port to newer Rails versions. Thus, sites using Imagine have been stuck on Rails 1.2 since time
6
- immemorial.
3
+ Imagine CMS is a content management system developed by {Bigger Bird Creative, Inc.}[https://www.biggerbird.com] in 2006 for its clients. Other systems came with a learning curve: fine for daily users, but clients who only used it once a month or so would never remember how to use the system the next time they logged in. Simpler systems didn't allow us enough flexibility as designers and developers.
7
4
 
8
- This project intends to fix all that. By extracting Imagine functionality out into a gem, we should
9
- be able to achieve compatibility with Rails 4.0 (hopefully around the time it is released). However,
10
- at the same time, backwards compatibility with existing sites is extremely important, as the whole
11
- reason for doing this is to allow us to upgrade existing sites to a modern, supported version of
12
- Rails.
5
+ =History and Roadmap
13
6
 
14
- So... don't use this. I'm not even including a license right now. (But it will probably be AGPLv3.)
7
+ Thus, Imagine was created in the Rails 1.0 days, to run a large number of technically simple content-based sites (versus the one or two highly customized web applications most Rails developers were building at the time). We wanted to provide a way to create and manage static content while also allowing some automation (navigation, RSS feeds, etc.) while also allowing limitless custom development. However, because plugins/engines were quite limited in those days, Imagine was implemented by monkey-patching core parts of Rails and creating a new framework on top of Rails. Although this allowed us great insight into the inner workings of Rails (and led to a minor contribution to Rails core), this approach proved extremely difficult to port to Rails 2. Thus, sites using Imagine have been stuck on Rails 1.2 since time immemorial.
15
8
 
16
- Wait until the second phase of this project (Imagine 4.x). Why? Well, the 3.x versions, while
17
- usable, will be hobbled by their need to remain compatible with Bigger Bird's existing sites. The
18
- ERB templating language is dangerous (allows shell escapes) and the editor is Firefox-only. Once we
19
- are into the 4.x era, when we can move ahead without worrying about backward compatibility, it will
20
- be a good time to get on board.
9
+ All that is now firmly in the past. By extracting Imagine functionality into a gem (a Rails Engine), we have achieved compatibility with Rails 3.2 and Ruby 1.9 and removed roadblocks to a future upgrade to Rails 4 and Ruby 2, all while remaining backwards compatible with the legacy Imagine CMS database structure.
21
10
 
22
- =Roadmap
11
+ Of the three original phases of this project, two remain:
23
12
 
24
- Current status: Original functionality 75% restored
13
+ * Imagine 3.0 (Rails 3.2, Ruby 1.9): [DONE] 90% restored functionality, no database changes.
14
+ * Imagine 3.1 (Rails 3.2, Ruby 1.9/2.0): 100% restored functionality, plus a few extras. May require a few simple migrations.
15
+ * Imagine 4.0 (Rails 4.0, Ruby 2.0): Upgrade to Rails 4; refactor & rewrite the worst parts (substitutions); drop ERB templating for something safer, like Liquid; switch to a cross-browser editor; drop Prototype for jQuery; modernize HTML, CSS, JS
25
16
 
26
- Here's what's coming up:
17
+ (Imagine 1.x and 2.x version numbers have already been used internally, so we started at 3.0.)
27
18
 
28
- * Imagine 3.0 (Rails 3.2): 90% restored functionality, can function on existing sites with no database changes
29
- * Imagine 3.1 (Rails 3.2): 100% restored functionality, may require a few simple migrations
30
- * Imagine 4.0 (Rails 4.0): Refactoring & rewriting of the worst parts (substitutions); move away from ERB templating, to something like Liquid; switch to a cross-browser editor; switch to jQuery
19
+ =Current Status
31
20
 
32
- (Imagine 1.x and 2.x version numbers have already been used internally, so might as well start at 3.0.)
21
+ Imagine 3.0 is finally ready for production use internally at Bigger Bird, but it's not quite ready for general use yet. For starters, it has no install generator or migrations, so good luck figuring out the database schema on your own. Probably still buggy, not all functionality has been properly exercised. No tests or documentation yet, I'll tackle this for 4.0 as we modernize the internals.
33
22
 
34
- Dependencies:
35
- * Rails 3.2
36
- * acts_as_tree
37
- * acts_as_versioned
38
- * mini_magick
39
- * net-dns
23
+ One major feature is still missing: browser-based editing of application layout and stylesheets. While convenient, this was probably not ever a good idea, so I'm working on a better solution. Might need to go into 3.1. Once 3.0 has stabilized in production (December 2012-ish), I'll branch off 3.0-stable and begin work on 3.1 on master.
24
+
25
+ Unless you are interested in contributing to development, it might be best to wait until the second phase of this project (Imagine 4). Why? Well, the purpose of Imagine 3 is strictly to port legacy sites to Rails 3.2 as simply as possible. Imagine 3 will always be held back by its need to remain compatible with legacy installations dating back to 2006. The ERB templating language can be dangerous (it allows all Ruby, including shell escapes), and the editor (powered by an ancient version of Dojo) is Firefox-only. It also uses Prototype, which has become a bit unfashionable these days.
26
+
27
+ Imagine 4 will be a clean break from all of these "traditions," and thus will be a good time to get on board.
28
+
29
+ =Getting Help
30
+
31
+ Get paid support and hosting for Imagine CMS straight from the people who made it: {Bigger Bird Creative, Inc.}[https://www.biggerbird.com] Neither is required, of course. :-) Free support is up top (Issues).
32
+
33
+ =Contributing
34
+
35
+ Pull requests always appreciated (recommend getting in touch first). If companies or individuals are willing to sponsor major features on the roadmap (or features that meet their own needs) development can proceed more quickly.
36
+
37
+ =License and Copyright
38
+
39
+ Imagine 3 is licensed under AGPLv3, meaning that if you run a modified version on a publicly-accessible server, you need to offer source code. With Github, that's quite easy: just don't make any private forks, and link to your Github site.
40
+
41
+ imagine_cms - The Imagine Content Management System
42
+ Copyright (c) 2012 Aaron Namba (aaron@biggerbird.com)
43
+
44
+ This program is free software: you can redistribute it and/or modify
45
+ it under the terms of the GNU Affero General Public License as published by
46
+ the Free Software Foundation, either version 3 of the License, or
47
+ (at your option) any later version.
48
+
49
+ This program is distributed in the hope that it will be useful,
50
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
51
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
52
+ GNU Affero General Public License for more details.
53
+
54
+ You should have received a copy of the GNU Affero General Public License
55
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
data/Rakefile CHANGED
@@ -1,2 +1,40 @@
1
- require 'bundler'
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'ImagineCms'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
24
+ load 'rails/tasks/engine.rake'
25
+
26
+
27
+
2
28
  Bundler::GemHelper.install_tasks
29
+
30
+ require 'rake/testtask'
31
+
32
+ Rake::TestTask.new(:test) do |t|
33
+ t.libs << 'lib'
34
+ t.libs << 'test'
35
+ t.pattern = 'test/**/*_test.rb'
36
+ t.verbose = false
37
+ end
38
+
39
+
40
+ task :default => :test
@@ -403,11 +403,20 @@ class Management::CmsController < Management::ApplicationController # :nodoc:
403
403
  @page_objects[key] = obj.content.html_safe
404
404
  end
405
405
 
406
- @dynamic_javascripts ||= []
407
- @dynamic_javascripts << url_for(:action => 'page_tags_for_lookup')
406
+ # set "legacy" vars
407
+ @content_levels = @pg.path.split('/')
408
+ params[:section] = @content_levels.size < 1 ? '' : @content_levels.first
409
+ params[:subsection] = @content_levels[1] unless @content_levels.size < 3
410
+ if @content_levels.size == 1
411
+ params[:page] = 'index'
412
+ elsif @content_levels.size > 1
413
+ params[:page] = @content_levels.last
414
+ end
415
+
416
+ @page_title = @pg.title
408
417
 
409
- @stylesheets ||= []
410
- @stylesheets << 'imagine_ccs'
418
+ @cms_head ||= ''
419
+ @cms_head << "<script type=\"text/javascript\" src=\"#{url_for(:action => 'page_tags_for_lookup')}\"></script>"
411
420
 
412
421
  @template_content = substitute_placeholders(@pg.template.content, @pg)
413
422
  render :layout => 'application'
@@ -1092,12 +1092,12 @@ EOF
1092
1092
 
1093
1093
 
1094
1094
  def cropper_image_tag(options)
1095
- ret = image_tag(options[:url] || '', :id => "testImage")
1096
- ret += javascript_tag "cropper = new Cropper.Img('testImage', { minWidth: 0, minHeight: 0, captureKeys: false, onEndCrop: onEndCrop });"
1095
+ ret = "<img id=\"testImage\" src=\"/assets/#{options[:url]}\" />".html_safe
1096
+ ret += javascript_tag("cropper = new Cropper.Img('testImage', { minWidth: 0, minHeight: 0, captureKeys: false, onEndCrop: onEndCrop });")
1097
1097
  end
1098
1098
 
1099
1099
  def page_image_tag(page, filename)
1100
- image_tag File.join('content', page.path, File.basename(filename))
1100
+ "<img id=\"testImage\" src=\"/#{File.join('assets', 'content', page.path, File.basename(filename))}\" alt=\"#{File.basename(filename, '.*').sub(/-[[:xdigit:]]{32}\z/, '').capitalize}\" />".html_safe
1101
1101
  end
1102
1102
 
1103
1103
  def copyright_year(year)
@@ -10,6 +10,7 @@ class CmsPage < ActiveRecord::Base
10
10
  has_many :objects, :class_name => 'CmsPageObject', :dependent => :destroy
11
11
  has_many :tags, :class_name => 'CmsPageTag', :dependent => :destroy
12
12
  has_many :versions, :class_name => 'CmsPageVersion', :dependent => :destroy
13
+ has_many :sub_pages, :class_name => 'CmsPage', :foreign_key => :parent_id, :conditions => [ 'published_version >= 0' ], :order => 'position, title, name'
13
14
 
14
15
  validates_format_of :name, :with => /\A[-\w\d%]+\Z/
15
16
  validates_uniqueness_of :path, :message => 'conflicts with an existing page'
@@ -37,12 +38,6 @@ class CmsPage < ActiveRecord::Base
37
38
  self.published_date ||= self.created_on || Time.now
38
39
  end
39
40
 
40
- def sub_pages(options = {})
41
- # not using options just yet, but you can override if you like
42
- conditions = [ 'published_version >= 0' ]
43
- self.children.find(:all, :conditions => conditions, :order => 'position')
44
- end
45
-
46
41
  def tags_as_css_classes
47
42
  self.tags.map { |t| t.name.downcase.gsub(/[^\w]+/, '-') }.join(' ')
48
43
  end
@@ -34,6 +34,7 @@
34
34
  hasShadow="true" resizable="true" followScroll="false" displayCloseAction="true" style="width: 650px; height: 580px;">
35
35
  <div id="gallery_dialog_content"></div>
36
36
  </div>
37
-
38
-
39
- </div>
37
+ </div>
38
+
39
+ <div id="preview_cover" onclick="return false;" style="display: none;"></div>
40
+ <div id="dialog-temp"></div>
@@ -0,0 +1,40 @@
1
+ <%#= javascript_tag 'var djConfig = { isDebug: true };' %>
2
+
3
+ <script type="text/javascript">
4
+ var load_dojo = false;
5
+ if (<%= @load_dojo || 'false' %>) {
6
+ load_dojo = true;
7
+ }
8
+
9
+ function readCookie(name) {
10
+ var ca = document.cookie.split(';');
11
+ for (var i=0; i < ca.length; i++) {
12
+ var c = ca[i];
13
+ while (c.charAt(0) == ' ') c = c.substring(1, c.length);
14
+ if (c.indexOf(name+'=') == 0) return c.substring((name+'=').length, c.length);
15
+ }
16
+ return null;
17
+ }
18
+
19
+ function loggedIn() {
20
+ return readCookie('user_auth_status') == 'authenticated';
21
+ }
22
+
23
+ if (loggedIn() || load_dojo) {
24
+ document.writeln('<scr' + 'ipt src="/assets/dojo/dojo.js" type="text/javascript"></scr' + 'ipt>');
25
+ }
26
+ </script>
27
+
28
+ <script type="text/javascript">
29
+ if (loggedIn()) {
30
+ dojo.require("dojo.widget.Editor2");
31
+ dojo.require("dojo.widget.Editor2Plugin.TableOperation");
32
+ }
33
+ </script>
34
+
35
+ <%- for feed in [].concat(@rss_feeds || []) -%>
36
+ <%= auto_discovery_link_tag(:rss, { :controller => '/cms/content', :action => 'rss_feed', :page_id => @pg.id, :page_list_name => feed }, :title => feed) if @pg && @pg.id %>
37
+ <%- end -%>
38
+
39
+ <%=raw @cms_head %>
40
+ <%= @pg.html_head if @pg && @pg.respond_to?(:html_head) %>
@@ -0,0 +1,26 @@
1
+ <%- if params[:action] != 'preview_template' -%>
2
+ <table id="mainCCSToolbar" cellpadding="0" cellspacing="0" border="0" width="100%" style="display: none">
3
+ <%- if [ 'content', 'cms' ].include?(controller.controller_name) && params[:action] != 'preview_template' -%>
4
+ <tr>
5
+ <td>
6
+ <%- if is_editing_page? -%>
7
+ <div dojoType="Editor2" widgetId="main_toolbar" useActiveX="false" htmlEditing="true" focusOnLoad="false"
8
+ toolbarTemplatePath="<%= url_for :controller => '/management/cms', :action => 'toolbar_edit', :id => @pg, :version => params[:version] %>"
9
+ toolbarTemplateCssPath="/assets/dojo/src/widget/templates/EditorToolbarFullFeature.css"
10
+ toolbarAlwaysVisible="true" style="height: 25px; vertical-align: middle" toolbarGroup="main">
11
+ </div>
12
+ <%- else -%>
13
+ <div dojoType="Editor2" widgetId="main_toolbar" useActiveX="false" htmlEditing="false" focusOnLoad="false"
14
+ toolbarTemplatePath="<%= url_for :controller => '/management/cms', :action => 'toolbar_preview', :id => @pg, :version => params[:version] %>"
15
+ toolbarTemplateCssPath="/assets/dojo/src/widget/templates/EditorToolbarFullFeature.css"
16
+ toolbarAlwaysVisible="true" style="height: 25px; vertical-align: middle">
17
+ </div>
18
+ <%- end -%>
19
+ </td>
20
+ </tr>
21
+ <%- end -%>
22
+ </td>
23
+ </tr>
24
+ </table>
25
+ <%= javascript_tag "if (loggedIn()) $('mainCCSToolbar').show();" %>
26
+ <%- end -%>
@@ -15,6 +15,7 @@
15
15
  <%#= javascript_tag 'var djConfig = { isDebug: true };' %>
16
16
  <%- if is_logged_in_user? -%>
17
17
  <script src="/assets/dojo/dojo.js" type="text/javascript"></script>
18
+ <script src="/assets/codepress/codepress.js" type="text/javascript"></script>
18
19
  <%- end -%>
19
20
  <%= stylesheet_link_tag "application", :media => "all" %>
20
21
  <%= stylesheet_link_tag "manage", :media => "all" %>
@@ -60,5 +61,9 @@
60
61
  <!-- Main Content -->
61
62
  <%= yield %>
62
63
  </div>
64
+
65
+ <footer>
66
+
67
+ </footer>
63
68
  </body>
64
69
  </html>
data/imagine_cms.gemspec CHANGED
@@ -1,7 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
+
4
+ # Maintain your gem's version:
3
5
  require "imagine_cms/version"
4
6
 
7
+ # Describe your gem and declare its dependencies:
5
8
  Gem::Specification.new do |s|
6
9
  s.name = "imagine_cms"
7
10
  s.version = ImagineCms::VERSION
@@ -10,7 +13,7 @@ Gem::Specification.new do |s|
10
13
  s.email = ["aaron@biggerbird.com"]
11
14
  s.homepage = "https://github.com/anamba/imagine_cms"
12
15
  s.summary = %q{Imagine Content Management System for Rails}
13
- s.description = %q{Don't use this for now. See README for details.}
16
+ s.description = %q{See README for details.}
14
17
 
15
18
  s.rubyforge_project = "imagine_cms"
16
19
 
@@ -26,4 +29,6 @@ Gem::Specification.new do |s|
26
29
  s.add_dependency "rinku", "~> 1.7.2"
27
30
  s.add_dependency "net-dns", "~> 0.7.1"
28
31
  s.add_dependency "acts_as_tree", "~> 1.2"
32
+
33
+ s.add_development_dependency "sqlite3"
29
34
  end
@@ -1,3 +1,3 @@
1
1
  module ImagineCms
2
- VERSION = "3.0.0.beta8"
2
+ VERSION = "3.0.0.beta9"
3
3
  end