# HG changeset patch # User Daniel Diniz # Date 1246046292 -7200 # Node ID 44c500fc0eca05ce9f03d27eec17bc4129e0f97d # Parent 0979e7af115fb51c4df4602f35406f27041216b3 Added templates considering Surveys. Patch by: Daniel Diniz, James Levy Reviewed by: Lennard de Rijk diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/edit.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/edit.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,204 @@ +{% extends "soc/models/edit.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 forms_helpers %} + +{% block scripts %} +{{ block.super }} + + + + + + + + +{% endblock %} + + +{# cannot add an id for the main form with inheritance #} +{% block body %} +

{# TODO: check if can be changed to div #} +

+{% block instructions %} +Please use this form to edit the {{ entity_type }}. +{% endblock %} +

+ +{% if error_message %} +
{{ error_message|safe }}
+{% endif %} + +
+ + + {% block form_table %} + {% as_table form %} + {% endblock %} +
+ + Survey content: + +
+
+ + {% block survey_content %} + {% if survey_form %} + {% as_twoline_table survey_form %} + {% else %} + + {% endif %} + {% endblock %} +
+ +
+ {% for type_id, type_info in question_types.items %} + + + + + {% endfor %} +
+
{# end survey_widget #} +
+ + + + + + + {% block submit_buttons %} + {% block save_button %} + {% if entity %} + + {% else %} + + {% endif %} + {% endblock %} + + {% if entity %} + {% block delete_button %} + + {% endblock %} + {% if export_link %} + + {% endif %} + {% ifequal entity.taking_access "mentor evaluation" %} + + {% endifequal %} + + {% endif %} + {% endblock %} + +
 
+ + + + + {% if edit_cancel_redirect %} + + {% else %} + + {% endif %} + + + + + + + +
+ + + + + +
+

+ + +

This item will be permanently deleted and cannot be recovered. Are you sure?
+

+
+ +
+ +
+
+
+ + + + +
+
+
+ +
+
+
+ + + + + + + +
+ + +
+ +
+
+
+ +

+ + {% if not new_survey %} + {% if survey_records %} + {{ survey_records|safe }} + {% endif %} + {% endif %} + +{% endblock %} diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/list/heading.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/list/heading.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,9 @@ + + Path + Title + Link ID + Featured + Created By + Created On + Modified + diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/list/results_heading.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/list/results_heading.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,16 @@ + + {% for property in properties %} + {{ property }} + {% endfor %} + Taken By + + Created On + + Last Modified + + Answer + + {% if grades %} + Grade + {% endif %} + diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/list/results_row.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/list/results_row.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,51 @@ + + + {% for value in list.item.getValues %} + +
+ {{ value }} +
+ + {% endfor %} + + +
+ {{ list.item.user.link_id }} +
+ + + +
+ {{ list.item.created|date:"Y-m-d H:i" }} +
+ + + +
+ {{ list.item.modified|date:"Y-m-d H:i" }} +
+ + + + View + + + {% if grades %} + +
+ +
+ + {% endif %} + diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/list/row.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/list/row.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,15 @@ + + +
+ {{ list.item.scope_path}}/{{ list.item.link_id }} +
+ +
{{ list.item.title }}
+ + +
{{ list.item.author.link_id }}
+
{{ list.item.created }}
+
{{ list.item.modified }}
+ diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/messages/new_survey.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/messages/new_survey.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,21 @@ +{% extends "soc/notification/messages/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 content %} +There is a new Survey available for your program.
+Please visit {{ survey_title}} +to take the survey.
+ +Keep in mind that taking a survey might be mandatory! +{% endblock %} diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/public.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/public.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,88 @@ +{% 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 }} + + + + +{% endblock %} + +{% block page_title %} +{{ entity.title }} +{% endblock %} + +{% block header_title %} +{{ entity.title }} +{% endblock %} + +{% block body %} +
Last modified on {{ entity.modified }} by {{ entity.modified_by.name }}
+ +{% if survey_form %} + + {% load forms_helpers %} + + {% if not read_only %} +
+ {% endif %} + + {% if read_only %} + + {% endif %} + + {{ help_text }} + +
+
+ + + + {# Project Selected for this Survey #} + {% if project %} + + {% endif %} + + {% block form_table %} + {% as_twoline_table survey_form %} + {% endblock %} + +
+
{# end survey_widget #} +
+ +

+ + + + + + +
+ {% if not read_only %} + + {% endif %} +
+ +
+{% endif %} + +{% endblock %} diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/results.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/results.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,21 @@ +{% if grades %} +
+{% endif %} +{% if list_msg %} + {{ list_msg|safe }} +{% endif %} + +{% if list.empty %} + {{ no_lists_msg }} +{% endif %} + +{% for list_number in list.lists %} +

+ {% include list.nextList %} +

+{% endfor %} + +{% if grades %} + +
+{% endif %} diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/results_page.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/results_page.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,109 @@ +{% extends "soc/models/edit.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 forms_helpers %} + +{% block scripts %} +{{ block.super }} + + + + + + + + +{% endblock %} + +{% block body %} + +{% if not new_survey %} + {% if results %} + + {% for user_role in results %} + + {% endfor %} + +
+
+ + + + + + + + + + + {% if grades %} + + {% endif %} + + {% for record in user_role %} + + + + + + + + + + + + + {% if grades %} + +{% endif %} + + + {% endfor %} +
Taken BySurveyLast ModifiedAnswerGrade
+
+ {{ record.user.name }} ({{ record.user.link_id }}) +
+
+
+ {{ record.survey.title }} +
+
+
+ {{ record.modified|date:"Y-m-d H:i" }} +
+
+ View + +
+ +
+
+
+
+ {% endif %} +{% endif %} + +{% endblock %} diff -r 0979e7af115f -r 44c500fc0eca app/soc/templates/soc/survey/universal_choice_editor.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/soc/templates/soc/survey/universal_choice_editor.html Fri Jun 26 21:58:12 2009 +0200 @@ -0,0 +1,43 @@ +
+ +{# Question type drop-down #} + + + +{# Render widget drop-down #} + + + +{# Each choice field has a hidden input where its options' order is stored. #} + + +{# Open the ordered list. #} +
    +{# Template for each option #} + {% for i, option_value in choices.items %} +
  1. + + + {{ option_value }} + + +
  2. + {% endfor %} + +{# Close the ordered list and add the 'add option' button. #} +
+ + +