Sha256: 071438c5f1f68fef2cb5388976411810f985446725150dd1f38db5d2d3ddcc4c

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

%div.posterous
  - if defined?(@posts) && @posts.nil?
    %h3
      Sorry, there's a problem communicating with Posterous.com
  - else
    - @posts.each do |post|
      - puts post.inspect
      = haml :_post, :layout=>false, :locals=>{:post=>post}
    %nav#pagination
      - page = params[:page].to_i if defined?(params[:page])
      - page ||= 1
      - page = 1 if page < 1
      #next
        - if page > 1
          %a{:href=>"/posterous/#{page-1}"}
            Next
      
      #previous
        - if @posts
          %a{:href=>"/posterous/#{page+1}"}
            Previous
      
    - if Caboodle::Site.disqus
      :javascript
        (function() {
        	var links = document.getElementsByTagName('a');
        	var query = '?';
        	for(var i = 0; i < links.length; i++) {
        		if(links[i].href.indexOf('#disqus_thread') >= 0) {
        			query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
        		}
        	}
        	document.write('<script type="text/javascript" src="http://disqus.com/forums/#{Caboodle::Site.disqus}/get_num_replies.js' + query + '"></' + 'script>');
        	})();

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
caboodle-0.2.25 lib/caboodle/kits/posterous/views/posts.haml
caboodle-0.2.24 lib/caboodle/kits/posterous/views/posts.haml