Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/notifier')
-rw-r--r--app/views/notifier/_notifier_css.haml28
-rw-r--r--app/views/notifier/also_commented.html.haml4
-rw-r--r--app/views/notifier/also_commented.markerb5
-rw-r--r--app/views/notifier/also_commented.text.erb4
-rw-r--r--app/views/notifier/comment_on_post.html.haml4
-rw-r--r--app/views/notifier/comment_on_post.markerb5
-rw-r--r--app/views/notifier/comment_on_post.text.erb4
-rw-r--r--app/views/notifier/confirm_email.html.haml6
-rw-r--r--app/views/notifier/confirm_email.markerb5
-rw-r--r--app/views/notifier/confirm_email.text.erb5
-rw-r--r--app/views/notifier/contacts_birthday.html.haml5
-rw-r--r--app/views/notifier/contacts_birthday.markerb6
-rw-r--r--app/views/notifier/contacts_birthday.text.erb4
-rw-r--r--app/views/notifier/csrf_token_fail.html.haml4
-rw-r--r--app/views/notifier/csrf_token_fail.markerb1
-rw-r--r--app/views/notifier/csrf_token_fail.text.erb3
-rw-r--r--app/views/notifier/invite.markerb6
-rw-r--r--app/views/notifier/liked.html.haml10
-rw-r--r--app/views/notifier/liked.markerb11
-rw-r--r--app/views/notifier/liked.text.erb10
-rw-r--r--app/views/notifier/mentioned.html.haml9
-rw-r--r--app/views/notifier/mentioned.markerb9
-rw-r--r--app/views/notifier/mentioned.text.erb8
-rw-r--r--app/views/notifier/mentioned_in_comment.html.haml9
-rw-r--r--app/views/notifier/mentioned_in_comment.text.erb (renamed from app/views/notifier/mentioned_in_comment.markerb)5
-rw-r--r--app/views/notifier/plain_markdown_email.html.haml2
-rw-r--r--app/views/notifier/plain_markdown_email.text.haml1
-rw-r--r--app/views/notifier/private_message.html.haml4
-rw-r--r--app/views/notifier/private_message.markerb5
-rw-r--r--app/views/notifier/private_message.text.erb4
-rw-r--r--app/views/notifier/reshared.html.haml5
-rw-r--r--app/views/notifier/reshared.markerb7
-rw-r--r--app/views/notifier/reshared.text.erb6
-rw-r--r--app/views/notifier/single_admin.html.haml8
-rw-r--r--app/views/notifier/single_admin.markerb7
-rw-r--r--app/views/notifier/single_admin.text.erb6
-rw-r--r--app/views/notifier/started_sharing.html.haml7
-rw-r--r--app/views/notifier/started_sharing.markerb5
-rw-r--r--app/views/notifier/started_sharing.text.erb4
39 files changed, 138 insertions, 103 deletions
diff --git a/app/views/notifier/_notifier_css.haml b/app/views/notifier/_notifier_css.haml
deleted file mode 100644
index 4ca518b2d..000000000
--- a/app/views/notifier/_notifier_css.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-:css
- body{
- width:600px;
- font-family: 'Helvetica',sans-serif;
- }
- #container{
- }
- header{
- margin-bottom: 25px;
- }
- p{
- padding:5px;
- }
- p.small{
- font-size:smaller;
- color:#999;
- font-style:italic;
- }
- a{
- color:#107FC9;
- font-weight:bold;
- }
- a:hover{
- color: #22AAE0;
- }
- a:active{
- color: #005D9C;
- }
diff --git a/app/views/notifier/also_commented.html.haml b/app/views/notifier/also_commented.html.haml
new file mode 100644
index 000000000..ec6fdfc94
--- /dev/null
+++ b/app/views/notifier/also_commented.html.haml
@@ -0,0 +1,4 @@
+= comment_message(@notification.comment, html: true)
+%p
+ = link_to t("notifier.comment_on_post.reply", name: @notification.comment.post.author_first_name),
+ post_url(@notification.comment.post, anchor: @notification.comment.guid)
diff --git a/app/views/notifier/also_commented.markerb b/app/views/notifier/also_commented.markerb
deleted file mode 100644
index 8c5023664..000000000
--- a/app/views/notifier/also_commented.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= comment_message(@notification.comment, :process_newlines => true) %>
-
-[<%= t('notifier.comment_on_post.reply', :name => @notification.comment_post.author_first_name) %>][1]
-
-[1]: <%= post_url(@notification.comment_post, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/also_commented.text.erb b/app/views/notifier/also_commented.text.erb
new file mode 100644
index 000000000..bce14edd8
--- /dev/null
+++ b/app/views/notifier/also_commented.text.erb
@@ -0,0 +1,4 @@
+<%= comment_message(@notification.comment) %>
+
+<%= t("notifier.comment_on_post.reply", name: @notification.comment.post.author_first_name) %>
+<%= post_url(@notification.comment.post, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/comment_on_post.html.haml b/app/views/notifier/comment_on_post.html.haml
new file mode 100644
index 000000000..ec6fdfc94
--- /dev/null
+++ b/app/views/notifier/comment_on_post.html.haml
@@ -0,0 +1,4 @@
+= comment_message(@notification.comment, html: true)
+%p
+ = link_to t("notifier.comment_on_post.reply", name: @notification.comment.post.author_first_name),
+ post_url(@notification.comment.post, anchor: @notification.comment.guid)
diff --git a/app/views/notifier/comment_on_post.markerb b/app/views/notifier/comment_on_post.markerb
deleted file mode 100644
index 7d4d86802..000000000
--- a/app/views/notifier/comment_on_post.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= comment_message(@notification.comment, :process_newlines => true) %>
-
-[<%= t('notifier.comment_on_post.reply', :name => @notification.comment.parent_author_name) %>][1]
-
-[1]: <%= post_url(@notification.comment.post, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/comment_on_post.text.erb b/app/views/notifier/comment_on_post.text.erb
new file mode 100644
index 000000000..bce14edd8
--- /dev/null
+++ b/app/views/notifier/comment_on_post.text.erb
@@ -0,0 +1,4 @@
+<%= comment_message(@notification.comment) %>
+
+<%= t("notifier.comment_on_post.reply", name: @notification.comment.post.author_first_name) %>
+<%= post_url(@notification.comment.post, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/confirm_email.html.haml b/app/views/notifier/confirm_email.html.haml
new file mode 100644
index 000000000..87e334688
--- /dev/null
+++ b/app/views/notifier/confirm_email.html.haml
@@ -0,0 +1,6 @@
+%p
+ = t("notifier.hello", name: @notification.recipient_first_name)
+%p
+ = t("notifier.confirm_email.click_link", unconfirmed_email: @notification.recipient_unconfirmed_email)
+%p
+ = link_to nil, confirm_email_url(token: @notification.recipient_confirm_email_token)
diff --git a/app/views/notifier/confirm_email.markerb b/app/views/notifier/confirm_email.markerb
deleted file mode 100644
index 6b32bfa0a..000000000
--- a/app/views/notifier/confirm_email.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= t('notifier.hello', :name => @notification.recipient_first_name) %>
-
-<%= t('notifier.confirm_email.click_link', :unconfirmed_email => @notification.recipient_unconfirmed_email) %>
-
-<<%= confirm_email_url(:token => @notification.recipient_confirm_email_token) %>>
diff --git a/app/views/notifier/confirm_email.text.erb b/app/views/notifier/confirm_email.text.erb
new file mode 100644
index 000000000..4b310db63
--- /dev/null
+++ b/app/views/notifier/confirm_email.text.erb
@@ -0,0 +1,5 @@
+<%= t("notifier.hello", name: @notification.recipient_first_name) %>
+
+<%= t("notifier.confirm_email.click_link", unconfirmed_email: @notification.recipient_unconfirmed_email) %>
+
+<%= confirm_email_url(token: @notification.recipient_confirm_email_token) %>
diff --git a/app/views/notifier/contacts_birthday.html.haml b/app/views/notifier/contacts_birthday.html.haml
new file mode 100644
index 000000000..4402cf41d
--- /dev/null
+++ b/app/views/notifier/contacts_birthday.html.haml
@@ -0,0 +1,5 @@
+%p
+ = t(".birthday", name: @notification.person.name)
+%p
+ = link_to t(".view_profile", name: @notification.person.first_name),
+ local_or_remote_person_path(@notification.person, absolute: true)
diff --git a/app/views/notifier/contacts_birthday.markerb b/app/views/notifier/contacts_birthday.markerb
deleted file mode 100644
index ee4d27770..000000000
--- a/app/views/notifier/contacts_birthday.markerb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<%= t(".birthday", name: @notification.person.name) %>
-
-[<%= t(".view_profile", name: @notification.person.name) %>][1]
-
-[1]: <%= local_or_remote_person_path(@notification.person, absolute: true) %>
diff --git a/app/views/notifier/contacts_birthday.text.erb b/app/views/notifier/contacts_birthday.text.erb
new file mode 100644
index 000000000..773fc41c1
--- /dev/null
+++ b/app/views/notifier/contacts_birthday.text.erb
@@ -0,0 +1,4 @@
+<%= t(".birthday", name: @notification.person.name) %>
+
+<%= t(".view_profile", name: @notification.person.first_name) %>
+<%= local_or_remote_person_path(@notification.person, absolute: true) %>
diff --git a/app/views/notifier/csrf_token_fail.html.haml b/app/views/notifier/csrf_token_fail.html.haml
new file mode 100644
index 000000000..08c27d4b9
--- /dev/null
+++ b/app/views/notifier/csrf_token_fail.html.haml
@@ -0,0 +1,4 @@
+- message = t("notifier.csrf_token_fail.body",
+ name: @notification.recipient_first_name,
+ link: "https://owasp.org/www-community/attacks/csrf")
+!= Redcarpet::Markdown.new(Diaspora::Markdownify::Email).render(message)
diff --git a/app/views/notifier/csrf_token_fail.markerb b/app/views/notifier/csrf_token_fail.markerb
deleted file mode 100644
index 22f3164ea..000000000
--- a/app/views/notifier/csrf_token_fail.markerb
+++ /dev/null
@@ -1 +0,0 @@
-<%= t("notifier.csrf_token_fail.body", name: @notification.recipient_first_name, link: "https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)") %>
diff --git a/app/views/notifier/csrf_token_fail.text.erb b/app/views/notifier/csrf_token_fail.text.erb
new file mode 100644
index 000000000..ef034ed02
--- /dev/null
+++ b/app/views/notifier/csrf_token_fail.text.erb
@@ -0,0 +1,3 @@
+<%= t("notifier.csrf_token_fail.body",
+ name: @notification.recipient_first_name,
+ link: "https://owasp.org/www-community/attacks/csrf") %>
diff --git a/app/views/notifier/invite.markerb b/app/views/notifier/invite.markerb
deleted file mode 100644
index 8c20a00c0..000000000
--- a/app/views/notifier/invite.markerb
+++ /dev/null
@@ -1,6 +0,0 @@
-<%= t('.message',
- invite_url: invite_code_url(@invitation_code),
- diasporafoundation_url: 'https://diasporafoundation.org/',
- user: @inviter.try(:full_name).empty? ? @inviter.try(:diaspora_handle) : "#{@inviter.name} (#{@inviter.diaspora_handle})",
- diaspora_id: @inviter.try(:diaspora_handle))
-%>
diff --git a/app/views/notifier/liked.html.haml b/app/views/notifier/liked.html.haml
new file mode 100644
index 000000000..96cf3770f
--- /dev/null
+++ b/app/views/notifier/liked.html.haml
@@ -0,0 +1,10 @@
+- if @notification.like_target.public?
+ %p
+ #{t('.liked', name: @notification.sender_name)}:
+ = post_message(@notification.like_target, html: true)
+- else
+ %p
+ #{t('notifier.liked.limited_post', name: @notification.sender_name)}.
+
+%p
+ = link_to t(".view_post"), post_url(@notification.like_target)
diff --git a/app/views/notifier/liked.markerb b/app/views/notifier/liked.markerb
deleted file mode 100644
index 8ed88a979..000000000
--- a/app/views/notifier/liked.markerb
+++ /dev/null
@@ -1,11 +0,0 @@
-<% if @notification.like_target.public? %>
-<%= "#{t('.liked', :name => "#{@notification.sender_name}")}:" %>
-
-<%= post_message(@notification.like_target, :process_newlines => true) %>
-<% else %>
-<%= "#{t('notifier.liked.limited_post', :name => "#{@notification.sender_name}")}." %>
-<% end %>
-
-[<%= t('.view_post') %>][1]
-
-[1]: <%= post_url(@notification.like_target) %>
diff --git a/app/views/notifier/liked.text.erb b/app/views/notifier/liked.text.erb
new file mode 100644
index 000000000..ce743ade3
--- /dev/null
+++ b/app/views/notifier/liked.text.erb
@@ -0,0 +1,10 @@
+<% if @notification.like_target.public? %>
+<%= "#{t(".liked", name: @notification.sender_name)}:" %>
+
+<%= post_message(@notification.like_target) %>
+<% else %>
+<%= "#{t("notifier.liked.limited_post", name: @notification.sender_name)}." %>
+<% end %>
+
+<%= t(".view_post") %>
+<%= post_url(@notification.like_target) %>
diff --git a/app/views/notifier/mentioned.html.haml b/app/views/notifier/mentioned.html.haml
new file mode 100644
index 000000000..715de7647
--- /dev/null
+++ b/app/views/notifier/mentioned.html.haml
@@ -0,0 +1,9 @@
+- if @notification.post.public?
+ = post_message(@notification.post, html: true)
+- else
+ %p
+ = t("notifier.mentioned.limited_post")
+
+%p
+ = link_to t("notifier.comment_on_post.reply", name: @notification.post.author_first_name),
+ post_url(@notification.post)
diff --git a/app/views/notifier/mentioned.markerb b/app/views/notifier/mentioned.markerb
deleted file mode 100644
index 414739665..000000000
--- a/app/views/notifier/mentioned.markerb
+++ /dev/null
@@ -1,9 +0,0 @@
-<% if @notification.post.public? %>
-<%= post_message(@notification.post, :process_newlines => true) %>
-<% else %>
-<%= t('notifier.mentioned.limited_post') %>
-<% end %>
-
-[<%= t("notifier.comment_on_post.reply", name: @notification.post_author_name) %>][1]
-
-[1]: <%= post_url(@notification.post) %>
diff --git a/app/views/notifier/mentioned.text.erb b/app/views/notifier/mentioned.text.erb
new file mode 100644
index 000000000..fbce0dbb4
--- /dev/null
+++ b/app/views/notifier/mentioned.text.erb
@@ -0,0 +1,8 @@
+<% if @notification.post.public? %>
+<%= post_message(@notification.post) %>
+<% else %>
+<%= t("notifier.mentioned.limited_post") %>
+<% end %>
+
+<%= t("notifier.comment_on_post.reply", name: @notification.post.author_first_name) %>
+<%= post_url(@notification.post) %>
diff --git a/app/views/notifier/mentioned_in_comment.html.haml b/app/views/notifier/mentioned_in_comment.html.haml
new file mode 100644
index 000000000..89d04cb49
--- /dev/null
+++ b/app/views/notifier/mentioned_in_comment.html.haml
@@ -0,0 +1,9 @@
+- if @notification.comment.public?
+ = @notification.comment.message.markdownified_for_mail
+- else
+ %p
+ = t("notifier.mentioned_in_comment.limited_post")
+
+%p
+ = link_to t("notifier.mentioned_in_comment.reply"),
+ post_url(@notification.comment.post, anchor: @notification.comment.guid)
diff --git a/app/views/notifier/mentioned_in_comment.markerb b/app/views/notifier/mentioned_in_comment.text.erb
index 3b86f409b..8f327a2a6 100644
--- a/app/views/notifier/mentioned_in_comment.markerb
+++ b/app/views/notifier/mentioned_in_comment.text.erb
@@ -4,6 +4,5 @@
<%= t("notifier.mentioned_in_comment.limited_post") %>
<% end %>
-[<%= t("notifier.mentioned_in_comment.reply") %>][1]
-
-[1]: <%= post_url(@notification.comment.parent, anchor: @notification.comment.guid) %>
+<%= t("notifier.mentioned_in_comment.reply") %>
+<%= post_url(@notification.comment.parent, anchor: @notification.comment.guid) %>
diff --git a/app/views/notifier/plain_markdown_email.html.haml b/app/views/notifier/plain_markdown_email.html.haml
new file mode 100644
index 000000000..a102d4ecb
--- /dev/null
+++ b/app/views/notifier/plain_markdown_email.html.haml
@@ -0,0 +1,2 @@
+%div{style: "font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px"}
+ != Redcarpet::Markdown.new(Diaspora::Markdownify::Email).render(body)
diff --git a/app/views/notifier/plain_markdown_email.text.haml b/app/views/notifier/plain_markdown_email.text.haml
new file mode 100644
index 000000000..d2059e444
--- /dev/null
+++ b/app/views/notifier/plain_markdown_email.text.haml
@@ -0,0 +1 @@
+!= body
diff --git a/app/views/notifier/private_message.html.haml b/app/views/notifier/private_message.html.haml
new file mode 100644
index 000000000..bd4eb72f0
--- /dev/null
+++ b/app/views/notifier/private_message.html.haml
@@ -0,0 +1,4 @@
+%p
+ = t("notifier.a_private_message")
+%p
+ = link_to t(".reply_to_or_view"), conversations_url(conversation_id: @notification.conversation)
diff --git a/app/views/notifier/private_message.markerb b/app/views/notifier/private_message.markerb
deleted file mode 100644
index e41a38cb4..000000000
--- a/app/views/notifier/private_message.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= t('notifier.a_private_message') %>
-
-[<%= t('.reply_to_or_view') %>][1]
-
-[1]: <%= conversations_url(:conversation_id => @notification.conversation) %>
diff --git a/app/views/notifier/private_message.text.erb b/app/views/notifier/private_message.text.erb
new file mode 100644
index 000000000..6751ea454
--- /dev/null
+++ b/app/views/notifier/private_message.text.erb
@@ -0,0 +1,4 @@
+<%= t("notifier.a_private_message") %>
+
+<%= t(".reply_to_or_view") %>
+<%= conversations_url(conversation_id: @notification.conversation) %>
diff --git a/app/views/notifier/reshared.html.haml b/app/views/notifier/reshared.html.haml
new file mode 100644
index 000000000..1450775e9
--- /dev/null
+++ b/app/views/notifier/reshared.html.haml
@@ -0,0 +1,5 @@
+%p
+ #{t('.reshared', name: @notification.sender_name)}:
+= post_message(@notification.reshare_root, html: true)
+%p
+ = link_to t(".view_post"), post_url(@notification.reshare)
diff --git a/app/views/notifier/reshared.markerb b/app/views/notifier/reshared.markerb
deleted file mode 100644
index a1c43c6a1..000000000
--- a/app/views/notifier/reshared.markerb
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= "#{t('.reshared', :name => "#{@notification.sender_name}")}:" %>
-
-<%= post_message(@notification.reshare_root, :process_newlines => true) %>
-
-[<%= t('.view_post') %>][1]
-
-[1]: <%= post_url(@notification.reshare) %>
diff --git a/app/views/notifier/reshared.text.erb b/app/views/notifier/reshared.text.erb
new file mode 100644
index 000000000..320b626b6
--- /dev/null
+++ b/app/views/notifier/reshared.text.erb
@@ -0,0 +1,6 @@
+<%= "#{t(".reshared", name: @notification.sender_name)}:" %>
+
+<%= post_message(@notification.reshare_root) %>
+
+<%= t(".view_post") %>
+<%= post_url(@notification.reshare) %>
diff --git a/app/views/notifier/single_admin.html.haml b/app/views/notifier/single_admin.html.haml
new file mode 100644
index 000000000..304e2fb92
--- /dev/null
+++ b/app/views/notifier/single_admin.html.haml
@@ -0,0 +1,8 @@
+%p
+ = t("notifier.hello", name: @receiver.username)
+%p
+ = @string
+%p
+ = t("notifier.thanks")
+ %br/
+ = t("notifier.single_admin.admin")
diff --git a/app/views/notifier/single_admin.markerb b/app/views/notifier/single_admin.markerb
deleted file mode 100644
index 0b9f23749..000000000
--- a/app/views/notifier/single_admin.markerb
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= t('notifier.hello', :name => @receiver.username) %>
-
-<%= @string %>
-
-<%= t('notifier.thanks') %>
-
-<%= t('notifier.single_admin.admin') %>
diff --git a/app/views/notifier/single_admin.text.erb b/app/views/notifier/single_admin.text.erb
new file mode 100644
index 000000000..ed2c0a4e4
--- /dev/null
+++ b/app/views/notifier/single_admin.text.erb
@@ -0,0 +1,6 @@
+<%= t("notifier.hello", name: @receiver.username) %>
+
+<%= @string %>
+
+<%= t("notifier.thanks") %>
+<%= t("notifier.single_admin.admin") %>
diff --git a/app/views/notifier/started_sharing.html.haml b/app/views/notifier/started_sharing.html.haml
new file mode 100644
index 000000000..bb5084ba7
--- /dev/null
+++ b/app/views/notifier/started_sharing.html.haml
@@ -0,0 +1,7 @@
+%p
+ = @notification.sender_name
+ = t(".sharing")
+
+%p
+ = link_to t(".view_profile", name: @notification.sender_first_name),
+ local_or_remote_person_path(@notification.sender, absolute: true)
diff --git a/app/views/notifier/started_sharing.markerb b/app/views/notifier/started_sharing.markerb
deleted file mode 100644
index d5e16d74c..000000000
--- a/app/views/notifier/started_sharing.markerb
+++ /dev/null
@@ -1,5 +0,0 @@
-<%= @notification.sender_name %> <%= t('.sharing') %>
-
-[<%= t('.view_profile', :name => @notification.sender_first_name) %>][1]
-
-[1]: <%= local_or_remote_person_path(@notification.sender, :absolute => true) %>
diff --git a/app/views/notifier/started_sharing.text.erb b/app/views/notifier/started_sharing.text.erb
new file mode 100644
index 000000000..6218f8d9e
--- /dev/null
+++ b/app/views/notifier/started_sharing.text.erb
@@ -0,0 +1,4 @@
+<%= @notification.sender_name %> <%= t(".sharing") %>
+
+<%= t(".view_profile", name: @notification.sender_first_name) %>
+<%= local_or_remote_person_path(@notification.sender, absolute: true) %>