diff options
author | pnshiralkar | 2020-04-30 12:29:17 +0530 |
---|---|---|
committer | pnshiralkar | 2020-04-30 12:29:17 +0530 |
commit | f37c22cd751e53e1fe19f2aee2e782d619cdc354 (patch) | |
tree | 2c6b3299ce3dc5e25852d27a955ae5e1ada69d3e /workshop_app/templates | |
parent | 835c4e34964f77c3b75624a038ba153bfa58a44f (diff) | |
download | workshop_booking-f37c22cd751e53e1fe19f2aee2e782d619cdc354.tar.gz workshop_booking-f37c22cd751e53e1fe19f2aee2e782d619cdc354.tar.bz2 workshop_booking-f37c22cd751e53e1fe19f2aee2e782d619cdc354.zip |
Refractoring templates and frontend done, upgraded to bootstrap 4
Diffstat (limited to 'workshop_app/templates')
22 files changed, 256 insertions, 1778 deletions
diff --git a/workshop_app/templates/workshop_app/activation.html b/workshop_app/templates/workshop_app/activation.html index dc6114a..fb8de48 100644 --- a/workshop_app/templates/workshop_app/activation.html +++ b/workshop_app/templates/workshop_app/activation.html @@ -1,23 +1,25 @@ {% extends 'workshop_app/base.html' %} {% block title %} - Awating activation + Awaiting activation {% endblock %} {% block header %} - <nav class="navbar navbar-default navbar-custom"> - <div class="container-fluid"> - <div class="navbar-header"> - <a class="navbar-brand" href="#">FOSSEE Python Workshops</a> - </div> - <ul class="nav navbar-nav navbar-right"> - {% if request.user.profile.is_email_verified %} - <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> Profile</a></li> - - <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li> - {% endif %} - </ul> - </div> + <nav class="navbar navbar-default navbar-custom"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="#">FOSSEE Python Workshops</a> + </div> + <ul class="nav navbar-nav navbar-right"> + {% if request.user.profile.is_email_verified %} + <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> + Profile</a></li> + + <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a> + </li> + {% endif %} + </ul> + </div> </nav> {% endblock %} @@ -26,45 +28,46 @@ {% endblock %} {% block content %} - {% if status == '2' %} - <div class="container"> - <div class="jumbotron"> - <p> Your email is already verified, Please view your profile <a href="{{ URL_ROOT }}/view_profile/">here</a> </p> - - </div> - </div> - {% elif status == '1' %} - <script type="text/javascript"> - window.setTimeout(function() - { - location.href="{{ URL_ROOT }}/register/" - }, 3000); - </script> - <div class="container"> - <div class="jumbotron"> - <p> Your activation has expired please register again</p> - </div> - </div> - {% elif status == '0' %} - <div class="container"> - <div class="jumbotron"> - <p> Your account has been activated. Please view your profile <a href="{{ URL_ROOT }}/view_profile/">here</a> </p> - - </div> - </div> - {% else %} - <script type="text/javascript"> - window.setTimeout(function() - { - location.href="{{ URL_ROOT }}/logout/" - }, 5000); - </script> + {% if status == '2' %} + <div class="container"> + <div class="jumbotron"> + <p> Your email is already verified, Please view your profile <a + href="{{ URL_ROOT }}/view_profile/">here</a></p> + + </div> + </div> + {% elif status == '1' %} + <script type="text/javascript"> + window.setTimeout(function () { + location.href = "{{ URL_ROOT }}/register/" + }, 3000); + </script> + <div class="container"> + <div class="jumbotron"> + <p> Your activation has expired please register again</p> + </div> + </div> + {% elif status == '0' %} + <div class="container"> + <div class="jumbotron"> + <p> Your account has been activated. Please view your profile <a href="{{ URL_ROOT }}/view_profile/">here</a> + </p> + + </div> + </div> + {% else %} + <script type="text/javascript"> + window.setTimeout(function () { + location.href = "{{ URL_ROOT }}/logout/" + }, 5000); + </script> - <div class="container"> - <div class="jumbotron"> - <h1>Activation Awaiting</h1> - <p>The Activation Link has been sent to your email. The link expires in <strong>24hours</strong> from the date of registration. You will be logged out automatically.</p> - </div> - </div> - {% endif %} + <div class="container"> + <div class="jumbotron"> + <h1>Activation Awaiting</h1> + <p>The Activation Link has been sent to your email. The link expires in <strong>24hours</strong> from + the date of registration. You will be logged out automatically.</p> + </div> + </div> + {% endif %} {% endblock %} diff --git a/workshop_app/templates/workshop_app/base.html b/workshop_app/templates/workshop_app/base.html index af07689..c7a454e 100644 --- a/workshop_app/templates/workshop_app/base.html +++ b/workshop_app/templates/workshop_app/base.html @@ -1,100 +1,105 @@ <!DOCTYPE html> <html> <head> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title> - {% block title %} - HomePage - {% endblock %} - </title> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title> + {% block title %} + HomePage + {% endblock %} + </title> + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" + integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> - <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"> - <link href="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/sticky-footer.css" type="text/css" /> + <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" + integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" + crossorigin="anonymous"></script> + <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" + integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" + crossorigin="anonymous"></script> + {% block extra-dependencies %} + {% endblock %} + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" + integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" + crossorigin="anonymous"></script> + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" + rel="stylesheet"> + <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/base.css" type="text/css"/> <!-- favicon --> - <link rel="shortcut icon" type="image/png" href="{{ URL_ROOT}}/static/workshop_app/img/fevicon_python.png"/> + <link rel="shortcut icon" type="image/png" href="{{ URL_ROOT }}/static/workshop_app/img/fevicon_python.png"/> + {% block extra-custom-scripts %} + {% endblock %} </head> - <!-- For js/ajax and other related scripts --> - {% block extra %} - {% endblock %} - <body style="overflow: scroll;"> - {% block header %} - <nav class="navbar navbar-default navbar-custom"> - <div class="container-fluid"> - {% if request.user.profile.position == 'instructor' %} - <div class="navbar-header"> - <a class="navbar-brand" >FOSSEE Python Workshops</a> - </div> - <ul class="nav navbar-nav"> - <li><a href="{{ URL_ROOT }}/manage/">Manage Workshops</a></li> - <li><a href="{{ URL_ROOT }}/create_workshop/">Create Workshop</a></li> - <li><a href="{{ URL_ROOT }}/my_workshops/">Workshop Status</a></li> - </ul> - {% elif request.user.profile.position == 'coordinator' %} - <div class="navbar-header"> - <a class="navbar-brand" >FOSSEE Python Workshops</a> - </div> - <ul class="nav navbar-nav"> - <li ><a href="{{ URL_ROOT }}/my_workshops/">Workshop Status</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Workshops - <span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="{{ URL_ROOT }}/book/">Book a Workshop</a></li> - <li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li> - </ul> - </li> - <li><a href="{{ URL_ROOT }}/view_workshoptype_list/"> Workshop List</a></li> - </ul> - {% else %} - <div class="navbar-header"> - <a class="navbar-brand" href="{{ URL_ROOT }}/">FOSSEE Python Workshops</a> - </div> +{% block header %} + <nav class=" navbar-custom navbar navbar-expand-lg bg-light"> + <a class="navbar-brand" href="/">FOSSEE Python Workshops</a> + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" + aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> - {% endif %} + <div class="collapse navbar-collapse" id="navbarSupportedContent"> + <ul class="navbar-nav mr-auto"> + {% if request.user.profile.position == 'coordinator' %} + <li class="nav-item"> + <a class="nav-link" href="/my_workshops/">Workshop Status</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="/propose_workshop/">Propose Workshop</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="/workshop_types/">Workshop Types</a> + </li> + {% elif request.user.profile.position == 'instructor' %} + <li class="nav-item"> + <a class="nav-link" href="/my_workshops/">Workshop Status</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="/workshop_types/">Workshop Types</a> + </li> + {% endif %} + </ul> + <div class="my-2 my-lg-0"> + {% if user.is_authenticated %} + <ul class="navbar-nav mr-auto"> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" + data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span + class="material-icons" style="vertical-align: middle">account_circle</span> + <p + style="display: inline; vertical-align: middle">{{ user.first_name }} {{ user.last_name }}</p> + </a> + <div class="dropdown-menu" aria-labelledby="navbarDropdown"> + <a class="dropdown-item" href="/view_profile/">Profile</a> + <a class="dropdown-item" href="/logout">Logout</a> + </div> + </li> + </ul> + {% else %} + <ul class="navbar-nav mr-auto"> + <li class="nav-item"> + <a class="nav-link" href="/register/">Register</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="/login/">Login</a> + </li> + </ul> + {% endif %} + </div> + </div> + </nav> +{% endblock %} - <ul class="nav navbar-nav navbar-right"> - {% if request.user.profile.position == 'instructor' %} - <li><a href="{{ URL_ROOT }}/view_workshoptype_list/">Workshop List</a></li> - <li class="dropdown"> - <a class="dropdown-toggle" data-toggle="dropdown" href="#">Statistics - <span class="caret"></span></a> - <ul class="dropdown-menu"> - <li><a href="{{ URL_ROOT }}/statistics/">Workshop Statistics</a></li> - <li><a href="{{ URL_ROOT }}/statistics/profile_stats/">Profile Statistics</a></li> - </ul> - </li> - <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> {{ user.first_name }} </a></li> - <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li> - {% elif request.user.profile.position == 'coordinator' %} - <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li> - <li><a href="{{ URL_ROOT }}/faq/">FAQ's</a></li> - <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> {{ user.first_name }} </a></li> - <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li> - {% else %} - <li><a href="{{URL_ROOT}}/register">Register</a></li> - <li><a href="{{URL_ROOT}}/login">Login</a></li> - <li><a href="{{URL_ROOT}}/how_to_participate">How to Participate</a></li> - <li ><a href="https://python.fossee.in/about" target="_blank">About Us</a></li> - <li><a href="{{URL_ROOT}}/statistics/public_stats/">Stats</a></li> - </ul> - {% endif %} - </div> - </nav> - {% endblock %} +{% block content %} + <h1>Base Template Content. Please override me</h1> +{% endblock %} - {% block content %} - <h1>Base Template Content. Please override me</h1> - {% endblock %} - </body> - <footer class="footer"> - <div class="container"> - <p align="center">Developed by FOSSEE group, IIT Bombay</p> - </div> - </footer> +<footer class="footer"> + <div class="container"> + Developed by FOSSEE group, IIT Bombay + </div> +</footer> </html> diff --git a/workshop_app/templates/workshop_app/booking.html b/workshop_app/templates/workshop_app/booking.html deleted file mode 100644 index 8c2b2c3..0000000 --- a/workshop_app/templates/workshop_app/booking.html +++ /dev/null @@ -1,144 +0,0 @@ -{% extends 'workshop_app/base.html' %} - -{% block title %} - Book a Workshop -{% endblock %} - - -{% block extra %} - - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> - - <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> - <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> - - <script> - // Button function - function sendData(d){ - var check_count; - //For queue - var URL = "{{ URL_ROOT }}/book_workshop/"; - c = d + ',0'; - $.ajax({ - url: URL, - datatype: 'json', - async: false, - type: "POST", - data: { - c, - csrfmiddlewaretoken: $("input[name=csrfmiddlewaretoken]").val() - }, - success:function(response){ - check_count = response; - } - }); - - var $dialog = $('<div></div').html( - '<form id="myform" action="">\ - <input type="checkbox" id="one"\ - name="one" value="one"/> We assure to give minimum 30 participants for the workshop.<br/>\ - <input type="checkbox" id="two" name="two" value="two" /> We agree that this booking won\'t be cancelled without prior notice of 2days to the instructor and fossee.<br/>\ - <input type="checkbox" id="three" name="three" value="three"/> Your request will be number '+ check_count +' in the queue.\ - </form> ') - .dialog({ - autoOpen: false, - title: 'Terms & Condition', - buttons: { - "Confirm": function(){ - if($('#one').is(":checked") && $('#two').is(":checked") && $('#three').is(":checked")){ - booking_confirmed(d); - $(this).dialog("close"); - } else { - alert("Please select all the checkboxes."); - } - }, - "Cancel": function(){ - $(this).dialog("close"); - } - } - }); - $dialog.dialog('open'); - } - - function booking_confirmed(d){ - var URL = "{{ URL_ROOT }}/book_workshop/"; - - $.ajax({ - url: URL, - type: "POST", - data: { - d, - csrfmiddlewaretoken: $("input[name=csrfmiddlewaretoken]").val() - }, - - success:function(response){ - window.location.reload(); - alert("success: " + response); - } - }); - } - </script> -{% endblock %} - -{% block content %} - <h3 align="center">List of Available Workshops </h3> - <br> - <div class="container"> - <table class="table table-hover "> - <thead> - <tr> - <th>Instructor Name</th> - <th>Workshop Name</th> - <th>Workshop Day</th> - <th>Booking</th> - </tr> - </thead> - {% csrf_token %} - - {% for workshop in workshop_details %} - <tbody> - - <tr > - <td id="instructor-name">{{ workshop.1 }}</td> - <td - id="workshop-name">{{ workshop.2 }} <a href="{{URL_ROOT}}/file_view/{{workshop.4}}" > - <span class="glyphicon glyphicon-info-sign"></span> - </a> </td> - <td id="workshop-date{{ forloop.counter }}">{{ workshop.0 }}</td> - <td><button class="btn btn-primary btn-sm" id="book-btn" onClick="sendData('{{workshop.0}},{{workshop.3}},{{workshop.4}}')" > Book</button></td> - </tr> - </tbody> - {% endfor %} - </table> - </div> - - - <!-- Page Navigation --> - <div class="container"> - <div class="Page-Nav" align="center"> - <nav aria-label="Page navigation"> - <ul class="pagination pagination-sm"> - <li class="page-item"> - {% if workshop_details.has_previous %} - <a class="page-link" tabindex="-1" - href="?page={{ workshop_details.previous_page_number }}">Previous</a> - {% endif %} - </li> - <li class="page-item"> - <span class="current"> - Page {{ workshop_details.number }} of {{ workshop_details.paginator.num_pages }} - </span> - </li> - <li class="page-item"> - {% if workshop_details.has_next %} - <a class="page-link" href="?page={{ workshop_details.next_page_number }}">Next - </a> - {% endif %} - </li> - </ul> - </nav> - </div> - </div> - -{% endblock %} diff --git a/workshop_app/templates/workshop_app/create_workshop.html b/workshop_app/templates/workshop_app/create_workshop.html deleted file mode 100644 index 3498da4..0000000 --- a/workshop_app/templates/workshop_app/create_workshop.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends "workshop_app/base.html" %} - -{% block title %} - Create Workshop -{% endblock %} - - {% block extra %} - <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="{{URL_ROOT}}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> - <script src="https://code.jquery.com/jquery-1.12.4.js"></script> - <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> - {% endblock %} - - -{% block content %} - <div class="container"> - <form method="post"> - {% csrf_token %} - <br/> - {{ form.media }} - {{ form.as_p }} - <br><br> - <div class="alert alert-info"> - <strong>Please Note:!</strong> While Making Recurring Workshops please also fill <strong>Repeat Until </strong> and while creating single event please set it <strong>4days after the current date.</strong> - </div> - <br> - <button class="btn btn-success" type="submit">Save</button> - </form> - </div> -{% endblock %} diff --git a/workshop_app/templates/workshop_app/how_to_participate.html b/workshop_app/templates/workshop_app/how_to_participate.html deleted file mode 100644 index c23b178..0000000 --- a/workshop_app/templates/workshop_app/how_to_participate.html +++ /dev/null @@ -1,65 +0,0 @@ -{% extends 'workshop_app/base.html' %} - -{% block title %} - How to Participate -{% endblock %} - -{% block extra %} - - <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> --> - - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> - <link href='//fonts.googleapis.com/css?family=Open Sans' rel='stylesheet'> - <style> - h1 { - font-family: 'Open Sans'; - color: #2952a2; - } - h4 { - font-family: 'Open Sans', 'Light'; - color: #04a9cf; - padding-left: 5%; - } - img { - display: block; - margin: 0 auto; - } - - #info { - - padding-left :6%; - padding-right :6%; - - } - - - </style> -{% endblock %} - - -{% block content %} - - <div class="container-fluid" id="info"> - <div class="row"> - <div class="col-12"> - <ul> - <h1>Steps for conducting workshop</h1> - <br> - <h4><li>Register on this website as a Coordinator</li></h4> - <h4><li>Login using your credentials and propose a workshop or select a workshop from the list of available workshops</li></h4> - <h4><li>Wait for instructor approval till you receive a confirmation mail</li></h4> - <h4><li>Once the workshop request/proposal is approved, instructor will send you other workshop details</li></h4> - <h4> <li>Conduct the workshop</li></h4> - </ul> - </div> - </div> - <div class="row"> - <div class="col-12"> - <img style="width:auto ; height:auto; " class="img-responsive" src="{{ URL_ROOT }}/static/workshop_app/img/structure.png"> - </div> - </div> - <br><br> - </div> - -{% endblock %} diff --git a/workshop_app/templates/workshop_app/index.html b/workshop_app/templates/workshop_app/index.html deleted file mode 100644 index 4880a2a..0000000 --- a/workshop_app/templates/workshop_app/index.html +++ /dev/null @@ -1,214 +0,0 @@ - -<!DOCTYPE html> -<html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="Akshen Doke" content="PRE, FOSSEE-IITB"> - <meta name="title" content="Welcome to FOSSEE's Python Workshops"> - <meta name="description" content="The FOSSEE team at IIT Bombay conducts remote-assisted training programs in Python. - These are interactive workshop sessions with hands-on experience, live assistance, practice sessions and evaluation quizzes. - These programs can be conducted at your institution / organisation, free of charge. - Please note that you will require a coordinator and a minimum number of 25 participants to request for these workshops."> - <meta name="keywords" content="learn python for free, fossee, iit bombay, python workshops, fossee python, python workshops"> - <!-- favicon --> - <link rel="shortcut icon" type="image/png" href="{{ URL_ROOT}}/static/workshop_app/img/fevicon_python.png"/> - - <!-- <script src="{{ URL_ROOT }}/static/workshop_app/css/bootstrap4.min.css"></script> --> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> - - - <!-- Custom CSS --> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/index.css" type="text/css" /> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/sticky-footer.css" type="text/css" /> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/slick.css" type="text/css" /> - <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/slick-theme.css" type="text/css" /> - - <!-- Add icon library --> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> - - - <script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script> -<script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> - -<!-- Custom JS --> -<script src="{{ URL_ROOT }}/static/workshop_app/js/index.js"></script> -<script src="{{ URL_ROOT }}/static/workshop_app/js/slick.js"></script> - -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> - - <title>Welcome</title> - - <script> - $(function() { - $(".rslides").responsiveSlides({ - speed: "3000", - }); - }); - - $(function() { - $(".tslides").responsiveSlides({ - speed: "1000", - }); - }); - </script> - -<!-- Carousal(slick) --> -<script> -$(document).ready(function(){ - $('.slick_carousal').slick({ - infinite: true, - slidesToShow: 3, - slidesToScroll: 1 - }); -}); -</script> - -</head> -<body> - <div> - {% if banners %} - {% for banner in banners %} - {% if banner.active %} - {{ banner.html | safe}} - {% endif %} - - <!-- - <center> - <a href="https://fossee.in/fellowship/2019"><img - src="https://static.fossee.in/fossee/banners/fellowship_2019_3.gif"/> - </a> - </center> - --> - {% endfor %} - {% endif %} - </div> - <nav class="navbar navbar-expand-sm navbar-custom"> - <a class="navbar-brand">FOSSEE Python Workshops</a> - <ul class=" nav navbar-nav ml-auto"> - <li class="nav-link"><a href="{{URL_ROOT}}/register"> Register</a></li> - <li class="nav-link"><a href="{{URL_ROOT}}/login">Login</a></li> - <li class="nav-link"><a href="{{URL_ROOT}}/how_to_participate">How to Participate</a></li> - <li class="nav-link"><a href="https://python.fossee.in/about" target="_blank">About Us</a></li> - <li class="nav-link"><a href="{{URL_ROOT}}/statistics/public_stats/">Stats</a></li> - </ul> - </nav> - -<div class="coverbox"> - <div class="row" id="r2"> - <div class="col-md-6 rslides" id="r2_c1"> - - <img src="{{ URL_ROOT}}/static/workshop_app/img/intro_img_01.jpg" > - <img src="{{ URL_ROOT}}/static/workshop_app/img/intro_img_02.jpg" > - <img src="{{ URL_ROOT}}/static/workshop_app/img/intro_img_03.jpg" > - <img src="{{ URL_ROOT}}/static/workshop_app/img/intro_img_04.jpg" > - <img src="{{ URL_ROOT}}/static/workshop_app/img/intro_img_05.jpg" > - - </div> - - <div class="col-md-6" id="r2_c2"> - <video style="width: 100%;" controls> - <source src="https://static.fossee.in/python/1-day-workshop/1_Introduction_to_Python.mp4" type="video/mp4"> - </video> - </div> -</div> - -<div class="row" id="r3"> - <div class="col-md-4" id="r3_c1"> <br>10000+ <br>Students Trained</div> - <div class="col-md-4" id="r3_c2"><br>150+ <br> Colleges - </div> - <div class="col-md-4" id="r3_c3"><br> 33 hours of <br>Workshop Material</div> -</div> - - -<div class="row slick_carousal" id="r4" style="width:95%;"> - <div class="col-4"> - <br> - <a href="{{URL_ROOT}}/view_workshoptype_details/1"><img src="{{ URL_ROOT}}/static/workshop_app/img/Crs_1.png"></a> - </div> - <div class="col-4"> - <br> - <a href="{{URL_ROOT}}/view_workshoptype_details/2"><img src="{{ URL_ROOT}}/static/workshop_app/img/Crs_2.png"></a> - </div> - <div class="col-4"> - <br> - <a href="{{URL_ROOT}}/self_workshop"><img src="{{ URL_ROOT}}/static/workshop_app/img/Crs_3.png"></a> - </div> - - <div class="col-4"> - <br> - <a href="{{URL_ROOT}}/view_workshoptype_details/3"><img src="{{ URL_ROOT}}/static/workshop_app/img/Crs_4.png"></a> - </div> -</div> - -<div class="row" id="r5"> - <div class="col-md-12" id="r5_c1">FOSSEE Python Workshop <span style="font-size: 3.5vw; color: #3bb1d1;">Advantage</span> - </div> - - <div class="col-md-6" id="r5_c2"><img src="{{ URL_ROOT}}/static/workshop_app/img/icon_1.png"><br><br> - <h5 style="color: #3bb1d1;">Learn Python for Free,</h5> - <h5 style="color: #3bb1d1;">Many exercises/practice problems</h5> <br> - <h5 style="color: #3bb1d1;"> Instructor support for your queries during workshop(s)</h5> <br> - <h5 style="color: #3bb1d1;">Get e-certificate</h5> - - </div> - - <div class="col-md-6" id="r5_c3"><img src="{{ URL_ROOT}}/static/workshop_app/img/adv_img.png" style="width: 100%;"></div> -</div> - -<div class="row" id="r6"> - - <div class="col-12 tslides" id="r6_c2" > - <li>{{ testimonials.0.message }} <br> <br> - <span>~ {{testimonials.0.name}} ~<br> - {{testimonials.0.institute}} </span></li> - <li>{{testimonials.4.message}} <br><br> - <span>~ {{testimonials.4.name}} ~ <br> - {{testimonials.4.institute}}</span></li> - <li>{{testimonials.3.message}} <br><br> - <span>~ {{testimonials.3.name}} ~ <br> - {{testimonials.3.institute}}</span></li> - </div> - -</div> - -<div class="row" id="r7"> - -</div> - -<div class="row" id="r8"> - - <div class="col-md-4" id="r8_c1" > - <br> <br> - <img src="{{ URL_ROOT}}/static/workshop_app/img/fossee_logo_iitb.png" > - </div> - - <div class="col-md-4" id="r8_c2" > - <br> <br> - FOSSEE, - IIT-Bombay <br>Mumbai, India <br> - Phone: (+91) 22 2576 4133 <br> - Email: workshops[at]fossee[dot]in - </div> - - <div class="col-md-4" id="r8_c3" > - <div id="social"> - <br> <br> - <a href="https://www.facebook.com/FOSSEENMEICT/" target="_blank" class="fa fa-facebook"></a> - <a href="https://plus.google.com/u/0/104012350840765676803" target="_blank" class="fa fa-google"></a> - <a href="https://www.youtube.com/channel/UCMtt6exSCmZI7JU73S6Wz_A" target="_blank" class="fa fa-youtube"></a> - </div> - </div> - - <div class="col-md-12" id="r8_c4"> - <hr> - The FOSSEE project is funded by the National Mission on Education through ICT, MHRD, Government of India. <br> - This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License - <br><br> - </div> -</div> -</div> - -</body> -</html> diff --git a/workshop_app/templates/workshop_app/login.html b/workshop_app/templates/workshop_app/login.html index e5d5d78..63f2591 100644 --- a/workshop_app/templates/workshop_app/login.html +++ b/workshop_app/templates/workshop_app/login.html @@ -1,21 +1,34 @@ {% extends 'workshop_app/base.html' %} - {% block title %} - Login - {% endblock %} +{% block title %} + Login +{% endblock %} {% block content %} - <div class="container" align="center"> - <br> - <form method="post"> - {% csrf_token %} - {{ form.as_p }} - <br> - <br> - <button class="btn btn-info btn-sm" type="submit">Login</button> - <a href="{{URL_ROOT}}/forgotpassword/" class="btn btn-default btn-sm" style="color:#3693C0;">Forgot Password</a> - <br> - </form> - <br> - </div> - {% endblock %} + <div class="container" align="center"> + <br> + <div class="col-md-6 col-md-offset-6"> + <div class="card border-primary"> + <div class="card-header"> + <h3>Log in</h3> + </div> + <div class="card-body"> + <div class="form-group"> + <form method="post"> + {% csrf_token %} + {{ form.username }} + <br> + {{ form.password }} + <br> + <button class="btn btn-success btn-md" style="width: 40%" type="submit">Login</button> + <br><br> + <a href="{{ URL_ROOT }}/forgotpassword/" class="btn btn-default btn-sm" + style="color:#3693C0;">Forgot Password</a> + </form> + </div> + </div> + </div> + </div> + <br> + </div> +{% endblock %} diff --git a/workshop_app/templates/workshop_app/manage.html b/workshop_app/templates/workshop_app/manage.html deleted file mode 100644 index f2e1c5a..0000000 --- a/workshop_app/templates/workshop_app/manage.html +++ /dev/null @@ -1,115 +0,0 @@ -{% extends 'workshop_app/base.html' %} - - -{% block title %} - Workshops -{% endblock %} - - -{% block extra %} - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> - <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> - <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> - <script> - //ToolTip PopUp function onhover - $(document).ready(function(){ - $('[data-toggle="popover"]').popover({ - placement : 'top', - trigger : 'hover' - }); - }); - - function sendData(d){ - var URL = "{{ URL_ROOT }}/my_workshops/" - console.log(d); - $.ajax({ - url: URL, - type: "POST", - dataType: 'json', - data: { - d, - csrfmiddlewaretoken: $("input[name=csrfmiddlewaretoken]").val() - }, - }); - - window.location.reload(); - alert("Refreshing Page please wait, if you don't see your changes, please refresh this page again."); - } - </script> - - -{% endblock %} - - -{% block content %} - - {% if workshop_occurence_list %} - <h4 align="center">This is the list of workshops you have created, you can delete a workshop if you are not availble on that day. </h4> - <br> - <div class="container"> - <table class="table table-hover"> - <thead> - <tr> - <th>Instructor Name</th> - <th>Workshop Name</th> - <th>Workshop Day</th> - </tr> - </thead> - {% csrf_token %} - {% for w in workshop_occurence_list %} - <tbody> - <tr> - <td>{{ w.user }}</td> - <td>{{ w.workshop }}</td> - <td>{{ w.date | date}}</td> - <td><button class="btn btn-danger btn-sm" id="delete-btn" onClick="sendData('{{ w.user}},{{w.date | safe}},{{ w.workshop.id }},DELETED')" data-toggle="popover" title="Please Note" data-content="Once Deleted you cannot revoke this action." > Delete Workshop </button></td> - </tr> - </tbody> - {% endfor %} - </table> - </div> - -<!-- Page Navigation --> - <div class="container"> - <div class="Page-Nav" align="center"> - <nav aria-label="Page navigation"> - <ul class="pagination pagination-sm"> - <li class="page-item"> - {% if workshop_occurence_list.has_previous %} - <a class="page-link" tabindex="-1" - href="?page={{ workshop_occurence_list.previous_page_number }}">Previous</a> - {% endif %} - </li> - <li class="page-item"> - <span class="current"> - Page {{ workshop_occurence_list.number }} of {{ workshop_occurence_list.paginator.num_pages }} - </span> - </li> - <li class="page-item"> - {% if workshop_occurence_list.has_next %} - <a class="page-link" href="?page={{ workshop_occurence_list.next_page_number }}">Next - </a> - {% endif %} - </li> - </ul> - </nav> - </div> - </div> - - {% else %} - <div class="container"> - <div class="jumbotron"> - <h1>Welcome {{ user.first_name }}</h1> - <p>Please navigate to <b>View Workshop list</b> and depending upon - your expertise and availability create a workshop by going to - <b>Create Workshop</b>. you can also check any workshop - requests by going to <b>Workshop Status</b></p> - - </div> - </div> - {% endif %} - -{% endblock %} diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html index 9d81c84..f39c8e8 100644 --- a/workshop_app/templates/workshop_app/my_workshops.html +++ b/workshop_app/templates/workshop_app/my_workshops.html @@ -4,15 +4,14 @@ Workshop Status {% endblock %} -{% block extra %} - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> - <script src="{{ URL_ROOT }}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> - <script src="{{ URL_ROOT }}/static/workshop_app/js/jquery-1.12.1-ui.min.js"></script> - +{% block extra-dependencies %} + <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> + <script src="https://code.jquery.com/jquery-1.12.4.js"></script> + <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> +{% endblock %} +{% block extra-custom-scripts %} <script> - //ToolTip popup function onhover + //ToolTip popup function on-hover $(document).ready(function () { $('[data-toggle="popover"]').popover({ placement: 'top', @@ -20,26 +19,7 @@ }); }); - function sendData(d) { - var URL = "{{ URL_ROOT }}/my_workshops/" - $.ajax({ - url: URL, - type: "POST", - dataType: 'json', - data: { - d, - csrfmiddlewaretoken: $("input[name=csrfmiddlewaretoken]").val() - }, - }); - - window.location.reload(); - alert("Refreshing Page please wait, if you don't see your changes, please refresh this page again."); - } - </script> - - <!-- Change Workshop Date --> - <script type="text/javascript"> - //ToolTip popup function onhover + //ToolTip popup function on-hover $(document).ready(function () { $('[data-toggle="popinfo"]').popover({ placement: 'top', @@ -47,6 +27,7 @@ }); }); + // Change date modal function changeDate(date) { var previous_date = new Date(date); var dateToday = new Date(); @@ -86,33 +67,6 @@ } }; - function submitNewDate(info) { - var data = info.split(","); - if (data[1] == 'R') { - var date = document.getElementsByClassName('rDate' + data[0]); - info = data.slice(2); - } else { - var date = document.getElementsByClassName('pDate' + data[0]); - info = data.slice(2); - } - var data_c = info + ',new_date=' + date[0].value + ',CHANGE_DATE'; - var URL = "{{ URL_ROOT }}/my_workshops/"; - $.ajax({ - url: URL, - async: false, - type: "POST", - data: { - data_c, - csrfmiddlewaretoken: $("input[name=csrfmiddlewaretoken]").val() - }, - success: function (response) { - window.location.reload(); - alert(response); - } - }); - - }; - </script> {% endblock %} @@ -122,84 +76,10 @@ <h3 align="center" style="color:#2952a2;">The status of your workshops </h3> <br> - <!-- Pending View --> - <div class="container"> - {% if request.user.profile.position == 'instructor' %} - <h3 align="center" style="color: #04a9cf;"><strong><u>Team Member Requests</u></strong></h3> - - <table class="table"> - <thead> - <tr> - <th>Coordinator Name</th> - <th>Team Member</th> - <th>Workshop Name</th> - <th>Workshop Day</th> - </tr> - </thead> - <tbody> - </tbody> - </table> - {% endif %} - {% if request.user.profile.position == 'instructor' %} - <h3 align="center" style="color: #04a9cf;"><strong><u>Requests for Me</u></strong></h3> - {% else %} - <h3 align="center" style="color: #04a9cf;"><strong><u>My Requests</u></strong></h3> - {% endif %} - <table class="table table-striped"> - <thead> - <tr> - {% if request.user.profile.position == 'instructor' %} - <th>Coordinator Name</th> - {% else %} - <th>Instructor Name</th> - {% endif %} - <th>Workshop Name</th> - <th>Workshop Day</th> - <th>Status</th> - </tr> - </thead> - {% csrf_token %} - {% for workshop in workshops %} - <tbody> - <tr> - {% if workshop.status == 0 and workshop.instructor %} - {% if request.user.profile.position == 'instructor' %} - <td> - <a href="{{ URL_ROOT }}/view_comment_profile/{{ workshop.coordinator.profile.user.id }}"> - {{ workshop.coordinator.get_full_name }}</a></td> - {% else %} - <td>{{ workshop.instructor.get_full_name }}</td> - {% endif %} - <td>{{ workshop.title }}</td> - <td>{{ workshop.date | date }}</td> - <td><span class="label label-warning">{{ workshop.status }}</span></td> - {% endif %} - {% if request.user.profile.position == 'instructor' and workshop.status == 0 and workshop.instructor %} - <td> - <button class="btn btn-primary btn-sm" id="book-btn" - onClick="sendData('{{ workshop.coordinator }},{{ workshop.date| safe }},{{ workshop.title_id }},ACCEPTED')" - data-toggle="popover" title="Please Note" - data-content="Once Accepted you can't Reject, you have to personally contact the Coordinator if the workshop is to be cancelled"> - Accept - </button> - </td> - <td> - <button class="btn btn-danger btn-sm" id="book-btn" - onClick="sendData('{{ workshop.coordinator }},{{ workshop.date| safe }},{{ workshop.title_id }},REJECTED')" - data-toggle="popover" title="Please Note" - data-content="Once Rejected you cannot revoke this action."> Reject - </button> - </td> - {% endif %} - </tr> - </tbody> - {% endfor %} - </table> - </div> - <!-- Accepted View --> + <br> <div class="container"> - <h3 align="center" style="color: #04a9cf;"><strong><u>Workshops Accepted</u></strong></h3> + <h3 align="center" style="color: #04a9cf;"><strong>Workshops Accepted</strong></h3> <table class="table table-striped"> <thead> <tr> @@ -230,11 +110,11 @@ <td>{{ workshop.title |capfirst }}</td> {% if workshop.date > today %} <td>{{ workshop.date | date }} - <span class="glyphicon glyphicon-calendar" data-toggle="popinfo" title="Note" + <span class="material-icons" style="cursor:pointer;" data-toggle="popinfo" + title="Note" data-content="Click here to change date" class="datepicker" - onclick="changeDate('R,{{ workshop.date| safe }}, {{ forloop.counter }}')"> - </span> + onclick="changeDate('R,{{ workshop.date| safe }}, {{ forloop.counter }}')">event</span> <div class="myDialogR{{ forloop.counter }}" style="display: none;" title="Select New Date"> <form method="post"> @@ -250,7 +130,7 @@ {% else %} <td>{{ workshop.date | date }}</td> {% endif %} - <td><span class="label label-success">{{ workshop.get_status }}</span></td> + <td><span class="badge badge-success">{{ workshop.get_status }}</span></td> {% endif %} {% if workshop.status == 1 and workshop.condition_one %} {% if request.user.profile.position == 'instructor' %} @@ -282,7 +162,7 @@ {% else %} <td>{{ workshop.date | date }}</td> {% endif %} - <td><span class="label label-success">{{ workshop.status }}</span></td> + <td><span class="badge badge-success">{{ workshop.status }}</span></td> {% endif %} </tr> </tbody> @@ -294,12 +174,14 @@ <!-- Proposed View --> + <br> <div class="container"> + {% if request.user.profile.position == 'instructor' %} - <h3 align="center" style="color: #04a9cf;"><strong><u>Workshops Proposed By Coordinators</u></strong> + <h3 align="center" style="color: #04a9cf;"><strong>Workshops Proposed By Coordinators</strong> </h3> {% else %} - <h3 align="center" style="color: #04a9cf;"><strong><u>Workshops Proposed By Me</u></strong></h3> + <h3 align="center" style="color: #04a9cf;"><strong>Workshops Proposed By Me</strong></h3> {% endif %} <table class="table table-striped"> <thead> @@ -313,6 +195,9 @@ <th>Workshop Name</th> <th>Workshop Day</th> <th>Status</th> + {% if request.user.profile.position == 'instructor' %} + <th>Action</th> + {% endif %} </tr> </thead> {% csrf_token %} @@ -330,7 +215,7 @@ <td>{{ workshop.workshop_type }}</td> <td>{{ workshop.date | date }}</td> - <td><span class="label label-warning">{{ workshop.get_status }}</span></td> + <td><span class="badge badge-warning">{{ workshop.get_status }}</span></td> {% if request.user.profile.position == 'instructor' and workshop.status == 0 %} <td> <form method="post"> @@ -354,44 +239,6 @@ </div> - <!-- Deleted/Rejected View --> - <div class="container"> - <h3 align="center" style="color: #04a9cf;"><strong><u>Workshops Deleted/Rejected</u></strong></h3> - <table class="table table-striped"> - <thead> - <tr> - {% if request.user.profile.position == 'instructor' %} - <th>Coordinator Name</th> - {% else %} - <th>Instructor Name</th> - {% endif %} - <th>Workshop Name</th> - <th>Workshop Day</th> - <th>Status</th> - </tr> - </thead> - {% csrf_token %} - {% for workshop in workshops %} - <tbody> - <tr> - {% if workshop.status == 'DELETED' or workshop.status == 'REJECTED' %} - {% if request.user.profile.position == 'instructor' %} - <td>{{ workshop.coordinator.get_full_name }}</td> - {% else %} - <td>{{ workshop.instructor.get_full_name }}</td> - {% endif %} - <td>{{ workshop.title | capfirst }}</td> - <td>{{ workshop.date | date }}</td> - - <td><span class="label label-danger">{{ workshop.status }}</span></td> - {% endif %} - </tr> - </tbody> - - {% endfor %} - </table> - </div> - {% else %} {% if request.user.profile.position == 'instructor' %} diff --git a/workshop_app/templates/workshop_app/password_change_done.html b/workshop_app/templates/workshop_app/password_change_done.html deleted file mode 100644 index fc87389..0000000 --- a/workshop_app/templates/workshop_app/password_change_done.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.html" %} - -{% block pagetitle %} - Password change successful -{% endblock %} - -{% block script %} -<script type="text/javascript"> - window.setTimeout(function() - { - location.href="{{ URL_ROOT }}/login/" - }, 2000); -</script> -{% endblock %} - -{% block content %} - <h3>Your password has been changed successfully.</h3> - <h4>Redirecting ...</h4> -{% endblock %} diff --git a/workshop_app/templates/workshop_app/password_change_form.html b/workshop_app/templates/workshop_app/password_change_form.html deleted file mode 100644 index c5ed81a..0000000 --- a/workshop_app/templates/workshop_app/password_change_form.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} -<!DOCTYPE html> -{% block pagetitle %} Change Password {% endblock %} - -{% block content %} -<form action="" method="post" > - {% csrf_token %} - <center> - <table class=span1> - {{ form }} - </table> - </center> - <center><button class="btn" type="submit">Change Password</button> - <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/login/");'>Cancel</button></center> -</form> -{% endblock content %} diff --git a/workshop_app/templates/workshop_app/password_reset_complete.html b/workshop_app/templates/workshop_app/password_reset_complete.html deleted file mode 100644 index bf27059..0000000 --- a/workshop_app/templates/workshop_app/password_reset_complete.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "base.html" %} -{% block pagetitle %}Password reset complete{% endblock %} -{% block content %} -<p>Your password has been reset. </p> - -{% endblock %} diff --git a/workshop_app/templates/workshop_app/password_reset_confirm.html b/workshop_app/templates/workshop_app/password_reset_confirm.html deleted file mode 100644 index 1b0a1b7..0000000 --- a/workshop_app/templates/workshop_app/password_reset_confirm.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} -{% block pagetitle %}Reset Password{% endblock %} - -{% block content %} - {% if validlink %} - <p>Please enter your new password twice so we can verify you typed it in correctly</p>. - <form method="post"> - {% csrf_token %} - {{ form.as_p }} - <button class= "btn" type="submit">Submit</button> - </form> - {% else %} - <p>This reset link is no longer valid!</p> - {% endif %} -{% endblock %} diff --git a/workshop_app/templates/workshop_app/password_reset_done.html b/workshop_app/templates/workshop_app/password_reset_done.html deleted file mode 100644 index 7b4f09a..0000000 --- a/workshop_app/templates/workshop_app/password_reset_done.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base.html" %} - -{% block title %} - Password reset successful -{% endblock %} - -{% block pagetitle %} - Instruction for setting new password has been mailed to your registered email address -{% endblock %} diff --git a/workshop_app/templates/workshop_app/password_reset_form.html b/workshop_app/templates/workshop_app/password_reset_form.html deleted file mode 100644 index 8a7c09d..0000000 --- a/workshop_app/templates/workshop_app/password_reset_form.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} - -{% block pagetitle %} - Email will be send to the registered email address -{% endblock %} - -{% block content %} -<form action="" method="post"> - {% csrf_token %} - {{ form }} - <button class="btn" type="submit">Request</button> - <a class="btn" href="{{URL_ROOT}}/login/">Cancel</a> -</form> -{% endblock content %} diff --git a/workshop_app/templates/workshop_app/profile_updated.html b/workshop_app/templates/workshop_app/profile_updated.html deleted file mode 100644 index 31747b8..0000000 --- a/workshop_app/templates/workshop_app/profile_updated.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "workshop_app/base.html" %} - -{% block title %} - Profile Changing -{% endblock %} - - - {% block extra %} - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="{{URL_ROOT}}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> - {% endblock %} -{% block content %} - <div class="container"> - <div class="jumbotron"> - <h3>Your Profile has changed {{ user.first_name }}</h3> - </div> - </div> -{% endblock %} - diff --git a/workshop_app/templates/workshop_app/propose_workshop.html b/workshop_app/templates/workshop_app/propose_workshop.html index 8f1550f..586ea8e 100644 --- a/workshop_app/templates/workshop_app/propose_workshop.html +++ b/workshop_app/templates/workshop_app/propose_workshop.html @@ -1,63 +1,71 @@ {% extends "workshop_app/base.html" %} {% block title %} - Propose a workshop + Propose a workshop {% endblock %} - {% block extra %} +{% block extra %} <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> - <script src="https://code.jquery.com/jquery-1.12.4.js"></script> - <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="{{URL_ROOT}}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> - - <!-- calender --> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> <script> - var dateToday = new Date(); - var upto = new Date(); - - dateToday.setDate(dateToday.getDate() + 3); - upto.setFullYear(dateToday.getFullYear() + 1); + var dateToday = new Date(); + var upto = new Date(); - $(function() { - $( ".datepicker" ).datepicker({ - changeMonth: true, - changeYear: true, - minDate: dateToday, - maxDate: upto, - beforeShowDay: $.datepicker.noWeekends, + dateToday.setDate(dateToday.getDate() + 3); + upto.setFullYear(dateToday.getFullYear() + 1); - // You can put more options here. + $(function () { + $(".datepicker").datepicker({ + changeMonth: true, + changeYear: true, + minDate: dateToday, + maxDate: upto, + beforeShowDay: $.datepicker.noWeekends, + }); }); - }); - </script> - {% endblock %} + </script> +{% endblock %} {% block content %} - <style type="text/css"> - .errorlist { - color: red; - } - </style> - - <div class="container"> - <div class="alert alert-info"> - Please Note: Students have to take a mandatory test before Advanced Python - Workshop only those who will clear this test will be eligible to attend - the workshop. - </div> - <form method="post"> - {% csrf_token %} - <br/> - {{ form.as_p }} - <br><br> - <button class="btn btn-success" type="submit">Submit</button> - </form> - <br> - - </div> + <style type="text/css"> + .errorlist { + color: red; + } + </style> + + <div class="container" align="center"> + <div class="alert alert-info"> + Please Note: Students have to take a mandatory test before Advanced Python + Workshop only those who will clear this test will be eligible to attend + the workshop. + </div> + <br><br> + <div class="col-md-6 col-md-offset-6"> + <div class="card border-primary"> + <div class="card-header"> + <h3>Propose Workshop</h3> + </div> + <div class="card-body"> + <div class="form-group"> + <form method="post"> + {% csrf_token %} + <br/> + {{ form.workshop_type }} + <br> + {{ form.date }} + <br> + {{ form.tnc_accepted }} I accept the <a href="/tnc">terms and conditions</a> + <br><br> + <button class="btn btn-success" type="submit">Submit</button> + </form> + </div> + </div> + </div> + </div> + <br> + + </div> {% endblock %} diff --git a/workshop_app/templates/workshop_app/registeration_error.html b/workshop_app/templates/workshop_app/registeration_error.html deleted file mode 100644 index ad1e73b..0000000 --- a/workshop_app/templates/workshop_app/registeration_error.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends 'workshop_app/base.html' %} - -{% block title %} - Registeration Error -{% endblock %} - -{% block content %} - <div class="container" > - <br> - <h1>Error Occurred While registration</h1> - <h3>Please try to <a href="{{ URL_ROOT }}/register/"> register again</a> using different username or email and see to it that you fill all the fields.</h3> - </div> -{% endblock %}
\ No newline at end of file diff --git a/workshop_app/templates/workshop_app/self_workshop.html b/workshop_app/templates/workshop_app/self_workshop.html deleted file mode 100644 index 2c5ad09..0000000 --- a/workshop_app/templates/workshop_app/self_workshop.html +++ /dev/null @@ -1,101 +0,0 @@ -{% extends 'workshop_app/base.html' %} - -{% block title %} - Self Workshop -{% endblock %} - -{% block extra %} - <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/faq.css" type="text/css" /> - <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> --> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> - <link href='//fonts.googleapis.com/css?family=Antic Slab' rel='stylesheet'> -<style> -a { - color: red; -} -</style> - -{% endblock %} - - -{% block content %} - - <div class="container"> - <h1 style="color:#2952a2;">Welcome to Python Self Learning Course</h1><br> - <ul class='num'> - <h2>About this Course:</h2> - <ul> - <li class='ans'> - It is a free online course offered by the <a href="https://fossee.in" target="_blank">FOSSEE</a> team at IIT Bombay. - </li> - - <li class='ans'> - Students can gain hands-on experience in Python through a series of practice sessions and quizzes. - </li> - - <li class='ans'> - It is open to all, interested in learning Python irrespective of their academic background. - </li> - - <li class='ans'> - The course is designed and curated by <a - href="https://www.aero.iitb.ac.in/~prabhu/index.html" - target="_blank">Prof.Prabhu Ramachandran,(Dept. Of Aerospace Engineering, IIT Bombay).</a> - </li> - - <li class='ans'> - Graded e-certificates are issued to participants on successful completion of the course. - </li> - - <li class='ans'> - Queries/ doubts posted by participants on the <a href="http://forums.fossee.in/filter/Python/" target="_blank">FORUMS</a> are answered by FOSSEE’s Python experts. - </li> - - <li class='ans'> - Certificates are issued within 10days after the course has ended. - </li> - - </ul> - </ul> - - <ul class='num'> - <h2>Course Instructions:</h2> - <ul> - <li class='ans'> - Register on <a href="http://yaksh.fossee.in" target="_blank">Yaksh</a> and search for the course <strong> Basic Programming using Python('duration') by FOSSEE IIT Bombay using the course code <h4>"python"</h4> </strong> - </li> - - <li class='ans'> - Access the “Enrolled Courses” tab to start the course - </li> - - <li class='ans'> - Complete all the lessons, exercises and quizzes in a module and then proceed to the next module. - </li> - - <li class='ans'> - If needed, revisit lessons for better understanding - </li> - - </ul> - </ul> - - <ul class='num'> - <h2>Duration:</h2> - <ul> - <li class='ans'> - The course will be open for about one and half month (Approximately the participant can devote an hour each day or 3 hours per day on weekends to complete the course) - </li> - - <li class='ans'> - The course will start on the 1st day of every month and closes in the mid of next month(Eg: starts at 1st Feb closes at 15th March) - </li> - - </ul> - </ul> - -</div> -<br> -<br> -{% endblock %} diff --git a/workshop_app/templates/workshop_app/view_comment_profile.html b/workshop_app/templates/workshop_app/view_comment_profile.html deleted file mode 100644 index 25596c7..0000000 --- a/workshop_app/templates/workshop_app/view_comment_profile.html +++ /dev/null @@ -1,135 +0,0 @@ -{% extends 'workshop_app/base.html' %} - -{% block title %} - Coordinator Profile -{% endblock %} - - - {% block extra %} - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="{{URL_ROOT}}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> - {% endblock %} - -{% csrf_token %} -{% block content %} - - <div class="container" style="overflow-y: scroll;"> - <table class="table table-bordered"> - <tr> - <th><label for="id_first_name"><h5>First name:</h5></label></th> - <th><label for="id_first_name"><h5>{{ coordinator_profile.user.first_name }}</h5></label></th> - </tr> - <tr> - <th><label for="id_last_name"><h5>Last name:</h5></label></th> - <th><label for="id_last_name"><h5>{{ coordinator_profile.user.last_name }}</h5></label></th> - </tr> - <tr> - <th><label for="id_email"><h5>Email:</h5></label></th> - <th><label for="id_email"><h5>{{ coordinator_profile.user.email }}</h5></label></th> - </tr> - <tr> - <th><label for="id_institute"><h5>Institute:</h5></label></th> - <th><label for="id_institute"><h5>{{ coordinator_profile.user.profile.institute }}</h5></label></th> - </tr> - <tr> - <th><label for="id_phone_number"><h5>Phone Number:</h5></label></th> - <th><label for="id_phone_number"><h5>{{ coordinator_profile.user.profile.phone_number }}</h5></label></th> - </tr> - <tr> - <th><label for="id_department"><h5>Department:</h5></label></th> - <th><label for="id_department"><h5>{{ coordinator_profile.user.profile.department }}</h5></label></th> - </tr> - <tr> - <th><label for="id_location"><h5>Location:</h5></label></th> - <th><label for="id_location"><h5>{{ coordinator_profile.user.profile.location }}</h5></label></th> - </tr> - <tr> - <th><label for="id_position"><h5>Position:</h5></label></th> - <th><label for="id_position"><h5>{{ coordinator_profile.user.profile.position }}</h5></label></th> - </tr> - </table> - <br> - <div class="container"> - <h2>Workshop Details</h2> - <table class="table table-bordered"> - <tr> - <th><label for="id_instructor_name"><h5>Instructor name</h5></label></th> - <th><label for="id_workshop_date"><h5>Workshop date</h5></label></th> - <th><label for="id_workshop_type"><h5>Workshop type</h5></label></th> - </tr> - {% for workshop in Workshops%} - {% if workshop.proposed_workshop_date %} - <tr> - <td><label for="id_instructor_name"><h5>{{ workshop.proposed_workshop_instructor }}</h5></label></td> - <td><label for="id_workshop_date"><h5>{{ workshop.proposed_workshop_date }}</h5></label></td> - <td><label for="id_workshop_type"><h5>{{ workshop.proposed_workshop_title }}</h5></label></td> - </tr> - {% else %} - <tr> - <td><label for="id_instructor_name"><h5>{{ workshop.requested_workshop_instructor }}</h5></label></td> - <td><label for="id_workshop_date"><h5>{{ workshop.requested_workshop_date }}</h5></label></td> - <td><label for="id_workshop_type"><h5>{{ workshop.requested_workshop_title }}</h5></label></td> - </tr> - {% endif %} - {% endfor %} - </table> - </div> - <br> - <h1 style="color:#2c5aa0">Comments</h1> - <div> - <form method="POST"> - <br> - {% csrf_token %} - {{ comment_form.as_p }} - <button type="submit" class="btn btn-default">Post</button> - </form> - - </div> - <hr style="background-color: #fff; - border-top: 5px double #8c8b8b;"> - <table> - {% for comment in comments %} - <tbody> - <tr> - <td> - <h5>{{ comment.instructor_profile.profile.user.get_full_name }} | {{ comment.created_date | date }}</h5> - <h6 style="background-color: #ecf0f1; padding:10px;">{{ comment.comment }}</h6> - <hr style="border-top: 0.5px solid #8c8b8b;"> - </td> - </tr> - </tbody> - {% endfor %} - </table> - -<br><br> - </div> - - <!-- Page Navigation --> - <div class="container"> - <div class="Page-Nav" align="center"> - <nav aria-label="Page navigation"> - <ul class="pagination pagination-sm"> - <li class="page-item"> - {% if comments.has_previous %} - <a class="page-link" tabindex="-1" - href="?page={{ comments.previous_page_number }}">Previous</a> - {% endif %} - </li> - <li class="page-item"> - <span class="current"> - Page {{ comments.number }} of {{ comments.paginator.num_pages }} - </span> - </li> - <li class="page-item"> - {% if comments.has_next %} - <a class="page-link" href="?page={{ comments.next_page_number }}">Next - </a> - {% endif %} - </li> - </ul> - </nav> - </div> - <br> - </div> - -{% endblock %} diff --git a/workshop_app/templates/workshop_app/view_faq.html b/workshop_app/templates/workshop_app/view_faq.html deleted file mode 100644 index 1822dc3..0000000 --- a/workshop_app/templates/workshop_app/view_faq.html +++ /dev/null @@ -1,137 +0,0 @@ -{% extends 'workshop_app/base.html' %} - -{% block title %} - FAQ'S -{% endblock %} - -{% block extra %} - <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/faq.css" type="text/css" /> - <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> --> - - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> - <link href='//fonts.googleapis.com/css?family=Antic Slab' rel='stylesheet'> - -{% endblock %} - - -{% block content %} - - <div class="container"> - <h1 style="color: #2962B9;"> FAQs-</h1><br> - <ul class='num'> - <h4>Who can participate in these workshops?</h4> - <li class='ans'> - Anyone interested in learning Python irrespective of their domain can participate. - </li> - </ul> - - <ul class='num'> - <h4>Will the participants receive certificates?</h4> - <li class='ans'> - Yes, graded certificates shall be issued only after successfully clearing our post-workshop assessments/tests. - </li> - </ul> - - <ul class='num'> - <h4> Will the coordinators receive certificates?</h4> - <li class='ans'> - Yes, even the coordinators of the workshops are awarded certificates. - </li> - </ul> - - <ul class='num'> - <h4> When will I get my certificate?</h4> - <li class='ans'> - Within 15 working days from the last day of the workshop. - </li> - </ul> - - <ul class='num'> - <h4> How many coordinators are required to conduct a workshop?</h4> - <li class='ans'> - One coordinator for 50 participants. - </li> - </ul> - - <ul class='num'> - <h4> Do we have to pay for the workshop?</h4> - <li class='ans'> - No, the workshop is free of charge - </li> - </ul> - - <ul class='num'> - <h4> Do I have to register?</h4> - <li class='ans'> - Yes, only the coordinator of the workshop will have to register. - </li> - </ul> - - <ul class='num'> - <h4> Can we conduct this workshop as per our convenience?</h4> - <li class='ans'> - Absolutely! You may conduct the workshop as per your lab availability. - </li> - </ul> - - <ul class='num'> - <h4> What is the approximate wait time after requesting for a workshop?</h4> - <li class='ans'> - It could be between 1-2 weeks (subject to availability of our instructors). - </li> - </ul> - - <ul class='num'> - <h4> How will the workshop be conducted?</h4> - <li class='ans'> - It will be a hands-on workshop with remote assistance by a FOSSEE instructor from IIT Bombay. - </li> - </ul> - - <ul class='num'> - <h4> Can we have the instructor at our institute for the workshop?</h4> - <li class='ans'> - Unfortunately, we will not be able to send our instructor(s) to your institute. - </li> - </ul> - - <ul class='num'> - <h4>I am from a non-technical background but wish to learn Python. Can I participate in this workshop?</h4> - <li class='ans'> - Yes, of course. This is open to anyone from any field who is interested in learning Python. - </li> - </ul> - - <ul class='num'> - <h4> Can I use the material of this workshop in my class?</h4> - <li class='ans'> - Sure, you can use our video lectures. - </li> - </ul> - - <ul class='num'> - <h4> Are these workshops provided to individuals as well?</h4> - <li class='ans'> - Currently, this program is exclusively available for institutes only. However, if you are not associated with an institute and are willing to participate in this workshop, please write to us at workshops[at]fossee[dot]in - </li> - </ul> - - <ul class='num'> - <h4> What are the equipments required for conducting this workshop?</h4> - <li class='ans'> - A room with projector, speaker, microphone, laptops/desktops for every participant, high-speed internet and one laptop/desktop with a webcam. - </li> - </ul> - - <ul class='num'> - <h4>What are the video-audio conferencing tools used for this workshop?</h4> - <li class='ans'> - We will use any of these tools: Skype, appear.in and hangouts - </li> - </ul> - </div> -<br> -<br> - -{% endblock %} diff --git a/workshop_app/templates/workshop_app/workshop_stats.html b/workshop_app/templates/workshop_app/workshop_stats.html deleted file mode 100644 index 15c4a55..0000000 --- a/workshop_app/templates/workshop_app/workshop_stats.html +++ /dev/null @@ -1,345 +0,0 @@ -{% extends 'workshop_app/base.html' %} - - -{% block extra %} - <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> - <script src="https://code.jquery.com/jquery-1.12.4.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> - - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> - <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> - <!-- For Charts --> - - <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.bundle.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.min.js"></script> - - <!-- For Google GeoChart India Map --> - <script type='text/javascript' src='https://www.google.com/jsapi'></script> - -<script> - var dateToday = new Date(); - var upto = new Date(); - - dateToday.setDate(dateToday.getDate() - 1); - upto.setFullYear(dateToday.getFullYear() + 1); - - $( function() { - from = $( "#from" ) - .datepicker({ - defaultDate: "+1w", - changeMonth: true, - changeYear: true, - showButtonPanel: true, - maxDate: dateToday, - dateFormat: "yy-mm-dd" - }) - .on( "change", function() { - to.datepicker( "option", "minDate", getDate( this ) ); - }), - to = $( "#to" ).datepicker({ - defaultDate: "+1w", - changeMonth: true, - changeYear: true, - showButtonPanel: true, - minDate: dateToday, - maxDate: upto, - dateFormat: "yy-mm-dd" - }) - .on( "change", function() { - from.datepicker( "option", "maxDate", getDate( this ) ); - }); - - function getDate( element ) { - var date; - try { - date = $.datepicker.parseDate( dateFormat, element.value ); - } catch( error ) { - date = null; - } - return date; - } - } ); - - </script> - -{% endblock %} - -{% block content %} - -<div class="container"> - <div class="row"> - <div class="col-md-6" align="left" > - <fieldset data-mini="true"> - <label for="radio-1">Monthly Count </label> - <input type="radio" name="radio-1" id="radio-1" value="NWPM"> - <label for="radio-2">Overall Count</label> - <input type="radio" name="radio-1" id="radio-2" value="OWC"> - <label for="radio-3">India Map</label> - <input type="radio" name="radio-1" id="radio-3" value="MOIN"> - </fieldset> - </div> - - - {% if show_workshop_stats %} - <div align="right" class="col-md-6"> - <form method="POST" > - {% csrf_token %} - <div class="form-group"> - <label for="from">From</label> - <input type="text" id="from" name="from"> - <label for="to">to</label> - <input type="text" id="to" name="to"> - <button class="btn btn-warning btn-sm" type="submit" name="Download" value="Download">Download</button> - <button class="btn btn-info btn-sm" type="submit" name="View" value="View">View</button> - </div> - </form> - - {% if messages %} - <ul class="messages"> - {% for message in messages %} - <div class="alert alert-{{ message.tags }}"> - <li {% if message.tags %} class="{{ message.tags }}"{% endif %}> {{ message }} - </li> - </div> - {% endfor %} - </ul> - {% endif %} - - </div> - <br> - <table class="table table-hover"> - <thead> - <tr> - <th>Coordinator Name</th> - <th>Institute Name</th> - <th>Instructor Name</th> - <th>Workshop Name</th> - <th>Workshop Date</th> - <th>Requested/Proposed By</th> - </tr> - </thead> - {% csrf_token %} - {% for workshop in upcoming_workshops %} - {% if workshop.proposed_workshop_date %} - <tbody> - <tr> - <td>{{ workshop.proposed_workshop_coordinator.get_full_name | capfirst }}</td> - <td>{{ workshop.proposed_workshop_coordinator.profile.institute | capfirst }}</td> - <td>{{ workshop.proposed_workshop_instructor.get_full_name }}</td> - <td>{{ workshop.proposed_workshop_title.workshoptype_name }}</td> - <td>{{ workshop.proposed_workshop_date | date}}</td> - <td>Coordinator</td> - </tr> - </tbody> - {% else %} - <tbody> - <tr> - <td>{{ workshop.requested_workshop_coordinator.get_full_name | capfirst }}</td> - <td>{{ workshop.requested_workshop_coordinator.profile.institute | capfirst }}</td> - <td>{{ workshop.requested_workshop_instructor.get_full_name }}</td> - <td>{{ workshop.requested_workshop_title.workshoptype_name }}</td> - <td>{{ workshop.requested_workshop_date | date}}</td> - <td>Instructor</td> - </tr> - </tbody> - {% endif %} - {% endfor %} - </table> - - <!-- Page Navigation --> - <div class="container"> - <div class="Page-Nav" align="center"> - <nav aria-label="Page navigation"> - <ul class="pagination pagination-sm"> - <li class="page-item"> - {% if upcoming_workshops.has_previous %} - <a class="page-link" tabindex="-1" - href="?page={{ upcoming_workshops.previous_page_number }}">Previous</a> - {% endif %} - </li> - <li class="page-item"> - <span class="current"> - Page {{ upcoming_workshops.number }} of {{ upcoming_workshops.paginator.num_pages }} - </span> - </li> - <li class="page-item"> - {% if upcoming_workshops.has_next %} - <a class="page-link" href="?page={{ upcoming_workshops.next_page_number }}">Next - </a> - {% endif %} - </li> - </ul> - </nav> - </div> - </div> - {% else %} - <div class="jumbotron"> - <h2>Permission to View Upcoming Workshops is set to false, please set it to true in settings.py</h2> - </div> - {% endif %} - </div> - - -<div class="row"> - <br> - <div class="col-md-12 "> - <br> - <canvas id="myChartPie" width="60px" height="21px"></canvas> - <script> - $( function() { - $( "fieldset" ).controlgroup(); - }); - - var ctx1 = document.getElementById("myChartPie").getContext('2d'); - var myChart; - - $('input[type=radio]').change(function() { - - if (this.value == 'NWPM') {//Number of Workshops per month - if(myChart){ - myChart.destroy(); - } - - document.getElementById("visualization").style.visibility='hidden'; - myChart = new Chart(ctx1, { - type: 'bar', - data: { - labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - datasets: [{ - label: 'Number of workshops per Month for '+ dateToday.getFullYear(), - data: {{ workshop_count }}, - backgroundColor: [ - 'rgba(255, 99, 132, 0.2)', - 'rgba(54, 162, 235, 0.2)', - 'rgba(255, 206, 86, 0.2)', - 'rgba(75, 192, 192, 0.2)', - 'rgba(153, 102, 255, 0.2)', - 'rgba(242, 38, 19, 0.2)', - 'rgba(25, 91, 13, 0.2)', - 'rgba(54, 12, 235, 0.2)', - 'rgba(150, 40, 27, 0.2)', - 'rgba(66, 114, 155, 0.2)', - 'rgba(219, 10, 91, 0.2)', - 'rgba(191, 191, 191, 0.2)' - ], - borderColor: [ - 'rgba(255, 99, 132, 1)', - 'rgba(54, 162, 235, 1)', - 'rgba(255, 206, 86, 1)', - 'rgba(75, 192, 192, 1)', - 'rgba(153, 102, 255, 1)', - 'rgba(242, 38, 19, 1)', - 'rgba(25, 91, 13, 1)', - 'rgba(54, 12, 235, 1)', - 'rgba(150, 40, 27 ,1)', - 'rgba(66, 114, 155, 1)', - 'rgba(219, 10, 91, 1)', - 'rgba(191, 191, 191, 1)' - ], - borderWidth: 1 - }] - }, - options: { - responsive: true, - scales: { - yAxes: [{ - ticks: { - beginAtZero:true - } - }] - } - } - }); - } - else if (this.value == 'OWC') { //Overall Workshop Count - if(myChart){ - myChart.destroy(); - } - - document.getElementById("visualization").style.visibility='hidden'; - myChart = new Chart(ctx1, { - type: 'pie', - data: { - labels : {{ workshoptype_count.0 | safe}}, - datasets: [{ - data: {{ workshoptype_count.1 }}, - //Add more color scheme if workshop number increases - backgroundColor: [ - 'rgba(153, 102, 255, 1)', - 'rgba(191, 191, 1, 1)', - 'rgba(75, 192, 192, 1)', - 'rgba(153, 102, 255, 1)' - ] - }] - }, - options: { - responsive: true - } - }); - } - - else if (this.value == 'MOIN') { - if(myChart){ - myChart.destroy(); - } - - var dWidth = $(window).width() * 0.9; - var dHeight = $(window).height() * 0.9; - - $( "#visualization" ).dialog({ - resizable: false, - draggable: true, - title: 'State wise Completed Workshops(Map of India)', - closeOnEscape: true, - stack: true, - zIndex: 10000, - width: dWidth, - height: dHeight, - modal: true - }); - - document.getElementById("visualization").style.visibility='visible'; - function drawVisualization() { - var data = google.visualization.arrayToDataTable( - {{ india_map | safe }} - ); - - var opts = { - region: 'IN', - domain: 'IN', - displayMode: 'regions', - resolution: 'provinces', - colorAxis: {colors: ['lightyellow', 'orange']}, - legend: {position: 'top'}, - }; - - var geochart = new google.visualization.GeoChart( - document.getElementById('visualization')); - geochart.draw(data, opts); - }; - if(google) { - google.load('visualization', '1.0', { - packages: ['geochart'], - callback: function() { - // do stuff, if you wan't - it doesn't matter, because the page isn't blank! - drawVisualization(); - } - }) - } - } - }); - </script> - <style> - #visualization path { - stroke-width:1; /* control the countries borders width */ - stroke:#6699cc; /* choose a color for the border */ - } - </style> - <div id="visualization" style="width: 400px; height: 300px; display: block; margin: 0 auto;" ></div> - - </div> -</div> -</div> -<br> -{% endblock %} |