//= require sidebar
//= require richtext
//= require resize
+//= require geocoder
function zoomPrecision(zoom) {
var decimals = Math.pow(10, Math.floor(zoom/3));
--- /dev/null
+$(document).ready(function () {
+ $("body").on("click", ".search_more a", function (e) {
+ e.preventDefault();
+
+ var div = $(this).parents(".search_more");
+
+ div.find(".search_results_entry").hide();
+ div.find(".search_searching").show();
+
+ $.get($(this).attr("href"), function(data) {
+ div.replaceWith(data);
+ });
+ });
+});
-.node { padding-left: 25px; }
-.way { padding-left: 25px; }
-.relation { padding-left: 25px; }
+/* Make space for icons */
+
+.node, .way, .relation {
+ padding-left: 25px;
+
+ &:first-child {
+ margin-left: -25px;
+ }
+}
+
+/* Deleted objects */
.deleted { text-decoration: line-through; }
}
.search_results_entry {
- margin-bottom: 0 ;
+ margin-bottom: 0;
+
+ .search_details {
+ display: block;
+ text-align: right;
+ }
}
.search_results_entry .search_searching {
margin: 0px;
padding: 4px 6px;
}
- div {
- clear: left;
- }
h4, p {
margin-bottom: 5px;
}
- p, ul, .bbox {
- margin-left: 33.3333%;
+ p, ul, .bbox, .geo {
+ display: inline-block;
+ vertical-align: top;
+ max-width: 65%;
}
ul p {
margin-left: 0;
}
h4 {
width: 33.3333%;
- float: left;
+ display: inline-block;
+ vertical-align: top;
}
}
html << link_to(result[:name], url, html_options) if result[:name]
html << result[:suffix] if result[:suffix]
+ if result[:type] and result[:id]
+ html << content_tag(:small, :class => ["deemphasize", "search_details"]) do
+ link_to(t("browse.#{result[:type]}_history.view_details"), :controller => :browse, :action => result[:type], :id => result[:id])
+ end
+ end
+
return raw(html)
end
@name = printable_name @node
@title = t('browse.node_history.node_history') + ' | ' + @name
%>
+<% content_for :head do %>
+<%= stylesheet_link_tag 'browse' %>
+<% end %>
+
<% content_for :heading do %>
<h2><%= raw t'browse.node_history.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %></h2>
<ul class='secondary-actions clearfix'>
@name = printable_name @relation
@title = t('browse.relation_history.relation_history') + ' | ' + @name
%>
+<% content_for :head do %>
+<%= stylesheet_link_tag 'browse' %>
+<% end %>
<% content_for :heading do %>
<h2><%= raw t'browse.relation_history.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %></h2>
@name = printable_name @way
@title = t('browse.way_history.way_history') + ' | ' + @name
%>
+<% content_for :head do %>
+<%= stylesheet_link_tag 'browse' %>
+<% end %>
<% content_for :heading do %>
<h2><%= raw t'browse.way_history.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %></h2>
<% end %>
</ul>
<% if @more_params %>
- <div id="search_more_<%= @more_params.hash %>">
+ <div class="search_more">
<div class="inner12 search_results_entry">
- <%= link_to t('geocoder.results.more_results'), "#", :class => "button" %>
+ <%= link_to t('geocoder.results.more_results'), url_for(@more_params), :class => "button" %>
</div>
- <%= image_tag "searching.gif", :class => "search_searching" %>
+ <%= image_tag "searching.gif", :class => ["search_searching", "hidden"] %>
</div>
- <script type="text/javascript">
- $("#search_more_<%= @more_params.hash %> .search_searching").hide();
-
- $("#search_more_<%= @more_params.hash %> a").click(function () {
- $("#search_more_<%= @more_params.hash %> .search_results_entry").hide();
- $("#search_more_<%= @more_params.hash %> .search_searching").show();
- $("#search_more_<%= @more_params.hash %>").load("<%= raw url_for(@more_params) %>");
- });
- </script>
<% end %>
<% end %>
<div class="note-comment" style="margin-top: 5px">
<% if comment.author.nil? -%>
- <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at", :when => friendly_date(comment.created_at) %></div>
+ <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_html", :when => friendly_date(comment.created_at) %></div>
<% else -%>
- <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
+ <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
<% end -%>
<div class="note-comment-text"><%= comment.body %></div>
</div>
xml.link url_for(:controller => "browse", :action => "note", :id => comment.note.id, :only_path => false)
xml.guid url_for(:controller => "browse", :action => "note", :id => comment.note.id, :only_path => false)
- xml.description render(:partial => "entry", :object => comment, :formats => [ :html ])
+ xml.description do
+ xml.cdata! render(:partial => "entry", :object => comment, :formats => [ :html ])
+ end
if comment.author
xml.author comment.author.display_name
needs_view: "The user needs to log in before this block will be cleared."
note:
description:
- opened_at: "Created %{when} ago"
- opened_at_by: "Created %{when} ago by %{user}"
- commented_at: "Updated %{when} ago"
- commented_at_by: "Updated %{when} ago by %{user}"
- closed_at: "Resolved %{when} ago"
- closed_at_by: "Resolved %{when} ago by %{user}"
- reopened_at: "Reactivated %{when} ago"
- reopened_at_by: "Reactivated %{when} ago by %{user}"
+ opened_at_html: "Created %{when} ago"
+ opened_at_by_html: "Created %{when} ago by %{user}"
+ commented_at_html: "Updated %{when} ago"
+ commented_at_by_html: "Updated %{when} ago by %{user}"
+ closed_at_html: "Resolved %{when} ago"
+ closed_at_by_html: "Resolved %{when} ago by %{user}"
+ reopened_at_html: "Reactivated %{when} ago"
+ reopened_at_by_html: "Reactivated %{when} ago by %{user}"
rss:
title: "OpenStreetMap Notes"
description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]"