Sha256: 274a608caab3daa91499f7df7c37ddb29c605f4b2865c20f762f3459479fab75

Contents?: true

Size: 642 Bytes

Versions: 26

Compression:

Stored size: 642 Bytes

Contents

<% # Clients of this partial must supply the following variable:
   # thread
   # user
%>

<% is_subscribed = thread.is_subscribed?(user) %>
<% sub_string = is_subscribed ? "unsubscribe" : "subscribe" %>
<%= link_to sub_string.capitalize,
            commontator.polymorphic_path([sub_string, thread]),
            :confirm => (is_subscribed ? \
                          "Are you sure you want to unsubscribe from this thread?" : \
                          nil),
            :method => :put,
            :id => "thread_#{thread.id.to_s}_#{sub_string}_link",
            :class => "thread_#{sub_string}_link",
            :remote => true %>

Version data entries

26 entries across 25 versions & 1 rubygems

Version Path
commontator-4.2.2 app/views/commontator/subscriptions/_link.html.erb
commontator-4.2.1 app/views/commontator/subscriptions/_link.html.erb
commontator-4.2.0 app/views/commontator/subscriptions/_link.html.erb
commontator-4.1.2 app/views/commontator/subscriptions/_link.html.erb
commontator-4.1.1 app/views/commontator/subscriptions/_link.html.erb
commontator-4.0.2 app/views/commontator/subscriptions/_link.html.erb
commontator-2.0.2 app/views/commontator/subscriptions/_link.html.erb
commontator-2.0.2 app/views/commontator/subscriptions/_link.html.erb~
commontator-4.0.1 app/views/commontator/subscriptions/_link.html.erb~
commontator-4.0.0 app/views/commontator/subscriptions/_link.html.erb~
commontator-2.0.1 app/views/commontator/subscriptions/_link.html.erb
commontator-2.0.0 app/views/commontator/subscriptions/_link.html.erb
commontator-1.1.3 app/views/commontator/subscriptions/_link.html.erb
commontator-1.1.2 app/views/commontator/subscriptions/_link.html.erb
commontator-1.1.1 app/views/commontator/subscriptions/_link.html.erb
commontator-1.1.0 app/views/commontator/subscriptions/_link.html.erb
commontator-1.0.6 app/views/commontator/subscriptions/_link.html.erb
commontator-1.0.5 app/views/commontator/subscriptions/_link.html.erb
commontator-1.0.4 app/views/commontator/subscriptions/_link.html.erb
commontator-1.0.3 app/views/commontator/subscriptions/_link.html.erb