Add unsubscribe link to changeset notification mails
This commit is contained in:
parent
8e21e4e801
commit
f0764d3eca
12 changed files with 227 additions and 4 deletions
15
app/views/changesets/_heading.html.erb
Normal file
15
app/views/changesets/_heading.html.erb
Normal file
|
@ -0,0 +1,15 @@
|
|||
<% title = changeset.tags["comment"].to_s.presence || t(".title", :id => changeset.id) -%>
|
||||
<div class='mb-3'>
|
||||
<div class="row">
|
||||
<div class="col-auto">
|
||||
<%= user_thumbnail changeset.user %>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h2><%= link_to title, changeset_path(changeset) %></h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<small class='text-muted'>
|
||||
<%= t(".created_by_html", :link_user => link_to(changeset.user.display_name, user_path(changeset.user)), :created => l(changeset.created_at, :format => :blog)) %>
|
||||
</small>
|
||||
</div>
|
5
app/views/changesets/no_such_entry.html.erb
Normal file
5
app/views/changesets/no_such_entry.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".heading", :id => h(params[:id]) %></h1>
|
||||
<% end %>
|
||||
|
||||
<p><%= t ".body", :id => h(params[:id]) %></p>
|
12
app/views/changesets/subscribe.html.erb
Normal file
12
app/views/changesets/subscribe.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".heading" %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "heading", :object => @changeset, :as => "changeset" %>
|
||||
|
||||
<%= bootstrap_form_tag do |f| %>
|
||||
<% if params[:referer] -%>
|
||||
<%= f.hidden_field :referer, :value => params[:referer] %>
|
||||
<% end -%>
|
||||
<%= f.primary t(".button") %>
|
||||
<% end %>
|
12
app/views/changesets/unsubscribe.html.erb
Normal file
12
app/views/changesets/unsubscribe.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".heading" %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "heading", :object => @changeset, :as => "changeset" %>
|
||||
|
||||
<%= bootstrap_form_tag do |f| %>
|
||||
<% if params[:referer] -%>
|
||||
<%= f.hidden_field :referer, :value => params[:referer] %>
|
||||
<% end -%>
|
||||
<%= f.primary t(".button") %>
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue