{% extends "cranefly/layout.html" %} {% import "_forms.html" as form_theme with context %} {% import "cranefly/editor.html" as editor with context %} {% import "cranefly/macros.html" as macros with context %} {% block title %}{% if thread -%} {{ macros.page_title(title=_(get_title()), parent=thread.name) }} {%- else -%} {{ macros.page_title(title=_(get_title()), parent=_("Private Threads")) }} {%- endif %}{% endblock %} {% block breadcrumb %}{{ super() }}
  • {% trans %}Private Threads{% endtrans %}
  • {% if thread %}
  • {{ thread.name }}
  • {% endif %}
  • {{ get_title() }} {%- endblock %} {% block container %}

    {{ get_title() }}

    {% if message %}
    {{ macros.draw_message(message) }}
    {% endif %} {% if preview %}
    {{ preview|markdown_final|safe }}
    {% endif %}
    {% if 'thread_name' in form.fields %} {{ form_theme.row_widget(form.fields.thread_name, width=8) }} {% endif %} {% if action == 'new_thread' and 'invite_users' in form.fields %} {{ form_theme.row_widget(form.fields.invite_users, width=8) }} {% endif %} {% if 'thread_name' in form.fields or (action == 'new_thread' and 'invite_users' in form.fields) %}

    Message Body

    {% endif %} {{ editor.editor(form.fields.post, get_button(), rows=8, extra=get_extra()) }} {% if 'edit_reason' in form.fields or (action == 'new_reply' and 'invite_users' in form.fields) %}
    {% if action == 'new_reply' and 'invite_users' in form.fields %} {{ form_theme.row_widget(form.fields.invite_users, width=8) }} {% endif %} {% if 'edit_reason' in form.fields %} {{ form_theme.row_widget(form.fields.edit_reason, width=8) }} {% endif %}
    {% endif %}
    {% endblock %} {% block stylesheets %}{{ super() }} {% endblock %} {% block javascripts %}{{ super() }} {{ editor.js() }} {% endblock %} {% macro get_action() -%} {% if action == 'new_thread' -%} {% url 'private_thread_start' %} {%- elif action == 'edit_thread' -%} {% url 'private_thread_edit' thread=thread.pk, slug=thread.slug %} {%- elif action in 'new_reply' -%} {%- if quote -%} {% url 'private_thread_reply' thread=thread.pk, slug=thread.slug, quote=quote.pk %} {%- else -%} {% url 'private_thread_reply' thread=thread.pk, slug=thread.slug %} {%- endif -%} {%- elif action == 'edit_reply' -%} {% url 'private_post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %} {%- endif %} {%- endmacro %} {% macro get_title() -%} {% if action == 'new_thread' -%} {% trans %}Post New Thread{% endtrans %} {%- elif action == 'edit_thread' -%} {% trans %}Edit Thread{% endtrans %} {%- elif action == 'new_reply' -%} {% trans %}Post New Reply{% endtrans %} {%- elif action == 'edit_reply' -%} {% trans %}Edit Reply{% endtrans %} {%- endif %} {%- endmacro %} {% macro get_info() -%} {% if action == 'edit_reply' -%} {% if post.moderated %}
  • {% trans %}Not Reviewed{% endtrans %}
  • {% endif %}
  • {{ post.date|reltimesince }}
  • {% if post.user %}{{ post.user.username }}{% else %}{{ post.user_name }}{% endif %}
  • {% if post.edits > 0 -%} {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %} {%- else -%} {% trans %}First edit{% endtrans %} {%- endif %}
  • {%- else -%} {% if thread.moderated %}
  • {% trans %}Not Reviewed{% endtrans %}
  • {% endif %} {% if action == 'edit_thread' %}
  • {{ thread.start|reltimesince }}
  • {% else %}
  • {{ thread.last|reltimesince }}
  • {% endif %}
  • {% if thread.start_poster_id %}{{ thread.start_poster_name }}{% else %}{{ thread.start_poster_name }}{% endif %}
  • {% if thread.replies > 0 -%} {% trans count=thread.replies, replies=thread.replies|intcomma %}One reply{% pluralize %}{{ replies }} replies{% endtrans %} {%- else -%} {% trans %}No replies{% endtrans %} {%- endif %}
  • {%- endif %} {% if thread.closed %}
  • {% trans %}Locked{% endtrans %}
  • {% endif %} {%- endmacro %} {% macro get_button() -%} {% if action == 'new_thread' -%} {% trans %}Post Thread{% endtrans %} {%- elif action == 'new_reply' -%} {% trans %}Post Reply{% endtrans %} {%- else -%} {% trans %}Save Changes{% endtrans %} {%- endif %} {%- endmacro %} {% macro get_extra() %} {% endmacro %}