sphinx_django/templates/comment.html
changeset 2 f5e18f8ed036
parent 0 54f784230511
equal deleted inserted replaced
1:5574cfc2b28d 2:f5e18f8ed036
       
     1 <style type="text/css">
       
     2 .comment {
       
     3   font-size: 90%;
       
     4 }
       
     5 
       
     6 
       
     7 
       
     8 
       
     9 .comment_body {
       
    10   background: #eeeeff;
       
    11 }
       
    12 
       
    13 
       
    14 .comment_header {
       
    15   opacity: 0.75;
       
    16 }
       
    17 
       
    18 .comment_id {
       
    19   float: right;
       
    20   opacity: 0.3;
       
    21   font-size: 60%;
       
    22 }
       
    23 
       
    24 .comment_name {
       
    25   font-weight: bolder;
       
    26 }
       
    27 
       
    28 
       
    29 .comment_date {
       
    30   opacity: 0.75;
       
    31 }
       
    32 
       
    33 .comment_thanks {
       
    34   color: darkblue;
       
    35   margin-left: 1em;
       
    36   font-style: italic;
       
    37   font-weight: bolder;
       
    38 }
       
    39 
       
    40 .comment_error {
       
    41   padding-left: 1em;
       
    42   font-weight: bolder;
       
    43   font-size: 80%;
       
    44   color: darkred;
       
    45 }
       
    46 </style>
       
    47 
     1 {% ifequal length 1 %}
    48 {% ifequal length 1 %}
     2   <a class="commenttoggle" id="toggle_{{ id }}"
    49   <a class="commenttoggle" id="toggle_{{ id }}"
     3       onclick="return toggleComment('{{ id }}')"
    50       onclick="return toggleComment('{{ id }}')"
     4       href="comments: show / hide">One comment</a>
    51       href="comments: show / hide">{{ length }} comments</a>
     5 {% else %}
    52 {% else %}
     6   {% if length %}
    53   {% if length %}
     7     <a class="commenttoggle" id="toggle_{{ id }}"
    54     <a class="commenttoggle" id="toggle_{{ id }}"
     8       onclick="return toggleComment('{{ id }}')"
    55       onclick="return toggleComment('{{ id }}')"
     9       href="comments: show / hide">{{ length }} comments</a>
    56       href="comments: show / hide">{{ length }} comments</a>
    10   {% else %}
    57   {% else %}
    11     <a class="commenttoggle" id="toggle_{{ id }}"
    58     <a class="commenttoggle" id="toggle_{{ id }}"
    12       onclick="return toggleComment('{{ id }}')"
    59       onclick="return toggleComment('{{ id }}')"
    13       href="comments: show / hide">No comments</a>
    60       href="comments: show / hide">0 comments</a>
    14     <div class="comment" {% if not newid %} style="display: none;" {% endif %}>
    61     <span class="comment" {% if not newid %} style="display: none;" {% endif %}>
    15       <div class="comment_body">Be the first to comment on this paragraph!</div>
    62       <span class="comment_body">Be the first to comment on this paragraph!</span>
    16     </div>
    63     </span>
    17   {% endif %}
    64   {% endif %}
    18 {% endifequal %}
    65 {% endifequal %}
    19 {% for c in query %}
    66 {% for c in query %}
    20   <div class="{% ifequal c.id newid %}new_{% endifequal %}comment"
    67   <span class="{% ifequal c.id newid %}new_{% endifequal %}comment"
    21       {% if not newid %} style="display: none;" {% endif %}
    68       {% if not newid %} style="display: none;" {% endif %}
    22     id="comment{{ c.id }}">
    69     id="comment{{ c.id }}">
    23     <a name="comment{{ c.id }}"/>
    70     <a name="comment{{ c.id }}"/>
    24     <div class="comment_header">
    71     <span class="comment_header">
    25 	<span class="comment_id"><a href="/admin/comments/comment/{{ c.id }}/">{{ c.id }}</a></span>
    72     </span>
    26       {% if c.submitter_url %}
    73     <div class="comment_body">{{ forloop.counter }}   {{ c.submitter_name }}  {{ c.comment|escape|linebreaks }}</div>
    27 	<span class="comment_name"><a rel="nofollow"
    74   </span>
    28 	  href="{{ c.submitter_url }}">{{ c.submitter_name|escape }}</a></span>
       
    29       {% else %}
       
    30 	<span class="comment_name">{{ c.submitter_name|escape }}</span>
       
    31       {% endif %}
       
    32       <span class="comment_date">{{ c.date|date:"Y-m-d" }}</span>
       
    33       {% if c.reviewed %}
       
    34 	<span class="comment_reviewed">(reviewed)</span>
       
    35       {% endif %}
       
    36       {% ifequal c.id newid %}
       
    37 	<span class="comment_thanks">thank you for your comment!</span>
       
    38       {% endifequal %}
       
    39     </div>
       
    40     <div class="comment_body">{{ c.comment|escape|linebreaks }}</div>
       
    41   </div>
       
    42 {% endfor %}
    75 {% endfor %}
    43 <form class="comment" id="form_{{ id }}" action="/comments/submit/{{ id }}/"
    76 <form class="comment" id="form_{{ paragraph_id }}" action="/submit/{{  paragraph_id }}/"
    44     method="post" {% if not newid %} style="display: none;" {% endif %}>
    77     method="post" >
    45   {{ form.id }}
       
    46   <table>
    78   <table>
    47     <tbody>
    79     <tbody>
    48       <tr><td align="right" valign="top">Comment<br><a class="comment_help"
    80       <tr><td align="right" valign="top">Comment<br></td>
    49 		href="web.html#web.comment">[ help ]</a></td>
       
    50 	  <td>{{ form.comment }}</td></tr>
    81 	  <td>{{ form.comment }}</td></tr>
    51       <tr><td align="right">Your name</td><td>{{ form.name }}
    82       <tr><td align="right">Your name</td><td>{{ form.name }}
    52 	    <span class="comment_help"><b>Required</b> so we can <a
    83 	    <span class="comment_help"><b>Required</b> so we can give you credit</a></span></td></tr>
    53 		href="web.html#web.comment.name">give you credit</a></span></td></tr>
       
    54       <tr><td align="right">Your URL</td><td>{{ form.url }}
    84       <tr><td align="right">Your URL</td><td>{{ form.url }}
    55 	    <span class="comment_help"><b>Optional</b> link to blog, home page,
    85 	    <span class="comment_help"><b>Optional</b> link to blog, home page,
    56 	      <i>etc</i>.</span></td></tr>
    86 	      <i>etc</i>.</span></td></tr>
    57       <tr><td align="right">Remember you?</td><td>{{ form.remember }}</td></tr>
    87       <tr><td align="right">Remember you?</td><td>{{ form.remember }}</td></tr>
    58       <tr><td/><td><input name="submit" type="submit"
    88       <tr><td/><td><input name="submit" type="submit"