PageRenderTime 52ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 0ms

/apprecommender/web/templates/layout.html

https://gitlab.com/GCS2016/AppRecommender
HTML | 177 lines | 154 code | 19 blank | 4 comment | 0 complexity | 6466b0651a2eea6d2f7d4cacbd5b337d MD5 | raw file
  1. $def with (content)
  2. <!--Force IE6 into quirks mode with this comment tag-->
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  4. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  8. <title>AppRecommender - $content.title</title>
  9. <link rev="made" href="mailto:tassia@gmail.com" />
  10. <link rel="shortcut icon" href="$(content.url_base)static/favicon.ico" />
  11. <link href="$(content.url_base)static/css/style.css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
  12. $if content.has_key('cssfiles'):
  13. $for css in content.cssfiles.split():
  14. <link href="$(content.url_base)$css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
  15. <script src="$(content.url_base)static/js/jquery.js" type="text/javascript"></script>
  16. <script src="$(content.url_base)static/js/FormManager.js" type="text/javascript"></script>
  17. $if content.has_key('jsfiles'):
  18. $for js in content.jsfiles.split():
  19. <script src="$js" type="text/javascript"></script>
  20. <!-- Dynamic form -->
  21. <script type="text/javascript">
  22. window.onload = function() {
  23. setupDependencies('weboptions'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
  24. };
  25. function validateForm()
  26. {
  27. var t = $$("#pkgs_list");
  28. var i = $$("input[name=pkgs_file]");
  29. if (!i.val() && ( !t.val() || t.val() == "Write your list App here or send a file list this icon:")) {
  30. alert("Please select a local file containing the list of installed packages.");
  31. return false;
  32. } else {
  33. if (i.val()) t.val("");
  34. return true;
  35. }
  36. }
  37. </script>
  38. <script type="text/javascript">
  39. $$(document).ready(function() {
  40. $$("#advanced-button").click(function () {
  41. $$("#advanced-slide").toggle("slow");
  42. });
  43. $$("#upfile").click(function () {
  44. $$("#upload-slide").toggle("slow");
  45. });
  46. });
  47. </script>
  48. </head>
  49. <body class="$content.mod">
  50. <div id="wrap" class="vert-grad">
  51. <div id="header" class="glass">
  52. <a href="$content.url_base" title="AppRecommender"><h1 id="logo"><span>AppRecommender</span></h1></a>
  53. <div id="recommender-box">
  54. <form action="$(content.url_base)apprec" enctype="multipart/form-data" method="post" name="weboptions" onsubmit="return validateForm()">
  55. <fieldset>
  56. <div id="submit-box">
  57. <input type="submit" value="$content.action" id="submit-button" class="glass"><br />
  58. <a id="advanced-button">advanced query?</a>
  59. </div>
  60. <div id="input-box">
  61. <a id="upfile"><span style="display: none;">Upload a file.</span></a>
  62. <label title="App list"><textarea class="focused" onfocus="this.form.className='focused';
  63. if(this.value=='Write your list App here or send a file list this icon:'){this.value=''}" onblur="this.form.className='';
  64. if(/^\s*$$/.test(this.value)){ this.value='Write your list App here or send a file list this icon:';
  65. this.form.className='clean' }" rows="2" cols="55" name="pkgs_list" id="pkgs_list"
  66. >Write your list App here or send a file list this icon:</textarea></label>
  67. </div>
  68. </fieldset>
  69. <div id="upload-slide">
  70. <fieldset>
  71. <p>
  72. <label title="Upload file">Installed packages: <input type="file" name="pkgs_file" size="20" /></label>
  73. </p>
  74. <div id="tip-upload" class="tip important">
  75. <p>
  76. Format: one package per line or the popularity-contest log file.
  77. </div><!-- id="tip-upload" -->
  78. </fieldset>
  79. </div><!-- id="upload-slide" -->
  80. <div id="advanced-slide">
  81. <fieldset>
  82. <legend>General</legend>
  83. <div>
  84. <label><input type="hidden">Profile size:</label>
  85. <label class="special"><input type="text" name="profile_size" value="10" size="4"></label>
  86. <label><input type="hidden">Recommendations:</label>
  87. <label class="special"><input type="text" name="limit" value="10" size="4"></label>
  88. </div>
  89. <div>
  90. <label><input type="hidden">Weighting:</label>
  91. <label class="special"><input type="radio" name="weight" value="BM25" checked="checked"> BM25</label>
  92. <label class="special"><input type="radio" name="weight" value="trad"> Traditional</label>
  93. </div>
  94. <div>
  95. <label><input type="hidden">Strategy:</label>
  96. <label class="special"><input type="radio" name="strategy" value="content" checked="checked"> Content-based</label>
  97. <label class="special"><input type="radio" name="strategy" value="collab"> Collaborative</label>
  98. <label class="special"><input type="radio" name="strategy" value="hybrid"> Hybrid</label>
  99. </div>
  100. </fieldset>
  101. <fieldset>
  102. <legend>Tuning up</legend>
  103. <div id="content-form" class="group-form group-hybrid">
  104. <label><input type="hidden" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid">Content representation:</label>
  105. <label class="special"><input type="radio" name="content" value="tag" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> tag</label>
  106. <label class="special"><input type="radio" name="content" value="desc" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> description</label>
  107. <label class="special"><input type="radio" name="content" value="full" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> both</label>
  108. </div>
  109. <div id="colaborative-form" class="group-form group-hybrid">
  110. <label><input type="hidden">Clustering:</label>
  111. <label class="special"><input type="radio" name="cluster" value="yes"> yes</label>
  112. <label class="special"><input type="radio" name="cluster" value="no"> no</label>
  113. </div>
  114. <div id="hybrid-form" class="group-form group-hybrid">
  115. <label><input type="hidden" class="DEPENDS ON strategy BEING hybrid">Neighborhood:</label>
  116. <label class="special"><input type="text" name="neighbours" class="DEPENDS ON strategy BEING hybrid" value="50" size="4"></label>
  117. <div>
  118. <label><input type="hidden" class="DEPENDS ON strategy BEING hybrid">Personal profile:</label>
  119. <label class=special><input type="checkbox" name="profile_desktop" class="DEPENDS ON strategy BEING hybrid" > Desktop</label>
  120. <label class=special><input type="checkbox" name="profile_admin" class="DEPENDS ON strategy BEING hybrid" > Admin</label>
  121. <label class=special><input type="checkbox" name="profile_devel" class="DEPENDS ON strategy BEING hybrid" > Devel</label>
  122. <label class=special><input type="checkbox" name="profile_science" class="DEPENDS ON strategy BEING hybrid" > Science</label>
  123. <label class=special><input type="checkbox" name="profile_arts" class="DEPENDS ON strategy BEING hybrid" > Arts</label>
  124. </div>
  125. </div>
  126. </fieldset>
  127. </div><!-- id="advanced-slide" -->
  128. </form>
  129. </div>
  130. </div><!-- id="header" -->
  131. <div id="content">
  132. <noscript>
  133. <div>
  134. <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>
  135. <ol>
  136. <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>
  137. <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>
  138. </ol>
  139. </div>
  140. </noscript>
  141. $:content
  142. <div id="footer">
  143. <div id="navbar">
  144. <ul>
  145. <li><a href="$content.url_base">Home</a></li>
  146. <li><a href="$(content.url_base)about">About</a></li>
  147. <li><a href="http://github.com/tassia/AppRecommender">Development</a></li>
  148. </ul>
  149. </div><!-- id="navbar" -->
  150. <!--<div id="copyright"> <span> Copyright © 2011 AppRecommender team.
  151. </span> -->
  152. </div><!-- id="copyright" -->
  153. <br style="clear: both;" />
  154. </div><!-- id="footer" -->
  155. </div><!-- id="content" -->
  156. </div><!-- id="wrap" -->
  157. </body>
  158. </html>