Skip to content

Commit

Permalink
Include user title in email notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltrout committed Mar 23, 2015
1 parent 5bf7f3f commit 8513045
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/helpers/application_helper.rb
Expand Up @@ -7,6 +7,7 @@
require_dependency 'mobile_detection'
require_dependency 'category_badge'
require_dependency 'global_path'
require_dependency 'canonical_url'

module ApplicationHelper
include CurrentUser
Expand Down
6 changes: 5 additions & 1 deletion app/views/email/_post.html.erb
Expand Up @@ -5,7 +5,11 @@
<img src="<%= post.user.small_avatar_url%>" title="<%= post.user.username%>">
</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>
</td>
</tr>
Expand Down
1 change: 1 addition & 0 deletions lib/email/styles.rb
Expand Up @@ -75,6 +75,7 @@ def format_notification
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('.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('.user-avatar', 'vertical-align:top;width:55px;')
style('.user-avatar img', nil, width: '45', height: '45')
Expand Down

0 comments on commit 8513045

Please sign in to comment.