Browse Source

Nicer root route

master
Adrian Short 12 years ago
parent
commit
f0098b4080
3 changed files with 25 additions and 9 deletions
  1. +1
    -1
      app/views/feeds/index.html.haml
  2. +23
    -7
      app/views/feeds/show.html.haml
  3. +1
    -1
      app/views/layouts/application.html.haml

+ 1
- 1
app/views/feeds/index.html.haml View File

@@ -22,7 +22,7 @@
= time_ago_in_words feed.last_fetched
ago
%td= link_to 'Edit', edit_feed_path(feed)
%td= link_to 'Delete', feed, :confirm => 'Are you sure?', :method => :delete
%td= link_to 'Delete', feed, :confirm => "Delete #{feed.title} and all its posts?", :method => :delete

#new_feed
= render 'form'

+ 23
- 7
app/views/feeds/show.html.haml View File

@@ -1,13 +1,29 @@
%h1= link_to @feed.title, @feed.url

%p= @feed.description

%p
%b Title:
= @feed.title
= pluralize(@feed.posts.size, "post")
%p
%b Link:
= @feed.link
= link_to @feed.feed_url, @feed.feed_url
%p
%b Last fetched:
= @feed.last_fetched
- if @feed.last_fetched.nil?
This feed has never been fetched
- else
Last fetched
= time_ago_in_words @feed.last_fetched
ago

%table
- @feed.posts.each do |p|
%tr
%td= link_to p.title, p.url
%td= p.loc['lat']
%td= p.loc['lng']
%td= p.published

= link_to 'Edit', edit_feed_path(@feed)
\|
= link_to 'Back', feeds_path
= link_to 'Back', :root

+ 1
- 1
app/views/layouts/application.html.haml View File

@@ -8,7 +8,7 @@

%body
= link_to(image_tag("TAL_logo_blue-h100.png", :size => "275x100", :alt => "Talk About Local logo"), '/')
= link_to(image_tag("TAL_logo_blue-h100.png", :size => "275x100", :alt => "Talk About Local logo"), :root)
%p#notice= notice


Loading…
Cancel
Save