Merge branch 'master' into messages
This commit is contained in:
commit
5e407dfb34
193 changed files with 3218 additions and 1547 deletions
|
@ -127,7 +127,7 @@
|
|||
<% end %>
|
||||
<%=
|
||||
user = (@prev_by_user || @next_by_user).user.display_name
|
||||
link_to content_tag(:bdi, user), :controller => "changeset", :action => "list", :display_name => user
|
||||
link_to content_tag(:bdi, user), :controller => "changeset", :action => "index", :display_name => user
|
||||
%>
|
||||
<% if @next_by_user %>
|
||||
·
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<%= content_tag "li", :id => "changeset_#{changeset.id}", :data => {:changeset => changeset_data} do %>
|
||||
<h4>
|
||||
<a class="changeset_id" href="<%= changeset_path(changeset.id) %>">
|
||||
<a class="changeset_id" href="<%= changeset_path(changeset) %>">
|
||||
<%= changeset.tags['comment'].to_s.presence || t('browse.no_comment') %>
|
||||
</a>
|
||||
</h4>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<% end -%>
|
||||
|
||||
<%
|
||||
set_title(changeset_list_title(params, current_user))
|
||||
set_title(changeset_index_title(params, current_user))
|
||||
if params[:display_name]
|
||||
@heading = t('changeset.list.title_user', :user => link_to(params[:display_name], :controller => "user", :action => "view", :display_name => params[:display_name])).html_safe
|
||||
@heading = t('changeset.index.title_user', :user => link_to(params[:display_name], user_path(:display_name => params[:display_name]))).html_safe
|
||||
else
|
||||
@heading = @title
|
||||
end
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
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)),
|
||||
:root_url => url_for(@params.merge(:action => :index, :format => nil, :only_path => false)),
|
||||
"xmlns:georss" => "http://www.georss.org/georss") do |feed|
|
||||
feed.title changeset_list_title(params, current_user)
|
||||
feed.title changeset_index_title(params, current_user)
|
||||
|
||||
feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max
|
||||
feed.icon image_url("favicon.ico")
|
||||
|
@ -32,7 +32,7 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
|
|||
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 user_url(changeset.user, :only_path => false)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -51,7 +51,7 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
|
|||
table.tr do |tr|
|
||||
tr.th t("browse.changeset.belongs_to")
|
||||
tr.td do |td|
|
||||
td.a h(changeset.user.display_name), :href => url_for(:controller => "user", :action => "view", :display_name => changeset.user.display_name, :only_path => false)
|
||||
td.a h(changeset.user.display_name), :href => user_url(changeset.user, :only_path => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -59,10 +59,10 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
|
|||
table.tr do |tr|
|
||||
tr.th t("browse.tag_details.tags")
|
||||
tr.td do |td|
|
||||
td.table :cellpadding => "0" do |table|
|
||||
td.table :cellpadding => "0" do |tag_table|
|
||||
changeset.tags.sort.each do |tag|
|
||||
table.tr do |tr|
|
||||
tr.td << "#{h(tag[0])} = #{linkify(h(tag[1]))}"
|
||||
tag_table.tr do |tag_tr|
|
||||
tag_tr.td << "#{h(tag[0])} = #{linkify(h(tag[1]))}"
|
||||
end
|
||||
end
|
||||
end
|
|
@ -4,10 +4,10 @@
|
|||
<%= user_thumbnail diary_entry.user %>
|
||||
<% end %>
|
||||
|
||||
<h2><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></h2>
|
||||
<h2><%= link_to h(diary_entry.title), diary_entry_path(diary_entry.user, diary_entry) %></h2>
|
||||
|
||||
<small class='deemphasize'>
|
||||
<%= raw(t '.posted_by', :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %>
|
||||
<%= raw(t '.posted_by', :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'index', :display_name => nil, :language => diary_entry.language_code)) %>
|
||||
</small>
|
||||
|
||||
</div>
|
||||
|
@ -21,10 +21,10 @@
|
|||
<% end %>
|
||||
|
||||
<ul class='secondary-actions clearfix'>
|
||||
<% if params[:action] == 'list' %>
|
||||
<li><%= link_to t('.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %></li>
|
||||
<% if params[:action] == 'index' %>
|
||||
<li><%= link_to t('.comment_link'), diary_entry_path(diary_entry.user, diary_entry, :anchor => 'newcomment') %></li>
|
||||
<li><%= link_to t('.reply_link'), new_message_path(diary_entry.user, :message => { :title => "Re: #{diary_entry.title}" }) %></li>
|
||||
<li><%= link_to t('.comment_count', :count => diary_entry.visible_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %></li>
|
||||
<li><%= link_to t('.comment_count', :count => diary_entry.visible_comments.count), diary_entry_path(diary_entry.user, diary_entry, :anchor => 'comments') %></li>
|
||||
<% end %>
|
||||
|
||||
<% if current_user && current_user == diary_entry.user %>
|
||||
|
|
1
app/views/diary_entry/_diary_index_entry.html.erb
Normal file
1
app/views/diary_entry/_diary_index_entry.html.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= render :partial => "diary_entry", :object => diary_index_entry %>
|
|
@ -1 +0,0 @@
|
|||
<%= render :partial => "diary_entry", :object => diary_list_entry %>
|
|
@ -11,7 +11,7 @@
|
|||
<% @comments.each do |comment| -%>
|
||||
<% cl = cycle('table0', 'table1') %>
|
||||
<tr class="<%= cl %>">
|
||||
<td width="25%"><%= link_to comment.diary_entry.title, :action => :view, :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id %></td>
|
||||
<td width="25%"><%= link_to comment.diary_entry.title, diary_entry_path(comment.diary_entry.user, comment.diary_entry) %></td>
|
||||
<td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= t '.ago', :ago => time_ago_in_words(comment.created_at) %></span></td>
|
||||
<td width="50%" class="richtext"><%= comment.body.to_html %></td>
|
||||
</tr>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<% if @user %>
|
||||
<%= render :partial => 'diary_entry', :collection => @entries %>
|
||||
<% else %>
|
||||
<%= render :partial => 'diary_list_entry', :collection => @entries %>
|
||||
<%= render :partial => 'diary_index_entry', :collection => @entries %>
|
||||
<% end %>
|
||||
|
||||
<div class="pagination">
|
|
@ -7,24 +7,24 @@ xml.rss("version" => "2.0",
|
|||
xml.channel do
|
||||
xml.title @title
|
||||
xml.description @description
|
||||
xml.link url_for(:action => "list", :only_path => false)
|
||||
xml.link url_for(:action => "index", :only_path => false)
|
||||
xml.image do
|
||||
xml.url image_url("mag_map-rss2.0.png")
|
||||
xml.title @title
|
||||
xml.width "100"
|
||||
xml.height "100"
|
||||
xml.link url_for(:action => "list", :only_path => false)
|
||||
xml.link url_for(:action => "index", :only_path => false)
|
||||
end
|
||||
|
||||
@entries.each do |entry|
|
||||
xml.item do
|
||||
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.link diary_entry_url(entry.user, entry, :only_path => false)
|
||||
xml.guid diary_entry_url(entry.user, entry, :only_path => false)
|
||||
xml.description entry.body.to_html
|
||||
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", :only_path => false)
|
||||
xml.comments diary_entry_url(entry.user, entry, :anchor => "comments", :only_path => false)
|
||||
|
||||
if entry.latitude && entry.longitude
|
||||
xml.geo :lat, entry.latitude.to_s
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% content_for :heading do %>
|
||||
<div id="userinformation" >
|
||||
<%= user_image @entry.user %>
|
||||
<h2><%= link_to t('.user_title', :user => h(@entry.user.display_name)), :action => :list %></h2>
|
||||
<h2><%= link_to t('.user_title', :user => h(@entry.user.display_name)), :action => :index %></h2>
|
||||
<p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p>
|
||||
</div>
|
||||
<% end %>
|
|
@ -2,9 +2,9 @@
|
|||
<% comments.each do |comment| %>
|
||||
<div class="comment">
|
||||
<div style="float:left">
|
||||
<%= link_to user_thumbnail(comment.user), user_path(comment.user.display_name) %>
|
||||
<%= link_to user_thumbnail(comment.user), user_path(comment.user) %>
|
||||
</div>
|
||||
<b> <%= link_to comment.user.display_name, user_path(comment.user.display_name) %> </b> <br/>
|
||||
<b> <%= link_to comment.user.display_name, user_path(comment.user) %> </b> <br/>
|
||||
<%= comment.body %>
|
||||
</div>
|
||||
<span class="deemphasize">
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<% reports.each do |report| %>
|
||||
<div class="report">
|
||||
<div style="float:left">
|
||||
<%= link_to user_thumbnail(report.user), user_path(report.user.display_name) %>
|
||||
<%= link_to user_thumbnail(report.user), user_path(report.user) %>
|
||||
</div>
|
||||
<%= t ".reported_by_html", :category => report.category, :user => link_to(report.user.display_name, user_path(report.user.display_name)) %>
|
||||
<%= t ".reported_by_html", :category => report.category, :user => link_to(report.user.display_name, user_path(report.user)) %>
|
||||
<br/>
|
||||
<span class="deemphasize">
|
||||
<%= t(".updated_at", :datetime => l(report.updated_at.to_datetime, :format => :friendly)) %>
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
<td><%= t ".states.#{issue.status}" %></td>
|
||||
<td><%= link_to t(".reports_count", :count => issue.reports_count), issue %></td>
|
||||
<td><%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %></td>
|
||||
<td><%= link_to issue.reported_user.display_name, user_path(issue.reported_user.display_name) if issue.reported_user %></td>
|
||||
<td><%= link_to issue.reported_user.display_name, user_path(issue.reported_user) if issue.reported_user %></td>
|
||||
<td>
|
||||
<% if issue.user_updated %>
|
||||
<%= t ".last_updated_time_user_html", :user => link_to(issue.user_updated.display_name, user_path(issue.user_updated.display_name)),
|
||||
<%= t ".last_updated_time_user_html", :user => link_to(issue.user_updated.display_name, user_path(issue.user_updated)),
|
||||
:time => distance_of_time_in_words_to_now(issue.updated_at),
|
||||
:title => l(issue.updated_at) %>
|
||||
<% else %>
|
||||
|
|
|
@ -82,14 +82,14 @@
|
|||
<li>
|
||||
<%= link_to inbox_messages_path do %>
|
||||
<span class='count-number'><%= number_with_delimiter(current_user.new_messages.size) %></span>
|
||||
<%= t('user.view.my messages') %>
|
||||
<%= t('user.show.my messages') %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to t('user.view.my profile'), user_path(:display_name => current_user.display_name) %>
|
||||
<%= link_to t('user.show.my profile'), user_path(current_user) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => current_user.display_name %>
|
||||
<%= link_to t('user.show.my settings'), :controller => 'user', :action => 'account', :display_name => current_user.display_name %>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
|
|
|
@ -43,9 +43,8 @@
|
|||
<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',
|
||||
<p><%= t 'layouts.hosting_partners_html',
|
||||
:ucl => link_to(t('layouts.partners_ucl'), "https://www.ucl.ac.uk"),
|
||||
:ic => link_to(t('layouts.partners_ic'), "https://www.imperial.ac.uk/"),
|
||||
:bytemark => link_to(t('layouts.partners_bytemark'), "https://www.bytemark.co.uk"),
|
||||
:partners => link_to(t('layouts.partners_partners'), "https://hardware.openstreetmap.org/thanks/") %>
|
||||
</p>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<h1><%= t ".title" %></h1>
|
||||
<% end %>
|
||||
|
||||
<p><%= raw t(".request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, :controller => :user, :action => :view, :display_name => current_user.display_name)) %></p>
|
||||
<p><%= raw t(".request_access", :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(current_user.display_name, user_path(current_user))) %></p>
|
||||
|
||||
<%= form_tag authorize_url do %>
|
||||
<%= hidden_field_tag "oauth_token", @token.token %>
|
||||
|
|
|
@ -32,9 +32,8 @@
|
|||
|
||||
<div class='section' id='partners'>
|
||||
<h2><div class='icon partners'></div><%= t ".partners_title" %></h2>
|
||||
<p><%= t 'layouts.partners_html',
|
||||
<p><%= t 'layouts.hosting_partners_html',
|
||||
:ucl => link_to(t('layouts.partners_ucl'), "https://www.ucl.ac.uk"),
|
||||
:ic => link_to(t('layouts.partners_ic'), "https://www.imperial.ac.uk/"),
|
||||
:bytemark => link_to(t('layouts.partners_bytemark'), "https://www.bytemark.co.uk"),
|
||||
:partners => link_to(t('layouts.partners_partners'), "https://hardware.openstreetmap.org/thanks/") %>
|
||||
</p>
|
||||
|
|
|
@ -21,8 +21,8 @@ xml.rss("version" => "2.0",
|
|||
xml.item do
|
||||
xml.title trace.name
|
||||
|
||||
xml.link url_for(:controller => :traces, :action => :view, :id => trace.id, :display_name => trace.user.display_name, :only_path => false)
|
||||
xml.guid url_for(:controller => :traces, :action => :view, :id => trace.id, :display_name => trace.user.display_name, :only_path => false)
|
||||
xml.link url_for(:controller => :traces, :action => :show, :id => trace.id, :display_name => trace.user.display_name, :only_path => false)
|
||||
xml.guid url_for(:controller => :traces, :action => :show, :id => trace.id, :display_name => trace.user.display_name, :only_path => false)
|
||||
|
||||
xml.description do
|
||||
xml.cdata! render(:partial => "description", :object => trace, :formats => [:html])
|
||||
|
|
|
@ -14,16 +14,16 @@
|
|||
<% if @user.home_lon and @user.home_lat and contact.home_lon and contact.home_lat %>
|
||||
<% distance = @user.distance(contact) %>
|
||||
<% if distance < 1 %>
|
||||
(<%= t 'user.view.m away', :count => (distance * 1000).round %>)
|
||||
(<%= t 'user.show.m away', :count => (distance * 1000).round %>)
|
||||
<% else %>
|
||||
(<%= t 'user.view.km away', :count => distance.round %>)
|
||||
(<%= t 'user.show.km away', :count => distance.round %>)
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
<% changeset = contact.changesets.first %>
|
||||
<% if changeset %>
|
||||
<%= t('user.view.latest edit', :ago => t('user.view.ago', :time_in_words_ago => time_ago_in_words(changeset.created_at))) %>
|
||||
<%= t('user.show.latest edit', :ago => t('user.show.ago', :time_in_words_ago => time_ago_in_words(changeset.created_at))) %>
|
||||
<% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('browse.no_comment') %>
|
||||
"<%= link_to(comment,
|
||||
{:controller => 'browse', :action => 'changeset', :id => changeset.id},
|
||||
|
@ -35,12 +35,12 @@
|
|||
</p>
|
||||
|
||||
<ul class='secondary-actions clearfix deemphasize'>
|
||||
<li><%= link_to t('user.view.send message'), new_message_path(contact) %></li>
|
||||
<li><%= link_to t('user.show.send message'), new_message_path(contact) %></li>
|
||||
<li>
|
||||
<% if current_user.is_friends_with?(contact) %>
|
||||
<%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %>
|
||||
<%= link_to t('user.show.remove as friend'), remove_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %>
|
||||
<% else %>
|
||||
<%= link_to t('user.view.add as friend'), make_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %>
|
||||
<%= link_to t('user.show.add as friend'), make_friend_path(:display_name => contact.display_name, :referer => request.fullpath), :method => :post %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<td>
|
||||
<p>
|
||||
<% if user.creation_ip %>
|
||||
<%= raw t 'user.list.summary',
|
||||
:name => link_to(h(user.display_name), :action => "view", :display_name => user.display_name),
|
||||
<%= raw t 'user.index.summary',
|
||||
:name => link_to(h(user.display_name), user_path(user)),
|
||||
:ip_address => link_to(user.creation_ip, :ip => user.creation_ip),
|
||||
:date => l(user.creation_time, :format => :friendly)
|
||||
%>
|
||||
<% else %>
|
||||
<%= raw t 'user.list.summary_no_ip',
|
||||
:name => link_to(h(user.display_name), :action => "view", :display_name => user.display_name),
|
||||
<%= raw t 'user.index.summary_no_ip',
|
||||
:name => link_to(h(user.display_name), user_path(user)),
|
||||
:date => l(user.creation_time, :format => :friendly)
|
||||
%>
|
||||
<% end %>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<h1><%= t '.my settings' %></h1>
|
||||
<ul class='secondary-actions clearfix'>
|
||||
<li><%= link_to t('.return to profile'), user_path(current_user) %></li>
|
||||
<li><%= link_to t('user.view.oauth settings'), :controller => 'oauth_clients', :action => 'index' %></li>
|
||||
<li><%= link_to t('user.show.oauth settings'), :controller => 'oauth_clients', :action => 'index' %></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<!-- Displaying user's own profile page to themself -->
|
||||
<ul class='secondary-actions clearfix'>
|
||||
<li>
|
||||
<%= link_to t('.my edits'), :controller => 'changeset', :action => 'list', :display_name => current_user.display_name %>
|
||||
<%= link_to t('.my edits'), :controller => 'changeset', :action => 'index', :display_name => current_user.display_name %>
|
||||
<span class='count-number'><%= number_with_delimiter(current_user.changesets.size) %></span>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<span class='count-number'><%= number_with_delimiter(current_user.traces.size) %></span>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to t('.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => current_user.display_name %>
|
||||
<%= link_to t('.my diary'), :controller => 'diary_entry', :action => 'index', :display_name => current_user.display_name %>
|
||||
<span class='count-number'><%= number_with_delimiter(current_user.diary_entries.size) %></span>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<ul class='secondary-actions clearfix'>
|
||||
|
||||
<li>
|
||||
<%= link_to t('.edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
|
||||
<%= link_to t('.edits'), :controller => 'changeset', :action => 'index', :display_name => @user.display_name %>
|
||||
<span class='count-number'><%= number_with_delimiter(@user.changesets.size) %></span>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -66,7 +66,7 @@
|
|||
<%= link_to t('.send message'), new_message_path(@user) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to t('.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
|
||||
<%= link_to t('.diary'), :controller => 'diary_entry', :action => 'index', :display_name => @user.display_name %>
|
||||
<span class='count-number'><%= number_with_delimiter(@user.diary_entries.size) %></span>
|
||||
</li>
|
||||
<li>
|
Loading…
Add table
Add a link
Reference in a new issue