FilesSubmittedBranchesLabelsClientsUsersJobsHelp
Tree viewShow/hide recent activityInformation
Change 173

Change 173 by nullbyte@nullbyte-gentoo on 2005/07/10 16:58:09

AJAX! recent changes loads in place with link_to_remote. no page reload. very web 2.0. (it's an XMLHttpRequest. we've had those since IE5. but now it has a name.)
Affected files ...
//depot/projects/wiki/app/controllers/wiki_controller.rb#2 edittext
//depot/projects/wiki/app/views/wiki/show.rhtml#2 edittext
Differences ...

==== //depot/projects/wiki/app/controllers/wiki_controller.rb#2 (text) ====

@@ -23,6 +23,11 @@
2323 end
2424 end
2525
26 def recent
27 @pages = Page.find_all(nil, 'updated_at DESC', 10)
28 render_partial 'recent'
29 end
30
2631 private
2732
2833 def find_or_new(name)

==== //depot/projects/wiki/app/views/wiki/show.rhtml#2 (text) ====

@@ -10,3 +10,7 @@
1010 <%= link_to 'Edit', :action => 'edit', :name => @page.name %>
1111 </p>
1212<% end %>
13
14<div id="recent"></div>
15<p><%= link_to_remote 'Recent changes', :update => 'recent',
16 :url => { :action => 'recent' } %></p>

P4Web/LINUX26X86/2005.1/82295 · Copyright © 1995-2005 Perforce Software · ttul.org