apprec.html 2.47 KB
$def with (pkgs_details)
$var title: AppRecommender
$var url_base: /
$var action: RECOMMENDATION
$var mod = 'apprec';
$var cssfiles:  static/css/apprec.css static/css/facebox.css static/css/voting.css static/css/survey.css
$var jsfiles: static/js/facebox.js

<script type="application/x-javascript">
$$(document).ready(function() {
        $$('a[rel*=facebox]').facebox({
        loadingImage : 'static/images/loading.gif',
        closeImage   : 'static/images/closelabel.png'
        });

        $$('.like_button').mouseenter(function(e) {
                $$('.tooltip').show();
                $$('.ilikethis').fadeIn(200);
        }).mouseleave(function(e) {
                $$('.ilikethis').fadeOut(200);
                $$('.tooltip').hide();
        });
        $$('.dislike_button').mouseenter(function(e) {
                $$('.tooltip2').show();
                $$('.idislikethis').fadeIn(200);
        }).mouseleave(function(e) {
           $$('.tooltip2').hide();
                $$('.idislikethis').fadeOut(200);
        });
        
        $$('.totalstatsbutton').livequery("mouseenter", function(e){
                $$('.greenBar').css("background-color","#AADA37");
                $$('.redbar').css("background-color","#CF362F");
                $$('.tooltip3').show();
                $$('.totalstats').fadeIn(200);
        }).livequery("mouseleave", function(e){
                $$('.tooltip3').hide();
                $$('.greenBar').css("background-color","#DDDDDD");
                $$('.redbar').css("background-color","#DDDDDD");
                $$('.totalstats').fadeOut(200);
        });

});
</script>

<div id="maincontent">
<div class="innertube">

<center>
<h1>Recommended applications</h1>
</center>

<form action="thanks" method="post" enctype="multipart/form-data">

<div id="result-thumbnail">
$for pkg in pkgs_details:
        <div class="item">
          <h3><a href="package/$pkg.name" rel="facebox" class="thickbox" title="General information for package $pkg.name">$pkg.name</a></h3>
          <a class="link-thumb" rel="facebox"
           href="http://screenshots.debian.net/screenshot/$pkg.name?.jpg" title="Screenshot of package $pkg.name"
             alt="Click to enlarge screenshot">
            <img src="http://screenshots.debian.net/thumbnail/$pkg.name" alt="Screenshot $pkg.name" />
           </a>
         <p class="thumb-caption">$pkg.summary</p>
        </div>

</div><!-- id="result-thumbnail" -->
</form>

</div><!-- class="innertube" -->
</div><!-- id="maincontent" -->