1、公共贴吧邮件提醒

2、浏览器版本过低提醒(样式需要再调试)
dev_repository_hjq
huang 10 years ago
parent 0a43ab67ac
commit 525a6394ca

@ -125,7 +125,7 @@ class Mailer < ActionMailer::Base
end
# 公共讨论区发帖、回帖添加邮件发送信息
def forum_message_added(memo)
@memo = memo
redmine_headers 'Memo' => memo.id
@ -134,9 +134,11 @@ class Mailer < ActionMailer::Base
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
@issue_author_url = url_for(user_activities_url(@author))
recipients ||= []
if @forum.author.mail_notification != 'day' && @forum.author.mail_notification != 'week'
#将帖子创建者邮箱地址加入数组
if @forum.creator.mail_notification != 'day' && @forum.creator.mail_notification != 'week'
recipients << @forum.creator.mail
end
#回复人邮箱地址加入数组
if @author.mail_notification != 'day' && @author.mail_notification != 'week'
recipients << @author.mail
end

@ -42,7 +42,7 @@ class Memo < ActiveRecord::Base
"parent_id",
"replies_count"
after_create :add_author_as_watcher, :reset_counters! #, :sendmail#,:be_user_score -- 公共区发帖暂不计入得分
after_create :add_author_as_watcher, :reset_counters!, :sendmail
# after_update :update_memos_forum
after_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分
# after_create :send_notification

@ -0,0 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>升级浏览器</title>
<script src="jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js" type="text/javascript"></script>
<style type="text/css">
body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background: #F2F2F2; font-style:normal;}
.update{ position: fixed; border-bottom:1px solid #d7d7d7; color:#fea254; text-align:center; width:100%; font-size:10px; height:30px; background:#fdffd9; padding:2px 0;z-index:1000;}
a.green_btn{ padding:2px 10px; background:#3caf3f; font-size:12px;color:#fff;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.green_btn{ background:#289c2b;}
a.close_btn{ background:url(images/img_floatbox.png) -20px -35px no-repeat; display:block; width:16px; height:16px; float:right; margin:7px 5px 0 0;}
a:hover.close_btn{ background:url(images/img_floatbox.png) -20px -63px no-repeat;}
</style>
<script type="text/javascript">
function close_window(){
$('#light').slideUp(400);
}
if ((navigator.userAgent.indexOf('MSIE 8.0') >= 0) && (navigator.userAgent.indexOf('Opera') < 0))
{alert('你是使用IE')}else
if (navigator.userAgent.indexOf('Firefox') >= 0)
Document.html{
div class="update" id="light">
<p>您的浏览器版本过低,建议升级您的浏览器。
<a href="#" onClick="close_window();" class="close_btn" ></a>
</p>
<div class="cl"></div>
</div>
}
{alert('你是使用Firefox')}else
if (navigator.userAgent.indexOf('Opera') >= 0){alert('你是使用Opera')}else
{alert('你是使用其他的浏览器浏览网页!')}
</script>
</head>
<body style=" height:1500px;">
<div class="update" id="light">
<p>您的浏览器版本过低,建议升级您的浏览器。
<a href="#" onClick="close_window();" class="close_btn" ></a>
</p>
<div class="cl"></div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B

Loading…
Cancel
Save