]> git.openstreetmap.org Git - rails.git/commitdiff
Add a title to the changeset lists. Closes #1938.
authorTom Hughes <tom@compton.nu>
Mon, 8 Jun 2009 20:10:09 +0000 (20:10 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 8 Jun 2009 20:10:09 +0000 (20:10 +0000)
app/controllers/changeset_controller.rb
app/views/changeset/list.rhtml
app/views/changeset/list.rxml

index 3af1f3ab9e03b1fac3e336e67d75928887b839a1..8c20ddb4d59fdd8662f2a62b232eafbf402c1dbf 100644 (file)
@@ -266,6 +266,7 @@ class ChangesetController < ApplicationController
           conditions = cond_merge conditions, ['false']
         end
       elsif params[:format] == 'rhtml'
           conditions = cond_merge conditions, ['false']
         end
       elsif params[:format] == 'rhtml'
+        @title = t 'user.no_such_user.title'
         @not_found_user = params[:display_name]
         render :template => 'user/no_such_user', :status => :not_found
       end
         @not_found_user = params[:display_name]
         render :template => 'user/no_such_user', :status => :not_found
       end
@@ -283,6 +284,8 @@ class ChangesetController < ApplicationController
       bbox_link = "<a href='#{url_for(:controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes")}'>#{bbox.to_s}</a>"
     end
 
       bbox_link = "<a href='#{url_for(:controller => "site", :action => "index", :minlon => bbox.min_lon, :minlat => bbox.min_lat, :maxlon => bbox.max_lon, :maxlat => bbox.max_lat, :box => "yes")}'>#{bbox.to_s}</a>"
     end
 
+    @title =  t 'changeset.list.title'
+
     if user and bbox
       @description = t 'changeset.list.description_user_bbox', :user => user.display_name, :bbox => bbox_link
     elsif user
     if user and bbox
       @description = t 'changeset.list.description_user_bbox', :user => user.display_name, :bbox => bbox_link
     elsif user
index fba45be502e31baeeda3d93179029226d070811e..c3d88bf6e2c6614daf4f9d61be7e9bab56aa69d1 100644 (file)
@@ -1,4 +1,4 @@
-<h1><%= t'changeset.list.title' %></h1>
+<h1><%= @title %></h1>
 <p><%= @description %></p>
 
 <%= render :partial => 'changeset_paging_nav' %>
 <p><%= @description %></p>
 
 <%= render :partial => 'changeset_paging_nav' %>
index f97516e61550cea0e759f8a3c6c0cea8226bc8ca..0251367fcdaf97ae9c72d5027bf9dd25200337f6 100644 (file)
@@ -2,7 +2,7 @@ xml.rss("version" => "2.0",
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
         "xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
         "xmlns:georss" => "http://www.georss.org/georss") do
   xml.channel do
-    xml.title t('changeset.list.title')
+    xml.title @title
     xml.description @description
     xml.link url_for(params.merge({ :only_path => false }))
     xml.image do
     xml.description @description
     xml.link url_for(params.merge({ :only_path => false }))
     xml.image do