{% 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=forum.name) }} {%- endif %}{% endblock %} {% block breadcrumb %}{{ super() }} {{ macros.parents_list(parents) }}
  • {{ forum.name }}
  • {% 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 %} {% if 'thread_prefix' in form.fields %}
    {{ form_theme.row(form.thread_name, attrs={'class': 'span6'}) }}
    {{ form_theme.row(form.thread_prefix, attrs={'class': 'span2'}) }}
    {% else %} {{ form_theme.row(form.thread_name, attrs={'class': 'span8'}) }} {% endif %}

    {% trans %}Message Body{% endtrans %}

    {% endif %} {{ editor.editor(form.post, get_button(), rows=8, zen=True, extra=get_extra()) }} {% if 'edit_reason' in form.fields %} {{ form_theme.row(form.edit_reason, attrs={'class': 'span8'}) }} {% endif %} {% if 'poll_question' in form.fields or 'poll_delete' in form.fields %}

    {% if thread and thread.poll %}{% trans %}Edit Poll{% endtrans %}{% else %}{% trans %}Create Poll{% endtrans %}{% endif %}

    {% if 'poll_question' in form.fields %} {{ form_theme.row(form.poll_question, attrs={'class': 'span8'}) }} {% if thread and thread.poll %}
    {% for option in thread.poll.option_set.all() %}
    {% endfor %}

    {% trans %}To delete existing choice, empty its text input.{% endtrans %}

    {% endif %} {{ form_theme.row(form.poll_choices, attrs={'class': 'span8', 'rows': 4}) }} {{ form_theme.row(form.poll_max_choices, attrs={'class': 'span8'}) }} {{ form_theme.row(form.poll_length, attrs={'class': 'span8'}) }} {% if 'poll_public' in form.fields %} {{ form_theme.row(form.poll_public, attrs={'inline': lang_poll_public()}) }} {% endif %} {{ form_theme.row(form.poll_changing_votes, attrs={'inline': lang_poll_changing_votes()}) }} {% endif %} {% if 'poll_delete' in form.fields %} {{ form_theme.row(form.poll_delete, attrs={'inline': lang_poll_delete()}) }} {% endif %} {% endif %} {% if intersect(form.fields, ('thread_weight', 'close_thread')) %}
    {% if 'thread_weight' in form.fields %} {{ form_theme.field(form.thread_weight, attrs={'class': 'span8'}) }} {% endif %} {% if 'close_thread' in form.fields %} {% endif %}
    {% endif %}
    {% endblock %} {% block stylesheets %}{{ super() }} {% endblock %} {% block javascripts %} {{ editor.zen() }} {{ super() }} {{ editor.js() }} {% endblock %} {% macro get_action() -%} {% if action == 'new_thread' -%} {{ url('thread_start', forum=forum.pk, slug=forum.slug) }} {%- elif action == 'edit_thread' -%} {{ url('thread_edit', thread=thread.pk, slug=thread.slug) }} {%- elif action in 'new_reply' -%} {%- if quote -%} {{ url('thread_reply', thread=thread.pk, slug=thread.slug, quote=quote.pk) }} {%- else -%} {{ url('thread_reply', thread=thread.pk, slug=thread.slug) }} {%- endif -%} {%- elif action == 'edit_reply' -%} {{ url('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 %}Start Thread{% endtrans %} {%- elif action == 'new_reply' -%} {% trans %}Post Reply{% endtrans %} {%- else -%} {% trans %}Save Changes{% endtrans %} {%- endif %} {%- endmacro %} {% macro get_extra() %} {% endmacro %} {% macro lang_poll_public() -%} {% trans %}Make voting in this poll public.{% endtrans %} {%- endmacro %} {% macro lang_poll_changing_votes() -%} {% trans %}Allow users to change their votes.{% endtrans %} {%- endmacro %} {% macro lang_poll_delete() -%} {% trans %}Delete this poll from thread.{% endtrans %} {%- endmacro %}