<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,7 +3,7 @@ class DataController &lt; ApplicationController
   require 'csv'
   
   def index
-        @page_title = &quot;TRACKS::Export&quot;
+    @page_title = &quot;TRACKS::Export&quot;
   end
 
   def import
@@ -35,21 +35,21 @@ class DataController &lt; ApplicationController
     content_type = 'text/csv'
     CSV::Writer.generate(result = &quot;&quot;) do |csv|
       csv &lt;&lt; [&quot;id&quot;, &quot;Context&quot;, &quot;Project&quot;, &quot;Description&quot;, &quot;Notes&quot;, &quot;Tags&quot;,
-              &quot;Created at&quot;, &quot;Due&quot;, &quot;Completed at&quot;, &quot;User ID&quot;, &quot;Show from&quot;,
-              &quot;state&quot;]
+        &quot;Created at&quot;, &quot;Due&quot;, &quot;Completed at&quot;, &quot;User ID&quot;, &quot;Show from&quot;,
+        &quot;state&quot;]
       current_user.todos.find(:all, :include =&gt; [:context, :project]).each do |todo|
-        # Format dates in ISO format for easy sorting in spreadsheet
-        # Print context and project names for easy viewing
+        # Format dates in ISO format for easy sorting in spreadsheet Print
+        # context and project names for easy viewing
         csv &lt;&lt; [todo.id, todo.context.name, 
-                todo.project_id = todo.project_id.nil? ? &quot;&quot; : todo.project.name,
-                todo.description, 
-                todo.notes, todo.tags.collect{|t| t.name}.join(', '),
-                todo.created_at.to_formatted_s(:db),
-                todo.due = todo.due? ? todo.due.to_formatted_s(:db) : &quot;&quot;,
-                todo.completed_at = todo.completed_at? ? todo.completed_at.to_formatted_s(:db) : &quot;&quot;, 
-                todo.user_id, 
-                todo.show_from = todo.show_from? ? todo.show_from.to_formatted_s(:db) : &quot;&quot;,
-                todo.state] 
+          todo.project_id = todo.project_id.nil? ? &quot;&quot; : todo.project.name,
+          todo.description, 
+          todo.notes, todo.tags.collect{|t| t.name}.join(', '),
+          todo.created_at.to_formatted_s(:db),
+          todo.due = todo.due? ? todo.due.to_formatted_s(:db) : &quot;&quot;,
+          todo.completed_at = todo.completed_at? ? todo.completed_at.to_formatted_s(:db) : &quot;&quot;, 
+          todo.user_id, 
+          todo.show_from = todo.show_from? ? todo.show_from.to_formatted_s(:db) : &quot;&quot;,
+          todo.state] 
       end
     end
     send_data(result, :filename =&gt; &quot;todos.csv&quot;, :type =&gt; content_type)
@@ -59,16 +59,17 @@ class DataController &lt; ApplicationController
     content_type = 'text/csv'
     CSV::Writer.generate(result = &quot;&quot;) do |csv|
       csv &lt;&lt; [&quot;id&quot;, &quot;User ID&quot;, &quot;Project&quot;, &quot;Note&quot;,
-              &quot;Created at&quot;, &quot;Updated at&quot;]
-      # had to remove project include because it's association order is leaking through
-      # and causing an ambiguous column ref even with_exclusive_scope didn't seem to help -JamesKebinger 
+        &quot;Created at&quot;, &quot;Updated at&quot;]
+      # had to remove project include because it's association order is leaking
+      # through and causing an ambiguous column ref even with_exclusive_scope
+      # didn't seem to help -JamesKebinger
       current_user.notes.find(:all,:order=&gt;&quot;notes.created_at&quot;).each do |note|
-        # Format dates in ISO format for easy sorting in spreadsheet
-        # Print context and project names for easy viewing
+        # Format dates in ISO format for easy sorting in spreadsheet Print
+        # context and project names for easy viewing
         csv &lt;&lt; [note.id, note.user_id, 
-                note.project_id = note.project_id.nil? ? &quot;&quot; : note.project.name,
-                note.body, note.created_at.to_formatted_s(:db),
-                note.updated_at.to_formatted_s(:db)] 
+          note.project_id = note.project_id.nil? ? &quot;&quot; : note.project.name,
+          note.body, note.created_at.to_formatted_s(:db),
+          note.updated_at.to_formatted_s(:db)] 
       end
     end
     send_data(result, :filename =&gt; &quot;notes.csv&quot;, :type =&gt; content_type)
@@ -104,7 +105,6 @@ class DataController &lt; ApplicationController
     @inarray = YAML::load(params['import']['yaml'])
     # arrays to handle id translations
 
-
     # contexts
     translate_context = Hash.new
     translate_context[nil] = nil
@@ -153,18 +153,18 @@ class DataController &lt; ApplicationController
 
       # state + dates
       case item.ivars['attributes']['state']
-        when 'active' : newitem.activate!
-        when 'project_hidden' : newitem.hide!
-        when 'completed' 
-          newitem.complete!
-          newitem.completed_at = adjust_time(item.ivars['attributes']['completed_at'])
-        when 'deferred' : newitem.defer!
+      when 'active' then newitem.activate!
+      when 'project_hidden' then newitem.hide!
+      when 'completed' 
+        newitem.complete!
+        newitem.completed_at = adjust_time(item.ivars['attributes']['completed_at'])
+      when 'deferred' then newitem.defer!
       end
       newitem.created_at = adjust_time(item.ivars['attributes']['created_at'])
       newitem.save(false)
     }
 
-    #tags
+    # tags
     translate_tag = Hash.new
     translate_tag[nil] = nil
     current_user.tags.each { |item| item.destroy }
@@ -182,8 +182,8 @@ class DataController &lt; ApplicationController
       newitem.user_id = current_user.id
       newitem.tag_id = translate_tag[newitem.tag_id]
       case newitem.taggable_type
-        when 'Todo' : newitem.taggable_id = translate_todo[newitem.taggable_id]
-        else newitem.taggable_id = 0
+      when 'Todo' then newitem.taggable_id = translate_todo[newitem.taggable_id]
+      else newitem.taggable_id = 0
       end
       newitem.save
     }
@@ -198,7 +198,6 @@ class DataController &lt; ApplicationController
       newitem.created_at = adjust_time(item.ivars['attributes']['created_at'])
       newitem.save
     }
-
   end
- 
-end
+  
+end
\ No newline at end of file</diff>
      <filename>app/controllers/data_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,44 +1,49 @@
-&lt;div id=&quot;feeds&quot;&gt;
-	&lt;div id=&quot;feedlegend&quot;&gt;
-		&lt;h3&gt;Exporting data&lt;/h3&gt;
-	  &lt;p&gt;You can choose between the following formats:&lt;/p&gt;
-	  &lt;ul&gt;
-            &lt;li&gt;&lt;strong&gt;YAML: &lt;/strong&gt;Best for exporting data. &lt;br/&gt;&lt;i&gt;Please note that  importing YAML files is currently supported only in experimentally. Do not rely on it for backing up critical data.&lt;/i&gt;&lt;/li&gt;
-	    &lt;li&gt;&lt;strong&gt;CSV: &lt;/strong&gt;Best for importing into spreadsheet or data analysis software&lt;/li&gt;
-	    &lt;li&gt;&lt;strong&gt;XML: &lt;/strong&gt;Best for importing or repurposing the data&lt;/li&gt;
-          &lt;/ul&gt;
-	&lt;/div&gt;
-
-&lt;p&gt;
-&lt;table class=&quot;export_table&quot;&gt;
-&lt;tr&gt;
-  &lt;th&gt;Description&lt;/th&gt;
-  &lt;th&gt;Download link&lt;/th&gt;
-&lt;/tr&gt;
-&lt;tr&gt;
-&lt;td&gt;YAML file containing all your actions, contexts, projects, tags and notes&lt;/td&gt;
-&lt;td&gt;&lt;%= link_to &quot;YAML file&quot;, :controller =&gt; 'data', :action =&gt; 'yaml_export' %&gt;&lt;/td&gt;
-&lt;/tr&gt;
-&lt;tr&gt;
-&lt;td&gt;CSV file containing all of your actions, with named contexts and projects&lt;/td&gt;
-&lt;td&gt;&lt;%= link_to &quot;CSV file (actions, contexts and projects)&quot;, :controller =&gt; 'data', :action =&gt; 'csv_actions' %&gt;&lt;/td&gt;
-&lt;/tr&gt;
-&lt;tr&gt;
-  &lt;td&gt;CSV file containing all your notes&lt;/td&gt;
-  &lt;td&gt;&lt;%= link_to &quot;CSV file (notes only)&quot;, :controller =&gt; 'data', :action =&gt; 'csv_notes' %&gt;&lt;/td&gt;
-&lt;/tr&gt;
-&lt;tr&gt;
-  &lt;td&gt;XML file containing all your actions, contexts, projects, tags and notes&lt;/td&gt;
-  &lt;td&gt;&lt;%= link_to &quot;XML file (actions only)&quot;, :controller =&gt; 'data', :action =&gt; 'xml_export' %&gt;&lt;/td&gt;
-&lt;/tr&gt;
-&lt;/table&gt;
-&lt;/p&gt;
-
-&lt;div id=&quot;feeds&quot;&gt;
-  &lt;div id=&quot;feedlegend&quot;&gt;
-   &lt;h3&gt;Importing data&lt;/h3&gt;
-&lt;p&gt;Curently there is a experimental support for importing YAML files. Beware: all your current data will be destroyed before importing the YAML file, so if you have access to the database, we strongly reccoment backing up the database right now in case that anything goes wrong.&lt;/p&gt;
-&lt;p&gt;&lt;%= link_to &quot;Start import&quot;, :controller =&gt; 'data', :action =&gt; 'yaml_form' %&gt;.&lt;/p&gt;
+&lt;div id=&quot;display_box&quot;&gt;
+  &lt;div id=&quot;feeds&quot;&gt;
+    &lt;div id=&quot;feedlegend&quot;&gt;
+      &lt;h3&gt;Importing data&lt;/h3&gt;
+      &lt;p&gt;Curently there is a experimental support for importing YAML files. 
+        Beware: all your current data will be destroyed before importing the YAML 
+        file, so if you have access to the database, we strongly recomment backing up 
+        the database right now in case that anything goes wrong.
+      &lt;/p&gt;
+      &lt;p&gt;&lt;%= link_to &quot;Start import&quot;, :controller =&gt; 'data', :action =&gt; 'yaml_form' %&gt;.&lt;/p&gt;
+      &lt;br/&gt;&lt;br/&gt;&lt;h3&gt;Exporting data&lt;/h3&gt;
+      &lt;p&gt;You can choose between the following formats:&lt;/p&gt;
+      &lt;ul&gt;
+        &lt;li&gt;&lt;strong&gt;YAML: &lt;/strong&gt;Best for exporting data. &lt;br/&gt;&lt;i&gt;Please note that  importing YAML files is currently supported only in experimentally. Do not rely on it for backing up critical data.&lt;/i&gt;&lt;/li&gt;
+        &lt;li&gt;&lt;strong&gt;CSV: &lt;/strong&gt;Best for importing into spreadsheet or data analysis software&lt;/li&gt;
+        &lt;li&gt;&lt;strong&gt;XML: &lt;/strong&gt;Best for importing or repurposing the data&lt;/li&gt;
+      &lt;/ul&gt;
+    &lt;/div&gt;
+    &lt;br/&gt;&lt;br/&gt;
+    &lt;table class=&quot;export_table&quot;&gt;
+      &lt;tr&gt;
+        &lt;th&gt;Description&lt;/th&gt;
+        &lt;th&gt;Download link&lt;/th&gt;
+      &lt;/tr&gt;
+      &lt;tr&gt;
+        &lt;td&gt;YAML file containing all your actions, contexts, projects, tags and notes&lt;/td&gt;
+        &lt;td&gt;&lt;%= link_to &quot;YAML file&quot;, :controller =&gt; 'data', :action =&gt; 'yaml_export' %&gt;&lt;/td&gt;
+      &lt;/tr&gt;
+      &lt;tr&gt;
+        &lt;td&gt;CSV file containing all of your actions, with named contexts and projects&lt;/td&gt;
+        &lt;td&gt;&lt;%= link_to &quot;CSV file (actions, contexts and projects)&quot;, :controller =&gt; 'data', :action =&gt; 'csv_actions' %&gt;&lt;/td&gt;
+      &lt;/tr&gt;
+      &lt;tr&gt;
+        &lt;td&gt;CSV file containing all your notes&lt;/td&gt;
+        &lt;td&gt;&lt;%= link_to &quot;CSV file (notes only)&quot;, :controller =&gt; 'data', :action =&gt; 'csv_notes' %&gt;&lt;/td&gt;
+      &lt;/tr&gt;
+      &lt;tr&gt;
+        &lt;td&gt;XML file containing all your actions, contexts, projects, tags and notes&lt;/td&gt;
+        &lt;td&gt;&lt;%= link_to &quot;XML file (actions only)&quot;, :controller =&gt; 'data', :action =&gt; 'xml_export' %&gt;&lt;/td&gt;
+      &lt;/tr&gt;
+    &lt;/table&gt;  
+  &lt;/div&gt;&lt;!-- End of feeds --&gt;
 &lt;/div&gt;
 
-&lt;/div&gt;&lt;!-- End of feeds --&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+    window.onload=function(){
+        Nifty(&quot;div#feedlegend&quot;,&quot;normal&quot;);
+    }
+&lt;/script&gt;</diff>
      <filename>app/views/data/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,23 @@
 &lt;div id=&quot;display_box&quot;&gt;
- &lt;div id=&quot;feeds&quot;&gt;
-  &lt;div id=&quot;feedlegend&quot;&gt;
-   &lt;p&gt;&lt;b&gt;Beware&lt;/b&gt;: all your current data will be destroyed before importing the YAML file, so if you have access to the database, we strongly reccoment backing up the database right now in case that anything goes wrong.&lt;/p&gt;
-   &lt;p&gt;Paste the contents of the YAML file you exported into the text box below:&lt;/p&gt;
-  &lt;/div&gt;
-  &lt;p&gt;
-  &lt;% form_for :import, @import, :url =&gt; {:controller =&gt; 'data', :action =&gt; 'yaml_import'} do |f| %&gt;
-   &lt;%= f.text_area :yaml %&gt;&lt;br /&gt;
-   &lt;input type=&quot;submit&quot; value=&quot;Import data&quot;&gt;
-  &lt;% end %&gt;
-  &lt;/p&gt;
- &lt;/div&gt;&lt;!-- End of feeds --&gt;
+  &lt;div id=&quot;feeds&quot;&gt;
+    &lt;div id=&quot;feedlegend&quot;&gt;
+      &lt;p&gt;&lt;b&gt;Beware&lt;/b&gt;: all your current data will be destroyed before importing 
+        the YAML file, so if you have access to the database, we strongly recommend 
+        backing up the database right now in case that anything goes wrong.
+      &lt;/p&gt;
+      &lt;p&gt;Paste the contents of the YAML file you exported into the text box below:&lt;/p&gt;
+    &lt;/div&gt;
+    &lt;p&gt;
+      &lt;% form_for :import, @import, :url =&gt; {:controller =&gt; 'data', :action =&gt; 'yaml_import'} do |f| %&gt;
+        &lt;%= f.text_area :yaml %&gt;&lt;br /&gt;
+        &lt;input type=&quot;submit&quot; value=&quot;Import data&quot;&gt;
+      &lt;% end %&gt;
+    &lt;/p&gt;
+  &lt;/div&gt;&lt;!-- End of feeds --&gt;
 &lt;/div&gt;&lt;!-- End of display_box --&gt;
 
-&lt;div id=&quot;input_box&quot;&gt;
-&lt;/div&gt;&lt;!-- End of input box --&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+    window.onload=function(){
+        Nifty(&quot;div#feedlegend&quot;,&quot;normal&quot;);
+    }
+&lt;/script&gt;</diff>
      <filename>app/views/data/yaml_form.html.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>88159d3f6ad4b0d0aa4d6b69c94b75d645cd2ecc</id>
    </parent>
  </parents>
  <author>
    <name>Reinier Balt</name>
    <email>lrbalt@gmail.com</email>
  </author>
  <url>http://github.com/bsag/tracks/commit/3a56d2bdd2ad86718f263bc5d1263757d844bbaa</url>
  <id>3a56d2bdd2ad86718f263bc5d1263757d844bbaa</id>
  <committed-date>2008-09-05T08:53:18-07:00</committed-date>
  <authored-date>2008-09-05T08:53:18-07:00</authored-date>
  <message>clean up export controller a bit. also some cleanups in the view</message>
  <tree>033849ac220ac977a6105c787e2e6b41e0720aa8</tree>
  <committer>
    <name>Reinier Balt</name>
    <email>lrbalt@gmail.com</email>
  </committer>
</commit>
