]> source.dussan.org Git - redmine.git/commitdiff
Rails3: rename app/views/common/feed.atom.rxml to app/views/common/feed.atom.builder...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 4 Oct 2011 11:09:06 +0000 (11:09 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 4 Oct 2011 11:09:06 +0000 (11:09 +0000)
:rhtml and :rxml were finally removed as template handlers at Rails 3.1 RC4.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7575 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/common/feed.atom.builder [new file with mode: 0644]
app/views/common/feed.atom.rxml [deleted file]

diff --git a/app/views/common/feed.atom.builder b/app/views/common/feed.atom.builder
new file mode 100644 (file)
index 0000000..70dacc7
--- /dev/null
@@ -0,0 +1,31 @@
+xml.instruct!
+xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
+  xml.title   truncate_single_line(@title, :length => 100)
+  xml.link    "rel" => "self", "href" => url_for(params.merge(:only_path => false))
+  xml.link    "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
+  xml.id      url_for(:controller => 'welcome', :only_path => false)
+  xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
+  xml.author  { xml.name "#{Setting.app_title}" }
+  xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
+  @items.each do |item|
+    xml.entry do
+      url = url_for(item.event_url(:only_path => false))
+      if @project
+        xml.title truncate_single_line(item.event_title, :length => 100)
+      else
+        xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100)
+      end
+      xml.link "rel" => "alternate", "href" => url
+      xml.id url
+      xml.updated item.event_datetime.xmlschema
+      author = item.event_author if item.respond_to?(:event_author)
+      xml.author do
+        xml.name(author)
+        xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
+      end if author
+      xml.content "type" => "html" do
+        xml.text! textilizable(item, :event_description, :only_path => false)
+      end
+    end
+  end
+end
diff --git a/app/views/common/feed.atom.rxml b/app/views/common/feed.atom.rxml
deleted file mode 100644 (file)
index 70dacc7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-xml.instruct!
-xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
-  xml.title   truncate_single_line(@title, :length => 100)
-  xml.link    "rel" => "self", "href" => url_for(params.merge(:only_path => false))
-  xml.link    "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
-  xml.id      url_for(:controller => 'welcome', :only_path => false)
-  xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
-  xml.author  { xml.name "#{Setting.app_title}" }
-  xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
-  @items.each do |item|
-    xml.entry do
-      url = url_for(item.event_url(:only_path => false))
-      if @project
-        xml.title truncate_single_line(item.event_title, :length => 100)
-      else
-        xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100)
-      end
-      xml.link "rel" => "alternate", "href" => url
-      xml.id url
-      xml.updated item.event_datetime.xmlschema
-      author = item.event_author if item.respond_to?(:event_author)
-      xml.author do
-        xml.name(author)
-        xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
-      end if author
-      xml.content "type" => "html" do
-        xml.text! textilizable(item, :event_description, :only_path => false)
-      end
-    end
-  end
-end