This commit is contained in:
bohung committed 2021-09-01 17:51:22 +08:00
1 parent de7b095c67
commit faedbd4a11
3 files changed
+7 -6

No files matched your search

+3 -3
View File
@@ -44,7 +44,7 @@ class AnnouncementsController < ApplicationController
"source-site-link" => "",
"subtitle" => a.subtitle,
"statuses" => statuses,
"category" => a.category.title,
"category" => (a.category.title rescue ""),
"postdate" => a.postdate,
"author" => author,
"is_top" => (a.is_top? ? 1 : 0),
@@ -575,7 +575,7 @@ class AnnouncementsController < ApplicationController
end
end
return {} if announcement.category.disable
return {} if (announcement.category.disable rescue false)
tags = announcement.tags.map{|tag| {
"tag" => tag.name ,
@@ -788,7 +788,7 @@ class AnnouncementsController < ApplicationController
"source-site-link" => "",
"subtitle" => a.subtitle,
"statuses" => statuses,
"category" => a.category.title,
"category" => (a.category.title rescue ""),
"postdate" => a.postdate,
"author" => author,
"is_top" => (a.is_top? ? 1 : 0),
+2 -1
View File
@@ -65,7 +65,8 @@ class Bulletin
field :open_comment, :type => Boolean, :default => false
field :comment_end_time, :type => DateTime
field :comment_role, :type => Array, :default => []
field :enable_sub_annc, :type => Boolean, :default => false
field :sub_annc_list, :type => Array, :default => []
mount_uploader :image, ImageUploader
has_many :bulletin_links, :autosave => true, :dependent => :destroy
+2 -2
View File
@@ -169,7 +169,7 @@
<div class="annc-comments-nickname">by <%= comment.account %></div>
<br>
</div>
<% end %>
<% end rescue nil %>
<% if action_data['show_comment_flag'] %>
<div class="annc-comment-div">
<div data-ph="<%= t('announcement.comment') %>" contenteditable="true" class="announcement-comment"></div>
@@ -177,4 +177,4 @@
<%= t('announcement.send_comment') %>
</button>
</div>
<% end %>
<% end rescue nil %>