<input type="hidden" name="fbactionID" id="fbactionID" />
<if:have_session>
    <div class="fbbluebox" style="float:left">
    <span><img src="<tag:user_pic_url />" /></span>
    <span><tag:user_name /></span>
    </div>
    <div class="clear">&nbsp;</div>
    <div class="fbbluebox"><gettext>Logged in to Facebook</gettext>
      <div class="fbaction"><input type="submit" class="fbbutton" value="<gettext>Logout</gettext>" onclick="document.prefs.fbactionID.value='revokeApplication'; return true" /></div>
    </div>
    <if:have_publish>
     <div class="fbbluebox"><gettext>Publish enabled.</gettext>
      <div class="fbaction"><input type="submit" class="fbbutton" value="<gettext>Disable</gettext>" onclick="document.prefs.fbactionID.value='revokePublish'; return true" /></div>
     </div>
    <else:have_publish>
     <div class="fbbluebox">
      <gettext><tag:app_name /> cannot set your status messages or publish other content to Facebook.</gettext>
      <div class="fbaction"><gettext>Authorize Publish</gettext><a class="fbbutton" href="<tag:publish_url />">Facebook</a></div>
     </div>
    </else:have_publish>
    </if:have_publish>
    <if:have_read>
     <div class="fbbluebox">
      <gettext>Read enabled</gettext>
      <div class="fbaction"><input type="submit" class="fbbutton" value="<gettext>Disable</gettext>" onclick="document.prefs.fbactionID.value='revokeRead'; return true" /></div>
     </div>
    <else:have_read>
     <div class="fbbluebox">
      <gettext><tag:app_name /> cannot read your stream messages and various other Facebook data items.</gettext>
      <div class="fbaction"><gettext>Authorize Read:</gettext><a class="fbbutton" href="<tag:read_url />">Facebook</a></div>
     </div>
    </else:have_read>
    </if:have_read>
    <if:have_friends>
     <div class="fbbluebox">
      <gettext>Friends enabled</gettext>
      <div class="fbaction"><input type="submit" class="fbbutton" value="<gettext>Disable</gettext>" onclick="document.prefs.fbactionID.value='revokeFriends'; return true" /></div>
     </div>
    <else:have_friends>
     <div class="fbbluebox">
      <gettext><tag:app_name /> cannot read information about your Facebook friends.</gettext>
      <div class="fbaction"><gettext>Authorize Access to Friends Data:</gettext><a class="fbbutton" href="<tag:friends_url />">Facebook</a></div>
     </div>
    </else:have_friends>
    </if:have_friends>
<else:have_session>
    <div class="notice">Could not find authorization for <tag:user_name /> to interact with your Facebook account.</div>
    <br />
    <gettext>Login to Facebook and authorize <tag:app_name /></gettext>
    <a href="<tag:authUrl />" class="fbbutton">Facebook</a>
</else:have_session>
</if:have_session>
