1.Rss feed but no entry for clicking now. wait for design.
2.Unit link is now fixed.
This commit is contained in:
parent
5fcc910723
commit
987e6fff2b
|
@ -186,7 +186,6 @@ GEM
|
|||
chinese_pinyin (>= 0.3.0)
|
||||
redis (>= 2.1.1)
|
||||
redis-namespace (~> 1.0.2)
|
||||
remotipart (1.0.2)
|
||||
resque (1.20.0)
|
||||
multi_json (~> 1.0)
|
||||
redis-namespace (~> 1.0.2)
|
||||
|
@ -333,7 +332,6 @@ DEPENDENCIES
|
|||
redis (>= 2.1.1)
|
||||
redis-namespace (~> 1.0.2)
|
||||
redis-search (= 0.7.1)
|
||||
remotipart
|
||||
resque
|
||||
resque-restriction
|
||||
resque-scheduler
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<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>
|
||||
<% 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">
|
||||
|
|
21
vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/show.rss.builder
vendored
Normal file
21
vendor/built_in_modules/news/app/views/panel/news/front_end/news_bulletins/show.rss.builder
vendored
Normal file
|
@ -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
|
Reference in New Issue