]> git.openstreetmap.org Git - rails.git/blob - app/views/user/api_details.builder
Don't refer to the decline button when there isn't one
[rails.git] / app / views / user / api_details.builder
1 xml.instruct! :xml, :version => "1.0"
2 xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
3   xml.tag! "user", :id => @user.id,
4                    :display_name => @user.display_name,
5                    :account_created => @user.creation_time.xmlschema do
6     if @user.description
7       xml.tag! "description", @user.description
8     end
9     xml.tag! "contributor-terms",
10         :agreed => !!@user.terms_agreed,
11         :pd => !!@user.consider_pd
12     if @user.home_lat and @user.home_lon
13       xml.tag! "home", :lat => @user.home_lat,
14                        :lon => @user.home_lon,
15                        :zoom => @user.home_zoom
16     end    
17     if @user.image
18       xml.tag! "img", :href => (url_for_file_column(@user, "image", :absolute => true))
19     end
20     if @user.languages
21       xml.tag! "languages" do
22         @user.languages.split(",") { |lang| xml.tag! "lang", lang }
23       end
24     end
25   end
26 end