Merge branch 'master' into moderation
This commit is contained in:
commit
dbd88d893f
785 changed files with 365807 additions and 212676 deletions
|
@ -1,6 +1,6 @@
|
|||
# create list of permissions
|
||||
xml.instruct! :xml, :version=>"1.0"
|
||||
xml.osm("version" => "#{API_VERSION}", "generator" => "OpenStreetMap Server") do
|
||||
xml.instruct! :xml, :version => "1.0"
|
||||
xml.osm("version" => API_VERSION.to_s, "generator" => "OpenStreetMap Server") do
|
||||
xml.permissions do
|
||||
@permissions.each do |permission|
|
||||
xml.permission :name => permission
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
<div class='browse-section browse-relation'>
|
||||
<%= render :partial => "common_details", :object => relation %>
|
||||
|
||||
<% unless relation.relation_members.empty? %>
|
||||
<h4><%= t'browse.relation.members' %></h4>
|
||||
<ul><%= render :partial => "relation_member", :collection => relation.relation_members %></ul>
|
||||
<% end %>
|
||||
|
||||
<% unless relation.containing_relation_members.empty? %>
|
||||
<h4><%= t'browse.part_of' %></h4>
|
||||
<ul><%= render :partial => "containing_relation", :collection => relation.containing_relation_members.uniq %></ul>
|
||||
<% end %>
|
||||
|
||||
<% unless relation.relation_members.empty? %>
|
||||
<h4><%= t'browse.relation.members' %></h4>
|
||||
<ul><%= render :partial => "relation_member", :collection => relation.relation_members %></ul>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -10,6 +10,13 @@
|
|||
<div class='browse-section browse-way'>
|
||||
<%= render :partial => "common_details", :object => way %>
|
||||
|
||||
<% unless way.containing_relation_members.empty? %>
|
||||
<h4><%= t'browse.part_of' %></h4>
|
||||
<ul>
|
||||
<%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% unless way.way_nodes.empty? %>
|
||||
<h4><%= t'browse.way.nodes' %></h4>
|
||||
<ul>
|
||||
|
@ -24,12 +31,5 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% unless way.containing_relation_members.empty? %>
|
||||
<h4><%= t'browse.part_of' %></h4>
|
||||
<ul>
|
||||
<%= render :partial => "containing_relation", :collection => way.containing_relation_members.uniq %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
comments.each do |comment|
|
||||
xml.item do
|
||||
xml.title t("changeset.rss.comment", :author => comment.author.display_name, :changeset_id => comment.changeset.id.to_s)
|
||||
|
||||
|
||||
xml.link url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false)
|
||||
xml.guid url_for(:controller => "browse", :action => "changeset", :id => comment.changeset.id, :anchor => "c#{comment.id}", :only_path => false)
|
||||
|
||||
xml.description do
|
||||
xml.cdata! render(:partial => "comment", :object => comment, :formats => [ :html ])
|
||||
xml.cdata! render(:partial => "comment", :object => comment, :formats => [:html])
|
||||
end
|
||||
|
||||
if comment.author
|
||||
xml.dc :creator, comment.author.display_name
|
||||
end
|
||||
xml.dc :creator, comment.author.display_name if comment.author
|
||||
|
||||
xml.pubDate comment.created_at.to_s(:rfc822)
|
||||
end
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
xml.rss("version" => "2.0",
|
||||
xml.rss("version" => "2.0",
|
||||
"xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
|
||||
xml.channel do
|
||||
if @changeset
|
||||
xml.title t('changeset.rss.title_particular', :changeset_id => @changeset.id)
|
||||
xml.title t("changeset.rss.title_particular", :changeset_id => @changeset.id)
|
||||
else
|
||||
xml.title t('changeset.rss.title_all')
|
||||
xml.title t("changeset.rss.title_all")
|
||||
end
|
||||
xml.link url_for(:controller => "site", :action => "index", :only_path => false)
|
||||
|
||||
xml << render(:partial => "comments", :object => @comments)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% content_for :auto_discovery_link_tag do -%>
|
||||
<% unless params[:friends] or params[:nearby] -%>
|
||||
<%= auto_discovery_link_tag :atom, params.merge(:max_id => nil, :xhr => nil, :action => :feed) %>
|
||||
<%= auto_discovery_link_tag :atom, @params.merge(:max_id => nil, :xhr => nil, :action => :feed) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
atom_feed(:language => I18n.locale, :schema_date => 2009,
|
||||
:id => url_for(params.merge({ :only_path => false })),
|
||||
:root_url => url_for(params.merge({ :action => :list, :format => nil, :only_path => false })),
|
||||
:id => url_for(@params.merge(:only_path => false)),
|
||||
:root_url => url_for(@params.merge(:action => :list, :format => nil, :only_path => false)),
|
||||
"xmlns:georss" => "http://www.georss.org/georss") do |feed|
|
||||
feed.title changeset_list_title(params, @user)
|
||||
|
||||
feed.updated @edits.map {|e| [e.created_at, e.closed_at].max }.max
|
||||
feed.icon "http://#{SERVER_URL}/favicon.ico"
|
||||
feed.logo "http://#{SERVER_URL}/images/mag_map-rss2.0.png"
|
||||
feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max
|
||||
feed.icon image_url("favicon.ico")
|
||||
feed.logo image_url("mag_map-rss2.0.png")
|
||||
|
||||
feed.rights :type => 'xhtml' do |xhtml|
|
||||
feed.rights :type => "xhtml" do |xhtml|
|
||||
xhtml.a :href => "http://creativecommons.org/licenses/by-sa/2.0/" do |a|
|
||||
a.img :src => "http://#{SERVER_URL}/images/cc_button.png", :alt => "CC by-sa 2.0"
|
||||
a.img :src => image_url("cc_button.png"), :alt => "CC by-sa 2.0"
|
||||
end
|
||||
end
|
||||
|
||||
for changeset in @edits
|
||||
@edits.each do |changeset|
|
||||
feed.entry(changeset, :updated => changeset.closed_at, :id => changeset_url(changeset.id, :only_path => false)) do |entry|
|
||||
entry.link :rel => "alternate",
|
||||
:href => changeset_read_url(changeset, :only_path => false),
|
||||
|
@ -23,20 +23,20 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
|
|||
:href => changeset_download_url(changeset, :only_path => false),
|
||||
:type => "application/osmChange+xml"
|
||||
|
||||
if !changeset.tags.empty? and changeset.tags.has_key? "comment"
|
||||
entry.title t('browse.changeset.feed.title_comment', :id => h(changeset.id), :comment => h(changeset.tags['comment'])), :type => "html"
|
||||
if !changeset.tags.empty? && changeset.tags.key?("comment")
|
||||
entry.title t("browse.changeset.feed.title_comment", :id => h(changeset.id), :comment => h(changeset.tags["comment"])), :type => "html"
|
||||
else
|
||||
entry.title t('browse.changeset.feed.title', :id => h(changeset.id))
|
||||
entry.title t("browse.changeset.feed.title", :id => h(changeset.id))
|
||||
end
|
||||
|
||||
if changeset.user.data_public?
|
||||
entry.author do |author|
|
||||
author.name changeset.user.display_name
|
||||
author.uri url_for(:controller => 'user', :action => 'view', :display_name => changeset.user.display_name, :only_path => false)
|
||||
author.uri url_for(:controller => "user", :action => "view", :display_name => changeset.user.display_name, :only_path => false)
|
||||
end
|
||||
end
|
||||
|
||||
feed.content :type => 'xhtml' do |xhtml|
|
||||
feed.content :type => "xhtml" do |xhtml|
|
||||
xhtml.style "th { text-align: left } tr { vertical-align: top }"
|
||||
xhtml.table do |table|
|
||||
table.tr do |tr|
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</ol>
|
||||
<% if @edits.size == 20 -%>
|
||||
<div class="changeset_more">
|
||||
<%= link_to t('changeset.list.load_more'), url_for(params.merge(:max_id => @edits.last.id - 1)), :class => "button load_more" %>
|
||||
<%= link_to t('changeset.list.load_more'), url_for(@params.merge(:max_id => @edits.last.id - 1)), :class => "button load_more" %>
|
||||
<%= image_tag "searching.gif", :class => "loader", :style => "display: none;" %>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
atom_feed(:language => I18n.locale, :schema_date => 2009,
|
||||
:id => url_for(params.merge({ :only_path => false })),
|
||||
:root_url => url_for(params.merge({ :only_path => false, :format => nil })),
|
||||
:id => url_for(params.merge(:only_path => false)),
|
||||
:root_url => url_for(params.merge(:only_path => false, :format => nil)),
|
||||
"xmlns:georss" => "http://www.georss.org/georss") do |feed|
|
||||
feed.title @title
|
||||
|
||||
feed.subtitle :type => 'xhtml' do |xhtml|
|
||||
feed.subtitle :type => "xhtml" do |xhtml|
|
||||
xhtml.p do |p|
|
||||
p << t('changeset.timeout.sorry')
|
||||
p << t("changeset.timeout.sorry")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,13 +37,13 @@
|
|||
<% if @entries.size < @page_size -%>
|
||||
<%= t('diary_entry.list.older_entries') %>
|
||||
<% else -%>
|
||||
<%= link_to t('diary_entry.list.older_entries'), params.merge(:page => @page + 1 ) %>
|
||||
<%= link_to t('diary_entry.list.older_entries'), @params.merge(:page => @page + 1 ) %>
|
||||
<% end -%>
|
||||
|
||||
|
|
||||
|
||||
<% if @page > 1 -%>
|
||||
<%= link_to t('diary_entry.list.newer_entries'), params.merge(:page => @page - 1) %>
|
||||
<%= link_to t('diary_entry.list.newer_entries'), @params.merge(:page => @page - 1) %>
|
||||
<% else -%>
|
||||
<%= t('diary_entry.list.newer_entries') %>
|
||||
<% end -%>
|
||||
|
|
|
@ -1,34 +1,35 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.rss("version" => "2.0",
|
||||
xml.rss("version" => "2.0",
|
||||
"xmlns:dc" => "http://purl.org/dc/elements/1.1/",
|
||||
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
|
||||
"xmlns:georss" => "http://www.georss.org/georss") do
|
||||
xml.channel do
|
||||
xml.title @title
|
||||
xml.description @description
|
||||
xml.link url_for(:action => "list", :host => SERVER_URL)
|
||||
xml.link url_for(:action => "list", :only_path => false)
|
||||
xml.image do
|
||||
xml.url image_path("mag_map-rss2.0.png")
|
||||
xml.title "OpenStreetMap"
|
||||
xml.url image_url("mag_map-rss2.0.png")
|
||||
xml.title @title
|
||||
xml.width "100"
|
||||
xml.height "100"
|
||||
xml.link url_for(:action => "list", :host=> SERVER_URL)
|
||||
xml.link url_for(:action => "list", :only_path => false)
|
||||
end
|
||||
|
||||
for entry in @entries
|
||||
@entries.each do |entry|
|
||||
xml.item do
|
||||
xml.title h(entry.title)
|
||||
xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
|
||||
xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :host => SERVER_URL)
|
||||
xml.title entry.title
|
||||
xml.link url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :only_path => false)
|
||||
xml.guid url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :only_path => false)
|
||||
xml.description entry.body.to_html
|
||||
xml.author entry.user.display_name
|
||||
xml.dc :creator, entry.user.display_name
|
||||
xml.pubDate entry.created_at.to_s(:rfc822)
|
||||
xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :host => SERVER_URL)
|
||||
|
||||
if entry.latitude and entry.longitude
|
||||
xml.comments url_for(:action => "view", :id => entry.id, :display_name => entry.user.display_name, :anchor => "comments", :only_path => false)
|
||||
|
||||
if entry.latitude && entry.longitude
|
||||
xml.geo :lat, entry.latitude.to_s
|
||||
xml.geo :long, entry.longitude.to_s
|
||||
xml.georss :point, "#{entry.latitude.to_s} #{entry.longitude.to_s}"
|
||||
xml.georss :point, "#{entry.latitude} #{entry.longitude}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
<%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %>
|
||||
<%= submit_tag t('diary_entry.view.save_button') %>
|
||||
<% end %>
|
||||
<% if @user and @entry.subscribers.exists?(@user.id) %>
|
||||
<div class="diary-subscribe-buttons"><%= link_to t('javascripts.changesets.show.unsubscribe'), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div>
|
||||
<% elsif @user %>
|
||||
<div class="diary-subscribe-buttons"><%= link_to t('javascripts.changesets.show.subscribe'), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= if_not_logged_in(:div) do %>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
</h2>
|
||||
<% @sources.each do |source| %>
|
||||
<h4 class="inner12"><%= raw(t "geocoder.search.title.#{source}") %></h4>
|
||||
<div class="search_results_entry" data-href="<%= url_for params.merge(:action => "search_#{source}") %>">
|
||||
<div class="search_results_entry" data-href="<%= url_for @params.merge(:action => "search_#{source}") %>">
|
||||
<%= image_tag "searching.gif", :class => "loader" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<head>
|
||||
<%= content_tag :head, :data => application_data do %>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/>
|
||||
<!--[if lt IE 9]><%= javascript_include_tag "html5shiv" %><![endif]-->
|
||||
|
@ -18,12 +18,16 @@
|
|||
<%= favicon_link_tag "favicon-96x96.png", :rel => "icon", :sizes => "96x96", :type => "image/png" %>
|
||||
<%= favicon_link_tag "android-chrome-192x192.png", :rel => "icon", :sizes => "192x192", :type => "image/png" %>
|
||||
<%= favicon_link_tag "favicon-16x16.png", :rel => "icon", :sizes => "16x16", :type => "image/png" %>
|
||||
<%= tag("link", { :rel => "mask-icon", :href => asset_path("tag-icon.svg"), :color => "#7ebc6f" }) %>
|
||||
<%= tag("link", { :rel => "manifest", :href => asset_path("manifest.json") }) %>
|
||||
<%= tag("meta", { :name => "msapplication-config", :content => asset_path("browserconfig.xml") }) %>
|
||||
<%= tag("meta", { :name => "msapplication-TileColor", :content => "#00a300" }) %>
|
||||
<%= tag("meta", { :name => "msapplication-TileImage", :content => image_path("mstile-144x144.png") }) %>
|
||||
<%= tag("meta", { :name => "theme-color", :content => "#ffffff" }) %>
|
||||
<%= tag("link", { :rel => "publisher", :href => "https://plus.google.com/111953119785824514010" }) %>
|
||||
<%= canonical_tag %>
|
||||
<% if defined?(PUBLISHER_URL) -%>
|
||||
<%= tag("link", { :rel => "publisher", :href => PUBLISHER_URL }) %>
|
||||
<% end -%>
|
||||
<%= tag("link", { :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml") }) %>
|
||||
<%= tag("meta", { :name => "description", :content => "OpenStreetMap is the free wiki world map." }) %>
|
||||
<%= opengraph_tags(@title) %>
|
||||
|
@ -34,26 +38,5 @@
|
|||
<%= yield :head %>
|
||||
<%= yield :auto_discovery_link_tag %>
|
||||
<%= csrf_meta_tag %>
|
||||
<script type="text/javascript">
|
||||
I18n.defaultLocale = "<%= I18n.default_locale %>";
|
||||
I18n.locale = "<%= I18n.locale %>";
|
||||
I18n.fallbacks = true;
|
||||
<% if @user -%>
|
||||
OSM.user = <%= @user.id.to_json.html_safe %>;
|
||||
<% unless @user.home_lon.nil? or @user.home_lat.nil? -%>
|
||||
OSM.home = <%= { :lat => @user.home_lat, :lon => @user.home_lon }.to_json.html_safe %>;
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if session[:location] -%>
|
||||
OSM.location = <%= session[:location].to_json.html_safe %>;
|
||||
<% end -%>
|
||||
OSM.preferred_editor = <%= preferred_editor.to_json.html_safe %>;
|
||||
<% if @oauth -%>
|
||||
OSM.oauth_token = "<%= @oauth.token %>";
|
||||
OSM.oauth_token_secret = "<%= @oauth.secret %>";
|
||||
OSM.oauth_consumer_key = "<%= @oauth.client_application.key %>";
|
||||
OSM.oauth_consumer_secret = "<%= @oauth.client_application.secret %>";
|
||||
<% end -%>
|
||||
</script>
|
||||
<title><%= t 'layouts.project_name.title' %><%= ' | ' + @title if @title %></title>
|
||||
</head>
|
||||
<% end %>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<% if @user && @user.id %>
|
||||
<div class='dropdown user-menu logged-in'>
|
||||
<a class='dropdown-toggle' data-toggle='dropdown' href="#">
|
||||
<%= user_thumbnail_tiny(@user, :size => 25, :width => 25, :height => 25)
|
||||
<%= user_thumbnail_tiny(@user, :width => 25, :height => 25)
|
||||
%><%= render :partial => 'layouts/inbox'
|
||||
%><span class="user-button"><span class='username'><%= @user.display_name %></span>
|
||||
<b class="caret"></b></span>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<%= yield :greeting %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to t('layouts.logout'), logout_path(:session => request.session_options[:id], :referer => request.fullpath) %>
|
||||
<%= link_to t('layouts.logout'), logout_path(:session => session.id, :referer => request.fullpath) %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="search_forms">
|
||||
<form method="GET" action="<%= search_path %>" class="search_form">
|
||||
<%= link_to image_tag('directions.png', :class => 'button'), directions_path, { :class => "button switch_link", :title => t('site.search.get_directions_title') } %>
|
||||
<%= submit_tag t('site.search.submit_text'), :class => 'float' %>
|
||||
<%= submit_tag t('site.search.submit_text'), :class => 'float', :data => { disable_with: false } %>
|
||||
<div class='query_wrapper'>
|
||||
<%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus, :class => 'overflow' %>
|
||||
<%= link_to t('site.search.where_am_i'), '#', { :class => "describe_location", :title => t('site.search.where_am_i_title') } %>
|
||||
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
<div class="line">
|
||||
<select class="routing_engines" name="routing_engines"></select>
|
||||
<%= submit_tag t('site.search.submit_text'), :class => "routing_go" %>
|
||||
<%= submit_tag t('site.search.submit_text'), :class => "routing_go", :data => { disable_with: false } %>
|
||||
</div>
|
||||
|
||||
<div class="loader_copy"><div class="loader"><%= image_tag "searching.gif" %></div></div>
|
||||
|
|
|
@ -24,19 +24,13 @@
|
|||
<div id="sidebar">
|
||||
<%= render :partial => "layouts/search", :locals => { :autofocus => true } %>
|
||||
|
||||
<% if STATUS == :database_offline or STATUS == :api_offline %>
|
||||
<p class="error"><%= t 'layouts.osm_offline' %></p>
|
||||
<% elsif STATUS == :database_readonly or STATUS == :api_readonly %>
|
||||
<p class="error"><%= t 'layouts.osm_read_only' %></p>
|
||||
<% end %>
|
||||
|
||||
<div id="flash">
|
||||
<%= render :partial => "layouts/flash" %>
|
||||
</div>
|
||||
|
||||
<div id="browse_status"></div>
|
||||
|
||||
<div id="sidebar_loader" style="display: none;">
|
||||
<div id="sidebar_loader">
|
||||
<img alt="<%= t('browse.start_rjs.loading') %>" class="loader" src="<%= image_path("searching.gif") %>">
|
||||
</div>
|
||||
|
||||
|
@ -49,6 +43,12 @@
|
|||
<h2><%= t 'layouts.intro_header' %></h2>
|
||||
<div class="close-wrap"><span class="icon close"></span></div>
|
||||
<p><%= t 'layouts.intro_text' %></p>
|
||||
<p><%= t 'layouts.partners_html',
|
||||
:ucl => link_to(t('layouts.partners_ucl'), "http://www.ucl.ac.uk"),
|
||||
:ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
|
||||
:bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
|
||||
:partners => link_to(t('layouts.partners_partners'), "https://hardware.openstreetmap.org/thanks/") %>
|
||||
</p>
|
||||
<a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
|
||||
<a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
|
||||
</div>
|
||||
|
|
51
app/views/layouts/notifier.html.erb
Normal file
51
app/views/layouts/notifier.html.erb
Normal file
|
@ -0,0 +1,51 @@
|
|||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8"></meta>
|
||||
</head>
|
||||
<body style="padding: 0; margin: 0; font-size: 14px; font-family: 'Helvetica Neue', Arial, sans-serif; color: #222">
|
||||
<table style="background-color: #eee; width: 100%">
|
||||
<tr>
|
||||
<%# having width=100% on the table and then only a fixed width on the middle cell gives us a max-width that works in Outlook %>
|
||||
<td rowspan="2"></td>
|
||||
<td width="600" style="text-align: center; padding: 0px 7px">
|
||||
<table style="width: 100%; color: #222; margin-left: auto; margin-right: auto">
|
||||
<tr>
|
||||
<td style="width: 30px; padding: 10px 10px 10px 0px">
|
||||
<a href="<%= @root_url %>" target="_blank">
|
||||
<%= image_tag attachments["logo.png"].url, alt: "OpenStreetMap", title: "OpenStreetMap", height: "30", width: "30", border: "0" %>
|
||||
</a>
|
||||
</td>
|
||||
<%# the "width: 100%" here looks wrong, but I couldn't find a better way of making Outlook give this cell full width %>
|
||||
<td style="width: 100%; padding: 0px; text-align: left">
|
||||
<%# NB we need "text-decoration: none" twice: GMail only honours it on the <a> but Outlook only on the <strong> %>
|
||||
<a href="<%= @root_url %>" target="_blank" style="text-decoration: none; color: #000">
|
||||
<strong style="text-decoration: none; font-size: 18px; font-weight: 600; margin: 0; text-align: left; font-family: 'Helvetica Neue', Arial, sans-serif">OpenStreetMap</strong>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table style="background-color: #fff; color: #222; border: solid 1px #ccc; border-collapse: separate">
|
||||
<tr>
|
||||
<td style="text-align: left; padding: 0px 15px 5px 15px">
|
||||
<%= raw style_message(yield) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td rowspan="2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center; font-size: 11px; font-family: 'Helvetica Neue', Arial, sans-serif">
|
||||
<%= yield :footer %>
|
||||
<p style="margin-bottom: 10px">
|
||||
<a href="<%= @root_url %>" target="_blank" style="color: #222">OpenStreetMap</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => "layouts/header" %>
|
||||
<%= render :partial => "layouts/content" %>
|
||||
<% if defined?(PIWIK) -%>
|
||||
<noscript><p><img src="<%= request.protocol %><%= PIWIK['location'] %>/piwik.php?idsite=<%= PIWIK['site'] %>" style="border:0" alt="" /></p></noscript>
|
||||
<noscript><p><img src="<%= request.protocol %><%= PIWIK['location'] %>/piwik.php?idsite=<%= PIWIK['site'] %>" class="piwik" alt="" /></p></noscript>
|
||||
<% end -%>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<div class='message-buttons buttons'>
|
||||
<%= button_to t('message.read.reply_button'), {:controller => 'message', :action => 'reply', :message_id => @message.id}, :class => 'reply-button' %>
|
||||
<%= button_to t('message.read.unread_button'), {:controller => 'message', :action => 'mark', :message_id => @message.id, :mark => 'unread'}, :class => 'mark-unread-button' %>
|
||||
<%= button_to t('message.read.delete_button'), {:controller => 'message', :action => 'delete', :message_id => @message.id}, :class => 'delete-button' %>
|
||||
|
||||
<% else %>
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
|
|||
xml.name t("browse.note.title", :id => note.id)
|
||||
|
||||
xml.desc do
|
||||
xml.cdata! render(:partial => "description", :object => note, :formats => [ :html ])
|
||||
xml.cdata! render(:partial => "description", :object => note, :formats => [:html])
|
||||
end
|
||||
|
||||
xml.link("href" => browse_note_url(note, :host => SERVER_URL))
|
||||
xml.link("href" => browse_note_url(note, :only_path => false))
|
||||
|
||||
xml.extensions do
|
||||
xml.id note.id
|
||||
|
@ -22,8 +22,6 @@ xml.wpt("lon" => note.lon, "lat" => note.lat) do
|
|||
xml.date_created note.created_at
|
||||
xml.status note.status
|
||||
|
||||
if note.closed?
|
||||
xml.date_closed note.closed_at
|
||||
end
|
||||
xml.date_closed note.closed_at if note.closed?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ json.type "Feature"
|
|||
|
||||
json.geometry do
|
||||
json.type "Point"
|
||||
json.coordinates [ note.lon, note.lat ]
|
||||
json.coordinates [ note.lon.to_f, note.lat.to_f ]
|
||||
end
|
||||
|
||||
json.properties do
|
||||
|
@ -26,7 +26,7 @@ json.properties do
|
|||
if comment.author
|
||||
json.uid comment.author.id
|
||||
json.user comment.author.display_name
|
||||
json.user_url user_url(:display_name => comment.author.display_name, :host => SERVER_URL)
|
||||
json.user_url user_url(:display_name => comment.author.display_name, :only_path => false)
|
||||
end
|
||||
|
||||
json.action comment.event
|
||||
|
|
|
@ -2,22 +2,20 @@ xml.item do
|
|||
location = describe_location(note.lat, note.lon, 14, locale)
|
||||
|
||||
if note.closed?
|
||||
xml.title t('note.rss.closed', :place => location)
|
||||
xml.title t("note.rss.closed", :place => location)
|
||||
elsif note.comments.length > 1
|
||||
xml.title t('note.rss.commented', :place => location)
|
||||
xml.title t("note.rss.commented", :place => location)
|
||||
else
|
||||
xml.title t('note.rss.opened', :place => location)
|
||||
xml.title t("note.rss.opened", :place => location)
|
||||
end
|
||||
|
||||
xml.link browse_note_url(note)
|
||||
xml.guid note_url(note)
|
||||
xml.description render(:partial => "description", :object => note, :formats => [ :html ])
|
||||
xml.description render(:partial => "description", :object => note, :formats => [:html])
|
||||
|
||||
if note.author
|
||||
xml.author note.author.display_name
|
||||
end
|
||||
xml.dc :creator, note.author.display_name if note.author
|
||||
|
||||
xml.pubDate note.updated_at.to_s(:rfc822)
|
||||
xml.pubDate note.created_at.to_s(:rfc822)
|
||||
xml.geo :lat, note.lat
|
||||
xml.geo :long, note.lon
|
||||
xml.georss :point, "#{note.lat} #{note.lon}"
|
||||
|
|
|
@ -12,9 +12,7 @@ xml.note("lon" => note.lon, "lat" => note.lat) do
|
|||
xml.date_created note.created_at
|
||||
xml.status note.status
|
||||
|
||||
if note.closed?
|
||||
xml.date_closed note.closed_at
|
||||
end
|
||||
xml.date_closed note.closed_at if note.closed?
|
||||
|
||||
xml.comments do
|
||||
note.comments.each do |comment|
|
||||
|
@ -24,7 +22,7 @@ xml.note("lon" => note.lon, "lat" => note.lat) do
|
|||
if comment.author
|
||||
xml.uid comment.author.id
|
||||
xml.user comment.author.display_name
|
||||
xml.user_url user_url(:display_name => comment.author.display_name, :host => SERVER_URL)
|
||||
xml.user_url user_url(:display_name => comment.author.display_name, :only_path => false)
|
||||
end
|
||||
|
||||
xml.action comment.event
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<p>
|
||||
|
||||
<% if @page > 1 %>
|
||||
<%= link_to t('changeset.changeset_paging_nav.previous'), params.merge({ :page => @page - 1 }) %>
|
||||
<%= link_to t('changeset.changeset_paging_nav.previous'), @params.merge({ :page => @page - 1 }) %>
|
||||
<% else %>
|
||||
<%= t('changeset.changeset_paging_nav.previous') %>
|
||||
<% end %>
|
||||
|
@ -11,7 +11,7 @@
|
|||
<% if @notes.size < @page_size %>
|
||||
<%= t('changeset.changeset_paging_nav.next') %>
|
||||
<% else %>
|
||||
<%= link_to t('changeset.changeset_paging_nav.next'), params.merge({ :page => @page + 1 }) %>
|
||||
<%= link_to t('changeset.changeset_paging_nav.next'), @params.merge({ :page => @page + 1 }) %>
|
||||
<% end %>
|
||||
|
||||
</p>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.rss("version" => "2.0",
|
||||
xml.rss("version" => "2.0",
|
||||
"xmlns:dc" => "http://purl.org/dc/elements/1.1/",
|
||||
"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('note.rss.title')
|
||||
xml.description t('note.rss.description_area', :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon )
|
||||
xml.title t("note.rss.title")
|
||||
xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
|
||||
xml.link url_for(:controller => "site", :action => "index", :only_path => false)
|
||||
|
||||
@comments.each do |comment|
|
||||
|
@ -14,17 +14,15 @@ xml.rss("version" => "2.0",
|
|||
|
||||
xml.item do
|
||||
xml.title t("note.rss.#{comment.event}", :place => location)
|
||||
|
||||
|
||||
xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
|
||||
xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
|
||||
|
||||
xml.description do
|
||||
xml.cdata! render(:partial => "entry", :object => comment, :formats => [ :html ])
|
||||
xml.cdata! render(:partial => "entry", :object => comment, :formats => [:html])
|
||||
end
|
||||
|
||||
if comment.author
|
||||
xml.dc :creator, comment.author.display_name
|
||||
end
|
||||
xml.dc :creator, comment.author.display_name if comment.author
|
||||
|
||||
xml.pubDate comment.created_at.to_s(:rfc822)
|
||||
xml.geo :lat, comment.note.lat
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.gpx("version" => "1.1",
|
||||
xml.gpx("version" => "1.1",
|
||||
"creator" => "OpenStreetMap.org",
|
||||
"xmlns" => "http://www.topografix.com/GPX/1/1",
|
||||
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.rss("version" => "2.0",
|
||||
xml.rss("version" => "2.0",
|
||||
"xmlns:dc" => "http://purl.org/dc/elements/1.1/",
|
||||
"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('note.rss.title')
|
||||
xml.description t('note.rss.description_area', :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon )
|
||||
xml.title t("note.rss.title")
|
||||
xml.description t("note.rss.description_area", :min_lat => @min_lat, :min_lon => @min_lon, :max_lat => @max_lat, :max_lon => @max_lon)
|
||||
xml.link url_for(:controller => "site", :action => "index", :only_path => false)
|
||||
|
||||
xml << (render(:partial => "note", :collection => @notes) || "")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.gpx("version" => "1.1",
|
||||
xml.gpx("version" => "1.1",
|
||||
"creator" => "OpenStreetMap.org",
|
||||
"xmlns" => "http://www.topografix.com/GPX/1/1",
|
||||
"xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.rss("version" => "2.0",
|
||||
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
|
||||
xml.title t('note.rss.title')
|
||||
xml.description t('note.rss.description_item', :id => @note.id)
|
||||
xml.title t("note.rss.title")
|
||||
xml.description t("note.rss.description_item", :id => @note.id)
|
||||
xml.link url_for(:controller => "site", :action => "index", :only_path => false)
|
||||
|
||||
xml << render(:partial => "note", :object => @note)
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
<%= t'notifier.gpx_notification.greeting' %>
|
||||
|
||||
<%= t'notifier.gpx_notification.your_gpx_file' %>
|
||||
|
||||
<%= @trace_name %>
|
||||
|
||||
<strong><%= @trace_name %></strong>
|
||||
<%= t'notifier.gpx_notification.with_description' %>
|
||||
|
||||
<%= @trace_description %>
|
||||
<em><%= @trace_description %></em>
|
||||
<% if @trace_tags.length>0 %>
|
||||
<%= t'notifier.gpx_notification.and_the_tags' %>
|
||||
<% @trace_tags.each do |tag| %>
|
||||
<%= tag.tag.rstrip %><% end %><% else %>
|
||||
<%= t'notifier.gpx_notification.and_no_tags' %><% end %>
|
||||
<%= t'notifier.gpx_notification.and_the_tags' %>
|
||||
<em><% @trace_tags.each do |tag| %>
|
||||
<%= tag.tag.rstrip %>
|
||||
<% end %></em>
|
||||
<% else %>
|
||||
<%= t'notifier.gpx_notification.and_no_tags' %>
|
||||
<% end %>
|
||||
|
|
21
app/views/notifier/_message_body.html.erb
Normal file
21
app/views/notifier/_message_body.html.erb
Normal file
|
@ -0,0 +1,21 @@
|
|||
<table style="font-size: 15px; margin: 15px 0px; background-color: #eee; width: 100%">
|
||||
<tr>
|
||||
<td style="width: 50px; min-width: 50px; vertical-align: top; padding: 15px">
|
||||
<%= link_to(
|
||||
image_tag(
|
||||
attachments["avatar.png"].url,
|
||||
alt: @author,
|
||||
title: @author,
|
||||
width: 50,
|
||||
height: 50,
|
||||
border: 0
|
||||
),
|
||||
user_url(@author, :host => SERVER_URL),
|
||||
:target => "_blank"
|
||||
) %>
|
||||
</td>
|
||||
<td style="text-align: left; vertical-align: top; padding-right: 10px; width: 100%">
|
||||
<%= body %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
|
@ -1,20 +1,29 @@
|
|||
<p><%= t 'notifier.changeset_comment_notification.greeting' %></p>
|
||||
|
||||
<p>
|
||||
<%= t 'notifier.changeset_comment_notification.hi', :to_user => @to_user %>
|
||||
</p>
|
||||
<p>
|
||||
<% if @owner %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.your_changeset", :commenter => @commenter, :time => @time %>
|
||||
<%= raw t "notifier.changeset_comment_notification.commented.your_changeset", :commenter => link_to_user(@commenter), :time => @time %>
|
||||
<% else %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.commented_changeset", :commenter => @commenter, :time => @time, :changeset_author => @changeset_author %>
|
||||
<%= raw t "notifier.changeset_comment_notification.commented.commented_changeset", :commenter => link_to_user(@commenter), :time => @time, :changeset_author => @changeset_author %>
|
||||
<% end %>
|
||||
<% if @changeset_comment %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_with_comment", :changeset_comment => @changeset_comment %>
|
||||
<%= raw t "notifier.changeset_comment_notification.commented.partial_changeset_with_comment", :changeset_comment => content_tag("em", @changeset_comment) %>
|
||||
<% else %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_without_comment" %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
==
|
||||
<%= @comment.to_html %>
|
||||
==
|
||||
<%= message_body do %>
|
||||
<%= @comment.to_html %>
|
||||
<% end %>
|
||||
|
||||
<p><%= raw t 'notifier.changeset_comment_notification.details', :url => link_to(@changeset_url, @changeset_url) %></p>
|
||||
<p>
|
||||
<%= raw t 'notifier.changeset_comment_notification.details', :url => link_to(@changeset_url, @changeset_url) %>
|
||||
</p>
|
||||
|
||||
<% content_for :footer do %>
|
||||
<p>
|
||||
<%= raw t 'notifier.changeset_comment_notification.unsubscribe', :url => link_to(@changeset_url, @changeset_url, :style => "color: #222") %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<%= t 'notifier.changeset_comment_notification.greeting' %>
|
||||
<%= t 'notifier.changeset_comment_notification.hi', :to_user => @to_user %>
|
||||
|
||||
<% if @owner %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.your_changeset", :commenter => @commenter, :time => @time %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.your_changeset", :commenter => @commenter, :time => @time %>
|
||||
<% else %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.commented_changeset", :commenter => @commenter, :time => @time, :changeset_author => @changeset_author %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.commented_changeset", :commenter => @commenter, :time => @time, :changeset_author => @changeset_author %>
|
||||
<% end %>
|
||||
<% if @changeset_comment %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_with_comment", :changeset_comment => @changeset_comment %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_with_comment", :changeset_comment => @changeset_comment %>
|
||||
<% else %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_without_comment" %>
|
||||
<%= t "notifier.changeset_comment_notification.commented.partial_changeset_without_comment" %>
|
||||
<% end %>
|
||||
|
||||
==
|
||||
|
@ -16,3 +16,5 @@
|
|||
==
|
||||
|
||||
<%= t 'notifier.changeset_comment_notification.details', :url => @changeset_url %>
|
||||
|
||||
<%= t 'notifier.changeset_comment_notification.unsubscribe', :url => @changeset_url %>
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
<p><%= t'notifier.diary_comment_notification.hi', :to_user => @to_user %></p>
|
||||
<p>
|
||||
<%= t'notifier.diary_comment_notification.hi', :to_user => @to_user %>
|
||||
</p>
|
||||
<p>
|
||||
<%= raw t'notifier.diary_comment_notification.header', :from_user => link_to_user(@from_user), :subject => content_tag("em", @title) %>
|
||||
</p>
|
||||
|
||||
<p><%= raw t'notifier.diary_comment_notification.header', :from_user => link_to(@from_user, :host => SERVER_URL, :controller => :user, :action => :view, :display_name => @from_user), :subject => @title %></p>
|
||||
<%= message_body do %>
|
||||
<%= @text.to_html %>
|
||||
<% end %>
|
||||
|
||||
==
|
||||
<%= @text.to_html %>
|
||||
==
|
||||
|
||||
<p><%= raw t'notifier.diary_comment_notification.footer', :readurl => link_to(@readurl, @readurl), :commenturl => link_to(@commenturl, @commenturl), :replyurl => link_to(@replyurl, @replyurl) %></p>
|
||||
<% content_for :footer do %>
|
||||
<p><%= raw t'notifier.diary_comment_notification.footer',
|
||||
:readurl => link_to(@readurl, @readurl) + tag(:br),
|
||||
:commenturl => link_to(@commenturl, @commenturl) + tag(:br),
|
||||
:replyurl => link_to(@replyurl, @replyurl)
|
||||
%></p>
|
||||
<% end %>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
<p><%= t 'notifier.friend_notification.had_added_you', :user => @friend.befriender.display_name %></p>
|
||||
|
||||
<p><%= raw t 'notifier.friend_notification.see_their_profile', :userurl => link_to(@viewurl, @viewurl) %></p>
|
||||
<%= message_body do %>
|
||||
<p><%= raw t 'notifier.friend_notification.see_their_profile', :userurl => link_to(@viewurl, @viewurl) %></p>
|
||||
|
||||
<% unless @friend.befriendee.is_friends_with?(@friend.befriender) -%>
|
||||
<p><%= raw t 'notifier.friend_notification.befriend_them', :befriendurl => link_to(@friendurl, @friendurl) %></p>
|
||||
<% end -%>
|
||||
<% unless @friend.befriendee.is_friends_with?(@friend.befriender) -%>
|
||||
<p><%= raw t 'notifier.friend_notification.befriend_them', :befriendurl => link_to(@friendurl, @friendurl) %></p>
|
||||
<% end -%>
|
||||
<% end %>
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
<%= render :partial => "gpx_description" %>
|
||||
<%= t'notifier.gpx_notification.failure.failed_to_import' %>
|
||||
<p><%= t'notifier.gpx_notification.greeting' %></p>
|
||||
|
||||
<p>
|
||||
<%= render :partial => "gpx_description" %>
|
||||
<%= t'notifier.gpx_notification.failure.failed_to_import' %>
|
||||
</p>
|
||||
|
||||
<blockquote>
|
||||
<%= @error %>
|
||||
</blockquote>
|
||||
|
||||
<%= t'notifier.gpx_notification.failure.more_info_1' %>
|
||||
<%= t'notifier.gpx_notification.failure.more_info_2' %>
|
||||
|
||||
<p>
|
||||
<%= t'notifier.gpx_notification.failure.more_info_1' %>
|
||||
<%= t'notifier.gpx_notification.failure.more_info_2' %>
|
||||
<%= t'notifier.gpx_notification.failure.import_failures_url' %>
|
||||
</p>
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
<%= render :partial => "gpx_description" %>
|
||||
<%= t'notifier.gpx_notification.success.loaded_successfully', :trace_points => @trace_points, :possible_points => @possible_points %>
|
||||
<p><%= t'notifier.gpx_notification.greeting' %></p>
|
||||
|
||||
<p>
|
||||
<%= render :partial => "gpx_description" %>
|
||||
<%= t'notifier.gpx_notification.success.loaded_successfully', :trace_points => @trace_points, :possible_points => @possible_points %>
|
||||
</p>
|
||||
|
|
|
@ -1,9 +1,22 @@
|
|||
<p><%= t'notifier.message_notification.hi', :to_user => @to_user %></p>
|
||||
<p>
|
||||
<%= t'notifier.message_notification.hi', :to_user => @to_user %>
|
||||
</p>
|
||||
<p>
|
||||
<%= raw t'notifier.message_notification.header',
|
||||
:from_user => link_to_user(@from_user),
|
||||
:subject => content_tag("em", @title)
|
||||
%>
|
||||
</p>
|
||||
|
||||
<p><%= raw t'notifier.message_notification.header', :from_user => link_to(@from_user, :host => SERVER_URL, :controller => :user, :action => :view, :display_name => @from_user), :subject => @title %></p>
|
||||
<%= message_body do %>
|
||||
<%= @text.to_html %>
|
||||
<% end %>
|
||||
|
||||
==
|
||||
<%= @text.to_html %>
|
||||
==
|
||||
|
||||
<p><%= t'notifier.message_notification.footer_html', :readurl => link_to(@readurl, @readurl), :replyurl => link_to(@replyurl, @replyurl) %></p>
|
||||
<% content_for :footer do %>
|
||||
<p>
|
||||
<%= t'notifier.message_notification.footer_html',
|
||||
:readurl => link_to(@readurl, @readurl) + tag(:br),
|
||||
:replyurl => link_to(@replyurl, @replyurl)
|
||||
%>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<p><%= t 'notifier.note_comment_notification.greeting' %></p>
|
||||
|
||||
<% if @owner %>
|
||||
<p><%= t "notifier.note_comment_notification.#{@event}.your_note", :commenter => @commenter, :place => @place %></p>
|
||||
<p><%= raw t "notifier.note_comment_notification.#{@event}.your_note", :commenter => link_to_user(@commenter), :place => @place %></p>
|
||||
<% else %>
|
||||
<p><%= t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => @commenter, :place => @place %></p>
|
||||
<p><%= raw t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => link_to_user(@commenter), :place => @place %></p>
|
||||
<% end %>
|
||||
|
||||
==
|
||||
<%= @comment.to_html %>
|
||||
==
|
||||
<% unless @comment.empty? %>
|
||||
<%= message_body do %>
|
||||
<%= @comment.to_html %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p><%= raw t 'notifier.note_comment_notification.details', :url => link_to(@noteurl, @noteurl) %></p>
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
<%= t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => @commenter, :place => @place %>
|
||||
<% end %>
|
||||
|
||||
<% unless @comment.empty? %>
|
||||
==
|
||||
<%= @comment.to_text %>
|
||||
==
|
||||
|
||||
<% end %>
|
||||
<%= t 'notifier.note_comment_notification.details', :url => @noteurl %>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<%= hidden_field_tag "oauth_callback", params[:oauth_callback] %>
|
||||
<%- end -%>
|
||||
<p><%= t 'oauth.oauthorize.allow_to' %></p>
|
||||
<ul style="list-style:none">
|
||||
<ul>
|
||||
<% @token.client_application.permissions.each do |perm| %>
|
||||
<li><%= check_box_tag perm.to_s, "yes", @token.read_attribute(perm) %><%= t "oauth.oauthorize.#{perm}" %></li>
|
||||
<% end %>
|
||||
|
|
|
@ -1,47 +1,10 @@
|
|||
<% if defined? ID_KEY %>
|
||||
<div id="map">
|
||||
<iframe frameBorder="0" id="id-embed" class="id-embed" allowfullscreen></iframe>
|
||||
</div>
|
||||
<script>
|
||||
var params = {};
|
||||
<%= javascript_include_tag "edit/id" %>
|
||||
|
||||
var mapParams = OSM.mapParams();
|
||||
if (mapParams.object) {
|
||||
params.id = mapParams.object.type[0] + mapParams.object.id;
|
||||
mapParams = OSM.parseHash(location.hash);
|
||||
if (mapParams.center) {
|
||||
params.map = mapParams.zoom + '/' + mapParams.center.lng + '/' + mapParams.center.lat;
|
||||
}
|
||||
} else {
|
||||
<% if @lat && @lon -%>
|
||||
params.map = '16/<%= @lon %>/<%= @lat %>';
|
||||
<% else -%>
|
||||
params.map = (mapParams.zoom || 17) + '/' + mapParams.lon + '/' + mapParams.lat;
|
||||
<% end -%>
|
||||
}
|
||||
|
||||
var hashParams = OSM.params(location.hash.substring(1));
|
||||
|
||||
if (hashParams.background) {
|
||||
params.background = hashParams.background;
|
||||
}
|
||||
if (hashParams.comment) {
|
||||
params.comment = hashParams.comment;
|
||||
}
|
||||
if (hashParams.offset) {
|
||||
params.offset = hashParams.offset;
|
||||
}
|
||||
|
||||
<% if params[:gpx] -%>
|
||||
params.gpx = '<%= trace_data_url(params[:gpx], :format => :xml) %>';
|
||||
<% else -%>
|
||||
if (hashParams.gpx) {
|
||||
params.gpx = hashParams.gpx;
|
||||
}
|
||||
<% end -%>
|
||||
|
||||
$('#id-embed').attr('src', '<%= id_url :locale => params[:locale] %>#' + querystring.stringify(params));
|
||||
</script>
|
||||
<% else %>
|
||||
<script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>
|
||||
<% end %>
|
||||
<div id="map">
|
||||
<% data = { :key => ID_KEY } -%>
|
||||
<% data[:lat] = @lat if @lat -%>
|
||||
<% data[:lon] = @lon if @lon -%>
|
||||
<% data[:gpx] = trace_data_url(params[:gpx], :format => :xml) if params[:gpx] -%>
|
||||
<% data[:url] = id_url(:locale => params[:locale]) -%>
|
||||
<%= content_tag :iframe, "", :frameBorder => 0, :id => "id-embed", :class => "id-embed", :allowfullscreen => "", :data => data %>
|
||||
</div>
|
||||
|
|
|
@ -1,60 +1,10 @@
|
|||
<%= javascript_include_tag "edit/potlatch" %>
|
||||
|
||||
<div id="map">
|
||||
<div id="potlatch"><%= raw t 'site.edit.flash_player_required' %></div>
|
||||
<% session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%>
|
||||
<% data = { :token => session[:token] } -%>
|
||||
<% data[:lat] = @lat if @lat -%>
|
||||
<% data[:lon] = @lon if @lon -%>
|
||||
<% data[:zoom] = @zoom if @zoom -%>
|
||||
<%= content_tag :div, raw(t("site.edit.flash_player_required")), :id => "potlatch", :data => data %>
|
||||
</div>
|
||||
|
||||
<%= javascript_include_tag 'swfobject.js' %>
|
||||
|
||||
<% session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) %>
|
||||
|
||||
<script type="text/javascript" defer="defer">
|
||||
var changesaved=true;
|
||||
var winie=false; if (document.all && window.print) { winie=true; }
|
||||
|
||||
window.onbeforeunload=function() {
|
||||
if (!changesaved) {
|
||||
return '<%= escape_javascript(t('site.edit.potlatch_unsaved_changes')) %>';
|
||||
}
|
||||
}
|
||||
|
||||
function markChanged(a) { changesaved=a; }
|
||||
|
||||
function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,object) {
|
||||
updateLinks({ lon: lon, lat: lat }, zoom);
|
||||
|
||||
var hash = OSM.formatHash({ lon: lon, lat: lat, zoom: zoom });
|
||||
if (hash !== location.hash) {
|
||||
location.replace(hash);
|
||||
}
|
||||
}
|
||||
|
||||
function doSWF(lat,lon,sc) {
|
||||
if (sc < 11) sc = 11;
|
||||
|
||||
var flashvars = {};
|
||||
flashvars.winie = winie;
|
||||
flashvars.scale = sc;
|
||||
flashvars.token = '<%= session[:token] %>';
|
||||
if (lat) { flashvars.lat = lat; }
|
||||
if (lon) { flashvars.long = lon; }
|
||||
<% if params['gpx'] %>flashvars.gpx = '<%= h(params['gpx'] ) %>';<% end %>
|
||||
<% if params['way'] %>flashvars.way = '<%= h(params['way'] ) %>';<% end %>
|
||||
<% if params['node'] %>flashvars.node = '<%= h(params['node'] ) %>';<% end %>
|
||||
<% if params['tileurl'] %>flashvars.custombg = '<%= h(params['tileurl']) %>';<% end %>
|
||||
|
||||
var params = {};
|
||||
|
||||
var attributes = {};
|
||||
attributes.id = "potlatch";
|
||||
attributes.bgcolor = "#FFFFFF";
|
||||
|
||||
swfobject.embedSWF("<%= asset_path("/potlatch/potlatch.swf") %>", "potlatch", "100%", "100%", "6","<%= asset_path("expressInstall.swf") %>", flashvars, params, attributes);
|
||||
// 700,600 for fixed size, 100%,100% for resizable
|
||||
}
|
||||
|
||||
<% if @lat && @lon -%>
|
||||
doSWF(<%= @lat %>, <%= @lon %>, <%= @zoom %>);
|
||||
<% else -%>
|
||||
var mapParams = OSM.mapParams();
|
||||
doSWF(mapParams.lat, mapParams.lon, mapParams.zoom || 17);
|
||||
<% end -%>
|
||||
</script>
|
||||
|
|
|
@ -1,88 +1,19 @@
|
|||
<%= javascript_include_tag "edit/potlatch2" %>
|
||||
|
||||
<div id="map">
|
||||
<div id="potlatch"><%= raw t 'site.edit.flash_player_required' %></div>
|
||||
<% session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%>
|
||||
<% data = { :token => session[:token] } -%>
|
||||
<% data[:lat] = @lat if @lat -%>
|
||||
<% data[:lon] = @lon if @lon -%>
|
||||
<% data[:zoom] = @zoom if @zoom -%>
|
||||
<% if defined? POTLATCH2_KEY %>
|
||||
<% token = @user.access_token(POTLATCH2_KEY) %>
|
||||
<% data[:token] = token.token -%>
|
||||
<% data[:token_secret] = token.secret -%>
|
||||
<% data[:consumer_key] = token.client_application.key -%>
|
||||
<% data[:consumer_secret] = token.client_application.secret -%>
|
||||
<% end %>
|
||||
<% data[:locale] = Locale.list(Potlatch2::LOCALES.keys).preferred(preferred_languages).to_s -%>
|
||||
<% data[:locale_path] = asset_path("potlatch2/locales/#{Potlatch2::LOCALES[data[:locale]]}.swf") -%>
|
||||
<%= content_tag :div, raw(t("site.edit.flash_player_required")), :id => "potlatch", :data => data %>
|
||||
</div>
|
||||
|
||||
<%= javascript_include_tag 'swfobject.js' %>
|
||||
|
||||
<% if defined? POTLATCH2_KEY %>
|
||||
<% token = @user.access_token(POTLATCH2_KEY) %>
|
||||
<% else%>
|
||||
<script type="text/javascript">alert("<%= t 'site.edit.potlatch2_not_configured' %>")</script>
|
||||
<% end %>
|
||||
|
||||
<% locale = Locale.list(Potlatch2::LOCALES.keys).preferred(preferred_languages).to_s %>
|
||||
|
||||
<script type="text/javascript" defer="defer">
|
||||
var changesaved=true;
|
||||
|
||||
window.onbeforeunload=function() {
|
||||
if (!changesaved) {
|
||||
return '<%= escape_javascript(t('site.edit.potlatch2_unsaved_changes')) %>';
|
||||
}
|
||||
}
|
||||
|
||||
function markChanged(a) { changesaved=a; }
|
||||
|
||||
function doSWF(lat,lon,zoom) {
|
||||
var flashvars = {};
|
||||
if (lat) { flashvars.lat = lat; }
|
||||
if (lon) { flashvars.lon = lon; }
|
||||
flashvars.zoom = zoom;
|
||||
flashvars.assets = "<%= asset_path "potlatch2/assets.zip" %>";
|
||||
flashvars.font_library = "<%= asset_path "potlatch2/FontLibrary.swf" %>";
|
||||
flashvars.locale = "<%= Potlatch2::LOCALES[locale] %>";
|
||||
flashvars.locale_paths = "<%= Potlatch2::LOCALES[locale] %>=<%= asset_path("potlatch2/locales/#{Potlatch2::LOCALES[locale]}.swf") %>";
|
||||
flashvars.intro_image = "<%= asset_path "help/introduction.jpg" %>";
|
||||
flashvars.intro_video = "<%= asset_path "help/introduction.mp4" %>";
|
||||
<% if params['gpx'] %>
|
||||
flashvars.gpx = '<%= h(params['gpx']) %>';
|
||||
<% end %>
|
||||
<% if params['tileurl'] %>
|
||||
flashvars.tileurl = '<%= h(params['tileurl']) %>';
|
||||
<% end %>
|
||||
flashvars.api = "<%= request.protocol + request.host_with_port %>/api/<%= API_VERSION %>/";
|
||||
flashvars.policy = "<%= request.protocol + request.host_with_port %>/api/crossdomain.xml";
|
||||
flashvars.connection = "XML";
|
||||
flashvars.show_help = "once";
|
||||
flashvars.user_check = "warn";
|
||||
<% if token %>
|
||||
flashvars.oauth_token = "<%= token.token %>";
|
||||
flashvars.oauth_token_secret = "<%= token.secret %>";
|
||||
flashvars.oauth_consumer_key = "<%= token.client_application.key %>";
|
||||
flashvars.oauth_consumer_secret = "<%= token.client_application.secret %>";
|
||||
<% end %>
|
||||
flashvars.maximise_function = "maximiseMap";
|
||||
flashvars.minimise_function = "minimiseMap";
|
||||
flashvars.move_function = "mapMoved";
|
||||
|
||||
var params = {};
|
||||
params.base = "/potlatch2";
|
||||
|
||||
var attributes = {};
|
||||
attributes.id = "potlatch";
|
||||
attributes.bgcolor = "#FFFFFF";
|
||||
|
||||
swfobject.embedSWF("<%= asset_path("potlatch2.swf") %>", "potlatch", "100%", "100%", "10.1.102","<%= asset_path("expressInstall.swf") %>", flashvars, params, attributes);
|
||||
// 700,600 for fixed size, 100%,100% for resizable
|
||||
|
||||
if (lat && lon) {
|
||||
updateLinks({ lon: lon, lat: lat }, zoom);
|
||||
}
|
||||
}
|
||||
|
||||
<% if @lat && @lon -%>
|
||||
doSWF(<%= @lat %>, <%= @lon %>, <%= @zoom %>);
|
||||
<% else -%>
|
||||
var mapParams = OSM.mapParams();
|
||||
doSWF(mapParams.lat, mapParams.lon, mapParams.zoom || 17);
|
||||
<% end -%>
|
||||
|
||||
var mapMoved = $.throttle(250, function(lon, lat, zoom) {
|
||||
updateLinks({ lon: lon, lat: lat }, zoom);
|
||||
|
||||
var hash = OSM.formatHash({ lon: lon, lat: lat, zoom: zoom });
|
||||
if (hash !== location.hash) {
|
||||
location.replace(hash);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
<div class='section' id='partners'>
|
||||
<h2><div class='icon partners'></div><%= t "about_page.partners_title" %></h2>
|
||||
<p><%= t 'layouts.partners_html',
|
||||
:ucl => link_to(t('layouts.partners_ucl'), "http://www.bartlett.ucl.ac.uk"),
|
||||
:ucl => link_to(t('layouts.partners_ucl'), "http://www.ucl.ac.uk"),
|
||||
:ic => link_to(t('layouts.partners_ic'), "http://www.imperial.ac.uk/"),
|
||||
:bytemark => link_to(t('layouts.partners_bytemark'), "http://www.bytemark.co.uk"),
|
||||
:partners => link_to(t('layouts.partners_partners'), t('layouts.partners_url')) %>
|
||||
:partners => link_to(t('layouts.partners_partners'), "https://hardware.openstreetmap.org/thanks/") %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<%= hidden_field_tag 'format', 'osm' %>
|
||||
|
||||
<div class='export_area_inputs'>
|
||||
<div class='export_boxy' style="border: 1px solid #ccc;">
|
||||
<div class='export_boxy'>
|
||||
<%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>
|
||||
<br/>
|
||||
<%= text_field_tag('minlon', nil, :size => 10, :class => "export_bound") %>
|
||||
|
|
|
@ -8,65 +8,17 @@
|
|||
<!-- <![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div id='id-container'></div>
|
||||
<script>
|
||||
if (typeof iD == 'undefined' || !iD.detect().support) {
|
||||
document.getElementById('id-container').innerHTML = 'This editor is supported ' +
|
||||
'in Firefox, Chrome, Safari, Opera, and Internet Explorer 11 and above. ' +
|
||||
'Please upgrade your browser or use Potlatch 2 to edit the map.';
|
||||
document.getElementById('id-container').className = 'unsupported';
|
||||
} else {
|
||||
<% locale = ID::LOCALES.preferred(preferred_languages).to_s %>
|
||||
|
||||
var id = iD()
|
||||
.presets(iD.data.presets)
|
||||
.imagery(iD.data.imagery)
|
||||
.taginfo(iD.services.taginfo())
|
||||
.embed(true)
|
||||
.assetPath("iD/")
|
||||
.assetMap(<%= assets("iD").to_json.html_safe %>)
|
||||
.locale("<%= locale %>", "<%= asset_path("iD/locales/#{locale}.json") %>")
|
||||
.preauth({
|
||||
<% token = @user.access_token(ID_KEY) %>
|
||||
url: "<%= request.protocol + request.host_with_port %>",
|
||||
oauth_consumer_key: "<%= token.client_application.key %>",
|
||||
oauth_secret: "<%= token.client_application.secret %>",
|
||||
oauth_token: "<%= token.token %>",
|
||||
oauth_token_secret: "<%= token.secret %>"
|
||||
});
|
||||
|
||||
id.map().on('move.embed', parent.$.throttle(250, function() {
|
||||
if (id.inIntro()) return;
|
||||
var zoom = ~~id.map().zoom(),
|
||||
center = id.map().center(),
|
||||
llz = { lon: center[0], lat: center[1], zoom: zoom };
|
||||
|
||||
parent.updateLinks(llz, zoom);
|
||||
|
||||
// Manually resolve URL to avoid iframe JS context weirdness.
|
||||
// http://bl.ocks.org/jfirebaugh/5439412
|
||||
var hash = parent.OSM.formatHash(llz);
|
||||
if (hash !== parent.location.hash) {
|
||||
parent.location.replace(parent.location.href.replace(/(#.*|$)/, hash));
|
||||
}
|
||||
}));
|
||||
|
||||
parent.$("body").on("click", "a.set_position", function (e) {
|
||||
e.preventDefault();
|
||||
var data = parent.$(this).data();
|
||||
|
||||
// 0ms timeout to avoid iframe JS context weirdness.
|
||||
// http://bl.ocks.org/jfirebaugh/5439412
|
||||
setTimeout(function() {
|
||||
id.map().centerZoom(
|
||||
[data.lon, data.lat],
|
||||
Math.max(data.zoom || 15, 13));
|
||||
}, 0);
|
||||
});
|
||||
|
||||
d3.select('#id-container')
|
||||
.call(id.ui());
|
||||
}
|
||||
</script>
|
||||
<% data = {} -%>
|
||||
<% if defined? ID_KEY %>
|
||||
<% token = @user.access_token(ID_KEY) %>
|
||||
<% data[:token] = token.token -%>
|
||||
<% data[:token_secret] = token.secret -%>
|
||||
<% data[:consumer_key] = token.client_application.key -%>
|
||||
<% data[:consumer_secret] = token.client_application.secret -%>
|
||||
<% end %>
|
||||
<% data[:locale] = ID::LOCALES.preferred(preferred_languages).to_s -%>
|
||||
<% data[:locale_path] = asset_path("iD/locales/#{data[:locale]}.json") -%>
|
||||
<% data[:asset_map] = assets("iD").to_json -%>
|
||||
<%= content_tag :div, "", :id => "id-container", :data => data %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div id="mapkey">
|
||||
<table class="mapkey-table">
|
||||
<% YAML.load_file("#{Rails.root}/config/key.yml").each do |name,data| %>
|
||||
<% YAML.load_file(Rails.root.join("config", "key.yml")).each do |name,data| %>
|
||||
<% data.each do |entry| %>
|
||||
<tr class="mapkey-table-entry" data-layer="<%= name %>" data-zoom-min="<%= entry['min_zoom'] %>" data-zoom-max="<%= entry['max_zoom'] %>">
|
||||
<td class="mapkey-table-key">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<% if @traces.size > 1 %>
|
||||
<% if @page > 1 %>
|
||||
<%= link_to t('trace.trace_paging_nav.newer'), params.merge({ :page => @page - 1 }) %>
|
||||
<%= link_to t('trace.trace_paging_nav.newer'), @params.merge({ :page => @page - 1 }) %>
|
||||
<% else %>
|
||||
<%= t('trace.trace_paging_nav.newer') %>
|
||||
<% end %>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<% if @traces.size < @page_size %>
|
||||
<%= t('trace.trace_paging_nav.older') %>
|
||||
<% else %>
|
||||
<%= link_to t('trace.trace_paging_nav.older'), params.merge({ :page => @page + 1 }) %>
|
||||
<%= link_to t('trace.trace_paging_nav.older'), @params.merge({ :page => @page + 1 }) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :display_name => @trace.user.display_name %>">
|
||||
|
||||
<%= form_for @trace, :url => { :action => "edit" } do |f| %>
|
||||
<%= form_for @trace, :method => :post, :url => { :action => "edit" } do |f| %>
|
||||
|
||||
<div id='edit-trace-form' class='standard-form'>
|
||||
<fieldset>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
xml.instruct!
|
||||
|
||||
xml.rss("version" => "2.0",
|
||||
xml.rss("version" => "2.0",
|
||||
"xmlns:dc" => "http://purl.org/dc/elements/1.1/",
|
||||
"xmlns:geo" => "http://www.w3.org/2003/01/geo/wgs84_pos#",
|
||||
"xmlns:georss" => "http://www.georss.org/georss") do
|
||||
|
@ -10,7 +10,7 @@ xml.rss("version" => "2.0",
|
|||
xml.link url_for(:controller => :trace, :action => :list, :only_path => false)
|
||||
|
||||
xml.image do
|
||||
xml.url image_path("mag_map-rss2.0.png")
|
||||
xml.url image_url("mag_map-rss2.0.png")
|
||||
xml.title t("trace.georss.title")
|
||||
xml.width 100
|
||||
xml.height 100
|
||||
|
@ -25,14 +25,14 @@ xml.rss("version" => "2.0",
|
|||
xml.guid url_for(:controller => :trace, :action => :view, :id => trace.id, :display_name => trace.user.display_name, :only_path => false)
|
||||
|
||||
xml.description do
|
||||
xml.cdata! render(:partial => "description", :object => trace, :formats => [ :html ])
|
||||
xml.cdata! render(:partial => "description", :object => trace, :formats => [:html])
|
||||
end
|
||||
|
||||
xml.dc :creator, trace.user.display_name
|
||||
|
||||
xml.pubDate trace.timestamp.to_s(:rfc822)
|
||||
|
||||
if trace.latitude and trace.longitude
|
||||
if trace.latitude && trace.longitude
|
||||
xml.geo :lat, trace.latitude
|
||||
xml.geo :long, trace.longitude
|
||||
xml.georss :point, "#{trace.latitude} #{trace.longitude}"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<% if @trace.inserted %>
|
||||
<img src="<%= url_for :controller => 'trace', :action => 'picture', :id => @trace.id, :display_name => @trace.user.display_name %>">
|
||||
<% else %>
|
||||
<span style="color:red"><%= t'trace.view.pending' %></span>
|
||||
<span class="trace_pending"><%= t'trace.view.pending' %></span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
|||
<td><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %></td></tr>
|
||||
<tr>
|
||||
<td><%= t'trace.view.start_coordinates' %></td>
|
||||
<td><div class="geo" style="display: inline"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%=link_to t('trace.view.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.view.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)</td>
|
||||
<td><div class="geo"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%=link_to t('trace.view.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.view.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<li>
|
||||
<p><%= raw @text['section_1'] %></p>
|
||||
<% unless @text['section_1a'].nil? %>
|
||||
<ol style="list-style-type: lower-alpha">
|
||||
<ol>
|
||||
<li><%= raw @text['section_1a'] %></li>
|
||||
<li><%= raw @text['section_1b'] %></li>
|
||||
</ol>
|
||||
|
|
|
@ -3,16 +3,14 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
|
|||
xml.tag! "user", :id => @this_user.id,
|
||||
:display_name => @this_user.display_name,
|
||||
:account_created => @this_user.creation_time.xmlschema do
|
||||
if @this_user.description
|
||||
xml.tag! "description", @this_user.description
|
||||
end
|
||||
xml.tag! "description", @this_user.description if @this_user.description
|
||||
if @user && @user == @this_user
|
||||
xml.tag! "contributor-terms", :agreed => !!@this_user.terms_agreed,
|
||||
:pd => !!@this_user.consider_pd
|
||||
xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?,
|
||||
:pd => @this_user.consider_pd
|
||||
else
|
||||
xml.tag! "contributor-terms", :agreed => !!@this_user.terms_agreed
|
||||
xml.tag! "contributor-terms", :agreed => @this_user.terms_agreed.present?
|
||||
end
|
||||
if @this_user.image.file? or @this_user.image_use_gravatar
|
||||
if @this_user.image.file? || @this_user.image_use_gravatar
|
||||
xml.tag! "img", :href => user_image_url(@this_user, :size => 256)
|
||||
end
|
||||
xml.tag! "roles" do
|
||||
|
@ -31,7 +29,7 @@ xml.osm("version" => API_VERSION, "generator" => GENERATOR) do
|
|||
end
|
||||
end
|
||||
if @user && @user == @this_user
|
||||
if @this_user.home_lat and @this_user.home_lon
|
||||
if @this_user.home_lat && @this_user.home_lon
|
||||
xml.tag! "home", :lat => @this_user.home_lat,
|
||||
:lon => @this_user.home_lon,
|
||||
:zoom => @this_user.home_zoom
|
||||
|
|
|
@ -4,9 +4,11 @@
|
|||
<% end %>
|
||||
|
||||
<% if params[:confirm_string] %>
|
||||
<script>
|
||||
$("#content").hide();
|
||||
</script>
|
||||
<% content_for :head do %>
|
||||
<%= javascript_include_tag "user" %>
|
||||
<% end %>
|
||||
|
||||
<% content_for(:content_class) { "user_confirm" } %>
|
||||
|
||||
<p><%= t 'user.confirm.press confirm button' %></p>
|
||||
|
||||
|
@ -15,10 +17,6 @@
|
|||
<input type="hidden" name="confirm_string" value="<%= params[:confirm_string] %>">
|
||||
<input type="submit" name="confirm_action" value="<%= t 'user.confirm.button' %>">
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$("#confirm").submit();
|
||||
</script>
|
||||
<% else %>
|
||||
<h1>
|
||||
<%= t "user.confirm.introduction_1" %>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<script>
|
||||
$("#content").hide();
|
||||
</script>
|
||||
<% content_for :head do %>
|
||||
<%= javascript_include_tag "user" %>
|
||||
<% end %>
|
||||
|
||||
<% content_for(:content_class) { "user_confirm" } %>
|
||||
|
||||
<% content_for :heading do %>
|
||||
<h1><%= t 'user.confirm_email.heading' %></h1>
|
||||
|
@ -12,7 +14,3 @@ $("#content").hide();
|
|||
<input type="hidden" name="confirm_string" value="<%= params[:confirm_string] %>">
|
||||
<input type="submit" name="confirm_action" value="<%= t 'user.confirm_email.button' %>">
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$("#confirm").submit();
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<% @title = t('user.list.title') %>
|
||||
|
||||
<% content_for :head do %>
|
||||
<%= javascript_include_tag "user" %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :heading do %>
|
||||
<h1><%= t('user.list.heading') %></h1>
|
||||
<% end %>
|
||||
|
@ -20,7 +24,7 @@
|
|||
:count => @user_pages.current_page.last_item - @user_pages.current_page.first_item + 1
|
||||
%>
|
||||
<% if @user_pages.page_count > 1 %>
|
||||
| <%= raw pagination_links_each(@user_pages, {}) { |n| link_to n, params.merge(:page => n) } %>
|
||||
| <%= raw pagination_links_each(@user_pages, {}) { |n| link_to n, @params.merge(:page => n) } %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -34,12 +38,6 @@
|
|||
<%= submit_tag t('user.list.confirm'), :name => "confirm" %>
|
||||
<%= submit_tag t('user.list.hide'), :name => "hide" %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#user_all").change(function () {
|
||||
$("#user_list input[type=checkbox]").prop("checked", $("#user_all").prop("checked"));
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p><%= t "user.list.empty" %></p>
|
||||
|
|
|
@ -58,6 +58,9 @@
|
|||
<% if defined?(GITHUB_AUTH_ID) -%>
|
||||
<li><%= auth_button "github", "github" %></li>
|
||||
<% end -%>
|
||||
<% if defined?(WIKIPEDIA_AUTH_ID) -%>
|
||||
<li><%= auth_button "wikipedia", "wikipedia" %></li>
|
||||
<% end -%>
|
||||
<li><%= auth_button "yahoo", "openid", :openid_url => "yahoo.com" %></li>
|
||||
<li><%= auth_button "wordpress", "openid", :openid_url => "wordpress.com" %></li>
|
||||
<li><%= auth_button "aol", "openid", :openid_url => "aol.com" %></li>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
|
||||
<%= form_tag :action => "logout" do %>
|
||||
<%= hidden_field_tag("referer", h(params[:referer])) %>
|
||||
<%= hidden_field_tag("session", request.session_options[:id]) %>
|
||||
<%= hidden_field_tag("session", session.id) %>
|
||||
<%= submit_tag t('user.logout.logout_button') %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
<% content_for :head do %>
|
||||
<%= javascript_include_tag "user" %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :heading do %>
|
||||
<h1><%= t 'user.terms.heading' %></h1>
|
||||
<div class='header-illustration new-user-terms'></div>
|
||||
|
@ -13,15 +17,9 @@
|
|||
<% [['france', 'FR'], ['italy', 'IT'], ['rest_of_world', 'GB']].each do |name, legale| %>
|
||||
<div class="form-row">
|
||||
<label for="legale_<%= legale %>">
|
||||
<%= radio_button_tag 'legale', legale, @legale == legale %>
|
||||
<%= radio_button_tag 'legale', legale, @legale == legale, :data => { :url => url_for(:legale => legale) } %>
|
||||
<%= t('user.terms.legale_names.' + name) %>
|
||||
</label>
|
||||
<script>
|
||||
$("#legale_<%= legale %>").change(function () {
|
||||
$("#contributorTerms").html("<%=j image_tag 'searching.gif' %>");
|
||||
$("#contributorTerms").load("<%= url_for :legale => legale %>");
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -141,14 +141,14 @@
|
|||
<p class='deemphasize'>
|
||||
<small>
|
||||
<%= t 'user.view.mapper since' %> <%= l @this_user.creation_time.to_date, :format => :long %>
|
||||
|
|
||||
<%= t 'user.view.ct status' %>
|
||||
<% if not @this_user.terms_agreed.nil? -%>
|
||||
<%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed) %>
|
||||
<% elsif not @this_user.terms_seen? -%>
|
||||
<%= t 'user.view.ct undecided' %>
|
||||
<% else -%>
|
||||
<%= t 'user.view.ct declined' %>
|
||||
<% unless @this_user.terms_agreed %>
|
||||
|
|
||||
<%= t 'user.view.ct status' %>
|
||||
<% if @this_user.terms_seen? -%>
|
||||
<%= t 'user.view.ct declined' %>
|
||||
<% else -%>
|
||||
<%= t 'user.view.ct undecided' %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</small>
|
||||
</p>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul class='secondary-actions'>
|
||||
<% if @user_blocks_pages.current_page.number > 1 -%>
|
||||
<li><%= link_to t('user_block.partial.previous'), params.merge({ :page => @user_blocks_pages.current_page.number - 1 }) %></li>
|
||||
<li><%= link_to t('user_block.partial.previous'), @params.merge({ :page => @user_blocks_pages.current_page.number - 1 }) %></li>
|
||||
<% else -%>
|
||||
<li><%= t('user_block.partial.previous') %></li>
|
||||
<% end -%>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<li><%= t('user_block.partial.showing_page', :page => @user_blocks_pages.current_page.number) %></li>
|
||||
|
||||
<% if @user_blocks_pages.current_page.number < @user_blocks_pages.page_count -%>
|
||||
<li><%= link_to t('user_block.partial.next'), params.merge({ :page => @user_blocks_pages.current_page.number + 1 }) %></li>
|
||||
<li><%= link_to t('user_block.partial.next'), @params.merge({ :page => @user_blocks_pages.current_page.number + 1 }) %></li>
|
||||
<% else -%>
|
||||
<li><%= t('user_block.partial.next') %></li>
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue