/apprecommender/web/templates/layout.html
HTML | 177 lines | 154 code | 19 blank | 4 comment | 0 complexity | 6466b0651a2eea6d2f7d4cacbd5b337d MD5 | raw file
- $def with (content)
- <!--Force IE6 into quirks mode with this comment tag-->
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>AppRecommender - $content.title</title>
- <link rev="made" href="mailto:tassia@gmail.com" />
- <link rel="shortcut icon" href="$(content.url_base)static/favicon.ico" />
- <link href="$(content.url_base)static/css/style.css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
- $if content.has_key('cssfiles'):
- $for css in content.cssfiles.split():
- <link href="$(content.url_base)$css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
- <script src="$(content.url_base)static/js/jquery.js" type="text/javascript"></script>
- <script src="$(content.url_base)static/js/FormManager.js" type="text/javascript"></script>
- $if content.has_key('jsfiles'):
- $for js in content.jsfiles.split():
- <script src="$js" type="text/javascript"></script>
- <!-- Dynamic form -->
- <script type="text/javascript">
- window.onload = function() {
- setupDependencies('weboptions'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
- };
- function validateForm()
- {
- var t = $$("#pkgs_list");
- var i = $$("input[name=pkgs_file]");
- if (!i.val() && ( !t.val() || t.val() == "Write your list App here or send a file list this icon:")) {
- alert("Please select a local file containing the list of installed packages.");
- return false;
- } else {
- if (i.val()) t.val("");
- return true;
- }
- }
- </script>
- <script type="text/javascript">
- $$(document).ready(function() {
- $$("#advanced-button").click(function () {
- $$("#advanced-slide").toggle("slow");
- });
- $$("#upfile").click(function () {
- $$("#upload-slide").toggle("slow");
- });
- });
- </script>
- </head>
- <body class="$content.mod">
- <div id="wrap" class="vert-grad">
- <div id="header" class="glass">
- <a href="$content.url_base" title="AppRecommender"><h1 id="logo"><span>AppRecommender</span></h1></a>
- <div id="recommender-box">
- <form action="$(content.url_base)apprec" enctype="multipart/form-data" method="post" name="weboptions" onsubmit="return validateForm()">
- <fieldset>
- <div id="submit-box">
- <input type="submit" value="$content.action" id="submit-button" class="glass"><br />
- <a id="advanced-button">advanced query?</a>
- </div>
- <div id="input-box">
- <a id="upfile"><span style="display: none;">Upload a file.</span></a>
- <label title="App list"><textarea class="focused" onfocus="this.form.className='focused';
- if(this.value=='Write your list App here or send a file list this icon:'){this.value=''}" onblur="this.form.className='';
- if(/^\s*$$/.test(this.value)){ this.value='Write your list App here or send a file list this icon:';
- this.form.className='clean' }" rows="2" cols="55" name="pkgs_list" id="pkgs_list"
- >Write your list App here or send a file list this icon:</textarea></label>
- </div>
- </fieldset>
- <div id="upload-slide">
- <fieldset>
- <p>
- <label title="Upload file">Installed packages: <input type="file" name="pkgs_file" size="20" /></label>
- </p>
- <div id="tip-upload" class="tip important">
- <p>
- Format: one package per line or the popularity-contest log file.
- </div><!-- id="tip-upload" -->
- </fieldset>
- </div><!-- id="upload-slide" -->
- <div id="advanced-slide">
- <fieldset>
- <legend>General</legend>
- <div>
- <label><input type="hidden">Profile size:</label>
- <label class="special"><input type="text" name="profile_size" value="10" size="4"></label>
- <label><input type="hidden">Recommendations:</label>
- <label class="special"><input type="text" name="limit" value="10" size="4"></label>
- </div>
- <div>
- <label><input type="hidden">Weighting:</label>
- <label class="special"><input type="radio" name="weight" value="BM25" checked="checked"> BM25</label>
- <label class="special"><input type="radio" name="weight" value="trad"> Traditional</label>
- </div>
- <div>
- <label><input type="hidden">Strategy:</label>
- <label class="special"><input type="radio" name="strategy" value="content" checked="checked"> Content-based</label>
- <label class="special"><input type="radio" name="strategy" value="collab"> Collaborative</label>
- <label class="special"><input type="radio" name="strategy" value="hybrid"> Hybrid</label>
- </div>
- </fieldset>
- <fieldset>
- <legend>Tuning up</legend>
- <div id="content-form" class="group-form group-hybrid">
- <label><input type="hidden" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid">Content representation:</label>
- <label class="special"><input type="radio" name="content" value="tag" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> tag</label>
- <label class="special"><input type="radio" name="content" value="desc" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> description</label>
- <label class="special"><input type="radio" name="content" value="full" class="DEPENDS ON strategy BEING content OR strategy BEING hybrid"> both</label>
- </div>
- <div id="colaborative-form" class="group-form group-hybrid">
- <label><input type="hidden">Clustering:</label>
- <label class="special"><input type="radio" name="cluster" value="yes"> yes</label>
- <label class="special"><input type="radio" name="cluster" value="no"> no</label>
- </div>
- <div id="hybrid-form" class="group-form group-hybrid">
- <label><input type="hidden" class="DEPENDS ON strategy BEING hybrid">Neighborhood:</label>
- <label class="special"><input type="text" name="neighbours" class="DEPENDS ON strategy BEING hybrid" value="50" size="4"></label>
- <div>
- <label><input type="hidden" class="DEPENDS ON strategy BEING hybrid">Personal profile:</label>
- <label class=special><input type="checkbox" name="profile_desktop" class="DEPENDS ON strategy BEING hybrid" > Desktop</label>
- <label class=special><input type="checkbox" name="profile_admin" class="DEPENDS ON strategy BEING hybrid" > Admin</label>
- <label class=special><input type="checkbox" name="profile_devel" class="DEPENDS ON strategy BEING hybrid" > Devel</label>
- <label class=special><input type="checkbox" name="profile_science" class="DEPENDS ON strategy BEING hybrid" > Science</label>
- <label class=special><input type="checkbox" name="profile_arts" class="DEPENDS ON strategy BEING hybrid" > Arts</label>
- </div>
- </div>
- </fieldset>
- </div><!-- id="advanced-slide" -->
- </form>
- </div>
- </div><!-- id="header" -->
- <div id="content">
- <noscript>
- <div>
- <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>
- <ol>
- <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>
- <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>
- </ol>
- </div>
- </noscript>
- $:content
- <div id="footer">
- <div id="navbar">
- <ul>
- <li><a href="$content.url_base">Home</a></li>
- <li><a href="$(content.url_base)about">About</a></li>
- <li><a href="http://github.com/tassia/AppRecommender">Development</a></li>
- </ul>
- </div><!-- id="navbar" -->
- <!--<div id="copyright"> <span> Copyright © 2011 AppRecommender team.
- </span> -->
- </div><!-- id="copyright" -->
- <br style="clear: both;" />
- </div><!-- id="footer" -->
- </div><!-- id="content" -->
- </div><!-- id="wrap" -->
- </body>
- </html>