<form xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      name="$name"
      id="$name"
      method="$method"
      action="$action"
      enctype="$enctype"
      py:attrs="attrs">
  <py:if test="value">
    <py:if test="style == 'icon'">
      <a href="$action?unsubscribe=True" class="artifact_unsubscribe btn ico btn_activate" title="Unsubscribe from this ${thing}"><b class="ui-icon ui-icon-mail-closed"></b> <span>Unsubscribe from this ${thing}</span></a>
    </py:if>
    <py:if test="style != 'icon'">
      You are currently subscribed to this ${thing}.
      <br/>
      ${fields['unsubscribe'].display()}
    </py:if>
  </py:if>
  <py:if test="not value">
    <py:if test="style == 'icon'">
      <a href="$action?subscribe=True" class="artifact_subscribe btn ico" title="Subscribe to this ${thing}"><b class="ui-icon ui-icon-mail-closed"></b> <span>Subscribe to this ${thing}</span></a>
    </py:if>
    <py:if test="style != 'icon'">
      You are currently not subscribed to this ${thing}.
      <br/>
      ${fields['subscribe'].display()}
    </py:if>
  </py:if>
</form>
