Fix typo and title in news and announcement frontend
This commit is contained in:
parent
5f88408dcb
commit
73b2cd1035
|
@ -9,6 +9,7 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
|||
# GET /bulletins.xml
|
||||
|
||||
def index
|
||||
@page = Page.find(params[:page_id])
|
||||
if !params[:search_query].blank?
|
||||
search_cond = {:is_checked=>true,:is_hidden=>false,:is_pending => false}
|
||||
search_cond.merge!({:bulletin_category_id => "#{params[:category_id]}" }) if !params[:category_id].blank?
|
||||
|
@ -39,6 +40,7 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
|||
end
|
||||
|
||||
def show
|
||||
@page = Page.find(params[:page_id])
|
||||
if params[:preview] == "true"
|
||||
preview_content
|
||||
else
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
|
||||
<%= flash_messages %>
|
||||
|
||||
<% if @current_category %>
|
||||
<h1 class="h1"><%= @current_category.title %></h1>
|
||||
<% else %>
|
||||
<h1 class="h1"><%= t('announcement.announcement') %></h1>
|
||||
<% end %>
|
||||
<h1 class="h1"><%= @page.title %></h1>
|
||||
|
||||
|
||||
<table class="table table-bordered">
|
||||
|
|
|
@ -9,6 +9,7 @@ class Panel::News::FrontEnd::NewsBulletinsController < OrbitWidgetController
|
|||
# GET /news_bulletins.xml
|
||||
|
||||
def index
|
||||
@page = Page.find(params[:page_id])
|
||||
if !params[:search_query].blank?
|
||||
search_cond = {:is_checked=>true,:is_hidden=>false,:is_pending=>false,:is_pending=>false}
|
||||
search_cond.merge!({:news_bulletin_category_id => "#{params[:category_id]}" }) if !params[:category_id].blank?
|
||||
|
@ -23,14 +24,14 @@ class Panel::News::FrontEnd::NewsBulletinsController < OrbitWidgetController
|
|||
@news_bulletins = @tag.news_bulletins.available_for_lang(I18n.locale).can_display.where(:news_bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(15)
|
||||
@current_category = NewsBulletinCategory.from_id(params[:category_id]) rescue nil
|
||||
elsif !params[:category_id].blank?
|
||||
@news_bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:news_bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(15)
|
||||
@news_bulletins = NewsBulletin.all.available_for_lang(I18n.locale).can_display.where(:news_bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(15)
|
||||
@current_category = NewsBulletinCategory.from_id(params[:category_id]) rescue nil
|
||||
elsif !params[:tag_id].blank?
|
||||
@tag = NewsTag.find(params[:tag_id]) rescue nil
|
||||
@tag = NewsTag.where(key: params[:tag_id])[0] unless @tag
|
||||
@news_bulletins = @tag.news_bulletins.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(15)
|
||||
else
|
||||
@news_bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(15)
|
||||
@news_bulletins = NewsBulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page_main]).per(15)
|
||||
end
|
||||
impressionist(@tag) if @tag
|
||||
end
|
||||
|
@ -40,6 +41,7 @@ class Panel::News::FrontEnd::NewsBulletinsController < OrbitWidgetController
|
|||
if params[:preview] == "true"
|
||||
preview_content
|
||||
else
|
||||
''
|
||||
@news_bulletin = NewsBulletin.all.available_for_lang(I18n.locale).can_display.where(_id: params[:id]).first
|
||||
unless @news_bulletin.disable?
|
||||
impressionist(@news_bulletin)
|
||||
|
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
<%= flash_messages %>
|
||||
|
||||
<% if @current_category %>
|
||||
<h1 class="h1"><%= @current_category.title %></h1>
|
||||
<% else %>
|
||||
<h1 class="h1"><%= t('news.news') %></h1>
|
||||
<% end %>
|
||||
<% if @news_bulletins.blank? and !params[:search_query].blank? %>
|
||||
<h1 class="h1"><%= @page.title %></h1>
|
||||
|
||||
<% if @news_bulletins.blank? and !params[:search_query].blank? %>
|
||||
<%=render :partial => 'shared/search_not_found' %>
|
||||
<% elsif !params[:search_query].blank? %>
|
||||
<% elsif !params[:search_query].blank? %>
|
||||
<%= t("search.result_get",:search_word => params[:search_query],:item_num=>@news_bulletins.count) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue