Mercurial > hg > soundsoftware-site
annotate app/views/common/feed.atom.builder @ 1628:9c5f8e24dadc live tip
Quieten this cron script
author | Chris Cannam |
---|---|
date | Tue, 25 Aug 2020 11:38:49 +0100 |
parents | dffacf8a6908 |
children |
rev | line source |
---|---|
Chris@909 | 1 xml.instruct! |
Chris@909 | 2 xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do |
Chris@1517 | 3 xml.title truncate_single_line_raw(@title, 100) |
Chris@909 | 4 xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false)) |
Chris@909 | 5 xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil)) |
Chris@909 | 6 xml.id url_for(:controller => 'welcome', :only_path => false) |
Chris@1517 | 7 xml.icon favicon_url |
Chris@909 | 8 xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema) |
Chris@909 | 9 xml.author { xml.name "#{Setting.app_title}" } |
Chris@909 | 10 xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; } |
Chris@909 | 11 @items.each do |item| |
Chris@909 | 12 xml.entry do |
Chris@909 | 13 url = url_for(item.event_url(:only_path => false)) |
Chris@909 | 14 if @project |
Chris@1517 | 15 xml.title truncate_single_line_raw(item.event_title, 100) |
Chris@909 | 16 else |
Chris@1517 | 17 xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100) |
Chris@909 | 18 end |
Chris@909 | 19 xml.link "rel" => "alternate", "href" => url |
Chris@909 | 20 xml.id url |
Chris@909 | 21 xml.updated item.event_datetime.xmlschema |
Chris@909 | 22 author = item.event_author if item.respond_to?(:event_author) |
Chris@909 | 23 xml.author do |
Chris@909 | 24 xml.name(author) |
Chris@909 | 25 xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail |
Chris@909 | 26 end if author |
Chris@909 | 27 xml.content "type" => "html" do |
Chris@909 | 28 xml.text! textilizable(item, :event_description, :only_path => false) |
Chris@909 | 29 end |
Chris@909 | 30 end |
Chris@909 | 31 end |
Chris@909 | 32 end |