<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/migrate/20090616061006_add_image_to_rooms.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -23,4 +23,12 @@ class Room &lt; ActiveRecord::Base
   # Validations
   validates_presence_of :name, :event
   validates_numericality_of :capacity, :unless =&gt; lambda{|obj| obj.capacity.blank? }
+
+  # Image Attachment
+  has_attached_file :image,
+    :styles =&gt; {
+      :large =&gt; &quot;650&gt;&quot;,
+      :medium =&gt; &quot;350&gt;&quot;,
+      :small =&gt; &quot;150&gt;&quot;
+    }
 end</diff>
      <filename>app/models/room.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 &lt;% focus :room_name %&gt;
 
-&lt;% form_for(@room) do |f| %&gt;
+&lt;% form_for(@room, :html =&gt; { :multipart =&gt; true }) do |f| %&gt;
   &lt;%= f.error_messages %&gt;
 
   &lt;p&gt;
@@ -24,6 +24,11 @@
     &lt;%= f.text_area :description %&gt;
   &lt;/p&gt;
   &lt;p&gt;
+    &lt;%= f.label :image, &quot;Image&quot; %&gt;
+    &lt;%= image_tag @room.image.url(:small) if @room.image.file? %&gt;
+    &lt;%= f.file_field :image %&gt;
+  &lt;/p&gt;
+  &lt;p&gt;
     &lt;%= f.submit @room.new_record? ? &quot;Create&quot; : &quot;Update&quot; %&gt;
     &lt;%= link_to 'Cancel', @room, :class =&gt; &quot;showable&quot; %&gt;
     &lt;%= link_to 'Back', rooms_path, :class =&gt; &quot;cancelable&quot; %&gt;</diff>
      <filename>app/views/rooms/_form.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 &lt;% page_title &quot;#{@room.name}&quot; %&gt;
 
 &lt;% cache &quot;room_#{@room.id},admin_#{admin?}&quot; do %&gt;
+  &lt;%= image_tag( @room.image.url(:medium), :class =&gt; 'room-image' )  if @room.image.file? %&gt;
   &lt;div id=&quot;room-show&quot;&gt;
     &lt;% if @room.capacity %&gt;
       &lt;div&gt;&lt;strong&gt;Capacity:&lt;/strong&gt; &lt;%= @room.capacity %&gt;&lt;/div&gt;</diff>
      <filename>app/views/rooms/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -855,6 +855,11 @@ ul.calendar_items {
   color: #116DB6;
 }
 
+.sub_list_for_event,
+.sub_list_for_many_events {
+  clear: both;
+}
+
 .favorite {
   background-image: url('/images/favorite.png');
   background-position: left -36px;
@@ -914,4 +919,8 @@ body.users.show h2.page_title {
   background: url(/images/lock.png) no-repeat 0 2px;
   padding-left: 23px;
   margin: 1em 0;
+}
+
+.room-image {
+  float: right;
 }
\ No newline at end of file</diff>
      <filename>themes/bridgepdx/stylesheets/custom.css</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c932185de53498c8766c29b6042820f99a0dbe60</id>
    </parent>
  </parents>
  <author>
    <name>Reid Beels</name>
    <email>mail@reidbeels.com</email>
  </author>
  <url>http://github.com/igal/openconferenceware/commit/acd6daf71b6e2d4031e8acc491d5b7730930bf21</url>
  <id>acd6daf71b6e2d4031e8acc491d5b7730930bf21</id>
  <committed-date>2009-06-17T07:27:32-07:00</committed-date>
  <authored-date>2009-06-15T23:38:22-07:00</authored-date>
  <message>Added a field for image attachments to rooms. Meant to display a photo of the room or a map showing its location.</message>
  <tree>b90a4f335e1437b5b400d18d47774b97335ff4e0</tree>
  <committer>
    <name>Igal Koshevoy</name>
    <email>igal@pragmaticraft.com</email>
  </committer>
</commit>
