mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-20 20:11:19 -04:00
Small improvements to digest emails and preview mechanism.
This commit is contained in:
parent
45cff9c674
commit
8b4e3402c2
6 changed files with 11 additions and 4 deletions
app
assets/javascripts
views/user_notifications
config/locales
lib/email
|
@ -1,3 +1,5 @@
|
|||
<p>{{i18n admin.email.preview_digest_desc}}</p>
|
||||
|
||||
<div class='admin-controls'>
|
||||
<div class='span7 controls'>
|
||||
<label for='last-seen'>{{i18n admin.email.last_seen_user}}</label>
|
||||
|
|
|
@ -14,7 +14,7 @@ Discourse.View.reopenClass({
|
|||
/**
|
||||
Register a view helper for ease of use
|
||||
|
||||
@method registerHElper
|
||||
@method registerHelper
|
||||
@param {String} helperName the name of the helper
|
||||
@param {Ember.View} helperClass the view that will be inserted by the helper
|
||||
**/
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
<%= raw(@markdown_linker.create(t.title, t.relative_url)) %>
|
||||
|
||||
<%- if t.best_post.present? %>
|
||||
<%= raw(t.best_post.excerpt(1000,
|
||||
<div class='digest-post'><%= raw(t.best_post.excerpt(1000,
|
||||
strip_links: true,
|
||||
text_entities: true,
|
||||
markdown_images: true)) %>
|
||||
markdown_images: true)) %></div>
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -1080,6 +1080,7 @@ en:
|
|||
sent_test: "sent!"
|
||||
delivery_method: "Delivery Method"
|
||||
preview_digest: "Preview Digest"
|
||||
preview_digest_desc: "This is a tool for previewing the content of the digest emails sent from your forum."
|
||||
refresh: "Refresh"
|
||||
format: "Format"
|
||||
html: "html"
|
||||
|
|
|
@ -21,7 +21,7 @@ module Email
|
|||
end
|
||||
|
||||
def html
|
||||
cooked = PrettyText.cook(text, environment: 'email')
|
||||
cooked = PrettyText.cook(text)
|
||||
|
||||
if @opts[:html_template]
|
||||
ActionView::Base.new(Rails.configuration.paths["app/views"]).render(
|
||||
|
|
|
@ -36,6 +36,10 @@ module Email
|
|||
pre.replace(pre.text)
|
||||
end
|
||||
|
||||
fragment.css('div.digest-post').each do |div|
|
||||
div['style'] = 'margin-left: 15px; margin-top: 20px; max-width: 694px;'
|
||||
end
|
||||
|
||||
fragment.to_html
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue