app/templates/projrev/proposal/review.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Tue, 11 Aug 2009 04:34:01 +0530
changeset 41 64249ebaf65a
parent 39 e7880a8f7e04
child 42 4cf4c1f0e5bb
permissions -rw-r--r--
Added Serial numbers support for lists.

{% extends "projrev/base.html" %}
{% load review_helpers %}

{% block scripts %}
{{ block.super }}
<script type="text/javascript">
$(document).ready(function () {
  $('#attribute1').html();
  
}
</script>
{% endblock scripts %}

{% block content %}
<div class="post">
			
	<a name="TemplateInfo"></a>	
	<h1>Review the proposal</h1>
				
	<p>The proposal details are given below followed by a Review form.</p>

  <div class='review-center-box'>
    <div class='review-left'>
      Title:
    </div>
    <div class='review-right'>
      {{ project.title }}
    </div>
    <br/>
    <div class='review-left'>
      Project MICR Code:
    </div>
    <div class='review-right'>
      {{ project.micr_code }}
    </div>
    <br/>
    <div class='review-left'>
      Institution:
    </div>
    <div class='review-right'>
      {{ project.institution }}
    </div>
    <br/>
    <div class='review-left'>
      Project Line Item:
    </div>
    <div class='review-right'>
      {{ project.line_item }}
    </div>
    <br/>
    <div class='review-left'>
      Address:
    </div>
    <div class='review-right'>
      {{ project.address }}
    </div>
    <br/>
    <div class='review-left'>
      City:
    </div>
    <div class='review-right'>
      {{ project.city }}
    </div>
    <br/>
    <div class='review-left'>
      PIN Code:
    </div>
    <div class='review-right'>
      {{ project.pin_code }}
    </div>
    <br/>
    <div class='review-left'>
      State:
    </div>
    <div class='review-right'>
      {{ project.state }}
    </div>
    <br/>
    <div class='review-left'>
      District:
    </div>
    <div class='review-right'>
      {{ project.district }}
    </div>
    <br/>
    <div class='review-left'>
      Proposal Document:
    </div>
    <div class='review-right'>
      <a href="/site-content/{{ proposal_path }}">{{ proposal_name }}</a>
    </div>
    <br />
  </div>


	<form enctype="multipart/form-data" method="post" action="">			
		<p>
      <p>
        {{ form.attribute1.errors }}
        <strong>{{ form.attribute1.label }}</strong><br />
        <input id="attribute1" name="attribute1" type="radio" class="star" value="1"/>
        <input id="attribute1" name="attribute1" type="radio" class="star" value="2"/>
        <input id="attribute1" name="attribute1" type="radio" class="star" value="3"/>
        <input id="attribute1" name="attribute1" type="radio" class="star" value="4" />
        <input id="attribute1" name="attribute1" type="radio" class="star" value="5"/> 
        {% if form.attribute1.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a1.errors }}
        <label id='id_comment'>{{ form.comment_a1.label }}</label>{{ form.comment_a1 }}
      </p>
      <p>
        {{ form.attribute2.errors }}
        <strong>{{ form.attribute2.label }}</strong><br />
        <input name="attribute2" type="radio" class="star" value="1"/>
        <input name="attribute2" type="radio" class="star" value="2"/>
        <input name="attribute2" type="radio" class="star" value="3"/>
        <input name="attribute2" type="radio" class="star" value="4"/>
        <input name="attribute2" type="radio" class="star" value="5"/> 
        {% if form.attribute2.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a2.errors }}
        <label id='id_comment'>{{ form.comment_a2.label }}</label>{{ form.comment_a2 }}
      </p>
      <p>
        {{ form.attribute3.errors }}
        <strong>{{ form.attribute3.label }}</strong><br />
        <input name="attribute3" type="radio" class="star" value="1"/>
        <input name="attribute3" type="radio" class="star" value="2"/>
        <input name="attribute3" type="radio" class="star" value="3"/>
        <input name="attribute3" type="radio" class="star" value="4"/>
        <input name="attribute3" type="radio" class="star" value="5"/> 
        {% if form.attribute3.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a3.errors }}
        <label id='id_comment'>{{ form.comment_a3.label }}</label>{{ form.comment_a3 }}
      </p>
      <p>
        {{ form.attribute4.errors }}
        <strong>{{ form.attribute4.label }}</strong><br />
        <input name="attribute4" type="radio" class="star" value="1"/>
        <input name="attribute4" type="radio" class="star" value="2"/>
        <input name="attribute4" type="radio" class="star" value="3"/>
        <input name="attribute4" type="radio" class="star" value="4"/>
        <input name="attribute4" type="radio" class="star" value="5"/> 
        {% if form.attribute4.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a4.errors }}
        <label id='id_comment'>{{ form.comment_a4.label }}</label>{{ form.comment_a4 }}
      </p>
      <p>
        {{ form.attribute5.errors }}
        <strong>{{ form.attribute5.label }}</strong><br />
        <input name="attribute5" type="radio" class="star" value="1"/>
        <input name="attribute5" type="radio" class="star" value="2"/>
        <input name="attribute5" type="radio" class="star" value="3"/>
        <input name="attribute5" type="radio" class="star" value="4"/>
        <input name="attribute5" type="radio" class="star" value="5"/> 
        {% if form.attribute5.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a5.errors }}
        <label id='id_comment'>{{ form.comment_a5.label }}</label>{{ form.comment_a5 }}
      </p>
      <p>
        {{ form.attribute6.errors }}
        <strong>{{ form.attribute6.label }}</strong><br />
        <input name="attribute6" type="radio" class="star" value="1"/>
        <input name="attribute6" type="radio" class="star" value="2"/>
        <input name="attribute6" type="radio" class="star" value="3"/>
        <input name="attribute6" type="radio" class="star" value="4"/>
        <input name="attribute6" type="radio" class="star" value="5"/> 
        {% if form.attribute6.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a6.errors }}
        <label id='id_comment'>{{ form.comment_a6.label }}</label>{{ form.comment_a6 }}
      </p>
      <p>
        {{ form.attribute7.errors }}
        <strong>{{ form.attribute7.label }}</strong><br />
        <input name="attribute7" type="radio" class="star" value="1"/>
        <input name="attribute7" type="radio" class="star" value="2"/>
        <input name="attribute7" type="radio" class="star" value="3"/>
        <input name="attribute7" type="radio" class="star" value="4"/>
        <input name="attribute7" type="radio" class="star" value="5"/> 
        {% if form.attribute7.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a7.errors }}
        <label id='id_comment'>{{ form.comment_a7.label }}</label>{{ form.comment_a7 }}
      </p>
      <p>
        {{ form.attribute8.errors }}
        <strong>{{ form.attribute8.label }}</strong><br />
        <input name="attribute8" type="radio" class="star" value="1"/>
        <input name="attribute8" type="radio" class="star" value="2"/>
        <input name="attribute8" type="radio" class="star" value="3"/>
        <input name="attribute8" type="radio" class="star" value="4"/>
        <input name="attribute8" type="radio" class="star" value="5"/> 
        {% if form.attribute8.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a8.errors }}
        <label id='id_comment'>{{ form.comment_a8.label }}</label>{{ form.comment_a8 }}
      </p>
      <p>
        {{ form.attribute9.errors }}
        <strong>{{ form.attribute9.label }}</strong><br />
        <input name="attribute9" type="radio" class="star" value="1"/>
        <input name="attribute9" type="radio" class="star" value="2"/>
        <input name="attribute9" type="radio" class="star" value="3"/>
        <input name="attribute9" type="radio" class="star" value="4"/>
        <input name="attribute9" type="radio" class="star" value="5"/> 
        {% if form.attribute9.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment_a9.errors }}
        <label id='id_comment'>{{ form.comment_a9.label }}</label>{{ form.comment_a9 }}
      </p>
      <br /><br />
      <p>
      {% if form.comment.help_text %}
        <script type="text/javascript">
          $(document).ready( function() {
            var tooltip = [
            "<div class='tooltip'>",
            "  <div class='tooltip-body'>",
            "    <img src='/site-content/images/info.png' alt='' />",
            "    <h3>Info</h3>",
            "    <p>",
            "      {% autoescape off %}",
            "        {{ form.comment.help_text|linebreaksbr|escapejs }}",
            "      {% endautoescape %}",
            "    </p>",
            "  </div>",
            "  <div class='tooltip-bottom'></div>",
            "</div>"
            ].join("");

            var tooltip_object=null;
            var documented = $("#id_{{ form.comment.name }}");
            var not_fieldset = documented.attr('tagName') !== 'FIELDSET';
            if (not_fieldset) {
              documented.focus(function() {
                if (tooltip_object==null) {
                  tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
                }
              });
              documented.blur(function() {
                if (tooltip_object!==null) {
                  tooltip_object.remove();
                  tooltip_object=null;
                }
              });
            }
            else {
              documented.find("input").hover(function() {
                if (tooltip_object==null) {
                  tooltip_object = $(tooltip).purr({usingTransparentPNG: true,removeTimer: 10000});
                }
              },
              function() {
                if (tooltip_object!==null) {
                  tooltip_object.remove();
                  tooltip_object=null;
                }
              });
            }
          });
        </script>
      {% endif %}
      {{ form.comment.errors }}
      <label id='id_comment'>{{ form.comment.label }}</label>{{ form.comment }}{% if form.comment.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
		<br />	
		<input class="button" type="submit" value="Submit Review" />		
		</p>
	</form>
				
	 <p class="post-footer align-right">
    <span class="comments">Reviews:
    {% if nr_reviews %}
      {{ nr_reviews }}
    {% else %}
      (<i>None</i>)
    {% endif %}
    </span>
    <span class="date">Last reviewed:
    {% if last_reviewed %}
      {{ last_reviewed|date:"jS F Y h:iA" }}
    {% else %}
      (<i>Not Reviewed</i>)
    {% endif %}
    </span>
    <span class="date">Last submitted:
    {% if last_submitted %}
      {{ last_submitted|date:"jS F Y h:iA" }}
    {% else %}
      (<i>New Submission</i>)
    {% endif %} 
    </span> 
  </p>
  {% if reviews %}
  <br /><br />
  <p>
  <h2>Reviews: Comments and Scores:</h2>
	{% for review in reviews %}
	  {% as_review review %}
	{% endfor %}
	</p>
	{% endif %}
</div>
{% endblock content %}