GeoRSS aggregator and Layar augmented reality server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

55 lines
1.1 KiB

  1. %h1
  2. Layer:
  3. = @layer.name
  4. %p
  5. API URL:
  6. = "#{request.protocol}#{request.host_with_port}/posts/near.layar?layer_id=#{@layer.id}"
  7. %br
  8. Layar layer name:
  9. = @layer.layar_name
  10. %h2 Feeds
  11. #new_feed
  12. = render 'feeds/form'
  13. %p= link_to "Fetch all", :fetch_all, :class => "button"
  14. %table
  15. %tr
  16. %th
  17. %th Posts
  18. %th Fetched
  19. %th
  20. %th
  21. %th
  22. - @layer_posts = 0
  23. - @layer.feeds.each do |f|
  24. - @layer_posts += f.posts.count
  25. %tr
  26. %td
  27. .feed_title
  28. = link_to f.title, f
  29. %td.right= f.posts.count
  30. %td
  31. - if f.last_fetched.nil?
  32. never
  33. - else
  34. = (time_ago_in_words(f.last_fetched) + " ago").gsub(/ +/, " ").html_safe
  35. %td= link_to "Fetch", fetch_feed_url(f), :class => "button"
  36. %td= link_to 'Edit', edit_feed_path(f), :class => "button"
  37. %td= link_to 'Delete', delete_feed_layer_path(:feed_id => f.id), :confirm => "Delete #{f.title} from this layer?", :method => :delete, :class => "button"
  38. %tr
  39. %td
  40. %td.right= @layer_posts
  41. %td
  42. %td
  43. %td
  44. %td
  45. = link_to 'Edit', edit_layer_path(@layer)
  46. \|
  47. = link_to 'Back', layers_path