~chipaca/unity-lens-video/custom-user-agent

« back to all changes in this revision

Viewing changes to templates/main/post.html

  • Committer: Janos Gyerik
  • Date: 2011-08-08 20:19:00 UTC
  • Revision ID: janos@axiom-20110808201900-rpq8pghds6gf8vnl
top 50 link now works

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
{% extends "base.html" %}
2
2
 
3
 
{% block pagetitle %}{{ form.title }}{% endblock %}
 
3
{% load nst %}
4
4
 
5
 
{% block pageheader %}{{ form.title }}{% endblock %}
 
5
{% block pagetitle %}Post a one-liner{% endblock %}
6
6
 
7
7
{% block keywords %}{% endblock %}
8
8
 
10
10
 
11
11
{% block content %}
12
12
 
13
 
{% if question %}
14
 
<div class="alert alert-info related">
15
 
    <p>The new one-liner will be linked to the following question as a possible answer:</p>
16
 
    {% with 1 as nobuttons %}
17
 
    {% include 'main/elements/question.html' %}
18
 
    {% endwith %}
19
 
</div>
20
 
{% endif %}
21
 
 
22
 
{% if oneliner %}
23
 
<div class="alert alert-info related">
24
 
    <p>The new one-liner will be linked to the following one-liner as an alternative:</p>
25
 
    {% with 1 as nobuttons %}
26
 
    {% include 'main/elements/oneliner.html' %}
27
 
    {% endwith %}
28
 
</div>
29
 
{% endif %}
30
 
 
31
 
{% include 'main/elements/please_login.html' %}
32
 
 
33
 
<ul>
34
 
    <li>Before you post, please do a quick search to confirm the one-liner does not exist yet.</li>
35
 
    <li>Please post only non-trivial and really useful, interesting or awesome one-liners.</li>
36
 
    <li>The <strong>Explanation</strong> is very important. The purpose of this site is to teach, not to show off.</li>
37
 
</ul>
38
 
 
39
 
{% include 'main/elements/oneliner_edit_form.html' %}
40
 
 
41
 
{% endblock %}
42
 
 
43
 
{% block ready %}
44
 
        $('#id_summary').focus();
 
13
<form action="" method="post">{% csrf_token %}
 
14
    <div class="non-field-errors">{{ form.non_field_errors }}</div>
 
15
    <div class="oneliner">
 
16
        <dl>
 
17
            <dt><label for="id_line">The one-liner</label></dt>
 
18
            <dd>
 
19
            <div class="error">{{ form.line.errors }}</div>
 
20
            <pre>{{ form.line }}</pre>
 
21
            </dd>
 
22
 
 
23
            <dt>Brief summary</dt>
 
24
            <dd>
 
25
            <div class="error">{{ form.summary.errors }}</div>
 
26
            <div class="summary">
 
27
                {{ form.summary }}
 
28
            </div>
 
29
            </dd>
 
30
 
 
31
            <dt>Detailed explanation</dt>
 
32
            <dd>
 
33
            <div class="error">{{ form.explanation.errors }}</div>
 
34
            <div class="explanation">
 
35
                {{ form.explanation }}
 
36
            </div>
 
37
            </dd>
 
38
 
 
39
            <dt>Caveats (if any)</dt>
 
40
            <dd>
 
41
            <div class="error">{{ form.caveats.errors }}</div>
 
42
            <div class="caveats">
 
43
                {{ form.caveats }}
 
44
            </div>
 
45
            </dd>
 
46
 
 
47
            <dt>Published</dt>
 
48
            <dd>
 
49
            <div class="error">{{ form.is_published.errors }}</div>
 
50
                {{ form.is_published }}
 
51
            </dd>
 
52
        </dl>
 
53
 
 
54
        <p><input type="submit"></p>
 
55
    </div>
 
56
</form>
 
57
 
45
58
{% endblock %}