<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -27,7 +27,7 @@ class TopicsController &lt; ApplicationController
       if @topic.save
         flash[:notice] = 'Topic was successfully created.'
         # redirect_to(@topic)
-        format.html { redirect_to meeting_path(@topic.meeting_id) }
+        format.html { redirect_to edit_meeting_path(@topic.meeting_id) }
         format.js
       else
         render :action =&gt; &quot;new&quot;</diff>
      <filename>app/controllers/topics_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,18 @@
 - content_for :head do
   = stylesheet_link_tag 'ui.datepicker.css'
   = javascript_include_tag 'ui.datepicker.js'
+
+- content_for :unobtrusive_javascript do
   :javascript
     $(document).ready(function(){
+      $(&quot;#add_topic&quot;).hide();    
+      $(&quot;a#new_topic&quot;).toggle(function(){
+        $(&quot;#add_topic&quot;).show('slow');
+        $(&quot;a#new_topic&quot;).text('Cancel');
+      },function(){
+        $(&quot;#add_topic&quot;).hide('slow');
+        $(&quot;a#new_topic&quot;).text('Add new topic');
+      });
       $(&quot;#meeting_date&quot;).datepicker({ 
           dateFormat: &quot;DD, MM d, yy&quot;, 
           showOn: &quot;both&quot;, 
@@ -10,7 +20,7 @@
           buttonImageOnly: true 
       });
     });
-
+        
 - form_for(@meeting) do |f|
   = f.error_messages
 
@@ -22,6 +32,7 @@
     = f.label :venue
     %br
     = f.text_field :venue
+
   %h4 Attendees
   %ul{ :style =&gt; 'list-style:none; padding-left: 0'}
     - for person in Person.all
@@ -29,4 +40,36 @@
         = check_box_tag &quot;meeting[attendee_ids][]&quot;, person.id, @meeting.attendees.include?(person)
         = person.name
   %p
-    = f.submit &quot;Save&quot;
\ No newline at end of file
+    = f.submit &quot;Save&quot;
+
+- unless @meeting.new_record?
+
+  %p
+    %strong Topics:
+  %ul#topic_list
+    = render :partial =&gt; 'topic', :collection =&gt; @meeting.topics
+
+  %p= link_to 'Add new topic', new_topic_path, :id =&gt; &quot;new_topic&quot;
+    
+  #add_topic
+    %h3 Add a topic
+    -# TODO: should do this as unobtrusive
+    - form_remote_for :topic, :url =&gt; topics_path, :html =&gt; { :id =&gt; 'topic_form' } do |f|
+      = f.error_messages
+
+      %p
+        = f.label :title
+        = f.text_field :title
+
+      %p
+        = f.label :description
+        = f.text_field :description
+
+      %p
+        = f.label :link
+        = f.text_field :link
+
+      = f.hidden_field :meeting_id, :value =&gt; @meeting.id
+
+      %p
+        = f.submit &quot;Update&quot;</diff>
      <filename>app/views/meetings/_form.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,3 @@
-- content_for :unobtrusive_javascript do
-  :javascript
-    $(document).ready(function(){
-      $(&quot;#add_topic&quot;).hide();    
-      $(&quot;a#new_topic&quot;).toggle(function(){
-        $(&quot;#add_topic&quot;).show('slow');
-        $(&quot;a#new_topic&quot;).text('Cancel');
-      },function(){
-        $(&quot;#add_topic&quot;).hide('slow');
-        $(&quot;a#new_topic&quot;).text('Add new topic');
-      });
-    });
-
 = flash[:notice]
 
 %h2 Meeting Details
@@ -28,33 +15,11 @@
   
 %p
   %strong Topics:
-%ul#topic_list
-  = render :partial =&gt; 'topic', :collection =&gt; Topic.all
-
-= link_to 'Add new topic', new_topic_path, :id =&gt; &quot;new_topic&quot;
-
-#add_topic
-  %h3 Add a topic
-  -# TODO: should do this as unobtrusive
-  - form_remote_for :topic, :url =&gt; topics_path, :html =&gt; { :id =&gt; 'topic_form' } do |f|
-    = f.error_messages
-
-    %p
-      = f.label :title
-      = f.text_field :title
-
-    %p
-      = f.label :description
-      = f.text_field :description
-
-    %p
-      = f.label :link
-      = f.text_field :link
-
-    = f.hidden_field :meeting_id, :value =&gt; @meeting.id
-
-    %p
-      = f.submit &quot;Update&quot;
+- if @meeting.topics.empty?
+  None
+- else
+  %ul
+    = render :partial =&gt; 'topic', :collection =&gt; @meeting.topics
 
 %p
   %strong Attendees:</diff>
      <filename>app/views/meetings/show.html.haml</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>df6c13e0467972927abf7219b16399ab7ffba02e</id>
    </parent>
  </parents>
  <author>
    <name>Michael MacDonald</name>
    <email>michaelm@amc.org.au</email>
  </author>
  <url>http://github.com/artpop/crc_site/commit/08f26049f92be7c45780b66ceb6634976c1e378e</url>
  <id>08f26049f92be7c45780b66ceb6634976c1e378e</id>
  <committed-date>2008-10-26T07:33:48-07:00</committed-date>
  <authored-date>2008-10-26T07:33:48-07:00</authored-date>
  <message>moved topic creation out of meeting show into meeting edit and fixed up topics list to only show topics for a meeting, not all topics</message>
  <tree>10cbc5dc8dc9635f4e3fbc9f884f7069e0e8047a</tree>
  <committer>
    <name>Michael MacDonald</name>
    <email>michaelm@amc.org.au</email>
  </committer>
</commit>
