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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2422
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     1
{% extends "soc/base.html" %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     2
{% comment %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     3
Licensed under the Apache License, Version 2.0 (the "License");
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     4
you may not use this file except in compliance with the License.
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     5
You may obtain a copy of the License at
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     6
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     7
http://www.apache.org/licenses/LICENSE-2.0
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     8
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
     9
Unless required by applicable law or agreed to in writing, software
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    10
distributed under the License is distributed on an "AS IS" BASIS,
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    11
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    12
See the License for the specific language governing permissions and
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    13
limitations under the License.
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    14
{% endcomment %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    15
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    16
{% block scripts %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    17
{{ block.super }}
2424
51cf7a0c00a4 Renamed JavaScript files in templates to match the correct files using prefixes.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2422
diff changeset
    18
<script type="text/javascript" src="/soc/content/js/survey-default-text-090627.js"></script>
51cf7a0c00a4 Renamed JavaScript files in templates to match the correct files using prefixes.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2422
diff changeset
    19
<script type="text/javascript" src="/soc/content/survey-take-090627.js"></script>
2422
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    20
<script type="text/javascript" src="/jquery/jquery-growfield.js"></script>
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    21
{% endblock %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    22
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    23
{% block page_title %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    24
{{ entity.title }}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    25
{% endblock %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    26
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    27
{% block header_title %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    28
{{ entity.title }}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    29
{% endblock %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    30
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    31
{% block body %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    32
<div id="created">Last modified on {{ entity.modified }} by {{ entity.modified_by.name }}</div>
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    33
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    34
{% if survey_form %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    35
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    36
  {% load forms_helpers %}
2473
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    37
  <form method="get" onsubmit="javascript:return false">
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    38
    This page gives a preview of how users will see the Survey.
2422
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    39
2473
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    40
    <div style="width:100%; float:left;">
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    41
      <div class="{{ status }}" id="survey_widget">
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    42
        <table>
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    43
          {% block form_table %}
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    44
            {% as_twoline_table survey_form %}
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    45
          {% endblock %}
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    46
        </table>
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    47
      </div> {# end survey_widget #}
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    48
    </div>
5cf0625dfa73 Changed the Survey public view to give a preview of the Survey.
Lennard de Rijk <ljvderijk@gmail.com>
parents: 2424
diff changeset
    49
  </form>
2422
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    50
{% endif %}
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    51
44c500fc0eca Added templates considering Surveys.
Daniel Diniz <ajaksu@gmail.com>
parents:
diff changeset
    52
{% endblock %}