blob: 5d33f460254325c381f20eec7dc3d517f9d7977d [file] [log] [blame]
{% extends "modules/gsoc/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 %}
{% block stylesheets %}
{{ block.super }}
<link rel="stylesheet" type="text/css" media="screen" href="/soc/content/{{ app_version }}/css/gsoc/buttons.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/soc/content/{{ app_version }}/css/gsoc/forms.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/soc/content/{{ app_version }}/css/gsoc/uniform.default.css" />
{% endblock stylesheets %}
{% block usermenu %}
{{ manage_actions.render }}
{% endblock usermenu %}
{% block page_content %}
{% if posted %}
<div id="flash-message" class="flash-success">
<p>Data saved successfully.</p>
</div>
{% endif %}
{% if top_message %}
{{ top_message.render }}
{% endif %}
{% if duplicate_data %}
{{ duplicate_data.render }}
{% endif %}
{% if is_ignored %}
<div id="user-message" class="error">
<strong>ALERT:</strong> This proposal has been flagged as
<strong>ignored</strong> by
{% if admin_only_data_visible %}
you or one of the other administrators of your organization. Neither
will the student be able to update or withdraw this proposal nor the
mentors of your organization will be able to perform any action on
this proposal. If you think this is incorrect, please click the
<strong>Unignore</strong> button below to resolve this situation.
<strong>NOTE:</strong> You will need to refresh this page after
clicking the button, to perform any further actions on this proposal.
{% else %}
the organization administrators. You will <strong>NOT</strong> be
allowed to perform any action on this proposal now. If you think this
is incorrect, contact your organization administrators to resolve this
situation.
{% endif %}
</div>
{% endif %}
<h1 id="project-page-title">
{{ title }}
</h1>
<h2 id="project-page-student-name">
{{ student_name }}
{% if edit_url %}
<div id="edit-page" class="project-edit-link">
<a href="{{ edit_url }}">Edit proposal</a>
</div>
{% endif %}
</h2>
<div class="project-short">
{% if student_email %}
<p class="project-mentor"><strong>Email:</strong> {{ student_email }}</p>
{% endif %}
{% if mentor_only_data_visible %}
<p class="project-mentor"><strong>Assigned mentors:</strong> {{ mentors|default:"No mentor assigned" }}</p>
<p class="project-possible-mentor"><strong>Possible mentors: </strong>{{ possible_mentors|default:"None" }}</p>
<p class="status"><strong>Status:</strong> {{ proposal_status }}</p>
{% endif %}
<p class="description"><strong>Organization:</strong> {{ org_name }}</p>
<p class="description"><strong>Short description:</strong> {{ abstract }}</p>
{% if additional_info %}
<p class="description">
<strong>Additional info:</strong>
<a href="{{ additional_info }}">{{ additional_info|truncatechars:75 }}</a>
</p>
{% endif %}
{% if public_url %}
{% if proposal_is_public %}
<p class="description" title="Anybody can view this proposal at this URL.">
{% else %}
<p class="description" title="Other students can view this proposal at this URL.">
{% endif %}
<strong>{% if proposal_is_public %}Public{% else %}Student{% endif %} URL:</strong>
<a href="{{ public_url }}">{{ public_url|truncatechars:75 }}</a>
{% endif %}
</div>
<div class="project-long">
{{ content|safe }}
</div>
{% if scoring_visible %}
<div class="score">
<div class="score-average">
<strong>Average score:</strong>
<div id="score-average-stars" class="stars"></div>
<div id="score-average-desc">
<em>{{ score.average }}/{{ score.max_score }} out of {{ score.number }} users, total: {{ score.total }}</em>
</div>
</div>
<div class="score-add">
<strong>My score:</strong>
<div id="score-add-stars" class="stars"></div>
</div>
{% if admin_only_data_visible and score.other_scores %}
<div class="score-others">
<strong>Other scores:</strong>
<div>
{% for score,names in score.other_scores.items %}
<div>
{{ score }} : {{ names|join:"," }} <br/>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% endif %}
<div class="project-comment-container">
{% if mentor_only_data_visible %}
<div class="project-comment-box project-comment-private-container">
<a name="private-comments"></a><h3>{{ private_comments|length }} private comments</h3>
{% for comment in private_comments %}
<div class="project-comment-single" id="c{{ comment.key.id_or_name }}">
<p class="project-comment-meta"><strong>{{ comment.getAuthor }}</strong> <a href="#c{{ comment.key.id_or_name }}">{{ comment.created }}</a></p>
<p class="project-comment-content">{{ comment.content }}</p>
</div>
{% endfor %}
</div>
{% endif %}
<div class="project-comment-box project-comment-public-container">
<a name="comments"></a><h3>{{ public_comments|length }} comments</h3>
{% for comment in public_comments %}
<div class="project-comment-single" id="c{{ comment.key.id_or_name }}">
<p class="project-comment-meta"><strong>{{ comment.getAuthor }}</strong> <a href="#c{{ comment.key.id }}">{{ comment.created }}</a></p>
<p class="project-comment-content">{{ comment.content }}</p>
</div>
{% endfor %}
</div>
<a name="comment"></a>
<form method="post" id="form" class="form-project-comment">
{{ comment_form.render }}
</form>
</div>
{% endblock %}
{% block dependencies %}
[
dep.uniform,
dep.jqueryui,
dep.melange.action,
{% if scoring_visible %}
dep.raty,
{% endif %}
tc(
"/soc/content/{{ app_version }}/js/templates/modules/gsoc/proposal/review.js",
{
{% if manage_actions.toggle_buttons %}
manage_toggle_buttons: [
{% for toggle_button in manage_actions.toggle_buttons %}
{
id: "{{ toggle_button.button_id }}",
type: "{{ toggle_button.button_type }}",
on_check_url: "{{ toggle_button.on_check_url }}",
on_uncheck_url: "{{ toggle_button.on_uncheck_url }}",
state: "{{ toggle_button.state }}",
checked_label: "{{ toggle_button.labels.checked }}",
unchecked_label: "{{ toggle_button.labels.unchecked }}"
},
{% endfor %}
],
{% endif %}
{% if scoring_visible %}
score: {
total: {{ score.total }},
number: {{ score.number }},
user_score: {{ score.user_score }},
max_score: {{ score.max_score }},
average: {{ score.average }},
score_action: "{{ score.score_action }}"
}
{% endif %}
})]
{% endblock dependencies %}