inderpartap/Bunk-O-Meter

View on GitHub
templates/timetable.html

Summary

Maintainability
Test Coverage
<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <link rel="icon" type="image/png" href="assets/img/favicon.ico">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>Dashboard - {{regno}}</title>
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
    <meta name="viewport" content="width=device-width" />
    <!-- Bootstrap core CSS     -->
    <!-- <link href="assets/css/bootstrap.min.css" rel="stylesheet" /> -->
    <link href= "{{ url_for('static',filename='css/bootstrap.min.css') }}" rel="stylesheet">
    <!-- Animation library for notifications   -->
    <!-- <link href="assets/css/animate.min.css" rel="stylesheet" /> -->
    <link href= "{{ url_for('static',filename='assets/css/animate.min.css') }}" rel="stylesheet">
    <!--  Light Bootstrap Table core CSS    -->
    <!-- <link href="assets/css/light-bootstrap-dashboard.css" rel="stylesheet" /> -->
    <link href= "{{ url_for('static',filename='assets/css/light-bootstrap-dashboard.css') }}" rel="stylesheet">
    <!--  CSS for Demo Purpose, don't include it in your project     -->
    <!-- <link href="assets/css/demo.css" rel="stylesheet" /> -->
    <link href= "{{ url_for('static',filename='assets/css/demo.css') }}" rel="stylesheet">
    <!--     Fonts and icons     -->
    <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
    <link href="{{ url_for('static',filename='assets/css/pe-icon-7-stroke.css') }}" rel="stylesheet" />
    <script src='https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.min.js'></script>
</head>

<body>
    <div class="wrapper">
        <div class="sidebar" data-color="purple" data-image="{{ url_for('static',filename='assets/img/sidebar-5.jpg') }}">
            <!--

        Tip 1: you can change the color of the sidebar using: data-color="blue | azure | green | orange | red | purple"
        Tip 2: you can also add an image using data-image tag

    -->
            <div class="sidebar-wrapper">
                <div class="logo">
                    <a href="#" class="simple-text">
                    {{regno}}
                </a>
                </div>
                <ul class="nav">
                    <li>
                        <a href="dashboard">
                        <i class="pe-7s-graph"></i>
                        <p>Attendance</p>
                    </a>
                    </li>
                    <li class="active">
                        <a href="timetable">
                        <i class="pe-7s-user"></i>
                        <p>Time Table</p>
                    </a>
                    </li>
                    <li>
                        <a href="marks">
                        <i class="pe-7s-user"></i>
                        <p>Marks</p>
                    </a>
                    </li>
                    <li>
                        <a href="history">
                        <i class="pe-7s-user"></i>
                        <p>Academic History</p>
                    </a>
                    </li>
                    <li>
                        <a href="plan">
                        <i class="pe-7s-user"></i>
                        <p>Plan Timetable</p>
                    </a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="main-panel">
            <nav class="navbar navbar-default navbar-fixed">
                <div class="container-fluid">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation-example-2">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="#">Attendance Menu</a>
                    </div>
                    <div class="collapse navbar-collapse">
                        <ul class="nav navbar-nav navbar-right">
                            <li>
                                <a href="/">
                                    <p>Log out</p>
                                </a>
                            </li>
                            <li class="separator hidden-lg hidden-md"></li>
                        </ul>
                    </div>
                </div>
            </nav>
            <div class="content">
                <div class="container-fluid">
                    <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="header">
                                <h4 class="title">Subject Wise Attendance</h4>
                                <p class="category">Classes you can miss/ need to go</p>
                            </div>
                            <div class="content table-responsive table-full-width">
                                <table class="table table-hover table-striped">
                                    <thead>
                                        <th>Course Code</th>
                                        <th>Course Name</th>
                                        <th>Course Type</th>
                                        <th>Current(%)</th>
                                        <th>Attend(%)</th>
                                        <th>Miss(%)</th>
                                        <th>Can Miss</th>
                                        <th>Need to Attend</th>
                                    </thead>
                                    <tbody>
                                    {% for j in resultsT %}
                                        <tr>
                                        {% for i in j %}
                                            <td>{{i}}</td>
                                            {% endfor %}
                                        </tr>
                                    {% endfor %}
                                    </tbody>
                                </table>

                            </div>
                        </div>
                    </div>
                    </div>
                </div>
            </div>
            <footer class="footer">
                <div class="container-fluid">
                    <nav class="pull-left">
                        <ul>
                            <li>
                                <a href="#">
                                Home
                            </a>
                            </li>
                            <li>
                                <a href="#">
                                Github
                            </a>
                            </li>
                        </ul>
                    </nav>
                    <p class="copyright pull-right">
                        &copy;
                        <script>
                        document.write(new Date().getFullYear())
                        </script> <a href="http://www.github.com/inderpartap">FFCS Scheduler</a>, made with love by Inderpartap Cheema, Raghav Kakkar, Sudhanva Devanathan
                    </p>
                </div>
            </footer>
        </div>
    </div>
</body>
<!--   Core JS Files   -->
<!-- <script src="assets/js/jquery-1.10.2.js" type="text/javascript"></script> -->
    <script src="{{ url_for('static',filename='assets/js/jquery-1.10.2.js') }}"></script>
<!-- <script src="assets/js/bootstrap.min.js" type="text/javascript"></script> -->
<script src="{{ url_for('static',filename='assets/js/bootstrap.min.js') }}"></script>
<!--  Checkbox, Radio & Switch Plugins -->
<!-- <script src="assets/js/bootstrap-checkbox-radio-switch.js"></script> -->
    <script src="{{ url_for('static',filename='assets/js/bootstrap-checkbox-radio-switch.js') }}"></script>
<!--  Charts Plugin -->
<!-- <script src="assets/js/chartist.min.js"></script> -->
    <script src="{{ url_for('static',filename='assets/js/chartist.min.js') }}"></script>
<!--  Notifications Plugin    -->
<!-- <script src="assets/js/bootstrap-notify.js"></script> -->
    <script src="{{ url_for('static',filename='assets/js/bootstrap-notify.js') }}"></script>
<!-- Light Bootstrap Table Core javascript and methods for Demo purpose -->
<!-- <script src="assets/js/light-bootstrap-dashboard.js"></script> -->
<script src="{{ url_for('static',filename='assets/js/light-bootstrap-dashboard.js') }}"></script>
<!-- Light Bootstrap Table DEMO methods, don't include it in your project! -->
<!-- <script src="assets/js/demo.js"></script> -->
<!-- <script src="{{ url_for('static',filename='assets/js/demo.js') }}"></script> -->
<script type="text/javascript">
$(document).ready(function() {

    demo.initChartist();

    $.notify({
        icon: 'pe-7s-gift',
        message: "Welcome to <b>FFCS Scheduler</b> - a beautiful app to help you organise your day."

    }, {
        type: 'info',
        timer: 5000
    });

});
</script>


<script type="text/javascript">

type = ['','info','success','warning','danger'];
        

demo = {
    initPickColor: function(){
        $('.pick-class-label').click(function(){
            var new_class = $(this).attr('new-class');  
            var old_class = $('#display-buttons').attr('data-class');
            var display_div = $('#display-buttons');
            if(display_div.length) {
            var display_buttons = display_div.find('.btn');
            display_buttons.removeClass(old_class);
            display_buttons.addClass(new_class);
            display_div.attr('data-class', new_class);
            }
        });
    },
    
    initChartist: function(){    
         
    
        var data = {
          labels: [{% for i in range(length-1) %}'{{results[0][i]}}',{% endfor %}'{{results[0][length-1]}}'],
          series: [
            [{% for i in range(length-1) %}{{results[3][i]}},{% endfor %}{{results[3][length-1]}}],
            [{% for i in range(length-1) %}{{results[5][i]}},{% endfor %}{{results[5][length-1]}}]
          ]
        };
        
        var options = {
            seriesBarDistance: 10,
            axisX: {
                showGrid: false
            },
            height: "245px"
        };
        
        var responsiveOptions = [
          ['screen and (max-width: 640px)', {
            seriesBarDistance: 5,
            axisX: {
              labelInterpolationFnc: function (value) {
                return value[0];
              }
            }
          }]
        ];
        
        Chartist.Bar('#chartActivity', data, options, responsiveOptions); 
    },
    

    
    showNotification: function(from, align){
        color = Math.floor((Math.random() * 4) + 1);
        
        $.notify({
            icon: "pe-7s-gift",
            message: "WWelcome to <b>FFCS Scheduler</b> - a beautiful app to help you organise your day."
            
        },{
            type: type[color],
            timer: 4000,
            placement: {
                from: from,
                align: align
            }
        });
    }

    
}



</script>

</html>