Create changeset subscription resource
This commit is contained in:
parent
7b19ba580c
commit
84a3a41531
17 changed files with 232 additions and 210 deletions
5
app/views/changeset_subscriptions/no_such_entry.html.erb
Normal file
5
app/views/changeset_subscriptions/no_such_entry.html.erb
Normal file
|
@ -0,0 +1,5 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".heading", :id => h(params[:changeset_id]) %></h1>
|
||||
<% end %>
|
||||
|
||||
<p><%= t ".body", :id => h(params[:changeset_id]) %></p>
|
12
app/views/changeset_subscriptions/show.html.erb
Normal file
12
app/views/changeset_subscriptions/show.html.erb
Normal file
|
@ -0,0 +1,12 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= @subscribed ? t(".unsubscribe.heading") : t(".subscribe.heading") %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "heading", :object => @changeset, :as => "changeset" %>
|
||||
|
||||
<%= bootstrap_form_tag :method => (@subscribed ? :delete : :post) do |f| %>
|
||||
<% if params[:referer] -%>
|
||||
<%= f.hidden_field :referer, :value => params[:referer] %>
|
||||
<% end -%>
|
||||
<%= f.primary @subscribed ? t(".unsubscribe.button") : t(".subscribe.button") %>
|
||||
<% end %>
|
|
@ -1,5 +0,0 @@
|
|||
<% content_for :heading do %>
|
||||
<h1><%= t ".heading", :id => h(params[:id]) %></h1>
|
||||
<% end %>
|
||||
|
||||
<p><%= t ".body", :id => h(params[:id]) %></p>
|
|
@ -1,12 +0,0 @@
|
|||
<% 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 %>
|
|
@ -1,12 +0,0 @@
|
|||
<% 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 %>
|
|
@ -24,6 +24,6 @@
|
|||
|
||||
<% content_for :footer do %>
|
||||
<p>
|
||||
<%= t ".unsubscribe_html", :url => link_to(@unsubscribe_url, @unsubscribe_url) %>
|
||||
<%= t ".unsubscribe_html", :url => link_to(@changeset_subscription_url, @changeset_subscription_url) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -17,4 +17,4 @@
|
|||
|
||||
<%= t '.details', :url => @changeset_url %>
|
||||
|
||||
<%= t '.unsubscribe', :url => @unsubscribe_url %>
|
||||
<%= t '.unsubscribe', :url => @changeset_subscription_url %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue