Changeset 42

Show
Ignore:
Timestamp:
08/07/06 00:35:10 (2 years ago)
Author:
tim
Message:

per theme atom feeds

Location:
trunk
Files:
3 added
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/themes_controller.rb

    r40 r42  
    99     
    1010    redirect_to(:action=>"view", :id=>theme.id) 
     11  end 
     12 
     13  def feed_single 
     14    @headers["Content-Type"] = "application/xml" 
     15    @theme = Theme.find(@params["id"]) 
     16    @revisions = @theme.theme_revisions 
     17    render_without_layout :action=>"atom_single" 
    1118  end 
    1219 
  • trunk/app/models/theme_revision.rb

    r34 r42  
    99    svninfo.each("\n") {|line| 
    1010      if(line.index("Last Changed Date")) 
    11         rc = line.gsub(/.*\(/, '').gsub(')', '') 
     11        rc = line.gsub("Last Changed Date: ", "").gsub(/\(.*/, '').strip.sub(" ", "T").sub(" ", "").sub(/00$/, ":00") 
    1212      end 
    1313    } 
  • trunk/app/views/themes/view.rhtml

    r36 r42  
    44<div id="theme-stats" class="bottom"> 
    55  <div class="top"> 
     6    <h4>Watch Changes</h4> 
     7    <%= link_to(image_tag("feed-icon-32-gray.gif") + " Atom Feed", "#{@theme.id}/atom.xml") %> 
    68    <h4>Statistics</h4> 
    79    <dl> 
  • trunk/config/routes.rb

    r14 r42  
    1616  map.connect '', :controller=>"themes", :action=>"list" 
    1717 
     18  map.connect 'themes/view/:id/atom.xml', :controller=>"themes", :action=>"feed_single", :format=>"atom" 
     19 
    1820  # Allow downloading Web Service WSDL as a file with an extension 
    1921  # instead of a file named 'wsdl' 
  • trunk/public/stylesheets/default.css

    r27 r42  
    144144div#theme-details > div {  
    145145  padding: 1em; 
    146   height: 300px; 
     146  height: 400px; 
    147147} 
    148148 
     
    152152 
    153153div#theme-stats {  
     154  font-family: Verdana, Arial, sans-serif; 
    154155  float: right; 
    155156  width: 18%; 
     157  height: 400px; 
    156158} 
     159 
     160div#theme-stats a {  
     161  text-decoration: none; 
     162} 
     163 
     164div#theme-stats img {  
     165  border: none; 
     166}