diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 909c56340..3edce092e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -7,6 +7,7 @@ require_dependency 'configurable_urls' require_dependency 'mobile_detection' require_dependency 'category_badge' require_dependency 'global_path' +require_dependency 'canonical_url' module ApplicationHelper include CurrentUser diff --git a/app/views/email/_post.html.erb b/app/views/email/_post.html.erb index 8cacf66f9..b5447c68e 100644 --- a/app/views/email/_post.html.erb +++ b/app/views/email/_post.html.erb @@ -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> diff --git a/lib/email/styles.rb b/lib/email/styles.rb index 1257cc004..46495aef3 100644 --- a/lib/email/styles.rb +++ b/lib/email/styles.rb @@ -75,6 +75,7 @@ module Email 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')