//= require index/browse
//= require index/export
//= require index/key
+//= require index/notes
$(document).ready(function () {
- var permalinks = $("#permalink").html();
+ var permalinks = $("#permalink").detach().html();
var marker;
var params = OSM.mapParams();
var map = createMap("map");
});
function updateLocation() {
- var center = map.getCenter();
+ var center = map.getCenter().wrap();
var zoom = map.getZoom();
var layers = getMapLayers();
- var extents = map.getBounds();
+ var extents = map.getBounds().wrap();
updatelinks(center.lng,
center.lat,
.site-index #tabnav a#viewanchor,
.site-edit #tabnav a#editanchor,
- .changeset_list #tabnav a#historyanchor,
+ .changeset-list #tabnav a#historyanchor,
.site-export #tabnav a#exportanchor {
border-bottom: 1px solid #aaa;
background: #9ed485;
background:#fff;
}
+.leaflet-control-attribution a.disabled {
+ color: #99c9dc;
+ cursor: default;
+ text-decoration: none;
+}
+
.site-index .leaflet-top,
.site-export .leaflet-top {
top: 10px !important;
left: 10px !important;
}
+.leaflet-popup-scrolled {
+ padding-right: 20px;
+ border-bottom: 0px !important;
+ border-top: 0px !important;
+}
+
/* Rules for edit menu */
.menuicon {
top: 30px;
}
+ #content.maximised {
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ border: 0;
+ z-index: 1000;
+ }
+
#slim_container {
width: 100%;
}
#slim_content {
margin: 10px;
- margin-top: 90px;
+ margin-top: 95px;
max-width: 50em;
+
+ .content-heading {
+ margin-bottom: 15px;
+ }
}
#slim_header {
- margin: 10px;
+ margin: 30px 10px;
position: absolute;
top: 0px;
margin-right: 5px;
}
}
.selected {
- background-color: rgb(255, 255, 160);
+ background: #FFFFC0;
}
.date,
.user {
p, ul, .bbox {
margin-left: 33.3333%;
}
+ ul p {
+ margin-left: 0;
+ margin-bottom: 0;
+ }
h4 {
width: 33.3333%;
float: left;
}
.activity-block {
+ clear: left;
border-bottom: 1px solid #ccc;
padding-bottom: 20px;
float: left;
}
ul,
ol {
- margin-bottom: 20px;
font-style: italic;
- margin-left: 20px;
- }
- ul li {
- list-style: disc;
- }
- ol li {
- list-style: decimal;
}
ul.secondary-actions { display: inline-block;}
}
/* Rules for user images */
img.user_image {
- width: 100px;
- height: 100px;
+ max-width: 100px;
+ max-height: 100px;
border: 1px solid #ccc;
margin-bottom: 20px;
float: left;
}
img.user_thumbnail {
- width: 50px;
- height: 50px;
+ max-width: 50px;
+ max-height: 50px;
border: 1px solid #ccc;
margin-right: 20px;
}
padding-left: 0;
}
}
- .hidden li,
- .hide_unless_logged_in li,
- .hide_unless_administrator li {
- border-left: 1px solid #ccc;
- padding-left: 5px;
- }
- .hidden:first-child li,
- .hide_unless_logged_in:first-child li,
- .hide_unless_administrator:first-child li {
- border-left: 0;
- padding-left: 0;
- }
}
/* Utility for managing inner content areas */
background-color: #9ed485;
}
}
+
/* Rules for doing distinct colour of alternate table rows */
.table0,
border: 0;
}
+ /* Rules for rich text */
+
+ .richtext {
+ ul,
+ ol {
+ margin-bottom: 20px;
+ margin-left: 20px;
+ }
+ ul li {
+ list-style: disc;
+ }
+
+ ol li {
+ list-style: decimal;
+ }
+ }
+
/* Rules for rich text editors */
.richtext_container {
white-space: nowrap;
+
.richtext_content {
display: inline-block;
vertical-align: top;
+
.richtext_preview {
display: inline-block;
padding: 20px;
background-color: #f4f4ff;
white-space: normal;
+
&.loading {
background-image: image-url("loading.gif");
background-repeat: no-repeat;
background-position: center;
}
+
> :first-child {
margin-top: 0px;
}
}
}
+
.richtext_help {
display: inline-block;
vertical-align: top;
margin-left: 15px;
background-color: #f8f8ff;
padding: 20px;
+
p {
margin: 0px;
}
+
th {
vertical-align: top;
text-align: left;
padding: 0px 15px 0px 0px !important;
}
- table > thead th {
- font-weight: bold;
- }
+
td {
font-family: fixed;
line-height: 16px;
text-align: left;
padding: 0px !important;
}
+
input.richtext_doedit {
margin-top: 5px !important;
margin-right: 10px !important;
}
+
input.richtext_dopreview {
margin-top: 5px !important;
margin-left: 10px !important;
}
}
}
+
+/* Rules for the notes interface */
+
+.note {
+ .comment_body {
+ margin-top: 4px;
+ margin-bottom: 4px;
+
+ p {
+ margin-top: 0px;
+ margin-bottom: 0px;
+ }
+ }
+
+ .comment {
+ width: 100%;
+ }
+
+ .buttons {
+ margin-top: 5px;
+ text-align: right;
+ }
+}
def style_rules
css = ""
- css << ".hidden { display: none }";
- css << ".hide_unless_logged_in { display: none }" unless @user;
- css << ".hide_if_logged_in { display: none }" if @user;
- css << ".hide_if_user_#{@user.id} { display: none }" if @user;
- css << ".show_if_user_#{@user.id} { display: inline }" if @user;
- css << ".hide_unless_administrator { display: none }" unless @user and @user.administrator?;
+ css << ".hidden { display: none !important }";
+ css << ".hide_unless_logged_in { display: none !important }" unless @user;
+ css << ".hide_if_logged_in { display: none !important }" if @user;
+ css << ".hide_if_user_#{@user.id} { display: none !important }" if @user;
+ css << ".show_if_user_#{@user.id} { display: inline !important }" if @user;
+ css << ".hide_unless_administrator { display: none !important }" unless @user and @user.administrator?;
return content_tag(:style, css, :type => "text/css")
end
content_tag(:div, :id => "#{id}_container", :class => "richtext_container") do
output_buffer << content_tag(:div, :id => "#{id}_content", :class => "richtext_content") do
output_buffer << text_area(object_name, method, options.merge("data-preview-url" => preview_url(:format => format)))
- output_buffer << content_tag(:div, "", :id => "#{id}_preview", :class => "richtext_preview")
+ output_buffer << content_tag(:div, "", :id => "#{id}_preview", :class => "richtext_preview richtext")
end
output_buffer << content_tag(:div, :id => "#{id}_help", :class => "richtext_help") do
I18n.t("html.dir")
end
end
+
+ def friendly_date(date)
+ content_tag(:span, time_ago_in_words(date), :title => l(date, :format => :friendly))
+ end
+
+ def note_author(object, link_options = {})
+ if object.author.nil?
+ ""
+ else
+ link_to h(object.author.display_name), link_options.merge({:controller => "user", :action => "view", :display_name => object.author.display_name})
+ end
+ end
end
</iframe>
<div id="browse_map" class='clearfix content_map'>
- <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %>
+ <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible? %>
<% content_for :head do %>
<%= javascript_include_tag "browse" %>
:maxlon => bbox.max_lon,
:maxlat => bbox.max_lat
}
+ elsif map.instance_of? Note
+ data = {
+ :type => "note",
+ :lon => map.lon,
+ :lat => map.lat
+ }
else
data = {
:type => map.class.name.downcase,
<ul class='secondary-actions clearfix'>
<li>
- <%= link_to t("browse.map.larger.area"),
- root_path(:box => "yes"),
- :id => "area_larger_map",
- :class => "geolink bbox" %>
+ <% if map.instance_of? Note -%>
+ <%= link_to t("browse.map.larger.area"),
+ root_path(:notes => "yes"),
+ :id => "area_larger_map",
+ :class => "geolink bbox" %>
+ <% else -%>
+ <%= link_to t("browse.map.larger.area"),
+ root_path(:box => "yes"),
+ :id => "area_larger_map",
+ :class => "geolink bbox" %>
+ <% end -%>
</li>
<li>
- <%= link_to h(t("browse.map.edit.area")) + content_tag(:span, "â\96¾", :class => "menuicon"),
+ <%= link_to h(t("browse.map.edit.area")) + content_tag(:span, "â\96¼", :class => "menuicon"),
edit_path,
:id => "area_edit",
:data => { :editor => preferred_editor },
</li>
</ul>
- <% unless map.instance_of? Changeset %>
+ <% unless map.instance_of? Changeset or map.instance_of? Note %>
<ul class='secondary-actions clearfix'>
<li>
<%= link_to t("browse.map.larger." + map.class.to_s.downcase),
:class => "geolink object" %>
</li>
<li>
- <%= link_to h(t("browse.map.edit." + map.class.to_s.downcase)) + content_tag(:span, "â\96¾", :class => "menuicon"),
+ <%= link_to h(t("browse.map.edit." + map.class.to_s.downcase)) + content_tag(:span, "â\96¼", :class => "menuicon"),
edit_path,
:id => "object_edit",
:data => { :editor => preferred_editor },
<%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
<span class='count-number'><%= number_with_delimiter(@user.changesets.size) %></span>
</li>
+ <li>
+ <%= link_to t('user.view.my notes'), :controller => 'notes', :action=> 'mine' %>
+ </li>
<li>
<%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
<span class='count-number'><%= number_with_delimiter(@user.traces.size) %></span>
<%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
<span class='count-number'><%= number_with_delimiter(@this_user.changesets.size) %></span>
</li>
+ <li>
+ <%= link_to t('user.view.notes'), :controller => 'notes', :action=> 'mine' %>
+ </li>
<li>
<%= link_to t('user.view.traces'), :controller => 'trace', :action => 'list', :display_name => @this_user.display_name %>
<span class='count-number'><%= number_with_delimiter(@this_user.traces.size) %></span>
</p>
</div>
- <div class='user-description'><%= @this_user.description.to_html %></div>
+ <div class="user-description richtext"><%= @this_user.description.to_html %></div>
</div>
way: Der Weg
paging_nav:
of: von
- showing_page: Zeige Seite
+ showing_page: Seite
redacted:
message_html: "Version %{version} dieses %{type}s kann nicht angezeigt werden. Weitere Informationen sind hier angegeben: %{redaction_link}."
redaction: Ausgabe %{id}
manually_select: Einen anderen Kartenausschnitt manuell auswählen
object_list:
api: Diesen Bereich von der API abfragen
- back: Objektliste anzeigen
+ back: Zurück zur Objektliste
details: Details
heading: Objektliste
history:
way_title: "Weg: %{way_name}"
way_details:
also_part_of:
- one: Auch Teil des Wegs %{related_ways}
- other: Auch Teil der Wege %{related_ways}
+ one: Teil des Wegs %{related_ways}
+ other: Teil der Wege %{related_ways}
nodes: "Knoten:"
part_of: "Teil von:"
way_history:
saved_at: Gespeichert am
user: Benutzer
list:
- description: Letzte Änderungen
+ description: Die letzten Beiträge an der Karte durchstöbern
description_bbox: Letzte Änderungen in %{bbox}
description_friend: Änderungssätze deiner Freunde
description_nearby: Änderungssätze von Benutzern in der Nähe
newer_entries: Neuere
no_entries: Dieser Benutzer hat noch kein Blog
older_entries: Ältere
- recent_entries: "Neuste Einträge:"
+ recent_entries: Neueste Einträge
title: Blogs
title_friends: Tagebücher meiner Freunde
title_nearby: Tagebücher von Nutzern in der Nähe
history_disabled_tooltip: Reinzoomen um Änderungen für diesen Bereich anzuzeigen
history_tooltip: Änderungen für diesen Bereich anzeigen
history_zoom_alert: Du musst näher heranzoomen, um die Chronik zu sehen
+ osb:
+ Fixed Error: Behobener Fehler
+ Unresolved Error: Offener Fehler
+ Description: Beschreibung
+ Comment: Kommentar
+ Has been fixed: Der Fehler wurde bereits behoben. Es kann jedoch bis zu einigen Tagen dauern, bis die Kartenansicht aktualisiert wird.
+ Comment/Close: Kommentieren/Schließen
+ Nickname: Benutzername
+ Add comment: Kommentar hinzufügen
+ Mark as fixed: Als behoben markieren
+ Cancel: Abbrechen
+ Create OpenStreetBug: OpenStreetBug melden
+ Create bug: Bug anlegen
+ Bug description: Fehlerbeschreibung
+ Create: Anlegeeen
+ Permalink: Permalink
layouts:
community: Gemeinschaft
community_blogs: Blogs
user_diaries_tooltip: Benutzer-Blogs lesen
view: Karte
view_tooltip: Karte anzeigen
- welcome_user: Willkommen, %{user_link}
welcome_user_link_tooltip: Eigene Benutzerseite
wiki: Wiki
wiki_title: Wiki des Projekts
attribution_example:
alt: Beispiel, wie man auf OpenStreetMap auf einer Webseite hinweist
title: Hinweisbeispiel
- contributors_at_html: "<strong>Österreich</strong>: Enthält Daten der <a href=\"http://data.wien.gv.at/\">Stadt Wien</a> (lizenziert gemäß <a href=\"http://creativecommons.org/licenses/by/3.0/at/deed.de\">CC BY AT</a>), <a href=\"http://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm\">des Landes Vorarlberg</a> und des Landes Tirol (<a href=\"http://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/\">beides lizenziert gemäß CC BY AT mit Anpassungen zur Lizenz</a>)."
+ contributors_at_html: "<strong>Österreich</strong>: Enthält Daten der <a href=\"http://data.wien.gv.at/\">Stadt Wien</a> (lizenziert gemäß <a href=\"http://creativecommons.org/licenses/by/3.0/at/deed.de\">CC BY AT</a>), <a href=\"http://www.vorarlberg.at/vorarlberg/bauen_wohnen/bauen/vermessung_geoinformation/weitereinformationen/services/wmsdienste.htm\">des Landes Vorarlberg</a> und des Landes Tirol (<a href=\"http://www.tirol.gv.at/applikationen/e-government/data/nutzungsbedingungen/\">lizenziert gemäß CC BY AT samt Erweiterungen zur Lizenz</a>)."
contributors_ca_html: "<strong>Kanada</strong>: Enthält Daten von GeoBase®, GeoGratis (© <i>Department of Natural Resources Canada</i>), CanVec (© <i>Department of Natural Resources Canada</i>) und StatCan (<i>Geography Division, Statistics Canada</i>)."
contributors_footer_1_html: Für weitere diesbezügliche Einzelheiten sowie anderer Datenquellen, die zur Verbesserung von OpenStreetMap genutzt wurden, besuche bitte <a href="http://wiki.openstreetmap.org/wiki/Contributors">die Seite über die Mitwirkenden</a> im Wiki von OpenStreetMap.
contributors_footer_2_html: Die Einbeziehung von Daten bei OpenStreetMap impliziert nicht, dass der ursprüngliche Datenlieferant OpenStreetMap unterstützt, Gewährleistung gibt, noch Haftung übernimmt.
visibility: "Sichtbarkeit:"
visibility_help: Was heißt das?
list:
+ description: Letzte GPS-Track-Uploads durchsuchen
empty_html: Bislang ist hier noch nichts vorhanden. <a href='%{upload_link}'>Lade eine neue Spur hoch</a> oder informiere dich auf folgender <a href='http://wiki.openstreetmap.org/wiki/Beginners_Guide_1.2'>Wikiseite</a> über das Aufzeichnen von GPS-Spuren.
public_traces: Öffentliche GPS-Tracks
public_traces_from: Öffentliche GPS-Tracks von %{user}
heading: Benutzer
hide: Ausgewählte Benutzer ausblenden
showing:
- one: Anzeige von Seite %{page} (%{first_item} von %{items})
- other: Anzeige von Seite %{page} (%{first_item}-%{last_item} von %{items})
+ one: Seite %{page} (%{first_item} von %{items})
+ other: Seite %{page} (%{first_item}–%{last_item} von %{items})
summary: "%{name} erstellt von %{ip_address} am %{date}"
summary_no_ip: "%{name} erstellt am %{date}"
title: Benutzer
button: Als Freund hinzufügen
failed: Sorry, %{name} konnte nicht als dein Freund hinzugefügt werden.
heading: "%{user} als Freund hinzufügen?"
- success: "%{name} ist nun dein Freund."
+ success: "%{name} ist nun dein Freund!"
new:
confirm email address: "Bestätige deine E-Mail-Adresse:"
confirm password: "Passwort bestätigen:"
nearby mapper: Mapper in der Nähe
your location: Eigener Standort
remove_friend:
- button: Als Freund entfernen
- heading: "%{user} als Freund entfernen?"
+ button: Freund entfernen
+ heading: Freund %{user} entfernen?
not_a_friend: "%{name} ist nicht dein Freund."
success: "%{name} wurde als Freund entfernt."
reset_password:
you need to accept or decline: Bitte lese die neuen Bedingungen für Mitwirkende und nehme sie an oder lehne sie ab, bevor du weitermachst.
view:
activate_user: Benutzer aktivieren
- add as friend: Als Freund hinzufügen
+ add as friend: Freund hinzufügen
ago: (%{time_in_words_ago} her)
block_history: Erhaltene Sperren
blocks by me: Selbst vergebene Sperren
diary: Blog
edits: Bearbeitungen
email address: "E-Mail-Adresse:"
- friends_changesets: Alle Änderungssätze deiner Freunde durchsuchen
- friends_diaries: Alle Tagebucheinträge von Freunden durchsuchen
+ friends_changesets: Änderungssätze deiner Freunde
+ friends_diaries: Tagebucheinträge von Freunden
hide_user: Benutzer verstecken
- if set location: Wenn du deinen Standort angegeben hast, erscheint eine Karte am Seitenende. Du kannst deinen Standort in deinen %{settings_link} ändern.
+ if set location: Lege in den %{settings_link} deinen Heimatort fest, um Benutzer in der Nähe anzuzeigen.
km away: "%{count} km entfernt"
latest edit: "Letzte Änderung %{ago}:"
m away: "%{count} m entfernt"
my settings: Eigene Einstellungen
my traces: Eigene Tracks
nearby users: Anwender in der Nähe
- nearby_changesets: Alle Änderungssätze von Benutzern in der Nähe durchsuchen
- nearby_diaries: Alle Tagebucheinträge von Benutzern in der Nähe durchsuchen
+ nearby_changesets: Änderungssätze von Benutzern in der Nähe
+ nearby_diaries: Tagebucheinträge von Benutzern in der Nähe
new diary entry: Neuer Blogeintrag
no friends: Du hast bis jetzt keine Freunde hinzugefügt.
no nearby users: Es gibt bisher keine Benutzer, die einen Standort in deiner Nähe angegeben haben.
oauth settings: OAuth-Einstellungen
- remove as friend: Als Freund entfernen
+ remove as friend: Freund entfernen
role:
administrator: Dieser Benutzer ist ein Administrator
grant:
next_relation_tooltip: "Next relation"
prev_changeset_tooltip: "Previous changeset"
next_changeset_tooltip: "Next changeset"
+ prev_note_tooltip: "Previous note"
+ next_note_tooltip: "Next note"
changeset_details:
created_at: "Created at:"
closed_at: "Closed at:"
download_xml: "Download XML"
view_history: "View history"
start_rjs:
+ notes_layer_name: "Browse Notes"
data_layer_name: "Browse Map Data"
data_frame_title: "Data"
zoom_or_select: "Zoom in or select an area of the map to view"
nodes: "Nodes:"
part_of: "Part of:"
also_part_of:
- one: "also part of way %{related_ways}"
- other: "also part of ways %{related_ways}"
+ one: "part of way %{related_ways}"
+ other: "part of ways %{related_ways}"
way_history:
way_history: "Way History"
way_history_title: "Way History: %{way_name}"
download_xml: "Download XML"
view_history: "View history"
edit: "Edit way"
+ note:
+ open_title: "Unresolved issue: %{note_name}"
+ closed_title: "Resolved issue: %{note_name}"
+ opened: "Opened:"
+ last_modified: "Last modified:"
+ closed: "Closed:"
+ at_by_html: "%{when} ago by %{user}"
+ description: "Description:"
+ comments: "Comments:"
changeset:
changeset_paging_nav:
showing_page: "Page %{page}"
greeting: "Hi,"
hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account."
click_the_link: "If this is you, please click the link below to reset your password."
+ note_comment_notification:
+ anonymous: An anonymous user
+ subject_own: "[OpenStreetMap] %{commenter} has commented on one of your notes"
+ subject_other: "[OpenStreetMap] %{commenter} has commented on a note you are interested in"
+ greeting: "Hi,"
+ your_note: "%{commenter} has left a comment on one of your map notes near %{place}."
+ commented_note: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}."
+ details: "More details about the note can be found at %{url}."
message:
inbox:
title: "Inbox"
js_2: "OpenStreetMap uses JavaScript for its slippy map."
permalink: Permalink
shortlink: Shortlink
+ createnote: Add a note
license:
copyright: "Copyright OpenStreetMap and contributors, under an open license"
license_url: "http://openstreetmap.org/copyright"
new diary entry: new diary entry
my edits: my edits
my traces: my traces
+ my notes: my map notes
my settings: my settings
my comments: my comments
oauth settings: oauth settings
diary: diary
edits: edits
traces: traces
+ notes: map notes
remove as friend: unfriend
add as friend: add friend
mapper since: "Mapper since:"
back: "View all blocks"
revoker: "Revoker:"
needs_view: "The user needs to log in before this block will be cleared."
+ note:
+ description:
+ opened_at_by: "Created %{when} ago by %{user}"
+ commented_at_by: "Updated %{when} ago by %{user}"
+ closed_at_by: "Resolved %{when} ago by %{user}"
+ reopened_at_by: "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})]"
+ description_item: "An rss feed for note %{id}"
+ closed: "closed note (near %{place})"
+ new: "new note (near %{place})"
+ comment: "new comment (near %{place})"
+ mine:
+ title: "Notes submitted or commented on by %{user}"
+ heading: "%{user}'s notes"
+ description: "Notes submitted or commented on by %{user}"
+ id: "Id"
+ last_changed: "Last changed"
javascripts:
map:
base:
history_tooltip: View edits for this area
history_disabled_tooltip: Zoom in to view edits for this area
history_zoom_alert: You must zoom in to view edits for this area
+ createnote_tooltip: Add a note to the map
+ createnote_disabled_tooltip: Zoom in to add a note to the map
+ createnote_zoom_alert: You must zoom in to add a note to the map
+ notes:
+ new:
+ intro: "Move the marker to the correct position and add your comment in the box below:"
+ add: Add Note
+ show:
+ title: Note %{id}
+ event: "%{action} by <a href='%{user_url}'>%{user}</a> at %{time}"
+ anonymous_event: "%{action} by anonymous at %{time}"
+ close: Close
+ comment_and_close: Comment & Close
+ comment: Comment
redaction:
edit:
description: "Description"
{ :path => "/browse/changeset/1", :method => :get },
{ :controller => "browse", :action => "changeset", :id => "1" }
)
+ assert_routing(
+ { :path => "/browse/note/1", :method => :get },
+ { :controller => "browse", :action => "note", :id => "1" }
+ )
end
def test_start
assert_template 'node_history'
# there are 2 revisions of the redacted node, but only one
- # should be showing up here.
- assert_select "body div[id=content] div[class=browse_details]", 1
- assert_select "body div[id=content] div[class=browse_details][id=1]", 0
+ # should be showing details here.
+ assert_select "body div#content div.browse_details", 2
+ assert_select "body div#content div.browse_details[id=1] div.common", 0
+ assert_select "body div#content div.browse_details[id=2] div.common", 1
end
def test_redacted_way_history
assert_template 'way_history'
# there are 4 revisions of the redacted way, but only 2
- # should be showing up here.
- assert_select "body div[id=content] div[class=browse_details]", 2
- # redacted revisions are 2 & 3
- assert_select "body div[id=content] div[class=browse_details][id=2]", 0
- assert_select "body div[id=content] div[class=browse_details][id=3]", 0
+ # should be showing details here.
+ assert_select "body div#content div.browse_details", 4
+ assert_select "body div#content div.browse_details[id=1] div.common", 1
+ assert_select "body div#content div.browse_details[id=2] div.common", 0
+ assert_select "body div#content div.browse_details[id=3] div.common", 0
+ assert_select "body div#content div.browse_details[id=4] div.common", 1
end
def test_redacted_relation_history
assert_template 'relation_history'
# there are 4 revisions of the redacted relation, but only 2
- # should be showing up here.
- assert_select "body div[id=content] div[class=browse_details]", 2
- # redacted revisions are 2 & 3
- assert_select "body div[id=content] div[class=browse_details][id=2]", 0
- assert_select "body div[id=content] div[class=browse_details][id=3]", 0
+ # should be showing details here.
+ assert_select "body div#content div.browse_details", 4
+ assert_select "body div#content div.browse_details[id=1] div.common", 1
+ assert_select "body div#content div.browse_details[id=2] div.common", 0
+ assert_select "body div#content div.browse_details[id=3] div.common", 0
+ assert_select "body div#content div.browse_details[id=4] div.common", 1
end
# This is a convenience method for most of the above checks