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 2012-08-09 02:20:10 +08:00 committed by Christophe Vilayphiou
parent e256440678
commit 1e7bc9aadd
5 changed files with 45 additions and 5 deletions

View File

@ -186,7 +186,6 @@ GEM
chinese_pinyin (>= 0.3.0) chinese_pinyin (>= 0.3.0)
redis (>= 2.1.1) redis (>= 2.1.1)
redis-namespace (~> 1.0.2) redis-namespace (~> 1.0.2)
remotipart (1.0.2)
resque (1.20.0) resque (1.20.0)
multi_json (~> 1.0) multi_json (~> 1.0)
redis-namespace (~> 1.0.2) redis-namespace (~> 1.0.2)
@ -333,7 +332,6 @@ DEPENDENCIES
redis (>= 2.1.1) redis (>= 2.1.1)
redis-namespace (~> 1.0.2) redis-namespace (~> 1.0.2)
redis-search (= 0.7.1) redis-search (= 0.7.1)
remotipart
resque resque
resque-restriction resque-restriction
resque-scheduler resque-scheduler

View File

@ -3,8 +3,9 @@
<div class="info"> <div class="info">
<div class="info1"> <div class="info1">
<span class="pull-right"><%= dislpay_view_count(@bulletin) %></span> <span class="pull-right"><%= dislpay_view_count(@bulletin) %></span>
<span class="date"><%= display_date_time(@bulletin.postdate) %></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> </div>
<div class="news_image"> <div class="news_image">

View File

@ -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

View File

@ -6,7 +6,7 @@
<span class="date"><%= display_date(@news_bulletin.postdate) %></span> <span class="date"><%= display_date(@news_bulletin.postdate) %></span>
<% unit = @news_bulletin.unit_list_for_anc.title rescue nil %> <% unit = @news_bulletin.unit_list_for_anc.title rescue nil %>
<%= " | " if unit %> <%= " | " 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> </div>
<div class="news_image"> <div class="news_image">

View 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