|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- %h1
- Layer:
- = @layer.name
-
- %p
- API URL:
- = "#{request.protocol}#{request.host_with_port}/posts/near.layar?layer_id=#{@layer.id}"
- %br
- Layar layer name:
- = @layer.layar_name
-
- %h2 Feeds
-
- #new_feed
- = render 'subscriptions/form'
-
- %p= link_to "Fetch all", :fetch_all, :class => "button"
-
- %table
- %tr
- %th
- %th Posts
- %th Fetched
- %th
- %th
- %th
- - @layer_posts = 0
- - @layer.subscriptions.each do |s|
- - @layer_posts += s.feed.posts.count
- %tr
- %td
- .feed_title
- = link_to s.feed.title, s.feed
- %td.right= s.feed.posts.count
- %td
- - if s.feed.last_fetched.nil?
- never
- - else
- = (time_ago_in_words(s.feed.last_fetched) + " ago").gsub(/ +/, " ").html_safe
- %td= link_to "Fetch", fetch_feed_url(s.feed), :class => "button"
- %td= link_to 'Edit', edit_feed_path(s.feed), :class => "button"
- %td= link_to 'Delete', s, :confirm => "Delete #{s.feed.title}?", :method => :delete, :class => "button"
- %td
- %a.button{ :href => edit_subscription_path(s) }
- Edit icon
- %td
- - unless s.icon_url.blank?
- = image_tag s.icon_url
- - else
-
- %tr
- %td
- %td.right= @layer_posts
- %td
- %td
- %td
- %td
-
- = link_to 'Edit', edit_layer_path(@layer)
- \|
- = link_to 'Back', layers_path
|