{% extends "user.html" %}
<!-- user_reputation.html -->
{% load extra_tags %}
{% load extra_filters %}
{% load humanize %}
{% load user_tags %}
{% block userjs %}
       <script type='text/javascript' src='{% media  "/media/js/excanvas.min.js" %}'></script>
       <script type='text/javascript' src='{% media  "/media/js/jquery.flot.min.js" %}'></script>
       
       <script type="text/javascript">
        $().ready(function(){
            var d = {{ graph_data }};
            var placeholder = $("#diagram");

            var plot = $.plot(placeholder, [d], {
                xaxis: { mode: "time" },
                points: { show: true },
                lines: { show: true }
            });
        });

        </script>

        <style type="text/css">
            div.positiveReputation {
                float: left;
                min-width: 20px;
                color: green;
                padding-right: 5px;
            }
            div.negativeReputation {
                float: left;
                min-width: 20px;
                color: red;
            }
        </style>
{% endblock %}
{% block usercontent %}
        <div style="padding:5px;font-size:13px;">
            <div id="diagram" style="width:550px;height:250px;float:left">

            </div>
            <div style="float:right; width:385px; height:300px; overflow-y:auto;word-wrap:break-word;" >
                {% for rep in reputation %}
                <p style="clear:both">
                    <div style="float:left;text-align:right;font-family:arial;font-weight:bold;background:#eee;padding:2px 10px 2px 10px;margin-right:5px">
                        <div class="positiveReputation">{{ rep.positive }}</div>
                        <div class="negativeReputation">{{ rep.negative }}</div>
                        
                    </div>
                    {% activity_item rep.action request.user %}<br/>
                </p>
                {% endfor %}
            </div>
        </div>
{% endblock %}<!-- end user_reputation.html -->
