app/soc/templates/soc/survey/public.html
author Lennard de Rijk <ljvderijk@gmail.com>
Wed, 01 Jul 2009 16:22:35 +0200
changeset 2473 5cf0625dfa73
parent 2424 51cf7a0c00a4
child 2551 087684992ab0
permissions -rw-r--r--
Changed the Survey public view to give a preview of the Survey. Also changed the access rights for deleting a Survey because of the possible invalid references problem. Added two TODO's to the _public method. The first one involves enabling the SurveyForm to generate a form without passing along the Logic since it is only used to retrieve the Survey entity which we already have available. The second one involves a brief discussion about the getFields method's functionality and name.

{% 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 %}

{% block scripts %}
{{ block.super }}
<script type="text/javascript" src="/soc/content/js/survey-default-text-090627.js"></script>
<script type="text/javascript" src="/soc/content/survey-take-090627.js"></script>
<script type="text/javascript" src="/jquery/jquery-growfield.js"></script>
{% endblock %}

{% block page_title %}
{{ entity.title }}
{% endblock %}

{% block header_title %}
{{ entity.title }}
{% endblock %}

{% block body %}
<div id="created">Last modified on {{ entity.modified }} by {{ entity.modified_by.name }}</div>

{% if survey_form %}

  {% load forms_helpers %}
  <form method="get" onsubmit="javascript:return false">
    This page gives a preview of how users will see the Survey.

    <div style="width:100%; float:left;">
      <div class="{{ status }}" id="survey_widget">
        <table>
          {% block form_table %}
            {% as_twoline_table survey_form %}
          {% endblock %}
        </table>
      </div> {# end survey_widget #}
    </div>
  </form>
{% endif %}

{% endblock %}