Merge branch 'master' into openid

Conflicts:
	app/views/user/login.html.erb
This commit is contained in:
Tom Hughes 2011-05-22 18:01:15 +01:00
commit a37e1b8f70
26 changed files with 290 additions and 201 deletions

View file

@ -50,7 +50,7 @@ module ApplicationHelper
css << ".show_if_user_#{@user.id} { display: inline }" if @user;
css << ".hide_unless_administrator { display: none }" unless @user and @user.administrator?;
return content_tag(:style, css)
return content_tag(:style, css, :type => "text/css")
end
def if_logged_in(tag = :div, &block)

View file

@ -1,9 +1,5 @@
<script type="text/javascript">
<!--
function startSearch() {
updateSidebar("<%= t 'site.sidebar.search_results' %>", "");
}
function describeLocation() {
var args = getArgs($("viewanchor").href);
@ -16,10 +12,46 @@
<% if params[:action] == 'index' %>
var extent = getMapExtent();
$("minlon").value = extent.left;
$("minlat").value = extent.bottom;
$("maxlon").value = extent.right;
$("maxlat").value = extent.top;
var minlon = document.createElement("input");
minlon.type = "hidden";
minlon.id = "minlon";
minlon.name = "minlon";
minlon.value = extent.left;
$("search_form").appendChild(minlon);
var minlat = document.createElement("input");
minlat.type = "hidden";
minlat.id = "minlat";
minlat.name = "minlat";
minlat.value = extent.bottom;
$("search_form").appendChild(minlat);
var maxlon = document.createElement("input");
maxlon.type = "hidden";
maxlon.id = "maxlon";
maxlon.name = "maxlon";
maxlon.value = extent.left;
$("search_form").appendChild(maxlon);
var maxlat = document.createElement("input");
maxlat.type = "hidden";
maxlat.id = "maxlat";
maxlat.name = "maxlat";
maxlat.value = extent.bottom;
$("search_form").appendChild(maxlat);
<% end %>
}
function startSearch() {
updateSidebar("<%= t 'site.sidebar.search_results' %>", "");
}
function endSearch() {
<% if params[:action] == 'index' %>
$("minlon").remove();
$("minlat").remove();
$("maxlon").remove();
$("maxlat").remove();
<% end %>
}
@ -34,20 +66,14 @@
<div class="optionalbox">
<span class="whereami"><a href="javascript:describeLocation()" title="<%= t 'site.search.where_am_i_title' %>"><%= t 'site.search.where_am_i' %></a></span>
<h1><%= t 'site.search.search' %></h1>
<div class="search_form">
<div class="search_container">
<div id="search_field">
<% form_remote_tag(:before => "setSearchViewbox()",
:loading => "startSearch()",
:complete => "endSearch()",
:url => { :controller => :geocoder, :action => :search },
:html => { :method => "get", :action => url_for(:action => "index") }) do %>
:html => { :id => "search_form", :method => "get", :action => url_for(:action => "index") }) do %>
<%= text_field_tag :query, h(params[:query]), :tabindex => "1" %>
<% if params[:action] == 'index' %>
<%= hidden_field_tag :minlon %>
<%= hidden_field_tag :minlat %>
<%= hidden_field_tag :maxlon %>
<%= hidden_field_tag :maxlat %>
<% end %>
<%= submit_tag t('site.search.submit_text') %>
<% end %>
</div>

View file

@ -58,13 +58,13 @@
<%= submit_tag t('user.login.login_button'), :tabindex => 6, :id => "login_openid_submit" %>
<% end %>
<br clear="both">
<br clear="all" />
</div>
<div id="login_signup">
<h2><%= t 'user.login.new to osm' %></h2>
<p><%= t 'user.login.to make changes' %></p>
<p><%= t 'user.login.create account minute' %></p></p>
<p><%= t 'user.login.create account minute' %></p>
<p><%= button_to t('user.login.register now'), :action => :new, :referer => params[:referer] %></p>
<br clear="both">

View file

@ -46,4 +46,6 @@
<%= submit_tag(t('user.terms.agree'), :name => "agree", :id => "agree") %>
</div>
</p>
<br clear="all" />
<p id="contributorGuidance"><%= t 'user.terms.guidance', :summary => 'http://www.osmfoundation.org/wiki/License/Contributor_Terms_Summary', :translations => 'http://www.osmfoundation.org/wiki/License/Contributor_Terms/Informal_Translations' %></p>
<% end %>

View file

@ -18,7 +18,7 @@ Rails::Initializer.run do |config|
unless STATUS == :database_offline
config.gem 'composite_primary_keys', :version => '2.2.2'
end
config.gem 'libxml-ruby', :version => '~> 1.1.1', :lib => 'libxml'
config.gem 'libxml-ruby', :version => '>= 2.0.5', :lib => 'libxml'
config.gem 'rmagick', :lib => 'RMagick'
config.gem 'oauth', :version => '>= 0.4.3'
config.gem 'oauth-plugin', :version => '0.3.14'

View file

@ -1614,6 +1614,7 @@ en:
consider_pd: "In addition to the above agreement, I consider my contributions to be in the Public Domain"
consider_pd_why: "what's this?"
consider_pd_why_url: http://www.osmfoundation.org/wiki/License/Why_would_I_want_my_contributions_to_be_public_domain
guidance: 'Information to help understand these terms: a <a href="{{summary}}">human readable summary</a> and some <a href="{{translations}}">informal translations</a>'
agree: Agree
declined: "http://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined"
decline: "Decline"

View file

@ -20,6 +20,10 @@ class DiffReader
def initialize(data, changeset)
@reader = XML::Reader.string(data)
@changeset = changeset
# document that's (re-)used to handle elements expanded out of the
# diff processing stream.
@doc = XML::Document.new
@doc.root = XML::Node.new("osm")
end
##
@ -85,8 +89,21 @@ class DiffReader
model = MODELS[model_name]
raise OSM::APIBadUserInput.new("Unexpected element type #{model_name}, " +
"expected node, way or relation.") if model.nil?
yield model, @reader.expand
# new in libxml-ruby >= 2, expand returns an element not associated
# with a document. this means that there's no encoding parameter,
# which means basically nothing works.
expanded = @reader.expand
# create a new, empty document to hold this expanded node
new_node = @doc.import(expanded)
@doc.root << new_node
yield model, new_node
@reader.next
# remove element from doc - it will be garbage collected and the
# rest of the document is re-used in the next iteration.
@doc.root.child.remove!
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 540 B

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 B

View file

@ -12,6 +12,15 @@
<terms_url>http://opengeodata.org/microsoft-imagery-details</terms_url>
<default>yes</default>
</set>
<set>
<name>MapQuest Open Aerial</name>
<url>http://oatile1.mqcdn.com/naip/$z/$x/$y.png</url>
</set>
<set>
<name>Yahoo</name>
<url>yahoo</url>
<sourcetag>yahoo</sourcetag>
</set>
<set>
<name>OSM - Mapnik</name>
<url>http://c.tile.openstreetmap.org/$z/$x/$y.png</url>
@ -27,16 +36,21 @@
<set>
<name>OSM - MapQuest</name>
<url>http://otile1.mqcdn.com/tiles/1.0.0/osm/$z/$x/$y.png</url>
</set>
<set minlat="17" minlon="175" maxlat="72" maxlon="-46">
<name>OSM - Tiger Edited Map</name>
<type>900913</type>
<url>http://tiger-osm.mapquest.com/tiles/1.0.0/tiger/$z/$x/$y.png</url>
</set>
<set minlat="49.8" minlon="-9" maxlat="61.1" maxlon="1.9">
<name>OS OpenData Streetview</name>
<url>http://os.openstreetmap.org/sv/$z/$x/$y.png</url>
<sourcetag>OS OpenData StreetView</sourcetag>
<sourcetag>OS_OpenData_StreetView</sourcetag>
</set>
<set minlat="49.8" minlon="-9" maxlat="61.1" maxlon="1.9">
<name>OS OpenData Locator</name>
<url>http://tiles.itoworld.com/os_locator/$z/$x/$y.png</url>
<sourcetag>OS OpenData Locator</sourcetag>
<sourcetag>OS_OpenData_Locator</sourcetag>
<sourcekey>source:name</sourcekey>
</set>
<set minlat="49.8" minlon="-9" maxlat="61.1" maxlon="1.9">
@ -84,7 +98,16 @@
<url>http://hypercube.telascience.org/tiles/1.0.0/haiti-city/$z/$x/$y.jpg</url>
<sourcetag>Haiti streetnames</sourcetag>
</set>
<set minlat="24.2" minlon="-125.8" maxlat="49.5" maxlon="-62.3">
<name>National Agriculture Imagery Program</name>
<url>http://cube.telascience.org/tilecache/tilecache.py/1.0.0/NAIP_ALL/$z/$x/$y.png</url>
<sourcetag>NAIP</sourcetag>
</set>
<set minlat="55.3" minlon="-168.5" maxlat="71.5" maxlon="-140">
<name>National Agriculture Imagery Program</name>
<url>http://cube.telascience.org/tilecache/tilecache.py/1.0.0/NAIP_ALL/$z/$x/$y.png</url>
<sourcetag>NAIP</sourcetag>
</set>
<set minlat="54.44" minlon="7.81" maxlat="57.86" maxlon="15.49">
<name>Denmark - Fugro Aerial Imagery</name>
<url>http://fugro.findvej.dk/fugro2005/$z/$x/$y.jpg</url>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -242,6 +242,7 @@
</icon>
<area/>
<point/>
<!-- This should catch all the "building=*" tags in use: yes, hut, house, residential, entrance, apartments, garage, industrial, garages, service, manufacture, collapsed...
Is this possible? -->
<!-- <tag k="building" v="*"/> -->

View file

@ -183,13 +183,13 @@
</feature>
<feature name="Ruin">
<feature name="Ruins">
<category>tourism</category>
<point/>
<area/>
<inputSet ref="simpleName"/>
<icon image="features/pois/tourist_ruin.n.24.png"/>
<tag k="historic" v="ruin"/>
<tag k="historic" v="ruins"/>
<inputSet ref="common"/>
</feature>
@ -268,4 +268,4 @@
<tag k="tourism" v="theme_park"/>
<inputSet ref="common"/>
</feature>
</featureGroup>
</featureGroup>

View file

@ -149,6 +149,29 @@
<inputSet ref="common"/>
</feature>
<feature name="Car Wash">
<category>transport</category>
<icon image="features/pois/transport_car_wash.n.24.png">
${name}
</icon>
<help>http://wiki.openstreetmap.org/wiki/Tag:amenity%3Dcar_wash</help>
<point/>
<area/>
<tag k="amenity" v="car_wash"/>
<inputSet ref="names"/>
<input type="freetext" presence="onTagMatch" category="Naming" name="Operator" key="operator" description="The company/organisation that runs the car wash" priority="low"/>
<input type="freetext" presence="onTagMatch" category="Operation" name="Opening hours" key="opening_hours" priority="normal"/>
<input type="choice" presence="onTagMatch" category="Operation" name="Self service" key="self_service" priority="low">
<choice value="yes" text="Yes" />
<choice value="no" text="No" />
</input>
<input type="choice" presence="onTagMatch" category="Operation" name="Automated" key="automated" priority="low">
<choice value="yes" text="Yes" />
<choice value="no" text="No" />
</input>
<inputSet ref="common"/>
</feature>
<feature name="Bus station">
<category>transport</category>

Binary file not shown.

View file

@ -62,7 +62,7 @@ node[historic=memorial] { icon-image: icons/tourist_memorial.n.16.png; text-offs
node[historic=monument] { icon-image: icons/tourist_monument.n.16.png; text-offset:15; text: name; z-index: 20; }
node[tourism=museum] { icon-image: icons/tourist_museum.n.16.png; text-offset:15; text: name; z-index: 20; }
node[tourism=picnic_site] { icon-image: icons/tourist_picnic.n.16.png; z-index: 20; }
node[historic=ruin] { icon-image: icons/tourist_ruin.n.16.png; z-index: 20; }
node[historic=ruins] { icon-image: icons/tourist_ruin.n.16.png; z-index: 20; }
node[amenity=theatre] { icon-image: icons/tourist_theatre.n.16.png; z-index: 20; }
node[tourism=viewpoint] { icon-image: icons/tourist_view_point.n.16.png; z-index: 20; }
node[tourism=zoo] { icon-image: icons/tourist_zoo.n.16.png; z-index: 20; }
@ -70,6 +70,7 @@ node[aeroway=aerodrome] { icon-image: icons/transport_aerodrome.n.16.png; z-inde
node[amenity=bus_station] { icon-image: icons/transport_bus_station.n.16.png; z-index: 20; }
node[highway=bus_stop] { icon-image: icons/transport_bus_stop2.n.16.png; z-index: 20; }
node[amenity=fuel] { icon-image: icons/transport_fuel.n.16.png; z-index: 20; }
node[amenity=car_wash] { icon-image: icons/transport_car_wash.n.16.png; z-index: 20; }
node[amenity=bicycle_parking] { icon-image: icons/transport_parking_bicycle.n.16.png; text-offset: 15; text: capacity; z-index: 20; }
node[amenity=parking] { icon-image: icons/transport_parking_car.n.16.png; z-index: 20; }
node[amenity=ferry_terminal] { icon-image: icons/transport_port.n.16.png; z-index: 20; }

View file

@ -222,7 +222,7 @@ hr {
float: right;
}
.search_form {
.search_container {
height: 16px;
padding-bottom: 6px;
}
@ -749,7 +749,7 @@ div#contributorTerms {
border: 1px solid black;
padding: 4px;
overflow: auto;
width: 80%;
width: 95%;
height: 400px;
}
@ -777,7 +777,7 @@ div#contributorTerms img {
}
form#termsForm {
width: 80%;
width: 95%;
margin-bottom: 3em;
}
@ -793,6 +793,14 @@ form#termsForm input#agree {
margin-left: 50px;
}
p#contributorGuidance {
background-color: #f5f5ff;
border: 1px solid #f3f3ff;
border-radius: 15px;
-moz-border-radius: 15px;
padding: 10px;
}
/* Rules for the account settings page */
#accountForm td {