<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,9 @@
+- version: 2.0.5 (beta)
+    - Added configuration option for importing/exporting pages from admin: `config.allow_import_export = true|false`, `true` is the default at the moment
+    - Reworked the UI for import/export a little bit
+    - Added LINK option to `test_harness` rake task to symlink the comatose plugin directory instead of copying it
+    - Updated manifest and gemspec
+
 - version: 2.0.4 (beta)
     - Added a rake task to generate a test_harness (for use in development). From the comatose directory, run: `rake test_harness TARGET=../comatose_test_harness`. This will create an empty rails app, copy this working folder over to vendor/plugins/comatose, install acts_as_list and acts_as_tree, and run any setup needed, like script/generate comatose_migration and rake db:migrate.
     - Bugfix in tasks/comatose.rake</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -55,7 +55,7 @@ LICENSE
 MANIFEST
 rails/init.rb
 Rakefile
-README.rdoc
+README.markdown
 resources/layouts/comatose_admin_template.html.erb
 resources/public/images/collapsed.gif
 resources/public/images/expanded.gif</diff>
      <filename>MANIFEST</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 # Comatose
 
-* Version: 2.0.4 (beta)
+* Version: 2.0.5 (beta)
 * Author:  M@ McCray
 * Website: comatose.rubyforge.org
 * Email: matt at elucidata dot net</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -125,6 +125,7 @@ end
 desc &quot;Creates an empty rails application for use as a test harness&quot;
 task :test_harness do
   target = ENV['TARGET']
+  sym_link = (ENV['LINK'].to_s == 'true')
   if target.nil?
     puts &quot;You must specify a TARGET for the test harness&quot;
     exit(1)
@@ -139,7 +140,11 @@ task :test_harness do
 
   puts &quot;Creating test harness at #{ target }&quot;
   run_sh &quot;rails -d sqlite3 #{target}&quot;
-  run_sh &quot;cp -r #{ File.dirname(__FILE__) }/ #{ comatose_plugin_path }&quot;
+  if sym_link
+    run_sh &quot;ln -s #{ File.dirname(__FILE__) } #{ comatose_plugin_path }&quot;
+  else
+    run_sh &quot;cp -r #{ File.dirname(__FILE__) }/ #{ comatose_plugin_path }&quot;
+  end
   run_sh &quot;ruby #{ comatose_plugin_path / 'install.rb' }&quot;
   run_sh &quot;ruby #{ target / 'script' / 'generate' } comatose_migration&quot;
   run_sh &quot;ruby #{ comatose_plugin_path / 'bin' / 'comatose' } --plugin #{ target }&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -3,5 +3,5 @@ summary: A micro CMS for embedding in Rails applications.
 homepage: http://comatose.rubyforge.org
 plugin: git://github.com/darthapo/comatose.git
 license: MIT
-version: 2.0.4
+version: 2.0.5
 rails_version: 2+</diff>
      <filename>about.yml</filename>
    </modified>
    <modified>
      <diff>@@ -97,6 +97,9 @@ Comatose.configure do |config|
   #  current_user.login
   #end
   
+  # Allows users to import and export pages (in YAML format)
+  #config.allow_import_export = true
+  
   # See the getting started guide at http://comatose.rubyforge.org for more...
 end
 EOT</diff>
      <filename>bin/comatose</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
 # Generated on Tue May 20 20:13:12 -0500 2008
 Gem::Specification.new do |s|
   s.name = &quot;comatose&quot;
-  s.version = &quot;2.0.4&quot;
-  s.date = &quot;2008-10-10&quot; # 2008-05-20
+  s.version = &quot;2.0.5&quot;
+  s.date = &quot;2008-10-31&quot; # 2008-05-20
   s.summary = &quot;Micro CMS designed for being embedded into existing Rails applications&quot;
   s.email = &quot;matt@elucidata.net&quot;
   s.rubyforge_project = 'comatose'
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
              &quot;INSTALL&quot;,
              &quot;LICENSE&quot;,
              &quot;MANIFEST&quot;,
-             &quot;README.rdoc&quot;,
+             &quot;README.markdown&quot;,
              &quot;Rakefile&quot;,
              &quot;SPECS&quot;,
              &quot;about.yml&quot;,
@@ -107,7 +107,7 @@ Gem::Specification.new do |s|
                   &quot;test/unit/processing_context_test.rb&quot;,
                   &quot;test/unit/text_filters_test.rb&quot;]
   
-  s.rdoc_options = [&quot;--main&quot;, &quot;README.rdoc&quot;]
-  s.extra_rdoc_files = %w(README.rdoc CHANGELOG SPECS LICENSE)
+  s.rdoc_options = [&quot;--main&quot;, &quot;README.markdown&quot;]
+  s.extra_rdoc_files = %w(README.markdown CHANGELOG SPECS LICENSE)
   #s.add_dependency(&quot;mime-types&quot;, [&quot;&gt; 0.0.0&quot;])
 end</diff>
      <filename>comatose.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 require 'fileutils'
 
 # Copy the images (*.gif) into RAILS_ROOT/public/images/comatose
-RAILS_ROOT = File.join(File.dirname(__FILE__), '../../../')
+RAILS_ROOT = File.expand_path( File.join(File.dirname(__FILE__), '../../../') )
 
 unless FileTest.exist? File.join(RAILS_ROOT, 'public', 'images', 'comatose')
   FileUtils.mkdir( File.join(RAILS_ROOT, 'public', 'images', 'comatose') )</diff>
      <filename>install.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,6 +36,7 @@ module Comatose
     attr_accessor_with_default :hidden_meta_fields,   []
     attr_accessor_with_default :helpers,              []
     attr_accessor_with_default :includes,             []
+    attr_accessor_with_default :allow_import_export,  true
 
     # 'Blockable' setters
     blockable_attr_accessor    :authorization</diff>
      <filename>lib/comatose/configuration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
 module Comatose
-  VERSION = &quot;2.0.4&quot;
+  VERSION = &quot;2.0.5&quot;
   VERSION_STRING = &quot;#{VERSION}  (beta)&quot;
 end
\ No newline at end of file</diff>
      <filename>lib/comatose/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -141,13 +141,22 @@ class ComatoseAdminController &lt; ActionController::Base
   end
 
   def export
-    send_data(page_to_hash(ComatosePage.root).to_yaml, :disposition =&gt; 'inline', :type =&gt; 'text/yaml', :filename =&gt; &quot;comatose-pages.yml&quot;)
+    if Comatose.config.allow_import_export
+      send_data(page_to_hash(ComatosePage.root).to_yaml, :disposition =&gt; 'attachment', :type =&gt; 'text/yaml', :filename =&gt; &quot;comatose-pages.yml&quot;)
+    else
+      flash[:notice] = &quot;Export is not allowed&quot;
+      redirect_to :controller=&gt;self.controller_name, :action=&gt;'index'
+    end
   end
 
   def import
-    data = YAML::load(params[:import_file])
-    hash_to_page_tree(data, ComatosePage.root)
-    flash[:notice] = &quot;Pages Imported Successfully&quot;
+    if Comatose.config.allow_import_export
+      data = YAML::load(params[:import_file])
+      hash_to_page_tree(data, ComatosePage.root)
+      flash[:notice] = &quot;Pages Imported Successfully&quot;
+    else
+      flash[:notice] = &quot;Import isn't allowed&quot;
+    end
     redirect_to :controller=&gt;self.controller_name, :action=&gt;'index'
   end
 </diff>
      <filename>lib/comatose_admin_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -60,8 +60,9 @@ BODY {
 #content .action A {
   font-weight: bold;
   text-decoration: none;
-  color: darkgreen;
-  border-bottom: 1px solid black;
+  color: navy;
+  border-bottom: 1px solid blue;
+  margin-left: 15px;
 }
 #content .action A:hover {
   color: red;
@@ -70,6 +71,28 @@ BODY {
 #content .page-header {
   color: gray;
 }
+#import_form {
+  position: fixed;
+  right: 75px;
+  border: 3px solid gray !important;
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  background: #FFF;
+  padding: 15px;
+}
+#import_form FORM {
+  display: inline;
+  margin: 0px;
+  padding: 0px;
+}
+#import_form A {
+  color: maroon !important;
+  border-bottom: 1px solid gray !important;
+}
+#import_form A:hover {
+  color: red !important;
+  border-bottom: 1px solid red !important;
+}
 
 /* Page Listing */
 #content .tree-controller {</diff>
      <filename>resources/public/stylesheets/comatose_admin.css</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,16 @@
 &lt;div class=&quot;action&quot;&gt;
-  &lt;% form_tag(url_for(:action =&gt; 'import'), :multipart =&gt; true, :style =&gt; 'display: none;', :id =&gt; 'import_form') do %&gt;
+  &lt;%= link_to 'Clear Page Cache', :controller=&gt;controller.controller_name, :action=&gt;'expire_page_cache' %&gt;
+&lt;% if Comatose.config.allow_import_export %&gt;
+  &lt;%= link_to 'Import', '#', :id =&gt; 'import_link2', :onclick =&gt; &quot;$('import_form').setStyle({display: 'inline'}); return false;&quot; %&gt;
+  &lt;%= link_to 'Export', :controller=&gt;controller.controller_name, :action=&gt;'export' %&gt;
+  &lt;div id=&quot;import_form&quot; style=&quot;display: none;&quot;&gt;
+  &lt;% form_tag(url_for(:action =&gt; 'import'), :multipart =&gt; true) do %&gt;
     &lt;%= file_field_tag 'import_file' %&gt;
-    &lt;%= submit_tag 'Import' %&gt;
+    &lt;%= submit_tag 'Upload and Import' %&gt;
+    &lt;a href=&quot;#&quot; onclick=&quot;$('import_form').hide(); return false;&quot;&gt;Cancel&lt;/a&gt;
   &lt;% end %&gt;
-  
-  &lt;%= link_to 'Import', '#', :id =&gt; 'import_link2', :onclick =&gt; &quot;$('import_form').setStyle({display: 'inline'}); this.hide();&quot; %&gt;
-  &lt;%= link_to 'Export', :controller=&gt;controller.controller_name, :action=&gt;'export' %&gt;
-  &lt;%= link_to 'Clear Page Cache', :controller=&gt;controller.controller_name, :action=&gt;'expire_page_cache' %&gt;
+  &lt;/div&gt;
+&lt;% end %&gt;
 &lt;/div&gt;
   
 &lt;h1&gt;</diff>
      <filename>views/comatose_admin/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -67,8 +67,9 @@ BODY {
 #content .action A {
   font-weight: bold;
   text-decoration: none;
-  color: darkgreen;
-  border-bottom: 1px solid black;
+  color: navy;
+  border-bottom: 1px solid blue;
+  margin-left: 15px;
 }
 #content .action A:hover {
   color: red;
@@ -77,6 +78,28 @@ BODY {
 #content .page-header {
   color: gray;
 }
+#import_form {
+  position: fixed;
+  right: 75px;
+  border: 3px solid gray !important;
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  background: #FFF;
+  padding: 15px;
+}
+#import_form FORM {
+  display: inline;
+  margin: 0px;
+  padding: 0px;
+}
+#import_form A {
+  color: maroon !important;
+  border-bottom: 1px solid gray !important;
+}
+#import_form A:hover {
+  color: red !important;
+  border-bottom: 1px solid red !important;
+}
 
 /* Page Listing */
 #content .tree-controller {</diff>
      <filename>views/layouts/comatose_admin.html.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>484adfec1985875a0fdab0df15821e972571d0c1</id>
    </parent>
  </parents>
  <author>
    <name>M@ McCray</name>
    <email>darthapo@gmail.com</email>
  </author>
  <url>http://github.com/darthapo/comatose/commit/8b5b7d071d2405e7f63a335695aeaae8df12c4be</url>
  <id>8b5b7d071d2405e7f63a335695aeaae8df12c4be</id>
  <committed-date>2008-10-31T00:27:24-07:00</committed-date>
  <authored-date>2008-10-31T00:27:24-07:00</authored-date>
  <message>* Added configuration option for importing/exporting pages from admin: `config.allow_import_export = true|false`, `true` is the default at the moment
* Reworked the UI for import/export a little bit
* Added LINK option to `test_harness` rake task to symlink the comatose plugin directory instead of copying it
* Updated manifest and gemspec</message>
  <tree>e328e64690e14c1eb769414449960018bd526923</tree>
  <committer>
    <name>M@ McCray</name>
    <email>darthapo@gmail.com</email>
  </committer>
</commit>
