Commit 5c5bf73ddfe85eda4bd4d58c0625621394009497
1 parent
cc913e63
Exists in
master
and in
1 other branch
Applying layout to survey.
Showing
3 changed files
with
17 additions
and
44 deletions
Show diff stats
src/web/server.py
| ... | ... | @@ -247,9 +247,9 @@ class AppRecommender: |
| 247 | 247 | except: |
| 248 | 248 | pkg_summaries[pkg] = "" |
| 249 | 249 | if Config().survey_mode: |
| 250 | - return render_plain.survey(recommendation, pkg_details, | |
| 251 | - FeedbackForm(request.selected_strategies), | |
| 252 | - request) | |
| 250 | + return render.survey(recommendation, pkg_details, | |
| 251 | + FeedbackForm(request.selected_strategies), | |
| 252 | + request) | |
| 253 | 253 | else: |
| 254 | 254 | return render.apprec(recommendation, pkg_summaries, |
| 255 | 255 | FeedbackForm(request.selected_strategies), | ... | ... |
src/web/templates/layout.html
| ... | ... | @@ -23,6 +23,13 @@ $ url_base = "http://localhost:8080" |
| 23 | 23 | $for js in content.jsfiles.split(): |
| 24 | 24 | <script src="$js" type="text/javascript"></script> |
| 25 | 25 | |
| 26 | +<!-- survey slides --> | |
| 27 | +<script type="text/javascript"> | |
| 28 | + $$().ready(function() { | |
| 29 | + $$('#coda-slider-1').codaSlider({dynamicTabs: false, dynamicArrowLeftText: "«", dynamicArrowRightText:"»" }); | |
| 30 | + }); | |
| 31 | +</script> | |
| 32 | + | |
| 26 | 33 | <!-- Dynamic form --> |
| 27 | 34 | <script type="text/javascript"> |
| 28 | 35 | window.onload = function() { | ... | ... |
src/web/templates/survey.html
| 1 | 1 | $def with (recommends, pkg_details, form, request) |
| 2 | -$var title: Feedback | |
| 3 | -$var mod = 'feedback'; | |
| 4 | -$var cssfiles: static/coda-slider-2.0/javascripts/jquery.coda-slider-2.0.js static/coda-slider-2.0/javascripts/jquery.easing.1.3.js | |
| 5 | -$var jsfiles: static/coda-slider-2.0/stylesheets/coda-slider-2.0.css static/coda-slider-2.0/stylesheets/reset.css | |
| 6 | - | |
| 7 | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| 8 | - | |
| 9 | -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
| 10 | - | |
| 11 | -<head> | |
| 12 | - <meta http-equiv="Content-type" content="text/html; charset=UTF-8" /> | |
| 13 | - <title>Coda-Slider 2.0</title> | |
| 14 | - <meta http-equiv="Content-Language" content="en-us" /> | |
| 15 | - | |
| 16 | - <meta name="author" content="Niall Doherty" /> | |
| 17 | - | |
| 18 | - <!-- Begin Stylesheets --> | |
| 19 | - <link rel="stylesheet" href="static/coda-slider-2.0/stylesheets/reset.css" type="text/css" media="screen" /> | |
| 20 | - <link rel="stylesheet" href="static/coda-slider-2.0/stylesheets/coda-slider-2.0.css" type="text/css" media="screen" /> | |
| 21 | - <!-- End Stylesheets --> | |
| 22 | - | |
| 23 | - <!-- Begin JavaScript --> | |
| 24 | - <script type="text/javascript" src="static/coda-slider-2.0/javascripts/jquery-1.3.2.min.js"></script> | |
| 25 | - <script type="text/javascript" src="static/coda-slider-2.0/javascripts/jquery.easing.1.3.js"></script> | |
| 26 | - <script type="text/javascript" src="static/coda-slider-2.0/javascripts/jquery.coda-slider-2.0.js"></script> | |
| 27 | - <script type="text/javascript"> | |
| 28 | - $$().ready(function() { | |
| 29 | - $$('#coda-slider-1').codaSlider({dynamicTabs: false, dynamicArrowLeftText: "«", dynamicArrowRightText:"»" }); | |
| 30 | - }); | |
| 31 | - </script> | |
| 32 | - <!-- End JavaScript --> | |
| 33 | - | |
| 34 | -</head> | |
| 35 | - | |
| 36 | -<body class="coda-slider-no-js"> | |
| 2 | +$var title: Survey | |
| 3 | +$var mod = 'survey'; | |
| 4 | +$var cssfiles: static/coda-slider-2.0/stylesheets/coda-slider-2.0.css static/coda-slider-2.0/stylesheets/reset.css | |
| 5 | +$var jsfiles: static/coda-slider-2.0/javascripts/jquery-1.3.2.min.js static/coda-slider-2.0/javascripts/jquery.coda-slider-2.0.js static/coda-slider-2.0/javascripts/jquery.easing.1.3.js | |
| 37 | 6 | |
| 38 | 7 | <noscript> |
| 39 | 8 | <div> |
| 40 | - <p>Unfortunately your browser does not hava JavaScript capabilities which are required to exploit full functionality of our site. This could be the result of two possible scenarios:</p> | |
| 9 | + <p>Unfortunately your browser does not have JavaScript capabilities which are required to exploit full functionality of our survey. This could be the result of two possible scenarios:</p> | |
| 41 | 10 | <ol> |
| 42 | 11 | <li>You are using an old web browser, in which case you should upgrade it to a newer version. We recommend the latest version of <a href="http://www.getfirefox.com">Firefox</a>.</li> |
| 43 | 12 | <li>You have disabled JavaScript in you browser, in which case you will have to enable it to properly use our site. <a href="http://www.google.com/support/bin/answer.py?answer=23852">Learn how to enable JavaScript</a>.</li> |
| ... | ... | @@ -54,8 +23,8 @@ $for pkg in pkg_details: |
| 54 | 23 | <div class="panel-wrapper"> |
| 55 | 24 | <h1>$pkg['package']</h1> |
| 56 | 25 | <span>$pkg['description']</span><br /> |
| 57 | - <input type="checkbox" name="good" /> Good <br /> | |
| 58 | - <input type="checkbox" name="surprise" /> Surprise | |
| 26 | + <input type="checkbox" name="good-$pkg['package']" /> Good <br /> | |
| 27 | + <input type="checkbox" name="surprise-$pkg['package']" /> Surprise | |
| 59 | 28 | <p> |
| 60 | 29 | <li><b>Description</b>: <br />$:pkg['long_description']</li> |
| 61 | 30 | $if pkg['homepage']: |
| ... | ... | @@ -80,6 +49,3 @@ $for pkg in pkg_details: |
| 80 | 49 | <input type="submit" value="Conclude" /> |
| 81 | 50 | |
| 82 | 51 | </form> |
| 83 | - | |
| 84 | -</body> | |
| 85 | -</html> | ... | ... |