Commit a403afac672e7d2c2c00950c61795d7e09335fcf
Committed by
root
1 parent
143f5a27
Exists in
master
and in
1 other branch
Fixed bug with upload file format and layout issues.
Showing
4 changed files
with
27 additions
and
20 deletions
Show diff stats
src/web/survey.py
| @@ -97,7 +97,8 @@ class Request: | @@ -97,7 +97,8 @@ class Request: | ||
| 97 | package_name_field = 0 | 97 | package_name_field = 0 |
| 98 | for line in lines: | 98 | for line in lines: |
| 99 | self.pkgs_list.append(line.split()[package_name_field]) | 99 | self.pkgs_list.append(line.split()[package_name_field]) |
| 100 | - f.write(line) | 100 | + for pkg in self.pkgs_list: |
| 101 | + f.write(pkg+'\n') | ||
| 101 | f.close() | 102 | f.close() |
| 102 | 103 | ||
| 103 | def __str__(self): | 104 | def __str__(self): |
src/web/templates/layout.html
| @@ -86,10 +86,10 @@ function validateForm() | @@ -86,10 +86,10 @@ function validateForm() | ||
| 86 | <div id="tip-upload" class="tip important"> | 86 | <div id="tip-upload" class="tip important"> |
| 87 | <p> | 87 | <p> |
| 88 | Upload a popularity-contest submission file ('/var/log/popularity-contest') | 88 | Upload a popularity-contest submission file ('/var/log/popularity-contest') |
| 89 | - or run the following command and upload generated 'packages.list' file. | 89 | + or run the following command and upload the generated 'packages.list' file. |
| 90 | </p> | 90 | </p> |
| 91 | <p> | 91 | <p> |
| 92 | - <code> # dpkg --get-selections > packages.list </code> | 92 | + <code> # dpkg-query --show > packages.list </code> |
| 93 | </p> | 93 | </p> |
| 94 | </div><!-- id="tip-upload" --> | 94 | </div><!-- id="tip-upload" --> |
| 95 | </fieldset> | 95 | </fieldset> |
| @@ -170,7 +170,8 @@ $:content | @@ -170,7 +170,8 @@ $:content | ||
| 170 | <li><a href="http://github.com/tassia/AppRecommender">Development</a></li> | 170 | <li><a href="http://github.com/tassia/AppRecommender">Development</a></li> |
| 171 | </ul> | 171 | </ul> |
| 172 | </div><!-- id="navbar" --> | 172 | </div><!-- id="navbar" --> |
| 173 | - <div id="copyright"> <span> Copyright © 2011 AppRecommender team. </span> | 173 | + <!--<div id="copyright"> <span> Copyright © 2011 AppRecommender team. |
| 174 | + </span> --> | ||
| 174 | </div><!-- id="copyright" --> | 175 | </div><!-- id="copyright" --> |
| 175 | <br style="clear: both;" /> | 176 | <br style="clear: both;" /> |
| 176 | </div><!-- id="footer" --> | 177 | </div><!-- id="footer" --> |
src/web/templates/survey.html
| @@ -32,13 +32,6 @@ $var jsfiles: static/coda-slider-2.0/javascripts/jquery-1.3.2.min.js static/coda | @@ -32,13 +32,6 @@ $var jsfiles: static/coda-slider-2.0/javascripts/jquery-1.3.2.min.js static/coda | ||
| 32 | <input type="hidden" name="strategy" value=$request.strategy> | 32 | <input type="hidden" name="strategy" value=$request.strategy> |
| 33 | <div id="controls-form" style="display: none;"><!-- display show in the end form --> | 33 | <div id="controls-form" style="display: none;"><!-- display show in the end form --> |
| 34 | 34 | ||
| 35 | -<label for="restart_button" id="tip-restart"> | ||
| 36 | - <div class="tip note"> | ||
| 37 | - <p>Restart the survey with a new packages list.</p> | ||
| 38 | - </div> | ||
| 39 | - <input id="restart-button" name="restart_button" type="submit" value="Restart" class="glass" /> | ||
| 40 | -</label> | ||
| 41 | - | ||
| 42 | <label for="finish_button" id="tip-finish"> | 35 | <label for="finish_button" id="tip-finish"> |
| 43 | <div class="tip important"> | 36 | <div class="tip important"> |
| 44 | <p>Conclude your participation in this survey</p> | 37 | <p>Conclude your participation in this survey</p> |
| @@ -48,9 +41,9 @@ $var jsfiles: static/coda-slider-2.0/javascripts/jquery-1.3.2.min.js static/coda | @@ -48,9 +41,9 @@ $var jsfiles: static/coda-slider-2.0/javascripts/jquery-1.3.2.min.js static/coda | ||
| 48 | 41 | ||
| 49 | <label for="strategy_button" id="tip-strategy"> | 42 | <label for="strategy_button" id="tip-strategy"> |
| 50 | <div class="tip tip"> | 43 | <div class="tip tip"> |
| 51 | - <p> New round of evaluations for the same list of packages and suggestions produced by a different recommendation strategy. </p> | 44 | + <p>Evaluate more suggestions </p> |
| 52 | </div> | 45 | </div> |
| 53 | - <input id="strategy-button" name="strategy_button" type="submit" value="New Round" class="glass" /> | 46 | + <input id="strategy-button" name="strategy_button" type="submit" value="Continue" class="glass" /> |
| 54 | </label> | 47 | </label> |
| 55 | 48 | ||
| 56 | </div><!-- id="controls-form" --> | 49 | </div><!-- id="controls-form" --> |
| @@ -64,7 +57,7 @@ $for pkg in pkg_details: | @@ -64,7 +57,7 @@ $for pkg in pkg_details: | ||
| 64 | <label class="glass radioButton"> | 57 | <label class="glass radioButton"> |
| 65 | <img src="/static/images/smile-s.png" alt="Smile Surprising" style="float: right;"> | 58 | <img src="/static/images/smile-s.png" alt="Smile Surprising" style="float: right;"> |
| 66 | <input class="radio" type="radio" name="evaluation-$pkg_details.index(pkg)" value="surprising" /> | 59 | <input class="radio" type="radio" name="evaluation-$pkg_details.index(pkg)" value="surprising" /> |
| 67 | - Surprising | 60 | + Pleasantly surprising |
| 68 | </label> | 61 | </label> |
| 69 | <label class="glass radioButton"> | 62 | <label class="glass radioButton"> |
| 70 | <img src="/static/images/smile-g.png" alt="Smile Good" style="float: right;"> | 63 | <img src="/static/images/smile-g.png" alt="Smile Good" style="float: right;"> |
src/web/templates/thanks.html
| 1 | $var title: Feedback | 1 | $var title: Feedback |
| 2 | $var mod = 'thanks'; | 2 | $var mod = 'thanks'; |
| 3 | $var cssfiles: static/css/survey.css | 3 | $var cssfiles: static/css/survey.css |
| 4 | -$var jsfiles: | ||
| 5 | - | ||
| 6 | 4 | ||
| 7 | <div id="maincontent"> | 5 | <div id="maincontent"> |
| 8 | <div class="innertube"> | 6 | <div class="innertube"> |
| @@ -10,12 +8,26 @@ $var jsfiles: | @@ -10,12 +8,26 @@ $var jsfiles: | ||
| 10 | <div class="index_include"> | 8 | <div class="index_include"> |
| 11 | 9 | ||
| 12 | <center> | 10 | <center> |
| 13 | -<p>Your personal identification is not mandatory, since it won't be processed | ||
| 14 | -along with the experiments results. It is collected by means of demographic | ||
| 15 | -characterization of the participants population.</p> | ||
| 16 | - | ||
| 17 | <h1>Thanks!</h1> | 11 | <h1>Thanks!</h1> |
| 18 | </center> | 12 | </center> |
| 13 | +<p>Thank you very much for participating in this survey.</p><br /> | ||
| 14 | +<p>Your identification is not mandatory, though if you provide a valid e-mail | ||
| 15 | +address you'll be sent the survey results report as soon as it is released. If | ||
| 16 | +you have any further comments, please send it through the form below.</p><br /> | ||
| 17 | + | ||
| 18 | +<div class=graybox> | ||
| 19 | +<h2>Identification</h2> | ||
| 20 | +<form> | ||
| 21 | +<label><input type="checkbox" name="public" value="checked">Can we publish your name | ||
| 22 | +in our thanks page?</label><br > | ||
| 23 | +<label>Name: <input type="text" name="name" value="" size="30"></label><br /> | ||
| 24 | +<label>E-mail:<input type="text" name="email" value="" size="30"></label><br > | ||
| 25 | +<label>Country:<input type="text" name="country" value="" size="30"></label><br > | ||
| 26 | +<label>Comments:<textarea name="comments" value="" rows="2" | ||
| 27 | +cols="30"></textarea></label><br /> | ||
| 28 | +<input type="submit" name="send_button" value="Submit" class="glass"> | ||
| 29 | +</form> | ||
| 30 | +</div> | ||
| 19 | 31 | ||
| 20 | </div> | 32 | </div> |
| 21 | 33 |