fix new ui announcement widget_style "bulletins_and_web_links"
This commit is contained in:
parent
a85de4ae00
commit
304bf0d445
|
@ -98,9 +98,17 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController
|
|||
|
||||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:tagged_ids => @selected_tag.id.to_s, :is_hidden => false).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc(:is_top, :postdate).page(params[:page]).per(@page_num) rescue nil
|
||||
|
||||
if @part.widget_style == 'bulletins_and_web_links'
|
||||
if @part.widget_style == 'bulletins_and_links'
|
||||
@ModuleApp_w = ModuleApp.first(:conditions => {:key=>'web_resource'})
|
||||
@link_selected_tag = Tag.first(:conditions => {:name => @selected_tag.name, :module_tag_id => @ModuleApp_w.id})
|
||||
|
||||
@link_module_tag = ModuleTag.first(:conditions => {:name => @selected_tag.name, :module_app_id => @ModuleApp_w.id})
|
||||
|
||||
if !@link_module_tag.blank?
|
||||
@link_selected_tag = Tag.first(:conditions => {:name => @selected_tag.name, :tag_lease_id => @link_module_tag.id})
|
||||
else
|
||||
@link_selected_tag = @link_module_tag
|
||||
end
|
||||
|
||||
@web_links = WebLink.where(:tagged_ids => @link_selected_tag.id.to_s, :is_hidden => false).desc(:is_top,:created_at).available_for_lang(I18n.locale).page(params[:page]).per(@page_num) rescue nil
|
||||
end
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<% if @part.widget_style == 'bulletins_and_web_links' %>
|
||||
<% if @part.widget_style == 'bulletins_and_links' %>
|
||||
|
||||
<div class="links_block">
|
||||
<h3 class="links_title"><%= t(:related_links) %></h3>
|
||||
|
|
Reference in New Issue