Skip to content

Commit

Permalink
Add subscribe/unsubscribe buttons for creators
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeltrix committed May 23, 2024
1 parent 195a2bd commit 5bb1b21
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/views/admin/signatures/_signature.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@
<% if signature.pending? %>
<%= button_to 'Validate', validate_admin_signature_path(signature, search_params), method: :post, class: 'button validate-action', data: { confirm: 'Validate signature?' } %>
<% else %>
&nbsp;
<% if signature.subscribed? %>
<%= button_to 'Unsubscribe', [:unsubscribe, :admin, @petition, signature, search_params].compact, method: :post, class: 'button unsubscribe-action', data: { confirm: 'Unsubscribe signature?' } %>
<% else %>
<%= button_to 'Subscribe', [:subscribe, :admin, @petition, signature, search_params].compact, method: :post, class: 'button subscribe-action', data: { confirm: 'Subscribe signature?' } %>
<% end %>
<% end %>
<% else %>
<% if signature.validated? %>
Expand Down

0 comments on commit 5bb1b21

Please sign in to comment.