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.

show.html.haml 1.2 KiB

11 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 'subscriptions/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.subscriptions.each do |s|
  24. - @layer_posts += s.feed.posts.count
  25. %tr
  26. %td
  27. .feed_title
  28. = link_to s.feed.title, s.feed
  29. %td.right= s.feed.posts.count
  30. %td
  31. - if s.feed.last_fetched.nil?
  32. never
  33. - else
  34. = (time_ago_in_words(s.feed.last_fetched) + " ago").gsub(/ +/, " ").html_safe
  35. %td= link_to "Fetch", fetch_feed_url(s.feed), :class => "button"
  36. %td= link_to 'Edit', edit_feed_path(s.feed), :class => "button"
  37. %td= link_to 'Delete', s, :confirm => "Delete #{s.feed.title}?", :method => :delete, :class => "button"
  38. %td= link_to 'Edit icon', edit_subscription_path(s), :class => "button"
  39. %tr
  40. %td
  41. %td.right= @layer_posts
  42. %td
  43. %td
  44. %td
  45. %td
  46. = link_to 'Edit', edit_layer_path(@layer)
  47. \|
  48. = link_to 'Back', layers_path