Fix for link in nccu widget

This commit is contained in:
Christophe Vilayphiou 2012-08-13 11:34:14 +08:00
parent 92fc0c8c26
commit c2f3f45196
2 changed files with 3 additions and 1 deletions

View File

@ -49,6 +49,8 @@ class PagesController < ApplicationController
def show_from_link
url = "/#{@item.path}?id=#{params[:id]}"
options = ''
options << "#{options.blank? ? '?' : '&'}category_id=#{params[:category_id]}" unless params[:category_id].blank?
options << "#{options.blank? ? '?' : '&'}tag_id=#{params[:tag_id]}" unless params[:tag_id].blank?
options << "&preview=#{params[:preview]}" unless params[:preview].blank?
redirect_to(url + options) unless save_from_no_lang_for_page
end

View File

@ -1,6 +1,6 @@
<% @bulletins.each do |bulletin| %>
<li>
<%= link_to bulletin.title, panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category_id ,:tag_id=>bulletin.tags.first.id ) %>
<%= link_to bulletin.title, panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category_id , :tag_id => @selected_tag.id ) %>
</li>
<% end %>