Bläddra i källkod

Nicer root route

master
Adrian Short 12 år sedan
förälder
incheckning
f0098b4080
3 ändrade filer med 25 tillägg och 9 borttagningar
  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 Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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


Laddar…
Avbryt
Spara