diff --git a/Gemfile b/Gemfile index 85127123..ac203bb5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ # A sample Gemfile source "https://rubygems.org" -ruby "1.8.7" + +ruby '1.8.7' gem "rack", "~> 1.1.0" gem "geokit", "~> 1.6.7" @@ -10,3 +11,4 @@ gem "json", "~> 1.8.1" gem "mysql", "~> 2.9.1" gem "fastercsv", "~> 1.5.5" gem "rake", '~> 0.9.2.2' +gem "sqlite3" diff --git a/Gemfile.lock b/Gemfile.lock index 28145b95..d025370a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,7 +6,6 @@ GEM geokit (1.6.7) multi_json (>= 1.3.2) google-v3-geocoder (1.0.0) - geokit (>= 1.5.0) geokit (>= 1.5.0) json json (1.8.1) @@ -14,6 +13,7 @@ GEM mysql (2.9.1) rack (1.1.6) rake (0.9.2.2) + sqlite3 (1.3.11) PLATFORMS ruby @@ -27,3 +27,7 @@ DEPENDENCIES mysql (~> 2.9.1) rack (~> 1.1.0) rake (~> 0.9.2.2) + sqlite3 + +BUNDLED WITH + 1.10.6 diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 47a45727..73cf3144 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -129,8 +129,7 @@ def destroy @organization.destroy respond_to do |format| - # format.html { redirect_to(organizations_url) } - format.html { redirect_to :action => 'index', :controller => "search" } + format.html { redirect_to :action => (if params[:recent] then 'recent' else 'index' end), :controller => "search" } format.xml { head :ok } end end diff --git a/app/views/search/_teaser.html.rhtml b/app/views/search/_teaser.html.rhtml index ede96e49..2b5fc36e 100644 --- a/app/views/search/_teaser.html.rhtml +++ b/app/views/search/_teaser.html.rhtml @@ -3,7 +3,7 @@ <%- show_state = true if local_assigns[:show_state].nil? -%> <%- show_class = true if local_assigns[:show_class].nil? -%>
-<%= show_link entry %>
+<%= show_link entry %><% if is_admin? %> (<%= link_to 'delete', url_for(entry) + "?recent=1", :confirm => 'Are you sure?', :method => :delete %>)<% end %>
<%- if entry.respond_to? "website" and !entry.website.blank? -%> <%= website_link(entry.website, :shorten => true) %>
<%- end -%>