In [ ]:
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    <title>Dashboard - Netshock</title>
	 {% load static %}
      <link rel="stylesheet" href="{% static "/bootstrap/css/bootstrap.min.css" %}">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
	      <link rel="stylesheet" href="{% static "/fonts/fontawesome-all.min.css" %}">
</head>
{% if user.is_authenticated %}
<body id="page-top">
    <div id="wrapper">
        <div class="d-flex flex-column" id="content-wrapper">
            <div id="content">
             <nav class="navbar navbar-light navbar-expand bg-white shadow mb-4 topbar static-top" style="background-color: rgb(120,0,0);">
                    <div class="container-fluid"><img src={% static "/img/logo.png" %} style="width: 174px;margin: 12px;">
                        <form class="form-inline d-none d-sm-inline-block mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
                            <div class="input-group"></div>
                        </form>
                        <ul class="nav navbar-nav flex-nowrap ml-auto">
    
                            <div class="d-none d-sm-block topbar-divider"></div>
                            <li class="nav-item dropdown no-arrow" role="presentation">
                                <div class="nav-item dropdown no-arrow"><a class="dropdown-toggle nav-link" data-toggle="dropdown" aria-expanded="false" href="#">My Account</a>
                                    <div
                                        class="dropdown-menu shadow dropdown-menu-right animated--grow-in" role="menu">
										
                                      
                                            <a class="dropdown-item" role="presentation" href="/logout/"><i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>&nbsp;Logout</a></div>
                    </div>
                    </li>
                    </ul>
            </div>
            </nav>
            <div class="container-fluid">
                <div class="d-sm-flex justify-content-between align-items-center mb-4">
                    <h3 class="text-dark mb-0">Dashboard</h3>
					
					
					
					
										<!-- ADD MODAL -->
                    <div class="modal fade" id="AddSkill" role="dialog" tabindex="-1">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h4 class="modal-title">Add A Skill</h4><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div>
                                <div class="modal-body">
                                    <form action="/add/" name="form2", id="form2" method="post">
									{% csrf_token %}
									<label>Skill Name:</label>
									<input class="form-control-plaintext" name="skill_name" type="text" style="background-color: #eeeeee;padding: 12px;">
									<small class="form-text text-muted">Enter the skill you'd like to develop. E.g. Python;</small>
                                        <hr
                                            style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;"><label>Current Skill Level</label>
											<select class="form-control" name="starting"><optgroup label="Select Skill Level"><option value="0" selected="">No Knowledge</option><option value="20">Some Knowledge</option><option value="50">Mediocre Knowledge</option><option value="70">High Knowledge</option><option value="100">Expert Knowledge</option></optgroup></select>
                                            <hr
                                                style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;"><label>Action Plan To Achieve Goal:</label>
												<textarea class="form-control" name="description" style="background-color: rgb(238,238,238);"></textarea>
                                                <hr style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;"><label>Target Date For Goal</label>
												<input name="target_date" type="date" value="2020-01-08"></div>
                                <div class="modal-footer"><button class="btn btn-light" type="button" data-dismiss="modal">Close</button>
								<button class="btn btn-primary" type="submit" type="button">Save</button></div>
                            </div></form>
                        </div>
                    </div>
					

					
					
                    <div class="modal fade" role="dialog" tabindex="-1">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h4 class="modal-title">Add A Skill</h4><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div>
                                <div class="modal-body">
                                    <form><label>Skill Name:</label><input class="form-control-plaintext" type="text" value="Plain Text Value" readonly="" style="background-color: #eeeeee;padding: 12px;"><small class="form-text text-muted">Enter the skill you'd like to develop. E.g. Python;</small>
                                        <hr
                                            style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;"><label>Current Skill Level</label><select class="form-control"><optgroup label="This is a group"><option value="12" selected="">This is item 1</option><option value="13">This is item 2</option><option value="14">This is item 3</option></optgroup></select>
                                            <hr
                                                style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;"><label>Action Plan To Achieve Goal:</label><textarea class="form-control" style="background-color: rgb(238,238,238);"></textarea>
                                                <hr style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;"><label>Target Date For Goal</label></form><input type="date"></div>
                                <div class="modal-footer"><button class="btn btn-light" type="button" data-dismiss="modal">Close</button><button class="btn btn-primary" type="button">Save</button></div>
                            </div>
                        </div>
                    </div>
					<a href="#" data-toggle="modal" data-target="#AddSkill" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-plus-square fa-sm text-white-50"></i> Add Skill </a>
					</div>
                <p>Add your development tasks & track them through to completion.</p>
				{% for message in messages %}
         <div class="alert alert-primary alert-dismissible fade show" role="alert">
            {{ message }}
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">&times; Dismiss</span>
            </button>
         </div>
         {% endfor %}
                <div class="row">
                    <div class="col-md-6 col-xl-3 mb-4">
                        <div class="row">
                            <div class="col">
                                <div class="card shadow border-left-primary py-2">
                                    <div class="card-body">
                                        <div class="row align-items-center no-gutters">
                                            <div class="col mr-2">
                                                <div class="text-uppercase text-primary font-weight-bold text-xs mb-1"><span>DEVELOPMENT AREAS</span></div>
                                                <div class="text-dark font-weight-bold h5 mb-0"><span>{{ count }}</span></div>
                                            </div>
                                            <div class="col-auto"><i class="fas fa-brain fa-2x text-gray-300"></i></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col">
                                <div class="card shadow border-left-info py-2">
                                    <div class="card-body">
                                        <div class="row align-items-center no-gutters">
                                            <div class="col mr-2">
                                                                                        <div class="text-uppercase text-info font-weight-bold text-xs mb-1"><span>STARTING SKILL POINTS</span></div>
                                                <div class="text-dark font-weight-bold h5 mb-0"><span>{{ starting_total }}</span></div>
                                            </div>
                                            <div class="col-auto"><i class="fas fa-coins fa-2x text-gray-300"></i></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col">
                                <div class="card shadow border-left-success py-2">
                                    <div class="card-body">
                                        <div class="row align-items-center no-gutters">
                                            <div class="col mr-2">
                                                <div class="text-uppercase text-success font-weight-bold text-xs mb-1"><span>CURRENT SKILL POINTS</span></div>
                                                <div class="text-dark font-weight-bold h5 mb-0"><span>{{ current_total }}</span></div>
                                            </div>
                                            <div class="col-auto"><i class="fas fa-coins fa-2x text-gray-300"></i></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <hr>
                        <div class="row">
                            <div class="col">
                                <div class="card shadow border-left-success py-2">
                                    <div class="card-body">
                                        <div class="row align-items-center no-gutters">
                                            <div class="col mr-2">
                                                <div class="text-uppercase text-success font-weight-bold text-xs mb-1"><span>POINTS GAIN</span></div>
                                                <div class="text-dark font-weight-bold h5 mb-0"><span>{{ delta }}</span></div>
                                            </div>
                                            <div class="col-auto"><i class="fas fa-plus-square fa-2x text-gray-300"></i></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6 mb-4">
                        <div class="card shadow mb-4">
                            <div class="card-header py-3">
                                <h6 class="text-primary font-weight-bold m-0">YOUR SKILLS</h6>
                            </div>
							
							

								
					
					
					
					
                            <div class="card-body">
							
{% if skill_list|length == 0 %}
Looks like you've not added any skills yet. Add them by clicking here. <a href="#" data-toggle="modal" data-target="#AddSkill">by clicking here. </a>


  {% else %}
   

							{% for skill in skill_list %}
							<h4 class="small font-weight-bold"> <a href="#" data-toggle="modal" data-target="#EditModal{{ skill.id }}">{{ skill.skill_name }}</a> <font size=1>
							
							
	
	</font><span class="float-right">{{ skill.current }}%</span></h4>
                                <div class="progress mb-4">
								    
                                    <div class="progress-bar bg-primary" aria-valuenow={{ skill.current }} aria-valuemin="0" aria-valuemax="100" style="width: {{ skill.current }}%;"><span class="sr-only">{{ skill.current }}%</span></div>
                                
				
								
								
								
								</div>
								
								  
			<!-- EDIT MODAL -->
					<div class="modal fade" id="EditModal{{ skill.id }}" role="dialog" tabindex="-1">
                        <div class="modal-dialog" role="document">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <h4 class="modal-title">Edit A Skill</h4><button type="button" name='skillname' class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div>
                                <div class="modal-body">
                                    <form action="/edit/" name="formx", id="form2" method="post">
									{% csrf_token %}
									
                                        <hr
                                            style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;"><label>Current Skill Level</label>
											
											
											<select class="form-control" name="starting"><optgroup label="Select Skill Level"><option value={{ skill.current }} selected="selected">
											
											No Change
											 
											</option><option value="0">No Knowledge</option><option value="20">Some Knowledge</option><option value="50">Mediocre Knowledge</option><option value="70">High Knowledge</option><option value="100">Expert Knowledge</option></optgroup></select>
                                            <hr
                                                style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;"><label>Action Plan To Achieve Goal:</label><textarea name="description" class="form-control" style="background-color: rgb(238,238,238);">{{ skill.description|linebreaks }}</textarea>
                                                <hr style="background-color: #ffffff;opacity: 0;padding: -23px;margin: 5px;">
												</div>
                                <div class="modal-footer"><button class="btn btn-light" type="button" data-dismiss="modal">Close</button><button name='editbutton'  value={{ skill.id }} class="btn btn-primary" type="submit">Save</button>
								</form>
								<form action="/delete/" name="form1", id="form1" method="post">
   {% csrf_token %}   
   <button name="deletebutton" data-toggle="tooltip" data-placement="top" title="Delete Task" type="submit"  value={{ skill.id }}  class="btn btn-link btn-sm">
    Delete Skill</button>
   </form></div>
                            </div>
                        </div>
                    </div>

					
								{% endfor %}
								   {% endif %}
                                <hr>
													<a href="#" data-toggle="modal" data-target="#AddSkill" class="btn btn-sm btn-primary shadow-sm"><i class="fas fa-plus-square fa-sm text-white-50"></i> Add Skill </a>

                            </div>
                        </div>
                    </div>
                    <div class="col-md-6 col-xl-3 mb-4">
                        <div class="card shadow mb-4">
                            <div class="card-header py-3">
                                <h6 class="text-primary m-0 font-weight-bold">COURSES YOU MAY LIKE</h6>
                            </div>
                            <div class="card-body">
							
							


								{% if course_list|length == 0 %}
Looks like you've not added any skills with matching courses, yet. Add them by clicking here. <a href="#" data-toggle="modal" data-target="#AddSkill">by clicking here. </a>


  {% else %}
   

							{% for course in course_list %}
							<div class="media">
  <img src={{ course.chosen_img }} class="mr-3" alt="..." width="25%">
  <div class="media-body">
    <h5 class="mt-0"><font size=2><a href={{ course.chosen_url }} target="_blank">{{ course.course_title }}</a></font></h5>
  </div>
</div>
<hr>



							{% endfor %}		
							{% endif %}
                            
                            </div>
                        </div>
                        <hr>
						<!--
                        <div class="row">
                            <div class="col">
                                <ul class="list-group">
                                    <li class="list-group-item"><span>Networking Meetup 1</span></li>
                                    <li class="list-group-item"><span>Networking Meetup 2</span></li>
                                    <li class="list-group-item"><span>Networking Meetup 3</span></li>
                                    <li class="list-group-item"><span>Networking Meetup 4</span></li>
                                    <li class="list-group-item"><span>Networking Meetup 5</span></li>
                                </ul>
                            </div>
                        </div>-->
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col">
                    <div class="card shadow mb-4">
                        <ul class="list-group list-group-flush"></ul>
                    </div>
                </div>
            </div>
        </div>
        <footer class="bg-white sticky-footer">
            <div class="container my-auto">
                <div class="text-center my-auto copyright"><span>Copyright © Netshock2019</span></div>
            </div>
        </footer>
    </div><a class="border rounded d-inline scroll-to-top" href="#page-top"><i class="fas fa-angle-up"></i></a></div>
	
	<script src="{% static "/js/jquery.min.js" %}"></script>
	<script src="{% static "/bootstrap/js/bootstrap.min.js" %}"></script>
	<script src="{% static "/js/theme.js" %}"></script>
	
    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.js"></script>
</body>
{% endif %}
</html>