app/templates/projrev/proposal/review.html
author Madhusudan.C.S <madhusudancs@gmail.com>
Mon, 10 Aug 2009 02:13:02 +0530
changeset 28 be65e84e7d03
parent 27 37612f295cd4
child 29 425626c7f63e
permissions -rw-r--r--
Added star-plugin files.

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

{% 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'>
      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'>
      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>
  </div>


	<form enctype="multipart/form-data" method="post" action="">			
		<p>
      <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 }}
      {{ form.comment.label_tag }}{{ form.comment }}{% if form.comment.field.required %}<span class="specialclass">&nbsp;&nbsp;(required)</span>{% endif %}
      </p>
      <p>
        {{ form.comment.errors }}
        {{ form.attribute1.label_tag }}:
        <input name="attribute1" type="radio" class="star"/>
        <input name="attribute1" type="radio" class="star"/>
        <input name="attribute1" type="radio" class="star"/>
        <input name="attribute1" type="radio" class="star"/>
        <input name="attribute1" type="radio" class="star"/> 
        {% if form.attribute1.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 %}