From b331823b5d897087f573917e04b9c3d7a3319a19 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 19 Apr 2008 13:29:24 +0000 Subject: [PATCH] Make export tab work from non-view pages. --- app/views/layouts/site.rhtml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/layouts/site.rhtml b/app/views/layouts/site.rhtml index 073b76388..db7fce0a6 100644 --- a/app/views/layouts/site.rhtml +++ b/app/views/layouts/site.rhtml @@ -46,7 +46,11 @@ %>
  • <%= link_to 'View', {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => 'view maps', :class => viewclass} %>
  • <%= link_to 'Edit', {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => 'edit maps', :class => editclass} %>
  • + <% if params['controller'] == 'site' and (params['action'] == 'index' or params['action'] == 'export') %>
  • <%= link_to_remote 'Export', {:url => {:controller => 'export', :action => 'start'}}, {:id => 'exportanchor', :title => 'export map data', :class => exportclass, :href => url_for(:controller => 'site', :action => 'export')} %>
  • + <% else %> +
  • <%= link_to 'Export', {:controller => 'site', :action => 'export'}, {:id => 'exportanchor', :title => 'export map data', :class => exportclass} %>
  • + <% end %>
  • <%= link_to 'GPS Traces', {:controller => 'trace', :action => 'list'}, {:id => 'traceanchor', :title => 'manage traces', :class => traceclass} %>
  • <%= link_to 'User Diaries', {:controller => 'diary_entry', :action => 'list'}, {:id => 'diaryanchor', :title => 'view user diaries', :class => diaryclass} %>
  • -- 2.43.2