Created
December 18, 2012 08:38
-
-
Save lewang/4326169 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/views/planned_seasons/_show_plan.html.erb b/app/views/planned_seasons/_show_plan.html.erb | |
index ccdd64d..77ff0ec 100644 | |
--- a/app/views/planned_seasons/_show_plan.html.erb | |
+++ b/app/views/planned_seasons/_show_plan.html.erb | |
@@ -23,7 +23,7 @@ properties = property ? [ property ] : company.properties.order( :name ) | |
<% if can?( :update, planned_season, company ) %> | |
<%= link_to( "Edit", edit_planned_season_path( planned_season ), :remote => true, :class => "button" ) %> | |
- <% if can?(:update, :paddock_plan, company) %> | |
+ <% if can?(:update, :paddock_plan, company) && ! planned_season.bucket? %> | |
<%= link_to( "F & R".html_safe, find_and_replace_path(planned_season), :class => "button" ) %> | |
<% end %> | |
<% end %> | |
diff --git a/app/views/planned_seasons/show.html.erb b/app/views/planned_seasons/show.html.erb | |
index 2ccf3fe..a386bdf 100644 | |
--- a/app/views/planned_seasons/show.html.erb | |
+++ b/app/views/planned_seasons/show.html.erb | |
@@ -65,7 +65,9 @@ | |
<ul class="link_list"> | |
<li>« <%= link_to( "Planning for #{ @company.name }", plan_company_path( @planned_season.company, :center_on => @planned_season.id ) ) %></li> | |
<li>« <%= link_to( "Rotations for #{ @company.name }", rotations_company_path( @planned_season.company, :center_on => @planned_season.id ) ) %></li> | |
- <li>« <%= link_to( "Find & Replace", find_and_replace_path(@planned_season) ) %></li> | |
+ <% unless @planned_season.bucket? %> | |
+ <li>« <%= link_to( "Find & Replace", find_and_replace_path(@planned_season) ) %></li> | |
+ <% end %> | |
<% if can?( :update, :paddock_plan ) %> | |
<li>« <%= link_to( "Crop Templates", templates_paddock_plans_path ) %></li> | |
<% end %> | |
diff --git a/config/routes.rb b/config/routes.rb | |
index 05badfa..ee2c7f1 100644 | |
--- a/config/routes.rb | |
+++ b/config/routes.rb | |
@@ -93,7 +93,7 @@ Website::Application.routes.draw do | |
match '/zendesk/authorise' => 'zendesk_auth#authorise', :as => :zendesk_authorise | |
match '/zendesk/logout' => 'zendesk_auth#logout', :as => :zendesk_logout | |
- match '/find_and_replace(/:planned_season_id)' => 'find_and_replace#home', :as => :find_and_replace | |
+ match '/find_and_replace/:planned_season_id' => 'find_and_replace#home', :as => :find_and_replace | |
match '/find_and_replace/:planned_season_id/summary' => 'find_and_replace#summary', :as => :find_and_replace_summary | |
match '/find_and_replace/:planned_season_id/get_matches' => 'find_and_replace#get_matches', :as => :find_and_replace_get_matches | |
match '/find_and_replace/:planned_season_id/do_modifications' => 'find_and_replace#do_modifications', :as => :find_and_replace_do_modifications |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment