Author: assaf
Date: Wed Jun 25 11:38:22 2008
New Revision: 671624

URL: http://svn.apache.org/viewvc?rev=671624&view=rev
Log:
General task list now rendered using tasks.<format> views. Only inbox uses 
index.html.erb.

Added:
    ode/sandbox/singleshot/app/views/tasks/tasks.atom.builder
      - copied, changed from r671622, 
ode/sandbox/singleshot/app/views/tasks/index.atom.builder
    ode/sandbox/singleshot/app/views/tasks/tasks.html.erb
      - copied, changed from r671622, 
ode/sandbox/singleshot/app/views/tasks/following.html.erb
    ode/sandbox/singleshot/app/views/tasks/tasks.ics.ical
      - copied, changed from r671622, 
ode/sandbox/singleshot/app/views/tasks/index.ics.ical
Removed:
    ode/sandbox/singleshot/app/views/tasks/following.html.erb
    ode/sandbox/singleshot/app/views/tasks/index.atom.builder
    ode/sandbox/singleshot/app/views/tasks/index.ics.ical
Modified:
    ode/sandbox/singleshot/.gitignore
    ode/sandbox/singleshot/app/controllers/tasks_controller.rb
    ode/sandbox/singleshot/app/views/layouts/application.html.erb

Modified: ode/sandbox/singleshot/.gitignore
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/.gitignore?rev=671624&r1=671623&r2=671624&view=diff
==============================================================================
--- ode/sandbox/singleshot/.gitignore (original)
+++ ode/sandbox/singleshot/.gitignore Wed Jun 25 11:38:22 2008
@@ -2,3 +2,4 @@
 log
 db/*.sqlite3
 vendor/rails
+index

Modified: ode/sandbox/singleshot/app/controllers/tasks_controller.rb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/controllers/tasks_controller.rb?rev=671624&r1=671623&r2=671624&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/controllers/tasks_controller.rb (original)
+++ ode/sandbox/singleshot/app/controllers/tasks_controller.rb Wed Jun 25 
11:38:22 2008
@@ -13,7 +13,7 @@
                    Mime::ICS=>formatted_tasks_url(:format=>:ics, 
:access_key=>authenticated.access_key) }
     @tasks = 
Task.pending.for_stakeholder(authenticated).with_stakeholders.rank_for(authenticated)
     respond_to do |wants|
-      wants.html
+      wants.html { render :action=>'inbox' }
       # TODO: wants.xml
       # TODO: wants.json
       wants.atom
@@ -45,11 +45,11 @@
                    Mime::ICS=>formatted_following_tasks_url(:format=>:ics, 
:access_key=>authenticated.access_key) }
     @tasks = Task.following.for_stakeholder(authenticated).with_stakeholders
     respond_to do |wants|
-      wants.html
+      wants.html { render :action=>'index' }
       # TODO: wants.xml
       # TODO: wants.json
       wants.atom { render :action=>'index' }
-      wants.ics  { render :action=>'ics' }
+      wants.ics  { render :action=>'index' }
     end
   end
 
@@ -60,7 +60,13 @@
     #               Mime::ICS=>formatted_tasks_url(:format=>:ics, 
:access_key=>authenticated.access_key) }
     ids = Task.find_id_by_contents(@query).last.map { |h| h[:id] }
     @tasks = Task.for_stakeholder(authenticated).with_stakeholders.find(:all, 
:conditions=>{ :id=>ids })
-    render :action=>'following'
+    respond_to do |wants|
+      wants.html { render :action=>'index' }
+      # TODO: wants.xml
+      # TODO: wants.json
+      wants.atom { render :action=>'index' }
+      wants.ics  { render :action=>'index' }
+    end
   end
 
 

Modified: ode/sandbox/singleshot/app/views/layouts/application.html.erb
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/layouts/application.html.erb?rev=671624&r1=671623&r2=671624&view=diff
==============================================================================
--- ode/sandbox/singleshot/app/views/layouts/application.html.erb (original)
+++ ode/sandbox/singleshot/app/views/layouts/application.html.erb Wed Jun 25 
11:38:22 2008
@@ -20,8 +20,10 @@
           ['Completed', completed_tasks_url, 'Tasks you completed'],
           ['Activity', activity_url, 'Recent task activity'] ].map { |tab|
             content_tag 'li', link_to(tab[0], tab[1], :title=>tab[2], 
:class=>current_page?(tab[1]) ? 'current': nil)
-          }.join %></ul>
+      }.join %><li><%= link_to 'Search', search_url, 
:onclick=>"$('search').show()" %></li>
+       </ul>
        <ul class='alternate'><%= content_tag 'li', 
link_to(image_tag('feed.png') + ' Feed', @alternate[Mime::ATOM], 
:rel=>'alternate', :title=>'Subscribe with your feed reader') if @alternate && 
@alternate[Mime::ATOM] %><%= content_tag 'li', 
link_to(image_tag('calendar.png') + ' Calendar', @alternate[Mime::ICS], 
:rel=>'alternate', :title=>'Add to your calendar') if @alternate && 
@alternate[Mime::ICS] %></ul>
+       <form id='search' action='%<= search_url %>' method='get' 
style='display:none'><input type='text' name='query' /><button><%= image_tag 
'search.png' %></button></form>
     </div>
     <div id='main'>
 <%= yield %>

Copied: ode/sandbox/singleshot/app/views/tasks/tasks.atom.builder (from 
r671622, ode/sandbox/singleshot/app/views/tasks/index.atom.builder)
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/tasks/tasks.atom.builder?p2=ode/sandbox/singleshot/app/views/tasks/tasks.atom.builder&p1=ode/sandbox/singleshot/app/views/tasks/index.atom.builder&r1=671622&r2=671624&rev=671624&view=diff
==============================================================================
    (empty)

Copied: ode/sandbox/singleshot/app/views/tasks/tasks.html.erb (from r671622, 
ode/sandbox/singleshot/app/views/tasks/following.html.erb)
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/tasks/tasks.html.erb?p2=ode/sandbox/singleshot/app/views/tasks/tasks.html.erb&p1=ode/sandbox/singleshot/app/views/tasks/following.html.erb&r1=671622&r2=671624&rev=671624&view=diff
==============================================================================
    (empty)

Copied: ode/sandbox/singleshot/app/views/tasks/tasks.ics.ical (from r671622, 
ode/sandbox/singleshot/app/views/tasks/index.ics.ical)
URL: 
http://svn.apache.org/viewvc/ode/sandbox/singleshot/app/views/tasks/tasks.ics.ical?p2=ode/sandbox/singleshot/app/views/tasks/tasks.ics.ical&p1=ode/sandbox/singleshot/app/views/tasks/index.ics.ical&r1=671622&r2=671624&rev=671624&view=diff
==============================================================================
    (empty)


Reply via email to