<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/views/meetings/_topic.html.haml</filename>
    </added>
    <added>
      <filename>app/views/topics/create.rjs</filename>
    </added>
    <added>
      <filename>app/views/topics/edit.html.haml</filename>
    </added>
    <added>
      <filename>app/views/topics/index.html.haml</filename>
    </added>
    <added>
      <filename>app/views/topics/new.html.haml</filename>
    </added>
    <added>
      <filename>app/views/topics/show.html.haml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,35 +1,18 @@
 class TopicsController &lt; ApplicationController
+  
   # GET /topics
-  # GET /topics.xml
   def index
     @topics = Topic.find(:all)
-
-    respond_to do |format|
-      format.html # index.html.erb
-      format.xml  { render :xml =&gt; @topics }
-    end
   end
 
   # GET /topics/1
-  # GET /topics/1.xml
   def show
     @topic = Topic.find(params[:id])
-
-    respond_to do |format|
-      format.html # show.html.erb
-      format.xml  { render :xml =&gt; @topic }
-    end
   end
 
   # GET /topics/new
-  # GET /topics/new.xml
   def new
     @topic = Topic.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.xml  { render :xml =&gt; @topic }
-    end
   end
 
   # GET /topics/1/edit
@@ -38,48 +21,35 @@ class TopicsController &lt; ApplicationController
   end
 
   # POST /topics
-  # POST /topics.xml
   def create
     @topic = Topic.new(params[:topic])
-
     respond_to do |format|
       if @topic.save
         flash[:notice] = 'Topic was successfully created.'
-        format.html { redirect_to(@topic) }
-        format.xml  { render :xml =&gt; @topic, :status =&gt; :created, :location =&gt; @topic }
+        # redirect_to(@topic)
+        format.html { redirect_to meeting_path(@topic.meeting_id) }
+        format.js
       else
-        format.html { render :action =&gt; &quot;new&quot; }
-        format.xml  { render :xml =&gt; @topic.errors, :status =&gt; :unprocessable_entity }
+        render :action =&gt; &quot;new&quot;
       end
     end
   end
 
   # PUT /topics/1
-  # PUT /topics/1.xml
   def update
     @topic = Topic.find(params[:id])
-
-    respond_to do |format|
-      if @topic.update_attributes(params[:topic])
-        flash[:notice] = 'Topic was successfully updated.'
-        format.html { redirect_to(@topic) }
-        format.xml  { head :ok }
-      else
-        format.html { render :action =&gt; &quot;edit&quot; }
-        format.xml  { render :xml =&gt; @topic.errors, :status =&gt; :unprocessable_entity }
-      end
+    if @topic.update_attributes(params[:topic])
+      flash[:notice] = 'Topic was successfully updated.'
+      redirect_to(@topic)
+    else
+      render :action =&gt; &quot;edit&quot;
     end
   end
 
   # DELETE /topics/1
-  # DELETE /topics/1.xml
   def destroy
     @topic = Topic.find(params[:id])
     @topic.destroy
-
-    respond_to do |format|
-      format.html { redirect_to(topics_url) }
-      format.xml  { head :ok }
-    end
+    redirect_to(topics_url)
   end
 end</diff>
      <filename>app/controllers/topics_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,5 @@
+= flash[:notice]
+
 %p
   %strong Date:
   =h @meeting.date
@@ -9,11 +11,8 @@
 %p
   %strong Topics:
 %ul
-  - for topic in @meeting.topics
-    %li
-      = link_to topic.title, topic.link
-      \-
-      = topic.description
+
+= link_to 'Create new topic', new_topic_path
 
 %p
   %strong Attendees:
@@ -26,3 +25,43 @@
 = link_to 'Edit', edit_meeting_path(@meeting)
 |
 = link_to 'Back', meetings_path
+
+%ul#topic_list
+  = render :partial =&gt; 'topic', :collection =&gt; Topic.all
+
+%a#new_topic Add new topic
+:javascript
+  $(document).ready(function(){
+    $(&quot;#add_topic&quot;).hide();    
+    $(&quot;a#new_topic&quot;).toggle(function(){
+      $(&quot;#add_topic&quot;).show('slow');
+    },function(){
+      $(&quot;#add_topic&quot;).hide('slow');
+    });
+  });
+
+#add_topic
+  %h1 Editing topic
+
+  - form_remote_for :topic, :url =&gt; topics_path, :html =&gt; { :id =&gt; 'topic_form' } do |f|
+    = f.error_messages
+
+    %p
+      = f.label :title
+      %br
+      = f.text_field :title
+
+    %p
+      = f.label :description
+      %br
+      = f.text_area :description
+
+    %p
+      = f.label :link
+      %br
+      = f.text_field :link
+
+    = f.hidden_field :meeting_id, :value =&gt; @meeting.id
+
+    %p
+      = f.submit &quot;Update&quot;
\ No newline at end of file</diff>
      <filename>app/views/meetings/show.html.haml</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>app/views/topics/edit.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/topics/index.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/topics/new.html.erb</filename>
    </removed>
    <removed>
      <filename>app/views/topics/show.html.erb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>f10022b0044347b59ccff24bee6e132d3cae3168</id>
    </parent>
  </parents>
  <author>
    <name>Michael MacDonald</name>
    <email>michaelm@amc.org.au</email>
  </author>
  <url>http://github.com/artpop/crc_site/commit/73b80e3578ae1f2a203dfec41478e1f3a96b49f0</url>
  <id>73b80e3578ae1f2a203dfec41478e1f3a96b49f0</id>
  <committed-date>2008-10-24T07:22:56-07:00</committed-date>
  <authored-date>2008-10-24T07:22:56-07:00</authored-date>
  <message>added some ajax goodness to the meetings show page. its still ugly but its a start</message>
  <tree>1e6b583ca318e237d2173641ba5ff7028b7f5bb5</tree>
  <committer>
    <name>Michael MacDonald</name>
    <email>michaelm@amc.org.au</email>
  </committer>
</commit>
