app/templates/projrev/proposal/review.html
changeset 34 21942fac2b4b
parent 30 94fe7fe7394d
child 38 3cb38edbe05f
equal deleted inserted replaced
33:2840389ee7f9 34:21942fac2b4b
     1 {% extends "projrev/base.html" %}
     1 {% extends "projrev/base.html" %}
       
     2 {% load review_helpers %}
       
     3 
       
     4 {% block scripts %}
       
     5 {{ block.super }}
       
     6 <script type="text/javascript">
       
     7 $(document).ready(function () {
       
     8   $('#attribute1').html();
       
     9   
       
    10 }
       
    11 </script>
       
    12 {% endblock scripts %}
       
    13 
     2 {% block content %}
    14 {% block content %}
     3 <div class="post">
    15 <div class="post">
     4 			
    16 			
     5 	<a name="TemplateInfo"></a>	
    17 	<a name="TemplateInfo"></a>	
     6 	<h1>Review the proposal</h1>
    18 	<h1>Review the proposal</h1>
    48     </div>
    60     </div>
    49     <div class='review-right'>
    61     <div class='review-right'>
    50       <a href="/site-content/{{ proposal_path }}">{{ proposal_name }}</a>
    62       <a href="/site-content/{{ proposal_path }}">{{ proposal_name }}</a>
    51     </div>
    63     </div>
    52   </div>
    64   </div>
       
    65 
       
    66 
    53 	<form enctype="multipart/form-data" method="post" action="">			
    67 	<form enctype="multipart/form-data" method="post" action="">			
    54 		<p>
    68 		<p>
    55       {{ form.as_p }}
    69       <p>
       
    70       {% if form.comment.help_text %}
       
    71         <script type="text/javascript">
       
    72           $(document).ready( function() {
       
    73             var tooltip = [
       
    74             "<div class='tooltip'>",
       
    75             "  <div class='tooltip-body'>",
       
    76             "    <img src='/site-content/images/info.png' alt='' />",
       
    77             "    <h3>Info</h3>",
       
    78             "    <p>",
       
    79             "      {% autoescape off %}",
       
    80             "        {{ form.comment.help_text|linebreaksbr|escapejs }}",
       
    81             "      {% endautoescape %}",
       
    82             "    </p>",
       
    83             "  </div>",
       
    84             "  <div class='tooltip-bottom'></div>",
       
    85             "</div>"
       
    86             ].join("");
       
    87 
       
    88             var tooltip_object=null;
       
    89             var documented = $("#id_{{ form.comment.name }}");
       
    90             var not_fieldset = documented.attr('tagName') !== 'FIELDSET';
       
    91             if (not_fieldset) {
       
    92               documented.focus(function() {
       
    93                 if (tooltip_object==null) {
       
    94                   tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
       
    95                 }
       
    96               });
       
    97               documented.blur(function() {
       
    98                 if (tooltip_object!==null) {
       
    99                   tooltip_object.remove();
       
   100                   tooltip_object=null;
       
   101                 }
       
   102               });
       
   103             }
       
   104             else {
       
   105               documented.find("input").hover(function() {
       
   106                 if (tooltip_object==null) {
       
   107                   tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
       
   108                 }
       
   109               },
       
   110               function() {
       
   111                 if (tooltip_object!==null) {
       
   112                   tooltip_object.remove();
       
   113                   tooltip_object=null;
       
   114                 }
       
   115               });
       
   116             }
       
   117           });
       
   118         </script>
       
   119       {% endif %}
       
   120       {{ form.comment.errors }}
       
   121       {{ form.comment.label_tag }}{{ form.comment }}{% if form.comment.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   122       </p>
       
   123       <p>
       
   124         {{ form.attribute1.errors }}
       
   125         {{ form.attribute1.label_tag }}
       
   126         <input id="attribute1" name="attribute1" type="radio" class="star" value="1"/>
       
   127         <input id="attribute1" name="attribute1" type="radio" class="star" value="2"/>
       
   128         <input id="attribute1" name="attribute1" type="radio" class="star" value="3"/>
       
   129         <input id="attribute1" name="attribute1" type="radio" class="star" value="4" />
       
   130         <input id="attribute1" name="attribute1" type="radio" class="star" value="5"/> 
       
   131         {% if form.attribute1.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   132       </p>
       
   133       <p>
       
   134         {{ form.attribute2.errors }}
       
   135         {{ form.attribute2.label_tag }}
       
   136         <input name="attribute2" type="radio" class="star" value="1"/>
       
   137         <input name="attribute2" type="radio" class="star" value="2"/>
       
   138         <input name="attribute2" type="radio" class="star" value="3"/>
       
   139         <input name="attribute2" type="radio" class="star" value="4"/>
       
   140         <input name="attribute2" type="radio" class="star" value="5"/> 
       
   141         {% if form.attribute2.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   142       </p>
       
   143       <p>
       
   144         {{ form.attribute3.errors }}
       
   145         {{ form.attribute3.label_tag }}
       
   146         <input name="attribute3" type="radio" class="star" value="1"/>
       
   147         <input name="attribute3" type="radio" class="star" value="2"/>
       
   148         <input name="attribute3" type="radio" class="star" value="3"/>
       
   149         <input name="attribute3" type="radio" class="star" value="4"/>
       
   150         <input name="attribute3" type="radio" class="star" value="5"/> 
       
   151         {% if form.attribute3.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   152       </p>
       
   153       <p>
       
   154         {{ form.attribute4.errors }}
       
   155         {{ form.attribute4.label_tag }}
       
   156         <input name="attribute4" type="radio" class="star" value="1"/>
       
   157         <input name="attribute4" type="radio" class="star" value="2"/>
       
   158         <input name="attribute4" type="radio" class="star" value="3"/>
       
   159         <input name="attribute4" type="radio" class="star" value="4"/>
       
   160         <input name="attribute4" type="radio" class="star" value="5"/> 
       
   161         {% if form.attribute4.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   162       </p>
       
   163       <p>
       
   164         {{ form.attribute5.errors }}
       
   165         {{ form.attribute5.label_tag }}
       
   166         <input name="attribute5" type="radio" class="star" value="1"/>
       
   167         <input name="attribute5" type="radio" class="star" value="2"/>
       
   168         <input name="attribute5" type="radio" class="star" value="3"/>
       
   169         <input name="attribute5" type="radio" class="star" value="4"/>
       
   170         <input name="attribute5" type="radio" class="star" value="5"/> 
       
   171         {% if form.attribute5.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   172       </p>
       
   173       <p>
       
   174         {{ form.attribute6.errors }}
       
   175         {{ form.attribute6.label_tag }}
       
   176         <input name="attribute6" type="radio" class="star" value="1"/>
       
   177         <input name="attribute6" type="radio" class="star" value="2"/>
       
   178         <input name="attribute6" type="radio" class="star" value="3"/>
       
   179         <input name="attribute6" type="radio" class="star" value="4"/>
       
   180         <input name="attribute6" type="radio" class="star" value="5"/> 
       
   181         {% if form.attribute6.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   182       </p>
       
   183       <p>
       
   184         {{ form.attribute7.errors }}
       
   185         {{ form.attribute7.label_tag }}
       
   186         <input name="attribute7" type="radio" class="star" value="1"/>
       
   187         <input name="attribute7" type="radio" class="star" value="2"/>
       
   188         <input name="attribute7" type="radio" class="star" value="3"/>
       
   189         <input name="attribute7" type="radio" class="star" value="4"/>
       
   190         <input name="attribute7" type="radio" class="star" value="5"/> 
       
   191         {% if form.attribute7.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   192       </p>
       
   193       <p>
       
   194         {{ form.attribute8.errors }}
       
   195         {{ form.attribute8.label_tag }}
       
   196         <input name="attribute8" type="radio" class="star" value="1"/>
       
   197         <input name="attribute8" type="radio" class="star" value="2"/>
       
   198         <input name="attribute8" type="radio" class="star" value="3"/>
       
   199         <input name="attribute8" type="radio" class="star" value="4"/>
       
   200         <input name="attribute8" type="radio" class="star" value="5"/> 
       
   201         {% if form.attribute8.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   202       </p>
       
   203       <p>
       
   204         {{ form.attribute9.errors }}
       
   205         {{ form.attribute9.label_tag }}
       
   206         <input name="attribute9" type="radio" class="star" value="1"/>
       
   207         <input name="attribute9" type="radio" class="star" value="2"/>
       
   208         <input name="attribute9" type="radio" class="star" value="3"/>
       
   209         <input name="attribute9" type="radio" class="star" value="4"/>
       
   210         <input name="attribute9" type="radio" class="star" value="5"/> 
       
   211         {% if form.attribute9.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
       
   212       </p>
    56 		<br />	
   213 		<br />	
    57 		<input class="button" type="submit" value="Submit Review" />		
   214 		<input class="button" type="submit" value="Submit Review" />		
    58 		</p>		
   215 		</p>
    59 	</form>
   216 	</form>
    60 				
   217 				
    61 	<p class="post-footer align-right">					
   218 	 <p class="post-footer align-right">
    62 		<span class="comments">Reviews (5)</span>
   219     <span class="comments">Reviews:
    63 		<span class="date">Last reviewed: Nov 11, 2006</span>
   220     {% if nr_reviews %}
    64 		<span class="date">Last submitted: Nov 11, 2006</span>	
   221       {{ nr_reviews }}
       
   222     {% else %}
       
   223       (<i>None</i>)
       
   224     {% endif %}
       
   225     </span>
       
   226     <span class="date">Last reviewed:
       
   227     {% if last_reviewed %}
       
   228       {{ last_reviewed|date:"jS F Y h:iA" }}
       
   229     {% else %}
       
   230       (<i>Not Reviewed</i>)
       
   231     {% endif %}
       
   232     </span>
       
   233     <span class="date">Last submitted:
       
   234     {% if last_submitted %}
       
   235       {{ last_submitted|date:"jS F Y h:iA" }}
       
   236     {% else %}
       
   237       (<i>New Submission</i>)
       
   238     {% endif %} 
       
   239     </span> 
       
   240   </p>
       
   241   {% if reviews %}
       
   242   <br /><br />
       
   243   <p>
       
   244   <h2>Reviews: Comments and Scores:</h2>
       
   245 	{% for review in reviews %}
       
   246 	  {% as_review review %}
       
   247 	{% endfor %}
    65 	</p>
   248 	</p>
    66 				
   249 	{% endif %}
    67 </div>
   250 </div>
    68 {% endblock content %}
   251 {% endblock content %}