more ui simplification
git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@48 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7master
parent
98323b8d56
commit
0ad871e748
|
@ -4,7 +4,7 @@ module BeersHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_beer_link(beer)
|
def show_beer_link(beer)
|
||||||
link_to 'Show', beer_path(beer.page.title_for_url),
|
link_to beer.title, beer_path(beer.page.title_for_url),
|
||||||
{ :title => beer.title }
|
{ :title => beer.title }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% unless @beers.empty? -%>
|
<% unless @beers.empty? -%>
|
||||||
<% for beer in @beers %>
|
<% for beer in @beers %><li><%= link_to beer.title, beer_path(beer.page.title_for_url) %></li><% else -%>
|
||||||
<li><%= link_to beer.title, beer_path(beer.page.title_for_url) %></li>
|
|
||||||
<% else -%>
|
|
||||||
<li>No beers, yet</li>
|
<li>No beers, yet</li>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -3,4 +3,5 @@
|
||||||
<% content_for :sidebar do -%>
|
<% content_for :sidebar do -%>
|
||||||
<%= new_beer_link -%><br />
|
<%= new_beer_link -%><br />
|
||||||
<%= edit_beer_link(@beer) -%><br />
|
<%= edit_beer_link(@beer) -%><br />
|
||||||
|
<%= link_to 'Destroy', beer_path(@beer.page.title_for_url), :confirm => 'Are you sure?', :method => :delete %><br />
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Reference in New Issue