Changes for nccu
This commit is contained in:
1 parent
5223a7a3e9
commit
6b2aeadde6
18 files changed
+999
-956
No files matched your search
+3
-1
@@ -17,7 +17,9 @@ class Panel::Announcement::FrontEnd::BulletinsController < ObitWidgetController
|
||||
@bulletins = Bulletin.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
end
|
||||
|
||||
get_categorys
|
||||
get_categorys
|
||||
|
||||
@current_category = BulletinCategory.from_id(params[:bulletin_category_id]) rescue nil
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
@@ -14,4 +14,8 @@ class BulletinCategory
|
||||
|
||||
has_many :bulletins
|
||||
|
||||
def self.from_id(id)
|
||||
BulletinCategory.find(id) rescue nil
|
||||
end
|
||||
|
||||
end
|
||||
vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb
Vendored
+5
-1
@@ -2,7 +2,11 @@
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<h1 class="h1"><%= t('announcement.list_announcement') %></h1>
|
||||
<% if @current_category %>
|
||||
<h1 class="h1"><%= @current_category.i18n_variable[I18n.locale] + t('announcement.bulletin.list_lower') %></h1>
|
||||
<% else %>
|
||||
<h1 class="h1"><%= t('announcement.list_announcement') %></h1>
|
||||
<% end %>
|
||||
|
||||
|
||||
<table class="table table-bordered">
|
||||
|
||||
Vendored
+1
-1
@@ -11,7 +11,7 @@
|
||||
<li>
|
||||
<div class="news_img"><%= image_tag(post.image.url, :size => "290x130") if post.image.file %></div>
|
||||
<h3 class="h3 news_title"><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %></h3>
|
||||
<p class="news_wrap"><%= post.subtitle[I18n.locale] %></p>
|
||||
<p class="news_wrap"><%= post.subtitle[I18n.locale].html_safe %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@ class Panel::WebResource::Widget::WebLinksController < ObitWidgetController
|
||||
|
||||
# @web_link = WebLink.where( :is_hidden => false ).desc(:is_top, :name).first
|
||||
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(9)
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(5)
|
||||
|
||||
# get_categorys
|
||||
|
||||
@@ -24,7 +24,7 @@ class Panel::WebResource::Widget::WebLinksController < ObitWidgetController
|
||||
end
|
||||
|
||||
def reload_web_links
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(9)
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(5)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user