From d7663e7d142093cbcc8340d12bfb74a35ba108c1 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Wed, 22 Apr 2009 17:08:04 +0000 Subject: [PATCH] Fix multiple issues with links to /history from the homepage. Thanks to Ed Avis for bringing this to our attention. --- app/views/layouts/site.rhtml | 2 +- public/javascripts/site.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/site.rhtml b/app/views/layouts/site.rhtml index 534003031..93abf3a5e 100644 --- a/app/views/layouts/site.rhtml +++ b/app/views/layouts/site.rhtml @@ -50,7 +50,7 @@ %>
  • <%= 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} %>
  • -
  • <%= link_to 'History', {:controller => 'history' }, {:id => 'historyanchor', :title => 'changeset history', :class => historyclass} %>
  • +
  • <%= link_to 'History', {:controller => 'changeset', :action => 'list_bbox' }, {:id => 'historyanchor', :title => 'changeset history', :class => historyclass} %>
  • <% 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 %> diff --git a/public/javascripts/site.js b/public/javascripts/site.js index 06b4152df..bf4eda912 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -72,7 +72,7 @@ function updatelinks(lon,lat,zoom,layers,extents) { maxlon = Math.round(maxlon * decimals) / decimals; maxlat = Math.round(maxlat * decimals) / decimals; args.bbox = minlon + "," + minlat + "," + maxlon + "," + maxlat; - node.href = setArgs("history/", args); + node.href = setArgs("/history", args); node.style.fontStyle = 'normal'; } else { node.href = 'javascript:alert("zoom in to see editing history");'; -- 2.39.5