public
Description: Your friendly neighborhood nzb downloader
Clone URL: git://github.com/maddox/pyrot.git
Click here to lend your support to: pyrot and make a donation at www.pledgie.com !
added watchlist adding to the iphone
maddox (author)
Thu Apr 24 14:52:41 -0700 2008
commit  3ed7c0b40823b7073fe5e59421683c1fc9b40818
tree    5f26e8a6fdbd9e681d63c8eea3d564f4edcce376
parent  d95b94744e1bcf27ee4fb1f172b35f7b1f031e6b
...
34
35
36
 
37
38
39
...
34
35
36
37
38
39
40
0
@@ -34,6 +34,7 @@ class GeneralController < ApplicationController
0
     @tv_groups = Group.find(:all, :params => {:type => :tv})
0
     @movie_groups = Group.find(:all, :params => {:type => :movies})
0
     @watchfors = Watchfor.find(:all)
0
+ @watchfor = Watchfor.new
0
 
0
     respond_to do |format|
0
       format.html
...
2
3
4
5
6
7
8
 
 
 
 
 
 
9
10
11
12
13
 
14
15
16
17
18
19
 
20
21
...
2
3
4
 
 
 
5
6
7
8
9
10
11
12
13
14
15
 
16
17
18
19
20
21
 
22
23
24
0
@@ -2,20 +2,23 @@ class WatchlistsController < ApplicationController
0
 
0
   def index
0
     @watchfors = Watchfor.find(:all)
0
- end
0
-
0
- def new
0
     @watchfor = Watchfor.new
0
+
0
+ respond_to do |format|
0
+ format.html
0
+ format.iphone { render :layout => false }
0
+ end
0
+
0
   end
0
 
0
   def create
0
     @watchfor = Watchfor.create(params[:watchfor])
0
- redirect_to home_path
0
+ redirect_to watchlists_path
0
   end
0
 
0
   def destroy
0
     watchfor = Watchfor.find(params[:id])
0
     watchfor.destroy
0
- redirect_to home_path
0
+ redirect_to watchlists_path
0
   end
0
 end
...
92
93
94
95
96
97
98
99
100
 
101
102
103
...
92
93
94
 
 
 
 
 
 
95
96
97
98
0
@@ -92,12 +92,7 @@
0
 <%= date_rows.push("<li>#{link_to "New Releases", movies_path(:most_recent => true)}</li><li>#{link_to "2000&#8217;s", movies_path(:by_decade => "2000")}</li>").reverse %>  
0
 </ul>
0
 
0
-<ul id="watchlist" title="By Date">
0
- <% @watchfors.each do |watchfor| -%>
0
- <li><%= link_to watchfor.title, movies_path(:q => watchfor.title) %></li>
0
- <% end -%>
0
-</ul>
0
-
0
+<%= render :partial => "watchlists/watchfors" %>
0
 
0
 <% form_tag movies_path, :method => :get, :id => 'search_form', :class => 'dialog' do %>
0
 <fieldset>
...
1
2
3
4
 
 
 
 
 
 
 
 
5
6
7
...
1
2
3
 
4
5
6
7
8
9
10
11
12
13
14
0
@@ -1,7 +1,14 @@
0
 <div id="padded">
0
   <h1>Watchlist</h1>
0
 
0
- <%= link_to 'Add Item', new_watchlist_path %>
0
+ <% form_for :watchfor, :url => watchlists_path do |f| -%>
0
+
0
+ <p><%= f.label :title %><br />
0
+ <%= f.text_field :title %></p>
0
+
0
+ <%= submit_tag 'Add to Watchlist'%>
0
+
0
+ <% end -%>
0
 
0
   <table id="season_passes">
0
     <tr class="title">

Comments

    No one has commented yet.