{% extends "soc/base.html" %}
{% comment %}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
{% load comments_helpers %}
{% load forms_helpers %}

{% block header_title %}
{{ page_name }} "{{ entity.title }}" from {{ student_name }}
{% if edit_link %}
<a href='{{ edit_link }}'>(Edit my Proposal)</a>
{% endif %}
{% endblock %}

{% block body %}
<table>
   {% if is_subscribed %}
   <td>
     <input style="font-weight: bold" type="button" value="Unsubscribe from updates"
       onclick="location.href='?subscription=off'"/>
   </td>
   {% else %}
   <td>
     <input style="font-weight: bold" type="button" value="Subscribe to updates"
       onclick="location.href='?subscription=on'"/>
   </td>
   {% endif %}
</table>

<p>
 <table>
  {% readonly_field_as_table_row entity.fields.title.label entity.title %}
  {% readonly_field_as_table_row "Student" student_name %}
  {% readonly_field_as_twoline_table_row entity.fields.abstract.label entity.abstract %}
  {% readonly_safe_field_as_twoline_table_row entity.fields.content.label entity.content %}
  {% readonly_url_field_as_table_row entity.fields.additional_info.label entity.additional_info %}
  {% readonly_field_as_table_row "Created on" entity.created_on %}
  {% readonly_field_as_table_row "Last Modified on" entity.last_modified_on %}
 </table>
</p>

<hr />
<form method="POST">
  <table>
    {% block form_table %}
      {% as_table form %}
    {% endblock %}
  </table>
 <table>
  <tr>
   <td colspan="4">&nbsp;</td>
  </tr>
  <tr>
   <td> 
    <input style="font-weight: bold" type="submit" value="Submit"/></span>
   </td>
  </tr>
 </table>
</form>

<hr />
<b>Public Reviews</b>
{% for review in public_reviews %}
  {% as_student_proposal_review review student %}
{% endfor %}
<hr />

{% endblock %}
