<% if user %>
    <% if subscriptions.includes? ucid %>
    <p>
        <a id="subscribe" onclick="unsubscribe()" class="pure-button pure-button-primary" 
            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>
        <a id="subscribe" onclick="subscribe()" class="pure-button pure-button-primary" 
            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>
        <a id="subscribe" class="pure-button pure-button-primary" 
            href="/login?referer=<%= env.get("current_page") %>">
            <b><%= translate(locale, "Login to subscribe to `x`", author) %></b>
        </a>
    </p>
<% end %>
