From afa8015bfa53316233d2b9bd4d6cdca06235c9d4 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 3 Dec 2007 08:38:47 +0000 Subject: [PATCH] brewery ui simplification git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@49 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- app/helpers/breweries_helper.rb | 2 +- app/views/breweries/index.rhtml | 23 ++++++----------------- app/views/breweries/show.rhtml | 5 +++-- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/app/helpers/breweries_helper.rb b/app/helpers/breweries_helper.rb index 34a9fdd..2e591a5 100644 --- a/app/helpers/breweries_helper.rb +++ b/app/helpers/breweries_helper.rb @@ -5,7 +5,7 @@ module BreweriesHelper end def show_brewery_link(brewery) - link_to 'Show', brewery_path(brewery.page.title_for_url), + link_to brewery.title, brewery_path(brewery.page.title_for_url), { :title => brewery.title } end diff --git a/app/views/breweries/index.rhtml b/app/views/breweries/index.rhtml index edffbae..424c9e5 100644 --- a/app/views/breweries/index.rhtml +++ b/app/views/breweries/index.rhtml @@ -1,23 +1,12 @@ + + +<%= render :partial => 'shared/pagination_links' %> <% content_for :sidebar do -%> <%= link_to 'New brewery', new_brewery_path -%>
diff --git a/app/views/breweries/show.rhtml b/app/views/breweries/show.rhtml index 974146a..872515a 100644 --- a/app/views/breweries/show.rhtml +++ b/app/views/breweries/show.rhtml @@ -1,6 +1,7 @@ <%= render :partial => 'pages/page' %> <% content_for :sidebar do -%> - <%= link_to 'New Brewery', new_brewery_path -%>
- <%= link_to 'Edit', edit_brewery_path(@brewery.page.title_for_url) -%>
+ <%= new_brewery_link -%>
+ <%= edit_brewery_link(@brewery) -%>
+ <%= link_to 'Destroy', brewery_path(@brewery.page.title_for_url), :confirm => 'Are you sure?', :method => :delete %>
<% end -%>