1.Rss feed but no entry for clicking now. wait for design.

2.Unit link is now fixed.
This commit is contained in:
Matthew K. Fu JuYuan committed 2012-08-09 02:20:10 +08:00
1 parent 5fcc910723
commit 987e6fff2b
6 files changed
+46 -5

No files matched your search

@@ -3,8 +3,9 @@
<div class="info">
<div class="info1">
<span class="pull-right"><%= dislpay_view_count(@bulletin) %></span>
<span class="date"><%= display_date_time(@bulletin.postdate) %></span>
<span><%= link_to @bulletin.cache_dept[I18n.locale.to_s],panel_announcement_front_end_index_bulletins_by_unit_path(:name=>@bulletin.cache_dept[I18n.locale.to_s]) rescue nil %></span>
<span class="date"><%= display_date_time(@bulletin.postdate) %></span>
<% unit = @bulletin.cache_dept[I18n.locale.to_s] rescue nil %>
<span><%= link_to unit,panel_announcement_front_end_index_bulletins_by_unit_path(:name=>unit) unless unit.blank? %></span>
</div>
</div>
<div class="news_image">
@@ -0,0 +1,20 @@
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
if @current_category
xml.title @current_category.i18n_variable[I18n.locale]
else
xml.title t('announcement.announcement')
end
xml.link panel_announcement_front_end_bulletins_path(:rss)
xml.item do
xml.title @bulletin.title
xml.description @bulletin.text
xml.pubDate @bulletin.postdate.to_s(:rfc822)
xml.link panel_announcement_front_end_bulletin_path(@bulletin, :rss)
xml.guid panel_announcement_front_end_bulletin_path(@bulletin, :rss)
end
# end
end
end
@@ -166,6 +166,7 @@ class NewsBulletin
end
end
def enabled_for_lang(lang)
eval("self.available_for_#{lang}")
end
@@ -6,7 +6,7 @@
<span class="date"><%= display_date(@news_bulletin.postdate) %></span>
<% unit = @news_bulletin.unit_list_for_anc.title rescue nil %>
<%= " | " if unit %>
<%= link_to unit, panel_news_front_end_index_news_bulletins_by_unit_path(:name=>@news_bulletin.unit_list_for_anc_id)%>
<%= link_to unit, panel_news_front_end_index_news_bulletins_by_unit_path(:name=>@news_bulletin.unit_list_for_anc_id) unless unit.blank?%>
</div>
</div>
<div class="news_image">
@@ -0,0 +1,21 @@
xml.instruct! :xml, :version => "1.0"
xml.rss :version => "2.0" do
xml.channel do
if @current_category
xml.title @current_category.i18n_variable[I18n.locale]
else
xml.title t('news.campus_news')
end
xml.link panel_news_front_end_news_bulletins_path(:rss)
# for news_bulletin in @news_bulletins
xml.item do
xml.title @news_bulletin.title
xml.description @news_bulletin.text
xml.pubDate @news_bulletin.postdate.to_s(:rfc822)
xml.link panel_news_front_end_news_bulletin_path(@news_bulletin, :rss)
xml.guid panel_news_front_end_news_bulletin_path(@news_bulletin, :rss)
end
# end
end
end