2019-01-28 03:06:28 +00:00
|
|
|
<% if user %>
|
|
|
|
<% if subscriptions.includes? ucid %>
|
|
|
|
<p>
|
2019-03-23 19:05:13 +00:00
|
|
|
<a id="subscribe" onclick="unsubscribe()" class="pure-button pure-button-primary"
|
2019-01-28 03:06:28 +00:00
|
|
|
href="/subscription_ajax?action_remove_subscriptions=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>">
|
|
|
|
<b><%= translate(locale, "Unsubscribe") %> | <%= sub_count_text %></b>
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
<% else %>
|
|
|
|
<p>
|
2019-03-23 19:05:13 +00:00
|
|
|
<a id="subscribe" onclick="subscribe()" class="pure-button pure-button-primary"
|
2019-01-28 03:06:28 +00:00
|
|
|
href="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= ucid %>&referer=<%= env.get("current_page") %>">
|
|
|
|
<b><%= translate(locale, "Subscribe") %> | <%= sub_count_text %></b>
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<p>
|
2019-03-23 19:05:13 +00:00
|
|
|
<a id="subscribe" class="pure-button pure-button-primary"
|
2019-01-28 03:06:28 +00:00
|
|
|
href="/login?referer=<%= env.get("current_page") %>">
|
|
|
|
<b><%= translate(locale, "Login to subscribe to `x`", author) %></b>
|
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
<% end %>
|