Move browse#note to notes#show

This allows a more resourceful routing approach.
This commit is contained in:
Andy Allan 2023-01-25 21:46:35 +00:00
parent b5046fdcd0
commit 9748ce301c
22 changed files with 175 additions and 138 deletions

View file

@ -1,12 +1,12 @@
xml.wpt("lon" => note.lon, "lat" => note.lat) do
xml.time note.created_at.to_fs(:iso8601)
xml.name t("browse.note.title", :id => note.id)
xml.name t("notes.show.title", :id => note.id)
xml.desc do
xml.cdata! render(:partial => "description", :object => note, :formats => [:html])
end
xml.link("href" => browse_note_url(note, :only_path => false))
xml.link("href" => note_url(note, :only_path => false))
xml.extensions do
xml.id note.id

View file

@ -9,7 +9,7 @@ xml.item do
xml.title t("api.notes.rss.opened", :place => location)
end
xml.link browse_note_url(note)
xml.link note_url(note)
xml.guid api_note_url(note)
xml.description render(:partial => "description", :object => note, :formats => [:html])

View file

@ -15,8 +15,8 @@ xml.rss("version" => "2.0",
xml.item do
xml.title t("api.notes.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.link url_for(:controller => "/notes", :action => "show", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
xml.guid url_for(:controller => "/notes", :action => "show", :id => comment.note.id, :anchor => "c#{comment.id}", :only_path => false)
xml.description do
xml.cdata! render(:partial => "entry", :object => comment, :formats => [:html])

View file

@ -29,7 +29,7 @@
<%= image_tag("open_note_marker.png", :alt => "open", :size => "25x40") %>
<% end %>
</td>
<td><%= link_to note.id, browse_note_path(note) %></td>
<td><%= link_to note.id, note %></td>
<td><%= note_author(note.author) %></td>
<td><%= note.comments.first.body.to_html %></td>
<td><%= friendly_date_ago(note.created_at) %></td>

View file

@ -1,6 +1,6 @@
<% set_title(t("browse.note.new_note")) %>
<% set_title(t(".title")) %>
<%= render "sidebar_header", :title => t("browse.note.new_note") %>
<%= render "sidebar_header", :title => t(".title") %>
<div class="note">
<p class="alert alert-info"><%= t("javascripts.notes.new.intro") %></p>