## The contents of this file are subject to the Common Public Attribution
## License Version 1.0. (the "License"); you may not use this file except in
## compliance with the License. You may obtain a copy of the License at
## http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
## License Version 1.1, but Sections 14 and 15 have been added to cover use of
## software over a computer network and provide for limited attribution for the
## Original Developer. In addition, Exhibit A has been modified to be
## consistent with Exhibit B.
##
## Software distributed under the License is distributed on an "AS IS" basis,
## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
## the specific language governing rights and limitations under the License.
##
## The Original Code is reddit.
##
## The Original Developer is the Initial Developer.  The Initial Developer of
## the Original Code is reddit Inc.
##
## All portions of the code written by reddit are Copyright (c) 2006-2015
## reddit Inc. All Rights Reserved.
###############################################################################

<%namespace file="printablebuttons.html" import="ynbutton" />

%if thing.is_author:
  %if thing.sendreplies:
    ${ynbutton(_("disable inbox replies"), _("inbox replies disabled"), "sendreplies",
      hidden_data=dict(id=thing.link._fullname, state=False))}
  %else:
    ${ynbutton(_("enable inbox replies"), _("inbox replies enabled"), "sendreplies",
      hidden_data=dict(id=thing.link._fullname, state=True))}
  %endif
  &nbsp;<span class="help-hoverable" title="${_('inbox replies will send you a message when this link receives a new top-level comment')}">(?)</span>
%endif

%if thing.can_edit:
  %if thing.contest_mode:
    ${ynbutton(_("disable contest mode"), _("contest mode disabled"), "set_contest_mode",
      hidden_data=dict(id=thing.link._fullname, state=False))}
  %else:
    ${ynbutton(_("enable contest mode"), _("contest mode enabled"), "set_contest_mode",
      hidden_data=dict(id=thing.link._fullname, state=True))}
  %endif
%endif

%if thing.can_edit and thing.link.is_self:
  %if thing.stickied:
    ${ynbutton(_("unsticky this post"), _("unstickied"), "set_subreddit_sticky",
      hidden_data=dict(id=thing.link._fullname, state=False))}
  %else:
    ${ynbutton(_("sticky this post"), _("stickied"), "set_subreddit_sticky",
      question=_("sticky this? (any existing sticky will be replaced)"),
      hidden_data=dict(id=thing.link._fullname, state=True))}
  %endif
%endif

%if thing.contest_mode:
  <div class="contest-mode infobar mellow"><strong>${_("this thread is in contest mode")}</strong>&#32;- 
  %if thing.can_edit:
    ${_('as a mod, comments are being sorted by "top" and scores are visible. regular users have randomized sorting and cannot see the scores.')}
  %else:
    ${_('contest mode randomizes comment sorting, hides scores, and collapses replies by default.')}
  %endif
  </div>
%endif
