Include user title in email notifications

This commit is contained in:
Robin Ward 2015-03-23 14:12:11 -04:00
parent 5bf7f3f4b5
commit 8513045381
3 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,7 @@ require_dependency 'configurable_urls'
require_dependency 'mobile_detection' require_dependency 'mobile_detection'
require_dependency 'category_badge' require_dependency 'category_badge'
require_dependency 'global_path' require_dependency 'global_path'
require_dependency 'canonical_url'
module ApplicationHelper module ApplicationHelper
include CurrentUser include CurrentUser

View File

@ -5,7 +5,11 @@
<img src="<%= post.user.small_avatar_url%>" title="<%= post.user.username%>"> <img src="<%= post.user.small_avatar_url%>" title="<%= post.user.username%>">
</td> </td>
<td> <td>
<a class="username" href="<%=Discourse.base_url%>/users/<%= post.user.username_lower%>" target="_blank"><%= post.user.username %></a><br> <a class="username" href="<%=Discourse.base_url%>/users/<%= post.user.username_lower%>" target="_blank"><%= post.user.username %></a>
<%- if post.user.title.present? %>
<span class='user-title'><%= post.user.title %></span>
<% end %>
<br>
<span class='notification-date'><%= l post.created_at, format: :short_no_year %></span> <span class='notification-date'><%= l post.created_at, format: :short_no_year %></span>
</td> </td>
</tr> </tr>

View File

@ -75,6 +75,7 @@ module Email
style('.previous-discussion', 'font-size: 17px; color: #444;') style('.previous-discussion', 'font-size: 17px; color: #444;')
style('.notification-date', "text-align:right;color:#999999;padding-right:5px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px") style('.notification-date', "text-align:right;color:#999999;padding-right:5px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;font-size:11px")
style('.username', "font-size:13px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;color:#3b5998;text-decoration:none;font-weight:bold") style('.username', "font-size:13px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;color:#3b5998;text-decoration:none;font-weight:bold")
style('.user-title', "font-size:13px;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;text-decoration:none;font-weight:bold;margin-left:7px;")
style('.post-wrapper', "margin-bottom:25px;") style('.post-wrapper', "margin-bottom:25px;")
style('.user-avatar', 'vertical-align:top;width:55px;') style('.user-avatar', 'vertical-align:top;width:55px;')
style('.user-avatar img', nil, width: '45', height: '45') style('.user-avatar img', nil, width: '45', height: '45')