Create traces feed resource

This commit is contained in:
Anton Khorev 2025-01-18 23:01:47 +03:00
parent 2626c763b5
commit f2a0f53cf5
10 changed files with 149 additions and 130 deletions

View file

@ -7,14 +7,14 @@ xml.rss("version" => "2.0",
xml.channel do
xml.title t(".title")
xml.description t(".title")
xml.link url_for(:controller => :traces, :action => :index, :only_path => false)
xml.link url_for(:controller => "/traces", :action => :index, :only_path => false)
xml.image do
xml.url image_url("mag_map-rss2.0.png")
xml.title t(".title")
xml.width 100
xml.height 100
xml.link url_for(:controller => :traces, :action => :index, :only_path => false)
xml.link url_for(:controller => "/traces", :action => :index, :only_path => false)
end
@traces.each do |trace|

View file

@ -16,8 +16,8 @@
<div class="d-flex flex-column flex-md-row-reverse align-items-md-end">
<div class="pb-1 ps-1 d-flex flex-wrap flex-shrink-0 gap-1 justify-content-end">
<%= link_to({ :action => :georss, :display_name => @target_user&.display_name, :tag => params[:tag] },
{ :class => "btn btn-secondary btn-sm" }) do %>
<%= link_to traces_feed_path(:display_name => @target_user&.display_name, :tag => params[:tag]),
:class => "btn btn-secondary btn-sm" do %>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" class="align-text-bottom">
<circle cx="2" cy="14" r="2" fill="white" />
<path d="M 8 14 a 6 6 0 0 0 -6 -6 M 14 14 a 12 12 0 0 0 -12 -12" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" />
@ -66,7 +66,7 @@
<% end %>
<% content_for :auto_discovery_link_tag do %>
<%= auto_discovery_link_tag :rss, :action => "georss", :display_name => @target_user&.display_name, :tag => params[:tag] %>
<%= auto_discovery_link_tag :rss, traces_feed_path(:display_name => @target_user&.display_name, :tag => params[:tag]) %>
<% end %>
<% if @traces.size > 0 %>