<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,26 @@
 = Page Attachments
 
-Description goes here
\ No newline at end of file
+The Page Attachments extension allows Radiant administrators to attach files
+to pages. It can also generate and display thumbnails of uploaded images if
+image_science, mini-magick, or rmagick are installed on the server.
+
+Install the extension and run 
+
+ rake production db:migrate:extensions
+ rake production radiant:extensions:page_attachments:update
+
+When you login to your Radiant admin and edit a page, you should see an area
+below the main interface that says &#8220;Attachments (0)&#8221;. Click the &quot;+&quot; icon to
+add an attachment. You can upload multiple attachments at once. Attachments
+will not be saved or removed until the whole page is saved. Therefore, if you
+accidentally deleted something you meant to keep, simply cancel the page-edit.
+
+
+ &lt;r:attachment name=&quot;file.txt&quot;&gt;...&lt;/r:attachment&gt;
+ &lt;r:attachment:url name=&quot;file.jpg&quot; [size=&quot;icon&quot;]/&gt;
+ &lt;r:attachment:#{key} name=&quot;file.jpg&quot; [size=&quot;icon&quot;]/&gt;
+ &lt;r:attachment:image name=&quot;file.jpg&quot; [size=&quot;icon&quot;]/&gt;
+
+ &lt;r:attachment:link name=&quot;file.jpg&quot; [size=&quot;thumbnail&quot;]/&gt;
+
+ &lt;r:attachment:each [order=&quot;asc|desc&quot;] [by=&quot;filename|size|created_at|...&quot;]&gt;</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,7 @@ module PageAttachmentAssociations
       has_many :attachments, :class_name =&gt; &quot;PageAttachment&quot;, :dependent =&gt; :destroy
   
       attr_accessor :add_attachments
+      attr_accessor :describe_attachments
       attr_accessor :delete_attachments
       after_save :save_attachments
       after_save :destroy_attachments
@@ -29,11 +30,11 @@ module PageAttachmentAssociations
       
     def save_attachments
       if @add_attachments
-        @add_attachments.each do |attachment|
-          attachments &lt;&lt; PageAttachment.new(:uploaded_data =&gt; attachment)
+         @add_attachments.zip(@describe_attachments).each do |attachment, description|
+           attachments &lt;&lt; PageAttachment.new(:uploaded_data =&gt; attachment, :description =&gt; description)
         end  
       end
       @add_attachments = nil
     end  
   end
-end
\ No newline at end of file
+end</diff>
      <filename>app/models/page_attachment_associations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -35,7 +35,7 @@ module PageAttachmentTags
     attachment.public_filename(size)
   end
   
-  [:content_type, :size, :width, :height].each do |key|
+  [:content_type, :size, :width, :height, :description].each do |key|
     desc %{
       Renders the `#{key}' attribute of the attachment.     
       The 'name' attribute is required on this tag or the parent tag.  The optional 'size'</diff>
      <filename>app/models/page_attachment_tags.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,7 @@
          image_tag(attachment.thumbnails.find(:first, :conditions =&gt; &quot;thumbnail = 'icon'&quot;).public_filename, 
                    :class =&gt; &quot;thumbnail&quot;)%&gt;&lt;/td&gt;
     &lt;td&gt; &lt;%= File.basename(attachment.public_filename) %&gt;&lt;/td&gt;
+    &lt;td&gt; &lt;%= attachment.description %&gt;&lt;/td&gt;
     &lt;td&gt;&lt;%= link_to_function image(&quot;minus&quot;, :title =&gt; &quot;Remove attachment&quot;), &quot;remove_attachment(#{attachment.id})&quot; %&gt;&lt;/td&gt;
   &lt;/tr&gt;
-&lt;/table&gt;
\ No newline at end of file
+&lt;/table&gt;</diff>
      <filename>app/views/admin/page/_attachment.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -13,10 +13,11 @@ class CreatePageAttachmentsExtensionSchema &lt; ActiveRecord::Migration
       t.column &quot;updated_at&quot;,   :datetime
       t.column &quot;updated_by&quot;,   :integer
       t.column &quot;page_id&quot;,      :integer
+      t.column &quot;description&quot;,  :string
     end
   end
   
   def self.down
     drop_table &quot;page_attachments&quot;
   end
-end
\ No newline at end of file
+end</diff>
      <filename>db/migrate/001_create_page_attachments_extension_schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 function add_attachment() {
   var attachments_box = $('attachments');
-  var template = new Template('&lt;p class=&quot;attachment&quot; id=&quot;file_#{id}&quot;&gt;&lt;label&gt;Upload file: &lt;/label&gt;&lt;input type=&quot;file&quot; name=&quot;page[add_attachments][]&quot; /&gt; &lt;a href=&quot;#&quot; onclick=&quot;Element.remove(\'file_#{id}\')&quot;&gt;Cancel&lt;/a&gt;&lt;/p&gt;');
+  var template = new Template('&lt;p class=&quot;attachment&quot; id=&quot;file_#{id}&quot;&gt;&lt;label&gt;Upload file: &lt;/label&gt;&lt;input type=&quot;file&quot; name=&quot;page[add_attachments][]&quot; /&gt; &lt;label&gt;Description:&lt;/label&gt;&lt;input type=&quot;text&quot; name=&quot;page[describe_attachments][]&quot; /&gt;&lt;a href=&quot;#&quot; onclick=&quot;Element.remove(\'file_#{id}\')&quot;&gt;Cancel&lt;/a&gt;&lt;/p&gt;');
   new Insertion.Bottom(attachments_box, template.evaluate({id: Math.round(Math.random() * 100000)}));
 }
 function remove_attachment(id){
@@ -15,4 +15,4 @@ function remove_attachment(id){
       }
       new Effect.Highlight('attachments-deleted');
   }
-}
\ No newline at end of file
+}</diff>
      <filename>public/javascripts/page_attachments.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2bfd3ca5d44f39057bf796b65a1368a50ba76cd8</id>
    </parent>
  </parents>
  <author>
    <name>Joel Williams</name>
    <email>joel@badger.lan</email>
  </author>
  <url>http://github.com/joelw/page_attachments/commit/454eb88bac9a3d31342f6f506091b71216f129ba</url>
  <id>454eb88bac9a3d31342f6f506091b71216f129ba</id>
  <committed-date>2008-06-01T02:18:20-07:00</committed-date>
  <authored-date>2008-06-01T02:18:20-07:00</authored-date>
  <message>Basic support for adding descriptions to file attachments.</message>
  <tree>9d86fa1ebbc7088e6e2d3faced65cb9ba800fd0e</tree>
  <committer>
    <name>Joel Williams</name>
    <email>joel@badger.lan</email>
  </committer>
</commit>
