Improve changeset template
This commit is contained in:
parent
0f6ee7407c
commit
d1cc387080
7 changed files with 57 additions and 37 deletions
|
@ -1026,6 +1026,11 @@ a.donate {
|
||||||
|
|
||||||
&.selected { background: lighten($green, 35%); }
|
&.selected { background: lighten($green, 35%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.comment a {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Rules for the data browser */
|
/* Rules for the data browser */
|
||||||
|
|
|
@ -29,4 +29,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render :partial => "tag_details", :object => common_details %>
|
<%= render :partial => "tag_details", :object => common_details.tags %>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<% unless tag_details.tags.empty? %>
|
<% unless tag_details.empty? %>
|
||||||
<div class='browse-section'>
|
<div class='browse-section'>
|
||||||
<h4><%= t'browse.tag_details.tags' %></h4>
|
<h4><%= t'browse.tag_details.tags' %></h4>
|
||||||
<ul class='browse-tag-list'>
|
<ul class='browse-tag-list'>
|
||||||
<%= render :partial => "tag", :collection => tag_details.tags.sort %>
|
<%= render :partial => "tag", :collection => tag_details.sort %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,29 +1,41 @@
|
||||||
<div class='browse-section header'>
|
|
||||||
<h2><%= t 'browse.changeset.changeset', :id => @changeset.id %>
|
<h2><%= t 'browse.changeset.changeset', :id => @changeset.id %>
|
||||||
<span class="icon close"></span>
|
<span class="icon close"></span>
|
||||||
</h2>
|
</h2>
|
||||||
|
<div class="browse-section">
|
||||||
<p>
|
<p>
|
||||||
|
<%=
|
||||||
|
if @changeset.tags['comment'].to_s != ''
|
||||||
|
@changeset.tags['comment'].to_s
|
||||||
|
else
|
||||||
|
t ('browse.changeset_details.no_comment')
|
||||||
|
end
|
||||||
|
%>
|
||||||
|
</p>
|
||||||
|
<span>
|
||||||
<%
|
<%
|
||||||
created_at = distance_of_time_in_words_to_now(@changeset.created_at)
|
created_at = distance_of_time_in_words_to_now(@changeset.created_at)
|
||||||
closed_at = distance_of_time_in_words_to_now(@changeset.closed_at)
|
closed_at = distance_of_time_in_words_to_now(@changeset.closed_at)
|
||||||
if created_at == closed_at %>
|
if created_at == closed_at
|
||||||
|
%>
|
||||||
<%= t 'browse.changeset_details.closed_at' %>
|
<%= t 'browse.changeset_details.closed_at' %>
|
||||||
<abbr title="<%= t 'browse.changeset_details.created_at' %>: <%= @changeset.created_at %> <%= t 'browse.changeset_details.closed_at' %>: <%= @changeset.closed_at %>">
|
<abbr title="<%= t 'browse.changeset_details.created_at' %>: <%= l @changeset.created_at %> <%= t 'browse.changeset_details.closed_at' %>: <%= l @changeset.closed_at %>">
|
||||||
<%= created_at %> ago</abbr>
|
<%= t('browse.changeset_details.ago', :ago => created_at) %></abbr>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= t 'browse.changeset_details.created_at' %> <abbr title="<%= l @changeset.created_at %>"><%= created_at %> ago</abbr>,
|
<%= t 'browse.changeset_details.created_at' %> <abbr title="<%= l @changeset.created_at %>"><%= t('browse.changeset_details.ago', :ago => created_at) %></abbr>,
|
||||||
<%= t 'browse.changeset_details.closed_at' %> <abbr title="<%= l @changeset.closed_at %>"><%= closed_at %> ago<abbr>
|
<%= t 'browse.changeset_details.closed_at' %> <abbr title="<%= l @changeset.closed_at %>"><%= t('browse.changeset_details.ago', :ago => closed_at) %><abbr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @changeset.user.data_public? %>
|
<% if @changeset.user.data_public? %>
|
||||||
by <%= link_to h(@changeset.user.display_name), :controller => "user", :action => "view", :display_name => @changeset.user.display_name %>
|
by <%= link_to h(@changeset.user.display_name), :controller => "user", :action => "view", :display_name => @changeset.user.display_name %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render :partial => "tag_details", :object => @changeset %>
|
<%=
|
||||||
|
render :partial => "tag_details", :object => @changeset.tags.except('comment')
|
||||||
|
%>
|
||||||
|
|
||||||
<% unless @nodes.empty? %>
|
<% unless @nodes.empty? %>
|
||||||
<div class='browse-section clearfix paginate'>
|
<div class='browse-section paginate'>
|
||||||
<h4><%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %></h4>
|
<h4><%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<% @nodes.each do |node| %>
|
<% @nodes.each do |node| %>
|
||||||
|
@ -35,7 +47,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @ways.empty? %>
|
<% unless @ways.empty? %>
|
||||||
<div class='browse-section clearfix paginate'>
|
<div class='browse-section paginate'>
|
||||||
<h4><%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %></h4>
|
<h4><%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<% @ways.each do |way| %>
|
<% @ways.each do |way| %>
|
||||||
|
@ -47,7 +59,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% unless @relations.empty? %>
|
<% unless @relations.empty? %>
|
||||||
<div class='browse-section clearfix paginate'>
|
<div class='browse-section paginate'>
|
||||||
<h4><%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %></h4>
|
<h4><%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<% @relations.each do |relation| %>
|
<% @relations.each do |relation| %>
|
||||||
|
@ -58,7 +70,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class='browse-section secondary-actions clearfix'>
|
<div class='browse-section secondary-actions'>
|
||||||
<span><%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %>
|
<span><%= link_to(t('browse.changeset.changesetxml'), :controller => "changeset", :action => "read") %>
|
||||||
·
|
·
|
||||||
<%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %></span>
|
<%= link_to(t('browse.changeset.osmchangexml'), :controller => "changeset", :action => "download") %></span>
|
||||||
|
|
|
@ -15,5 +15,6 @@
|
||||||
|
|
||||||
<div class='secondary-actions clearfix'>
|
<div class='secondary-actions clearfix'>
|
||||||
<span><%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %>
|
<span><%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %>
|
||||||
|
·
|
||||||
<%= link_to(t('browse.way_history.view_details'), :action => "way") %></span>
|
<%= link_to(t('browse.way_history.view_details'), :action => "way") %></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,7 +13,15 @@
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<%= content_tag "li", :id => "changeset_#{changeset.id}", :data => {:changeset => changeset_data} do %>
|
<%= content_tag "li", :id => "changeset_#{changeset.id}", :data => {:changeset => changeset_data} do %>
|
||||||
#<%= link_to(changeset.id, changeset_path(changeset.id), :class => :changeset_id) %>
|
<p class="comment">
|
||||||
|
<a class="changeset_id" href="<%= changeset_path(changeset.id) %>">
|
||||||
|
<% if changeset.tags['comment'].to_s != '' %>
|
||||||
|
<%= linkify(h(changeset.tags['comment'])) %>
|
||||||
|
<% else %>
|
||||||
|
<%= t 'changeset.changeset.no_comment' %>
|
||||||
|
<% end %>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<span class='date'>
|
<span class='date'>
|
||||||
<% if changeset.closed_at > DateTime.now %>
|
<% if changeset.closed_at > DateTime.now %>
|
||||||
|
@ -25,7 +33,7 @@
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% unless params.key?(:display_name) %>
|
<% unless params.key?(:display_name) %>
|
||||||
<span class="user">
|
<span class="user"> by
|
||||||
<% if changeset.user.data_public? %>
|
<% if changeset.user.data_public? %>
|
||||||
<%= link_to changeset.user.display_name, user_path(changeset.user.display_name) %>
|
<%= link_to changeset.user.display_name, user_path(changeset.user.display_name) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -33,12 +41,4 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<p class="comment deemphasize">
|
|
||||||
<% if changeset.tags['comment'].to_s != '' %>
|
|
||||||
<%= linkify(h(changeset.tags['comment'])) %>
|
|
||||||
<% else %>
|
|
||||||
<%= t 'changeset.changeset.no_comment' %>
|
|
||||||
<% end %>
|
|
||||||
</p>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -133,6 +133,8 @@ en:
|
||||||
has_nodes: "Nodes (%{count})"
|
has_nodes: "Nodes (%{count})"
|
||||||
has_ways: "Ways (%{count})"
|
has_ways: "Ways (%{count})"
|
||||||
has_relations: "Relations (%{count})"
|
has_relations: "Relations (%{count})"
|
||||||
|
no_comment: "(no comment)"
|
||||||
|
ago: "%{ago} ago"
|
||||||
common_details:
|
common_details:
|
||||||
edited: "Edited"
|
edited: "Edited"
|
||||||
deleted: "Deleted"
|
deleted: "Deleted"
|
||||||
|
@ -297,7 +299,7 @@ en:
|
||||||
changeset:
|
changeset:
|
||||||
still_editing: "(still editing)"
|
still_editing: "(still editing)"
|
||||||
anonymous: "Anonymous"
|
anonymous: "Anonymous"
|
||||||
no_comment: "(none)"
|
no_comment: "(no comment)"
|
||||||
no_edits: "(no edits)"
|
no_edits: "(no edits)"
|
||||||
show_area_box: "show area box"
|
show_area_box: "show area box"
|
||||||
big_area: "(big)"
|
big_area: "(big)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue