{# @description The follow control for a person or an object: a Follow button, or Unfollow once followed, beside how many people follow it. After a click only the control is redrawn. A signed-out visitor is sent to sign in. A person is never offered to follow themselves. #} {# @prop object:text | description:"The person or object to follow." #} {# @prop size:select['xs','sm','md'] | default:"sm" | description:"Size of the button." #} {# @prop replace_row:boolean | default:false | description:"For a control inside a list row marked data-follow-row: stopping following removes that row instead of redrawing the control." #} {# @prop next:text | description:"The page the control sits on, which a plain form post and signing in return to. Defaults to the current page." #} {% load i18n activity_tags mvp_community_activity %} {% followers_of object as followers %} {% firstof next request.get_full_path as page %}
{% blocktrans count counter=followers.count %}{{ counter }} follower{% plural %}{{ counter }} followers{% endblocktrans %} {% if request.user.is_authenticated and object == request.user %} {% elif request.user.is_authenticated %} {% follow_control_url object page as refresh %}
{% csrf_token %} {% if request.user|is_following:object %} {% else %} {% endif %} {% else %} {% url "account_login" as login_url %} {% endif %}