<tal:block tal:define="portal_state context/@@plone_portal_state;
                       portal_url portal_state/portal_url;
                       is_followed view/is_followed;
                       verb view/verb;
                       unique_id view/unique_id;
                       datapatinject python:'source: fieldset;; target: #functions-{0} fieldset'.format(unique_id)"
                       i18n:domain="ploneintranet">

  <form id="functions-123456"
        action="@@toggle_follow"
        method="post"
        class="pat-inject"
        tal:attributes="action view/action;
                        id string:functions-${unique_id};
                        data-pat-inject datapatinject;">
    <fieldset class="button-bar centred">
        <button tal:condition="python:view.verb == 'Follow'"
            class="pat-button icon-follow-empty ${python:is_followed and 'active' or ''}"
            title="${view/msg_title_follow}"
            ><strong i18n:translate="label_btn_follow_user">Follow <span tal:replace="context/fullname" i18n:name="username">someuser</span></strong>
        </button>
        <button tal:condition="python:view.verb == 'Unfollow'"
            class="pat-button icon-follow ${python:is_followed and 'active' or ''}"
            title="${view/msg_title_unfollow}"
            ><strong i18n:translate="">Following</strong></button>

      <input type="hidden" name="do_toggle_follow" value="" />
    </fieldset>
  </form>

</tal:block>
