diff --git a/app/assets/stylesheets/admin/announcements.css b/app/assets/stylesheets/admin/announcements.css index afad32d..2c22c38 100644 --- a/app/assets/stylesheets/admin/announcements.css +++ b/app/assets/stylesheets/admin/announcements.css @@ -2,3 +2,6 @@ Place all the styles related to the matching controller here. They will automatically be included in application.css. */ +.table .expired{ + color: #BE2E2E; +} \ No newline at end of file diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index 72562bd..4267639 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -60,6 +60,10 @@ class Bulletin mail = Email.find(self.email_id) rescue nil end + def expired? + (self.deadline < Time.now) rescue false + end + def destroy_email mail = Email.find(self.email_id) rescue nil mail.destroy if !mail.nil? diff --git a/app/views/admin/announcements/_index.html.erb b/app/views/admin/announcements/_index.html.erb index dd45318..c433d3b 100644 --- a/app/views/admin/announcements/_index.html.erb +++ b/app/views/admin/announcements/_index.html.erb @@ -13,10 +13,16 @@
<% @bulletins.each do |b| %>