Commit 89ffc4ae authored by Darshan Prabhu's avatar Darshan Prabhu

Dashboards with all forms and models

parent 544eea6a
from functools import reduce
# Part 1 (get these from the webapp)
# get student list
# get student project priorities and let them apply to their top priority
S = {"s1":["p1", "p3", "p2", "p4"], "s2":["p1", "p3", "p2", "p4"]}
# S = {"s1":["p1", "p2", "p3", "p4"], "s2":["p1", "p4", "p3", "p2"], "s3":["p3", "p1", "p2", "p4"], "s4":["p3", "p2", "p1", "p4"]}
# get project list from profs, per project capactiy and total capacity
L = {"l1":["p1", "p2"], "l2":["p3", "p4"]}
# L = {"l1":["p1", "p2"], "l2":["p3", "p4"]}
P2L = {"p1":"l1", "p2":"l1", "p3":"l2", "p4":"l2"}
# get priorities from profs about students
Lpref = {"l1": ["s1", "s2"], "l2": ["s2", "s1"]}
# Lpref = {"l1": ["s3", "s4", "s1", "s2"], "l2": ["s1", "s2", "s3", "s4"]}
# get max intake
Pc = {"p1":1, "p2":1, "p3":1, "p4":1}
# Pc = {"p1":2, "p2":1, "p3":2, "p4":1}
# matching structure
Ms = {"s1": [], "s2": []}
# Ms = {"s1": [], "s2": [], "s3": [], "s4": []}
Mp = {"p1": [], "p2": [], "p3": [], "p4": []}
# print("MS values: ", Ms.values())
# isStable = reduce(lambda x, y: (x and (len(y)>0), Ms.values(), True)
isStable = True
for i in Ms.values():
if len(i)==0:
isStable = False
break
# print(isStable)
# Part 2 (compute and return to the webapp)
# Run algo
while not isStable:
for stud in Ms.keys():
if len(Ms[stud])==0:
# provisionally asigning
# print("Current student: ", stud)
proj = S[stud][0]
lec = P2L[proj]
Ms[stud].append(proj)
Mp[proj].append(stud)
# check if project is oversubscibed
while len(Mp[proj]) > Pc[proj]:
# find the least priority students assigned to the project
prefList = Lpref[lec] # pref order of lec
idx = len(prefList)-1
found = False
while not found:
if prefList[idx] in Mp[proj]:
Mp[proj].remove(prefList[idx])
Ms[prefList[idx]].remove(proj)
S[prefList[idx]].remove(proj)
prefList.remove(prefList[idx])
# print("Removing project: ", proj)
# print("from student: ", prefList[idx])
found = True
else:
idx -= 1
# isStable = reduce(lambda x, y: (x and (len(y)>0), Ms.values(), True)
isStable = True
for i in Ms.values():
if len(i)==0:
isStable = False
break
print(Ms)
\ No newline at end of file
......@@ -37,6 +37,9 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'guideAllocationPortal',
'multiselectfield',
'django_drf_filepond'
]
MIDDLEWARE = [
......@@ -80,6 +83,11 @@ DATABASES = {
}
}
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
]
}
# Password validation
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
......@@ -118,3 +126,5 @@ USE_TZ = True
# https://docs.djangoproject.com/en/2.2/howto/static-files/
STATIC_URL = '/static/'
DJANGO_DRF_FILEPOND_UPLOAD_TMP = os.path.join(BASE_DIR, 'guideAllocationPortal/static/resume-temp-uploads')
DJANGO_DRF_FILEPOND_FILE_STORE_PATH = os.path.join(BASE_DIR, 'guideAllocationPortal/static/resume-uploads')
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>GAP</title>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.semanticui.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css" integrity="sha512-8Tb+T7SKUFQWOPIQCaLDWWe1K/SY8hvHl7brOH8Nz5z1VT8fnf8B+9neoUzmFY3OzkWMMs3OjrwZALgB1oXFBg==" crossorigin="anonymous" />
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/dataTables.semanticui.min.css" />
<style type="text/css">
.statistic:not(.last-stat){
border-right: 1px solid #e0e1e2 ;
}
.statistics th:not(.last-th){
border-right: 1px solid #dddddd;
}
</style>
</head>
<body style="background-color: whitesmoke;">
<div class="ui inverted segment tiny" style="font-size:medium;padding-top: 1vh; padding-bottom:1vh; ">
<div class="ui inverted secondary stackable menu">
<div class="header item " style="font-size: x-large;font-family: monospace;color:#00b5ad;">
<p class="teal">Guide Allocation Portal</p>
</div>
<div class="right menu">
<p class="item" style="font-size: large;">
Welcome Darshan Prabhu
</p>
<div class="item">
<div class="ui button teal">Log out</div>
</div>
</div>
</div>
</div>
<div class="ui container" style="width: 75%;">
<br>
<div class="ui container">
<h1 class="ui page centered align">Summary</h1>
<div class="ui grid">
<div class="six wide column">
<div class="ui fluid raised card" style="height:16vh;">
<div class="ui two statistics" style="margin-top: 3vh;">
<div class="teal statistic">
<div class="value">
3
</div>
<div class="label">
<br>
Current Round
</div>
</div>
<div class="red statistic">
<div class="text value" style="padding-top: 1rem;">
15-09-20
</div>
<div class="label">
<br>
Last date
</div>
</div>
</div>
</div>
</div>
<div class="ten wide column">
<div class="ui fluid raised card" style="height:16vh;">
<div class="ui three statistics divided" style="margin-top: 3vh;">
<div class="yellow statistic">
<div class="value">
150
</div>
<div class="label">
<br>
Total Applications
</div>
</div>
<div class="green statistic">
<div class="value">
25
</div>
<div class="label">
<br>
Shortlisted applications
</div>
</div>
<div class="ui grid">
</div>
<div class="statistic last-stat" >
<div class="value" style="color:#5279a2;" >
5
</div>
<div class="label">
<br>
Alloted students
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="ui yellow icon message">
<i class="inbox icon"></i>
<div class="content">
<div class="header">
Time remaining for current round
</div>
<div class="ui progress green" data-percent="90" id="time-progress" style="opacity: 0.85">
<div class="bar">
<div class="progress"></div>
</div>
<div class="label header">10 days to go</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui four item stackable tabs inverted menu " style="font-size: large;">
<a class="item active" data-tab="first">Applications</a>
<a class="item" data-tab="second">Shortlisted Applications</a>
<a class="item" data-tab="third">Open positions</a>
<a class="item" data-tab="fourth">Alloted students</a>
</div>
<div class="ui tab active" data-tab="first">
<table id="example" class="ui table raised segment center aligned" style="width:100%">
<thead>
<tr>
<th>NAME</th>
<th>POSITION</th>
<th>CGPA</th>
<th>DATE</th>
<th class="last-th">ACTIONS</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Darshan Prabhu
</td>
<td>
Neural Linguistics
</td>
<td>
<div style="display: none;">9.1</div>
<div class="ui yellow rating" data-rating="2.5">
</td>
<td>
19-04-20
</td>
<td>
<div class="">
<button class="ui vk button" onclick="show_student_detail(0)">
<i class="address card icon"></i>
Info
</button>
<button class="ui icon right labeled teal button">
<i class="check icon"></i>
Shortlist
</button>
</div>
</td>
</tr>
<tr>
<td>
<div>Sandeep Parihar</div>
</td>
<td>
Machine Translation
</td>
<td>
<div style="display: none;">9.4</div>
<div class="ui star yellow rating" data-rating="2.7" max-rating="5">
</td>
<td>
15-04-20
</td>
<td>
<div class="">
<button class="ui vk button" onclick="show_student_detail(1)">
<i class="address card icon"></i>
Info
</button>
<button class="ui icon right labeled teal button">
<i class="check icon"></i>
Shortlist
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="ui tab " data-tab="second">
<div class="ui grid">
<div class="right floated four wide column">
<button class="fluid ui labeled teal icon button" onclick="submit_priorities()" >
<i class="plus icon"></i>
Update priorities
</button>
</div>
</div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">NAME</div>
<div class="four wide column ui tiny header ">POSITION</div>
<div class="two wide column ui tiny header">CGPA</div>
<div class="two wide column ui tiny header">DATE</div>
<div class="four wide column ui tiny header">ACTIONS</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;" id="sortable">
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Piyush Sharma</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Word Embeddings</div></div>
<div class="column two wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>02-10-20</div></div>
<div class="right floated four wide column">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
<button class="ui right labeled icon negative button">
<i class="trash icon"></i>
Discard
</button>
</div>
</div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">Rajiv Vaidyanathan</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Travelling Salesman Problem</div></div>
<div class="column two wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>10-08-20</div></div>
<div class="right floated four wide column">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
<button class="ui right labeled icon negative button">
<i class="trash icon"></i>
Discard
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui tab" data-tab="third">
<div class="ui grid">
<div class="right floated four wide column">
<button class="fluid ui labeled teal icon button" onclick="show_new_position_form()" >
<i class="plus icon"></i>
Add new available position
</button>
</div>
</div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="three wide column ui tiny header">PROJECT TITLE</div>
<div class="three wide column ui tiny header ">DESCRIPTION</div>
<div class="two wide column ui tiny header">CONTACT DETAILS</div>
<div class="three wide column ui tiny header">REQUISITES</div>
<div class="two wide column ui tiny header">AVAILABLE POSITIONS</div>
<div class="three wide column ui tiny header">ACTIONS</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;" >
<div class="item">
<div class="ui grid">
<div class="column three wide center aligned middle aligned"><div class="ui medium ">Graph embeddings</div></div>
<div class="column three wide center aligned middle aligned"><div class="ui medium ">"Selecting training samples for robust, efficient training and performative predictions
https://arxiv.org/abs/1909.02963, https://arxiv.org/abs/2006.11845"</div></div>
<div class="column two wide center aligned middle aligned">abir.iitkgp@gmail.com</div>
<div class="column three wide center aligned middle aligned">
<table class="ui table">
<thead>
<tr>
<th>Subject</th>
<th>CGPA</th>
</tr>
</thead>
<tbody>
<tr>
<td>CS699</td>
<td>9.0</td>
</tr>
<tr>
<td>CS601</td>
<td>8.5</td>
</tr>
</tbody>
</table>
</div>
<div class="column two wide center aligned middle aligned">
3
</div>
<div class="right floated three wide column middle aligned">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
<button class="ui right labeled icon brown button">
<i class="edit icon"></i>
Update
</button>
</div>
</div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column three wide center aligned middle aligned"><div class="ui medium ">Graph embeddings</div></div>
<div class="column three wide center aligned middle aligned"><div class="ui medium ">"Selecting training samples for robust, efficient training and performative predictions
https://arxiv.org/abs/1909.02963, https://arxiv.org/abs/2006.11845"</div></div>
<div class="column two wide center aligned middle aligned">abir.iitkgp@gmail.com</div>
<div class="column three wide center aligned middle aligned">
<table class="ui table">
<thead>
<tr>
<th>Subject</th>
<th>CGPA</th>
</tr>
</thead>
<tbody>
<tr>
<td>CS699</td>
<td>8.5</td>
</tr>
<tr>
<td>CS705</td>
<td>8.0</td>
</tr>
<tr>
<td>CS601</td>
<td>9.0</td>
</tr>
</tbody>
</table>
</div>
<div class="column two wide center aligned middle aligned">
3
</div>
<div class="right floated three wide column middle aligned">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
<button class="ui right labeled icon brown button">
<i class="edit icon"></i>
Update
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui tab" data-tab="fourth">
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">NAME</div>
<div class="four wide column ui tiny header ">POSITION</div>
<div class="two wide column ui tiny header">CGPA</div>
<div class="two wide column ui tiny header">DATE</div>
<div class="four wide column ui tiny header">ACTIONS</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Darshan Prabhu</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Neural linguistics</div></div>
<div class="column two wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-09-20</div></div>
<div class="right floated four wide column">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
</div>
</div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">Piyush Sharma</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Word Embeddings</div></div>
<div class="column two wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>20-10-20</div></div>
<div class="right floated four wide column">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modals">
<div id="application-0" class="ui long modal">
<i class="close icon"></i>
<div class="header">
APPLICATION
</div>
<div class="content">
<div class="ui grid">
<div class="six wide column ui middle aligned">
<div class="ui medium image">
<img src="avatar.png" style="margin-left: auto; margin-right: auto;">
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Application Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="six wide column">
<div class="ui medium header left aligned">
Application number
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui large header center aligned grey">
1
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Applicant Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
Darshan Prabhu
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Email ID
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
darshanp@cse.iitb.ac.in
</div>
</div>
<div class="eleven wide column center aligned">
<div class="ui icon info message">
<i class="download icon"></i>
<div class="content">
<div class="header">
Resume of the applicant
</div>
<div class="ui left aligned" ><a href="https://www.google.com">Click me to download resume</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui">
<div class="ui large header center aligned brown">
Applicant Details
</div>
<div class="ui divider"></div>
<h3><u>Project Details</u></h3>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">PROJECT TITLE</div>
<div class="four wide column ui tiny header">PROGRAMMING LANGUAGES</div>
<div class="six wide column ui tiny header">DESCRIPTION</div>
<div class="two wide column ui tiny header">GITHUB</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Guide Allocation Portal</div></div>
<div class="column four wide center aligned middle aligned">
<div class="ui">
<a class="ui tiny primary inverted tag label">CSS</a>
<a class="ui tiny yellow inverted tag label">Python</a>
<a class="ui tiny red inverted tag label">Django</a>
</div>
</div>
<div class="column six wide center aligned middle aligned">This project was intended to benifit the department and all the students and faculties who work hard for the prestigious institute</div>
<div class="column two wide center aligned middle aligned"><a href="https:google.com">Link</a></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">Maze Solver</div></div>
<div class="column four wide center aligned middle aligned"><a class="ui tiny orange inverted tag label">P5.js</a>
<a class="ui tiny teal inverted tag label">HTML</a></div>
<div class="column six wide center aligned middle aligned">This project was intended to benifit the department and all the students and faculties who work hard to glorify the prestigious institute</div>
<div class="column two wide center aligned middle aligned"><a href="https:google.com">Link</a></div>
</div>
</div>
</div>
</div>
<br>
<div class="ui center aligned"><h3><u>Educational Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="five wide column ui tiny header">EXAMINATION</div>
<div class="five wide column ui tiny header ">BOARD</div>
<div class="four wide column ui tiny header">PERCENTAGE or CGPA</div>
<div class="two wide column ui tiny header">YEAR</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
<div class="item">
<div class="ui grid ">
<div class="column five wide center aligned middle aligned"><div class="ui medium ">SSLC</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">Karnataka Board</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="4"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-06-14</div></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column five wide center aligned middle aligned"><div class="ui medium">PUC</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">Karnataka Board</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="4"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-06-16</div></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column five wide center aligned middle aligned"><div class="ui medium">BE</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">None</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="4"></div></div>
<div class="column two wide center aligned middle aligned"><div>01-08-20</div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="actions">
<div class="ui secondary right labeled deny icon button">
Close
<i class="times icon"></i>
</div>
</div>
</div>
<div id="application-1" class="ui long modal">
<i class="close icon"></i>
<div class="header">
APPLICATION
</div>
<div class="content">
<div class="ui grid">
<div class="six wide column ui middle aligned">
<div class="ui medium image">
<img src="avatar.png" style="margin-left: auto; margin-right: auto;">
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Application Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="six wide column">
<div class="ui medium header left aligned">
Application number
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui large header center aligned grey">
2
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Applicant Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
Sandeep Parihar
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Email ID
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
sandy@cse.iitb.ac.in
</div>
</div>
<div class="eleven wide column center aligned">
<div class="ui icon info message">
<i class="download icon"></i>
<div class="content">
<div class="header">
Resume of the applicant
</div>
<div class="ui left aligned" ><a href="https://www.google.com">Click me to download resume</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui">
<div class="ui large header center aligned brown">
Applicant Details
</div>
<div class="ui divider"></div>
<h3><u>Project Details</u></h3>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">PROJECT TITLE</div>
<div class="four wide column ui tiny header">PROGRAMMING LANGUAGES</div>
<div class="six wide column ui tiny header">DESCRIPTION</div>
<div class="two wide column ui tiny header">GITHUB</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Guide Allocation Portal</div></div>
<div class="column four wide center aligned middle aligned">
<div class="ui">
<a class="ui tiny primary inverted tag label">CSS</a>
<a class="ui tiny yellow inverted tag label">Python</a>
<a class="ui tiny red inverted tag label">Django</a>
</div>
</div>
<div class="column six wide center aligned middle aligned">This project was intended to benifit the department and all the students and faculties who work hard for the prestigious institute</div>
<div class="column two wide center aligned middle aligned"><a href="https:google.com">Link</a></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">Human Pose Estimation</div></div>
<div class="column four wide center aligned middle aligned"><a class="ui tiny orange inverted tag label">Keras</a>
<a class="ui tiny teal inverted tag label">Python</a></div>
<div class="column six wide center aligned middle aligned">This project was intended to benifit the department and all the students and faculties who work hard to glorify the prestigious institute</div>
<div class="column two wide center aligned middle aligned"><a href="https:google.com">Link</a></div>
</div>
</div>
</div>
</div>
<br>
<div class="ui center aligned"><h3><u>Educational Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="five wide column ui tiny header">EXAMINATION</div>
<div class="five wide column ui tiny header ">BOARD</div>
<div class="four wide column ui tiny header">PERCENTAGE or CGPA</div>
<div class="two wide column ui tiny header">YEAR</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
<div class="item">
<div class="ui grid ">
<div class="column five wide center aligned middle aligned"><div class="ui medium ">SSLC</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">CBSE</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="4"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-06-14</div></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column five wide center aligned middle aligned"><div class="ui medium">PUC</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">CBSE</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="4"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-06-16</div></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column five wide center aligned middle aligned"><div class="ui medium">BTech</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">None</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="4"></div></div>
<div class="column two wide center aligned middle aligned"><div>01-08-20</div></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="actions">
<div class="ui secondary right labeled deny icon button">
Close
<i class="times icon"></i>
</div>
</div>
</div>
<div id="new-position" class="ui long modal">
<i class="close icon"></i>
<div class="header">
NEW POSITION
</div>
<div class="content">
<form class="ui form" id="new-position-form">
<div class="two fields">
<div class="twelve wide field">
<label>Project Title</label>
<input type="text" name="first-name" placeholder="Project Title">
</div>
<div class="four wide field">
<label>Total Positions</label>
<input type="number" name="first-name" placeholder="Number">
</div>
</div>
<div class="field">
<label>Project Description</label>
<textarea></textarea>
</div>
<div class="field">
<label>Requisites</label>
<div class="table">
<table class="no-error" style="width: 100%;">
<thead>
<tr>
<th class="col-3">Subject</th>
<th>CGPA</th>
</tr>
</thead>
<tbody class='requisites'>
<tr id="-row" class="requisites-form">
<td><input type="text" name="subject" placeholder="Subject"></td>
<td><input type="number" step="0.001" name="cgpa" placeholder="CGPA"></td>
<td>
<a id="remove-requisite-0-delete" name="remove-requisite-0-delete" href="javascript:void(0)" class="delete-row" onclick="deleterequisitesForm(this,0)">Delete</a>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan ="2"><a href="javascript:void(0)" class="add-row" onclick="addRequesiteForm()">Add another</a>
</tr>
</tfoot>
</table>
</div>
</div>
</form>
</div>
<div class="actions">
<button class="ui black button" type="reset" form="new-position-form">
Reset
</button>
<button class="ui positive right labeled icon button" type="submit" form="new-position-form">
Submit
<i class="checkmark icon"></i>
</button>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
window.requisitesformCount = 1;
window.requisitesformInst = $('.requisites-form:first').clone(true).get(0);
window.requisitesPrefix = 'requisite-';
$('#time-progress').progress();
$(".rating").rating('disable');
$('.menu .item').tab();
$( function() {
$( "#sortable" ).sortable();
$( "#sortable" ).disableSelection();
});
$('#example').DataTable({
columnDefs: [ { orderable: false, targets: [4] } ],
});
} );
function show_student_detail(id){
$(".modals #application-"+id).modal('show');
}
function show_new_position_form(){
$(".modals #new-position").modal('show');
}
function updateElementIndex(row,index) {
$(row).children().children().each(function(){
curr_id = $(this).attr('id');
new_id = curr_id.replace(/[0-9]+/gi,index);
$(this).attr('id',new_id);
curr_name = $(this).attr('name');
new_name = curr_name.replace(/[0-9]+/gi,index);
$(this).attr('name',new_name);
});
}
function update_total_forms_requisites(added){
if(added){
window.requisitesformCount +=1;
}
else{
window.requisitesformCount -=1;
}
//$('#id_previousDetails-TOTAL_FORMS').val(window.requisitesformcount);
}
function addRequesiteForm(){
var row = $(window.requisitesformInst).clone(true);
if(window.requisitesformCount == 0){
$('.requisites').html(row);
}
else{
$(row).attr('id',window.requisitesPrefix+window.requisitesformCount+'-row').insertAfter($('.requisites-form:last'));
var forms = $('.requisites-form');
$(forms).each(function(index){
updateElementIndex(this,index);
});
}
$(row).find('.delete-row').attr('onclick','deleterequisitesForm(this,"'+window.requisitesPrefix+window.requisitesformCount+'")');
update_total_forms_requisites(true);
return false;
}
function deleterequisitesForm(btn,prefix){
$(btn).parents('.requisites-form').remove();
var forms = $('.requisites-form');
update_total_forms_requisites(false);
$(forms).each(function(index){
$(this).attr('id',window.requisitesPrefix+index+'-row');
updateElementIndex(this,index);
});
return false;
}
function submit_priorities(){
return true;
}
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>GAP</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css" integrity="sha512-8Tb+T7SKUFQWOPIQCaLDWWe1K/SY8hvHl7brOH8Nz5z1VT8fnf8B+9neoUzmFY3OzkWMMs3OjrwZALgB1oXFBg==" crossorigin="anonymous" />
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.js"></script>
<style type="text/css">
.typewriter h1 {
color: #fff;
font-family: monospace;
overflow: hidden; /* Ensures the content is not revealed until the animation */
border-right: .15em solid orange; /* The typwriter cursor */
white-space: nowrap; /* Keeps the content on a single line */
margin: 0 auto; /* Gives that scrolling effect as the typing happens */
letter-spacing: .1em; /* Adjust as needed */
animation:
typing 3.5s steps(30, end),
blink-caret .5s step-end infinite;
}
/* The typing effect */
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
/* The typewriter cursor effect */
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: orange }
}
form h4 {
font-size: 1.5rem;
text-align: center;
padding-bottom: 1rem;
font-family: monospace;
}
</style>
</head>
<body>
<div class="ui two column grid" style="min-height: 100%;">
<div class="column ui aligned grid teal">
<div class="column" style="top:35%;padding-left: 13%;">
<div class=typewriter>
<h1 style="font-size: 2.5rem;">Guide Allocation Portal</h1>
</div>
<h3 style="font-size: 1.5rem;font-family: monospace;padding-left: inherit;">CSE Department, IIT Bombay</h3>
</div>
</div>
<div class="column">
<form class="ui large form" action="POST" style="top: 32%;padding-left: 2rem;">
<h4 >Login now</h4>
<div class="ui">
<div class="field" style="padding-bottom: 1rem;">
<div class="ui left icon input">
<i class="user icon"></i>
<input type="text" name="ldap" placeholder="CSE username">
</div>
</div>
<div class="field" style="padding-bottom: 1rem;">
<div class="ui left icon input">
<i class="lock icon"></i>
<input type="password" name="password" placeholder="Password">
</div>
</div>
<button class="ui fluid large black submit button" type="submit">Login</button>
</div>
</form>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>GAP</title>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.semanticui.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css" integrity="sha512-8Tb+T7SKUFQWOPIQCaLDWWe1K/SY8hvHl7brOH8Nz5z1VT8fnf8B+9neoUzmFY3OzkWMMs3OjrwZALgB1oXFBg==" crossorigin="anonymous" />
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/dataTables.semanticui.min.css" />
<style type="text/css">
.statistic:not(.last-stat){
border-right: 1px solid #e0e1e2 ;
}
.statistics th:not(.last-th){
border-right: 1px solid #dddddd;
}
</style>
</head>
<body style="background-color: whitesmoke;">
<div class="ui inverted segment tiny" style="font-size:medium;padding-top: 1vh; padding-bottom:1vh; ">
<div class="ui inverted secondary stackable menu">
<div class="header item " style="font-size: x-large;font-family: monospace;color:#00b5ad;">
<p class="teal">Guide Allocation Portal</p>
</div>
<div class="right menu">
<p class="item" style="font-size: large;">
Welcome Darshan Prabhu
</p>
<div class="item">
<div class="ui button teal">Log out</div>
</div>
</div>
</div>
</div>
<div class="ui container" style="width: 75%;">
<br>
<div class="ui container">
<h1 class="ui page centered align">Summary</h1>
<div class="ui grid">
<div class="six wide column">
<div class="ui fluid raised card" style="height:16vh;">
<div class="ui two statistics" style="margin-top: 3vh;">
<div class="teal statistic">
<div class="value">
3
</div>
<div class="label">
<br>
Current Round
</div>
</div>
<div class="red statistic">
<div class="text value" style="padding-top: 1rem;">
15-09-20
</div>
<div class="label">
<br>
Last date
</div>
</div>
</div>
</div>
</div>
<div class="ten wide column">
<div class="ui fluid raised card" style="height:16vh;">
<div class="ui three statistics divided" style="margin-top: 3vh;">
<div class="yellow statistic">
<div class="value">
85
</div>
<div class="label">
<br>
Total Positions
</div>
</div>
<div class="green statistic">
<div class="value">
25
</div>
<div class="label">
<br>
Submitted Applications
</div>
</div>
<div class="ui grid">
</div>
<div class="statistic last-stat" style="padding-left: 3rem;">
<div class="text value" style="color:#5279a2;padding-top: 1rem;" >
Not alloted
</div>
<div class="label">
<br>
Status
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="ui yellow icon message">
<i class="inbox icon"></i>
<div class="content">
<div class="header">
Time remaining for current round
</div>
<div class="ui progress green" data-percent="90" id="time-progress" style="opacity: 0.85">
<div class="bar">
<div class="progress"></div>
</div>
<div class="label header">10 days to go</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui three item stackable tabs inverted menu " style="font-size: large;">
<a class="item active" data-tab="first">Available Positions</a>
<a class="item" data-tab="second">Applied Positions</a>
<a class="item" data-tab="third">My profile</a>
</div>
<div class="ui tab active" data-tab="first">
<table id="example" class="ui table raised segment center aligned" style="width:100%">
<thead>
<tr>
<th>FACULTY NAME</th>
<th>PROJECT TITLE</th>
<th>CONTACT DETAILS</th>
<th>OPEN POSITIONS</th>
<th class="last-th">ACTIONS</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span class="ui" style="color: #b58105;">Abir De</span>
</td>
<td>
<span style="color: #5279a2;">Graph Embeddings</span>
</td>
<td>
Contact me at abir@cse.iitb.ac.in
</td>
<td>
<span class="ui orange header">2</span>
</td>
<td>
<div class="">
<button class="ui vk button" onclick="show_student_detail(0)">
<i class="address card icon"></i>
Info
</button>
<button class="ui icon right labeled teal button">
<i class="check icon"></i>
Apply
</button>
</div>
</td>
</tr>
<tr>
<td>
<span class="ui" style="color: #b58105;">Pushpak Bhattacharya</span>
</td>
<td>
<span style="color: #5279a2;">Machine Translation</span>
</td>
<td>
Contact me at puhspak@cse.iitb.ac.in
</td>
<td>
<span class="ui orange header">4</span>
</td>
<td>
<div class="">
<button class="ui vk button" onclick="show_student_detail(1)">
<i class="address card icon"></i>
Info
</button>
<button class="ui icon right labeled teal button">
<i class="check icon"></i>
Apply
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="ui tab " data-tab="second">
<div class="ui grid">
<div class="right floated four wide column">
<button class="fluid ui labeled teal icon button" onclick="submit_priorities()" >
<i class="plus icon"></i>
Update priorities
</button>
</div>
</div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="three wide column ui tiny header">FACULTY NAME</div>
<div class="four wide column ui tiny header ">PROJECT TITLE</div>
<div class="four wide column ui tiny header">CONTACT DETAILS</div>
<div class="two wide column ui tiny header">OPEN POSITIONS</div>
<div class="three wide column ui tiny header">ACTIONS</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;" id="sortable">
<div class="item">
<div class="ui grid">
<div class="column three wide center aligned middle aligned"><span class="ui" style="color: #b58105;">Preeti Jyothi</span></div>
<div class="column four wide center aligned middle aligned"><span style="color: #5279a2;">Speech Synthesis</span></div>
<div class="column four wide center aligned middle aligned">Contact me at pjyothi@cse.iitb.ac.in</div>
<div class="column two wide center aligned middle aligned"><span class="ui header" style="color: #f2711c;">3</span></div>
<div class="right floated three wide column">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
<button class="ui right labeled icon negative button">
<i class="trash icon"></i>
Discard
</button>
</div>
</div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column three wide center aligned middle aligned"><span class="ui" style="color: #b58105;">Rohit Gurjar</span></div>
<div class="column four wide center aligned middle aligned"><span style="color: #5279a2;">Sequence Matching</span></div>
<div class="column four wide center aligned middle aligned">Contact me at rgurjar@cse.iitb.ac.in</div>
<div class="column two wide center aligned middle aligned"><span class="ui header" style="color: #f2711c;">1</span></div>
<div class="right floated three wide column">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
<button class="ui right labeled icon negative button">
<i class="trash icon"></i>
Discard
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui tab" data-tab="third">
<div class="ui fluid raised card" style="width: 75%;margin-left: auto;margin-right: auto;margin-bottom: 1rem;">
<div class="content">
<div class="ui grid">
<div class="six wide column ui center aligned middle aligned">
<div class="ui medium image">
<img src="avatar.png">
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Personal Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="five wide column">
<div class="ui medium header left aligned">
Student Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="six wide column">
<div class="ui medium header center aligned grey">
Darshan Prabhu
</div>
</div>
<div class="five wide column">
<div class="ui medium header left aligned">
Email ID
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="six wide column">
<div class="ui medium header center aligned grey">
darshanp@cse.iitb.ac.in
</div>
</div>
<div class="five wide column">
<div class="ui medium header left aligned">
Qualities
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="six wide column">
<div class="ui tiny header center aligned grey">
Hard working, quality over quantity
</div>
</div>
<div class="eleven wide column center aligned">
<div class="ui icon info message">
<i class="download icon"></i>
<div class="content">
<div class="header">
Resume of the applicant
</div>
<div class="ui center aligned" ><a href="https://www.google.com">Click me to download resume</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui">
<div class="ui large header center aligned brown">
Applicant Details
</div>
<div class="ui divider"></div>
<div class="ui left aligned"><h3><u>Project Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">PROJECT TITLE</div>
<div class="four wide column ui tiny header">PROGRAMMING LANGUAGES</div>
<div class="six wide column ui tiny header">DESCRIPTION</div>
<div class="two wide column ui tiny header">GITHUB</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Guide Allocation Portal</div></div>
<div class="column four wide center aligned middle aligned">
<div class="ui">
<a class="ui tiny primary inverted tag label">CSS</a>
<a class="ui tiny yellow inverted tag label">Python</a>
<a class="ui tiny red inverted tag label">Django</a>
</div>
</div>
<div class="column six wide center aligned middle aligned">This project was intended to benifit the department and all the students and faculties who work hard to glorify the prestigious institute</div>
<div class="column two wide center aligned middle aligned"><a href="https:google.com">Link</a></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">Maze Solving</div></div>
<div class="column four wide center aligned middle aligned"><a class="ui tiny orange inverted tag label">HTML</a>
<a class="ui tiny teal inverted tag label">P5.js</a></div>
<div class="column six wide center aligned middle aligned">This project was intended to benifit the department and all the students and faculties who work hard to glorify the prestigious institute</div>
<div class="column two wide center aligned middle aligned"><a href="https:google.com">Link</a></div>
</div>
</div>
</div>
</div>
<br>
<div class="ui left aligned"><h3><u>Educational Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="five wide column ui tiny header">EXAMINATION</div>
<div class="five wide column ui tiny header ">BOARD</div>
<div class="four wide column ui tiny header">PERCENTAGE or CGPA</div>
<div class="two wide column ui tiny header">YEAR</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
<div class="item">
<div class="ui grid ">
<div class="column five wide center aligned middle aligned"><div class="ui medium ">SSLC</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">Karnataka Board</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-06-14</div></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column five wide center aligned middle aligned"><div class="ui medium">PUC</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">Karnataka Board</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-06-16</div></div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column five wide center aligned middle aligned"><div class="ui medium">BE</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">None</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-08-20</div></div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui center aligned">
<button class="ui right labeled large icon button blue">
<i class="pencil alternate icon"></i>
Edit
</button>
</div>
</div>
</div>
</div>
<div class="ui tab" data-tab="fourth">
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">NAME</div>
<div class="four wide column ui tiny header ">POSITION</div>
<div class="two wide column ui tiny header">CGPA</div>
<div class="two wide column ui tiny header">DATE</div>
<div class="four wide column ui tiny header">ACTIONS</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Darshan Prabhu</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Neural linguistics</div></div>
<div class="column two wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-09-20</div></div>
<div class="right floated four wide column">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
</div>
</div>
</div>
</div>
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">Darshan Prabhu</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui medium ">Neural linguistics</div></div>
<div class="column two wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="3"></div></div>
<div class="column two wide center aligned middle aligned"><div>15-09-20</div></div>
<div class="right floated four wide column">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modals">
</div>
<script type="text/javascript">
$(document).ready(function() {
window.requisitesformCount = 1;
window.requisitesformInst = $('.requisites-form:first').clone(true).get(0);
window.requisitesPrefix = 'requisite-';
$('#time-progress').progress();
$(".rating").rating('disable');
$('.menu .item').tab();
$( function() {
$( "#sortable" ).sortable();
$( "#sortable" ).disableSelection();
});
$('#example').DataTable({
columnDefs: [ { orderable: false, targets: [4] } ],
});
} );
function show_student_detail(id){
$(".modals #application-"+id).modal('show');
}
function show_new_position_form(){
$(".modals #new-position").modal('show');
}
function updateElementIndex(row,index) {
$(row).children().children().each(function(){
curr_id = $(this).attr('id');
new_id = curr_id.replace(/[0-9]+/gi,index);
$(this).attr('id',new_id);
curr_name = $(this).attr('name');
new_name = curr_name.replace(/[0-9]+/gi,index);
$(this).attr('name',new_name);
});
}
function update_total_forms_requisites(added){
if(added){
window.requisitesformCount +=1;
}
else{
window.requisitesformCount -=1;
}
//$('#id_previousDetails-TOTAL_FORMS').val(window.requisitesformcount);
}
function addRequesiteForm(){
var row = $(window.requisitesformInst).clone(true);
if(window.requisitesformCount == 0){
$('.requisites').html(row);
}
else{
$(row).attr('id',window.requisitesPrefix+window.requisitesformCount+'-row').insertAfter($('.requisites-form:last'));
var forms = $('.requisites-form');
$(forms).each(function(index){
updateElementIndex(this,index);
});
}
$(row).find('.delete-row').attr('onclick','deleterequisitesForm(this,"'+window.requisitesPrefix+window.requisitesformCount+'")');
update_total_forms_requisites(true);
return false;
}
function deleterequisitesForm(btn,prefix){
$(btn).parents('.requisites-form').remove();
var forms = $('.requisites-form');
update_total_forms_requisites(false);
$(forms).each(function(index){
$(this).attr('id',window.requisitesPrefix+index+'-row');
updateElementIndex(this,index);
});
return false;
}
function submit_priorities(){
return true;
}
</script>
</body>
</html>
\ No newline at end of file
......@@ -14,8 +14,11 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
from django.conf.urls import url
urlpatterns = [
path('admin/', admin.site.urls),
path('',include(("guideAllocationPortal.urls","gap"),namespace="gap")),
url(r'^fp/', include('django_drf_filepond.urls')),
]
from django.forms.models import inlineformset_factory
from django.forms import ModelForm, TextInput, NumberInput, Select, Textarea, DateInput
from .models import PositionsModel, RequisitesModel, StudentDetailModel, StudentProjectsModel, StudentEducationModel
# Form to get the project details from faculty
class PositionsModelForm(ModelForm):
class Meta:
model = PositionsModel
exclude = ('faculty','initial_total_positions',)
widgets = {
'title': TextInput(attrs={'placeholder':'Project Title'}),
'total_positions':NumberInput(attrs={'placeholder':'Total Positions'}),
'contact_details': TextInput(attrs={'placeholder':'How to contact me?'})
}
# Form to get the requisites list from faculty
class RequisitesModelForm(ModelForm):
class Meta:
model = RequisitesModel
exclude = ()
widgets = {
'Subject':Select(attrs={'class':"ui fluid search dropdown"}),
'cgpa':NumberInput(attrs={'placeholder':'CGPA','step':0.001})
}
# Formset to attach requisites form to main project form
RequisitesFormset = inlineformset_factory(PositionsModel,RequisitesModel,form=RequisitesModelForm,
extra=1,can_delete=False)
# Form to get student Details
class StudentDetailModelForm(ModelForm):
class Meta:
model = StudentDetailModel
exclude = ('student',)
# Form to get student project Details
class StudentProjectsModelForm(ModelForm):
class Meta:
model = StudentProjectsModel
exclude = ()
widgets = {
'title':TextInput(attrs={'placeholder':'Project Title'}),
'description': Textarea(attrs={'rows': 3}),
'link':TextInput(attrs={'placeholder':'Github Link'})
}
# Form to get student education Details
class StudentEducationModelForm(ModelForm):
class Meta:
model = StudentEducationModel
exclude = ()
widgets = {
'year': DateInput(attrs={'placeholder':'yyyy-mm-dd'}),
'exam': Select(attrs={'class':'ui selection dropdown'})
}
# Formset to attach projects form to main student detail form
StudentProjectFormset = inlineformset_factory(StudentDetailModel,StudentProjectsModel,form=StudentProjectsModelForm,
extra=1,can_delete=False)
# Formset to attach education form to main student detail form
StudentEducationFormset = inlineformset_factory(StudentDetailModel,StudentEducationModel,form=StudentEducationModelForm,
extra=1,can_delete=False)
from django.db import models
from django_drf_filepond.models import StoredUpload
from django.core.validators import MinValueValidator, MaxValueValidator
from django.contrib.auth.models import User
from django.conf import settings
# Create your models here.
from .choices import *
from multiselectfield import MultiSelectField
from datetime import datetime,timedelta
import os
# Model to store the project details
class PositionsModel(models.Model):
faculty = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=False,
blank=False,default=None, related_name='position_user')
title = models.CharField(verbose_name="Project Title",max_length=100,blank=False,null=False)
description = models.TextField(blank=True,null=True,verbose_name="Description")
contact_details = models.CharField(verbose_name="Contact Details",max_length=200,null=True,blank=True)
total_positions = models.IntegerField(verbose_name="Total Positions",null=False,blank=False)
initial_total_positions = models.IntegerField(verbose_name="Initial Total Positions",null=True,blank=True)
def get_requisites(self):
# Gives the list of all requisites for particular project
return self.requisites.all()
def get_alloted_students(self):
# Gives list of all students alloted to this project
return self.student_mappings.all()
# Model to store requisites for every project
class RequisitesModel(models.Model):
position = models.ForeignKey(PositionsModel,related_name='requisites',on_delete=models.CASCADE)
Subject = models.CharField(verbose_name="Subject Name",max_length=6,choices=subject_choices,default='CS699')
cgpa = models.FloatField(verbose_name="CGPA",null=False,blank=False,
validators=[MinValueValidator(0.0),MaxValueValidator(10.0)])
# Model to store details of student profile
class StudentDetailModel(models.Model):
student = models.ForeignKey(User, on_delete=models.DO_NOTHING, null=False,
blank=False,default=None, related_name='student_user')
qualities = models.CharField(verbose_name="Description",max_length=200,blank=True,null=True)
alloted_project = models.ForeignKey(PositionsModel,on_delete=models.DO_NOTHING,blank=True,default=None,null=True,related_name="alloted_student")
def get_education_details(self):
# Gives the list of all education details for student
return self.education.all()
def get_project_details(self):
# Gives the list of all project details for student
return self.projects.all()
def get_resume_details(self):
# Gives the resume associated with the student
return self.resume.first()
def get_cgpa(self):
# Gives the BE/Btech cgpa of the student the student
if self.education.exists():
return self.education.get(exam='BE/BTech').cgpa
else:
return 0
def get_alloted_project(self):
if self.student_allotment:
return self.student_allotment.project.title
else:
return None
# Model to store details of student projects
class StudentProjectsModel(models.Model):
student = models.ForeignKey(StudentDetailModel,related_name='projects',on_delete=models.CASCADE)
title = models.CharField(verbose_name="Project Title",max_length=100,blank=False,null=False)
languages = MultiSelectField(verbose_name="Programming Languages",choices=language_choices)
description = models.TextField(verbose_name="Description",blank=True,null=True)
link = models.URLField(verbose_name="Github Link",max_length=200,blank=True,null=True)
# Model to store details of student education
class StudentEducationModel(models.Model):
student = models.ForeignKey(StudentDetailModel,related_name='education',on_delete=models.CASCADE)
exam = models.CharField(verbose_name="Examination",max_length=10,choices=exam_choices,default="BE/BTech")
board = models.CharField(verbose_name="Examination Board",max_length=100,blank=False,null=False)
cgpa = models.FloatField(verbose_name="CGPA/Percentage",null=False,blank=False,
validators=[MinValueValidator(0.0),MaxValueValidator(100.0)])
year = models.DateField(verbose_name="Year of completion",null=False,blank=False)
# Model to store details of student resume
class StudentResumeModel(models.Model):
student = models.ForeignKey(StudentDetailModel,related_name="resume",on_delete=models.CASCADE)
file = models.ForeignKey(StoredUpload,on_delete=models.DO_NOTHING)
# Model to store generated mappings for every round
class GeneratedMappingsModel(models.Model):
roundNo = models.IntegerField(verbose_name="Round Number",null=False,blank=False,default=1)
project = models.ForeignKey(PositionsModel,related_name="student_mappings",on_delete=models.DO_NOTHING,db_column="project_id")
faculty = models.ForeignKey(User,on_delete=models.DO_NOTHING,db_column="faculty_id")
student = models.ForeignKey(StudentDetailModel,related_name="student_allotment",on_delete=models.DO_NOTHING,db_column="student_id")
{% load static %}
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}GAP{% endblock %}</title>
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
<link href="https://unpkg.com/filepond/dist/filepond.css" rel="stylesheet">
<!-- add before </body> -->
<script src="https://unpkg.com/filepond/dist/filepond.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.semanticui.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.7/semantic.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/icon.min.css" integrity="sha512-8Tb+T7SKUFQWOPIQCaLDWWe1K/SY8hvHl7brOH8Nz5z1VT8fnf8B+9neoUzmFY3OzkWMMs3OjrwZALgB1oXFBg==" crossorigin="anonymous" />
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.22/css/dataTables.semanticui.min.css" />
<style type="text/css">
body{
background-color: whitesmoke;
}
#navbar{
font-size:medium;
padding-top: 1vh;
padding-bottom:1vh;
}
#navbar .header{
font-size: x-large;
font-family: monospace;
color:#00b5ad;
}
{% block styling %}
{% endblock styling %}
</style>
</head>
<body>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=BioRhyme:wght@300&display=swap" rel="stylesheet">
<div id="navbar" class="ui inverted segment tiny" style="margin-top: 0;padding: 4px; ">
<div class="ui inverted secondary stackable menu">
<div class="header item ">
<p class="teal" style="font-family: 'BioRhyme', serif;letter-spacing: 4px;">Guide Allocation Portal</p>
</div>
<div class="right menu">
<p class="item" style="font-size: large;">
Welcome {{ request.user.get_full_name }}
</p>
<div class="item">
<form action="{% url 'gap:logout' %}">
<button class="ui button teal" type='submit'>Log out</button>
</form>
</div>
</div>
</div>
</div>
<div class="ui container" style="width: 75%;">
{% block content %}
{% endblock %}
</div>
<div class="modals">
{% block modals %}
{% endblock %}
</div>
<script type="text/javascript">
{% block scripts %}
{% endblock %}
</script>
</body>
</html>
\ No newline at end of file
{% extends "base.html" %}
{% load custom_tags %}
{% load static %}
{% block styling %}
.statistic:not(.last-stat){
border-right: 1px solid #e0e1e2 ;
}
.statistics th:not(.last-th){
border-right: 1px solid #dddddd;
}
{% endblock %}
{% block content %}
<br>
<div class="ui container" id="summary">
<div class="ui grid" style="margin-top: 1rem;">
<div class="six wide column">
<div class="ui fluid raised card" style="">
<div class="content">
<div class="ui two statistics" style="">
<div class="teal statistic">
<div class="value">
{{ current_round.roundNo }}
</div>
<div class="label">
<br>
Current Round
</div>
</div>
<div class="red statistic last-stat">
<div class="text value" style="padding-top: 1rem;">
{{ current_round.endDate }}
</div>
<div class="label">
<br>
Last date
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ten wide column">
<div class="ui fluid raised card">
<div class="content">
<div class="ui three statistics divided">
<div class="yellow statistic">
<div class="value">
{{ allApplications|length }}
</div>
<div class="label">
<br>
Total Applications
</div>
</div>
<div class="green statistic">
<div class="value">
{{ ProjectWiseShortlistedApplications|get_count_multilist }}
</div>
<div class="label">
<br>
Shortlisted applications
</div>
</div>
<div class="ui grid">
</div>
<div class="statistic last-stat" >
<div class="value" style="color:#5279a2;" >
{{ allotedStudents|length }}
</div>
<div class="label">
<br>
Alloted students
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="ui yellow icon large floating message" style="margin-top: 3rem;">
<i class="calendar check icon"></i>
<div class="content">
<div class="header" style="padding-bottom:1rem;">
Time remaining for Round {{ current_round.roundNo }}
</div>
<div class="ui progress {% get_progress_color current_round.endDate %}" data-percent="{% get_progress_percent current_round %}" id="time-progress" style="opacity: 0.85">
<div class="bar">
<div class="progress"></div>
</div>
<div class="label header">{% get_remaining_days current_round.endDate %}</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui {% if user_type == 'facad' %}five{% else %}four{% endif %} item stackable tabs inverted menu " style="font-size: large;">
<a class="item active" data-tab="first">Applications</a>
<a class="item" data-tab="second">Shortlisted Applications</a>
<a class="item" data-tab="third">Open positions</a>
<a class="item" data-tab="fourth">Alloted students</a>
</div>
<div class="ui tab active" data-tab="first">
</div>
<div class="ui tab " data-tab="second">
</div>
<div class="ui tab" data-tab="third">
<div class="ui warning message">
<i class="close icon"></i>
<div class="header ui center aligned">
Information to Faculty
</div>
<ul>
<li>Use <span class="medium header" style="display: inline;background-color:rgba(0, 0, 0, 0.06); ">Add new Project</span> to mention the projects available under you.</li>
<li>To make changes to existing projects use the <span class="medium header" style="display: inline;background-color:rgba(0, 0, 0, 0.06); ">Update</span> button .</li>
</ul>
</div>
<div class="ui grid">
<div class="right floated four wide column">
<button class="fluid ui labeled teal icon button" onclick="show_new_position_form()" >
<i class="plus icon"></i>
Add new Project
</button>
</div>
</div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="three wide column ui tiny header">PROJECT TITLE</div>
<div class="three wide column ui tiny header ">DESCRIPTION</div>
<div class="two wide column ui tiny header">CONTACT DETAILS</div>
<div class="three wide column ui tiny header">REQUISITES</div>
<div class="two wide column ui tiny header">AVAILABLE POSITIONS</div>
<div class="three wide column ui tiny header">ACTIONS</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;" >
{% for opening in availablePositions %}
<div class="item">
<div class="ui grid">
<div class="column three wide center aligned middle aligned"><div class="ui medium ">{{ opening.title }}</div></div>
<div class="column three wide center aligned middle aligned"><div class="ui medium ">{{ opening.description }}</div></div>
<div class="column two wide center aligned middle aligned">{{ opening.contact_details }}</div>
<div class="column three wide center aligned middle aligned">
<table class="ui table">
<thead>
<tr>
<th>Subject</th>
<th>CGPA</th>
</tr>
</thead>
<tbody>
{% for requisite in opening.get_requisites %}
<tr>
<td>{{ requisite.Subject }}</td>
<td>{{ requisite.cgpa }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="column two wide center aligned middle aligned">
{{ opening.total_positions }}
</div>
<div class="right floated three wide column middle aligned">
<div class="ui center aligned">
<button class="ui vk button">
<i class="address card icon"></i>
Info
</button>
<button class="ui right labeled icon brown button" onclick="show_update_form({{ forloop.counter0 }})">
<i class="edit icon"></i>
Update
</button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<div class="ui tab" data-tab="fourth">
{% if allotedStudents|length == 0 %}
<div class="ui warning message">
<i class="close icon"></i>
<div class="header ui center aligned">
Information to Faculty
</div>
<ul>
<li>You are not alloted any <span class="medium header" style="display: inline;background-color:rgba(0, 0, 0, 0.06); ">students</span> yet.</li>
</ul>
</div>
{% else %}
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="two wide column ui tiny header">ROUND NUMBER</div>
<div class="four wide column ui tiny header ">NAME</div>
<div class="four wide column ui tiny header">PROJECT</div>
<div class="two wide column ui tiny header">CGPA</div>
<div class="four wide column ui tiny header">ACTIONS</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for student in allotedStudents %}
<div class="item">
<div class="ui grid ">
<div class="column two wide center aligned middle aligned">{{ student.roundNo }}</div>
<div class="column four wide center aligned middle aligned"><div class="ui medium ">{{ student.student.student.get_full_name }}</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui medium ">{{ student.project.title }}</div></div>
<div class="column two wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="{% get_normalized_grades student.student.get_cgpa %}"></div></div>
<div class="right floated four wide column">
<div class="ui center aligned">
<button class="ui vk button" onclick="show_student_detail( '{{ student.student.id }}-{{ student.project.id }}' )">
<i class="address card icon"></i>
Info
</button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% endblock %}
{% block modals %}
{% for application in allApplications %}
<div id="application-{{ application.student.id }}-{{ application.project.id }}" class="ui long modal">
<i class="close icon"></i>
<div class="header">
APPLICATION
</div>
<div class="content">
<div class="ui grid">
<div class="six wide column ui center aligned middle aligned" style="padding-top: 5rem;">
<div class="ui medium image">
<div class="ui large icon header">
<i class="user circle massive grey icon"></i>
</div>
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Application Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="six wide column">
<div class="ui medium header left aligned">
Application number
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.id }}-{{ application.project.id }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Applicant Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.student.get_full_name }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Email ID
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.student.email }}
</div>
</div>
<div class="eleven wide column center aligned">
<div class="ui icon info message">
<i class="download icon"></i>
<div class="content">
<div class="header">
Resume of the applicant
</div>
{% with resume=application.student.get_resume_details %}
{% if resume %}
{% with 'resume-uploads/'|add:'/'|add:resume.file.file.name as image_static %}
<div class="ui center aligned" ><a href="{% static image_static %}" target="_blank">Click me to download resume</a></div>
{% endwith %}
{% else %}
<div class="ui center aligned" ><div style="color:slategrey;">Student has not uploaded the resume</div></div>
{% endif %}
{% endwith %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui">
<div class="ui large header center aligned brown">
Applicant Details
</div>
<div class="ui divider"></div>
<h3><u>Project Details</u></h3>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">PROJECT TITLE</div>
<div class="four wide column ui tiny header">PROGRAMMING LANGUAGES</div>
<div class="six wide column ui tiny header">DESCRIPTION</div>
<div class="two wide column ui tiny header">GITHUB</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for project in application.student.get_project_details %}
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">{{ project.title }}</div></div>
<div class="column four wide center aligned middle aligned">
<div class="ui">
{% for language in project.languages %}
<a class="ui tiny {% get_color language %} tag label">{{ language }}</a>
{% endfor %}
</div>
</div>
<div class="column six wide center aligned middle aligned">{{ project.description }}</div>
<div class="column two wide center aligned middle aligned"><a href="{{ project.link }}">Link</a></div>
</div>
</div>
{% endfor %}
</div>
</div>
<br>
<div class="ui center aligned"><h3><u>Educational Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">EXAMINATION</div>
<div class="five wide column ui tiny header ">BOARD</div>
<div class="four wide column ui tiny header">PERCENTAGE or CGPA</div>
<div class="three wide column ui tiny header">YEAR</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for education in application.student.get_education_details %}
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">{{ education.exam }}</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">{{ education.board }}</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="{% get_normalized_grades education.cgpa %}" data-max-rating="5"></div></div>
<div class="column three wide center aligned middle aligned">{{ education.year }}</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
<div class="actions">
<div class="ui secondary right labeled deny icon button">
Close
<i class="times icon"></i>
</div>
</div>
</div>
{% endfor %}
{% for shortlistedApplications in ProjectWiseShortlistedApplications %}
{% for application in shortlistedApplications %}
<div id="application-{{ application.student.id }}-{{ application.project.id }}" class="ui long modal">
<i class="close icon"></i>
<div class="header">
APPLICATION
</div>
<div class="content">
<div class="ui grid">
<div class="six wide column ui center aligned middle aligned" style="padding-top: 5rem;">
<div class="ui medium image">
<div class="ui large icon header">
<i class="user circle massive grey icon"></i>
</div>
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Application Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="six wide column">
<div class="ui medium header left aligned">
Application number
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.id }}-{{ application.project.id }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Applicant Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.student.get_full_name }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Email ID
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.student.email }}
</div>
</div>
<div class="eleven wide column center aligned">
<div class="ui icon info message">
<i class="download icon"></i>
<div class="content">
<div class="header">
Resume of the applicant
</div>
{% with resume=application.student.get_resume_details %}
{% if resume %}
{% with 'resume-uploads/'|add:'/'|add:resume.file.file.name as image_static %}
<div class="ui center aligned" ><a href="{% static image_static %}" target="_blank">Click me to download resume</a></div>
{% endwith %}
{% else %}
<div class="ui center aligned" ><div style="color:slategrey;">Student has not uploaded the resume</div></div>
{% endif %}
{% endwith %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui">
<div class="ui large header center aligned brown">
Applicant Details
</div>
<div class="ui divider"></div>
<h3><u>Project Details</u></h3>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">PROJECT TITLE</div>
<div class="four wide column ui tiny header">PROGRAMMING LANGUAGES</div>
<div class="six wide column ui tiny header">DESCRIPTION</div>
<div class="two wide column ui tiny header">GITHUB</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for project in application.student.get_project_details %}
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">{{ project.title }}</div></div>
<div class="column four wide center aligned middle aligned">
<div class="ui">
{% for language in project.languages %}
<a class="ui tiny {% get_color language %} tag label">{{ language }}</a>
{% endfor %}
</div>
</div>
<div class="column six wide center aligned middle aligned">{{ project.description }}</div>
<div class="column two wide center aligned middle aligned"><a href="{{ project.link }}">Link</a></div>
</div>
</div>
{% endfor %}
</div>
</div>
<br>
<div class="ui center aligned"><h3><u>Educational Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">EXAMINATION</div>
<div class="five wide column ui tiny header ">BOARD</div>
<div class="four wide column ui tiny header">PERCENTAGE or CGPA</div>
<div class="three wide column ui tiny header">YEAR</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for education in application.student.get_education_details %}
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">{{ education.exam }}</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">{{ education.board }}</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="{% get_normalized_grades education.cgpa %}" data-max-rating="5"></div></div>
<div class="column three wide center aligned middle aligned">{{ education.year }}</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
<div class="actions">
<div class="ui secondary right labeled deny icon button">
Close
<i class="times icon"></i>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% for application in allotedStudents %}
<div id="application-{{ application.student.id }}-{{ application.project.id }}" class="ui long modal">
<i class="close icon"></i>
<div class="header">
APPLICATION
</div>
<div class="content">
<div class="ui grid">
<div class="six wide column ui center aligned middle aligned" style="padding-top: 5rem;">
<div class="ui medium image">
<div class="ui large icon header">
<i class="user circle massive grey icon"></i>
</div>
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Application Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="six wide column">
<div class="ui medium header left aligned">
Application number
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.id }}-{{ application.project.id }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Applicant Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.student.get_full_name }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Email ID
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ application.student.student.email }}
</div>
</div>
<div class="eleven wide column center aligned">
<div class="ui icon info message">
<i class="download icon"></i>
<div class="content">
<div class="header">
Resume of the applicant
</div>
{% if application.student.resume.file %}
{% with 'resume-uploads/'|add:'/'|add:application.student.resume.file.name as image_static %}
<div class="ui center aligned" ><a href="{% static image_static %}" target="_blank">Click me to download resume</a></div>
{% endwith %}
{% else %}
<div class="ui center aligned" ><div style="color:slategrey;">Student has not uploaded the resume</div></div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui">
<div class="ui large header center aligned brown">
Applicant Details
</div>
<div class="ui divider"></div>
<h3><u>Project Details</u></h3>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">PROJECT TITLE</div>
<div class="four wide column ui tiny header">PROGRAMMING LANGUAGES</div>
<div class="six wide column ui tiny header">DESCRIPTION</div>
<div class="two wide column ui tiny header">GITHUB</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for project in application.student.get_project_details %}
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">{{ project.title }}</div></div>
<div class="column four wide center aligned middle aligned">
<div class="ui">
{% for language in project.languages %}
<a class="ui tiny {% get_color language %} tag label">{{ language }}</a>
{% endfor %}
</div>
</div>
<div class="column six wide center aligned middle aligned">{{ project.description }}</div>
<div class="column two wide center aligned middle aligned"><a href="{{ project.link }}">Link</a></div>
</div>
</div>
{% endfor %}
</div>
</div>
<br>
<div class="ui center aligned"><h3><u>Educational Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">EXAMINATION</div>
<div class="five wide column ui tiny header ">BOARD</div>
<div class="four wide column ui tiny header">PERCENTAGE or CGPA</div>
<div class="three wide column ui tiny header">YEAR</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for education in application.student.get_education_details %}
<div class="item">
<div class="ui grid">
<div class="column four wide center aligned middle aligned"><div class="ui medium">{{ education.exam }}</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">{{ education.board }}</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="{% get_normalized_grades education.cgpa %}" data-max-rating="5"></div></div>
<div class="column three wide center aligned middle aligned">{{ education.year }}</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
<div class="actions">
<div class="ui secondary right labeled deny icon button">
Close
<i class="times icon"></i>
</div>
</div>
</div>
{% endfor %}
<div id="new-position" class="ui long modal">
<i class="close icon"></i>
<div class="header">
NEW POSITION
</div>
<div class="content">
<form class="ui form" id="new-position-form" method="POST">
{% csrf_token %}
<div class="two fields">
<div class="twelve wide field">
<label>{{ newPosition.title.label }}</label>
{{ newPosition.title }}
</div>
<div class="four wide field">
<label>{{ newPosition.total_positions.label }}</label>
{{ newPosition.total_positions }}
</div>
</div>
<div class="field">
<label>{{ newPosition.contact_details.label }}</label>
{{ newPosition.contact_details }}
</div>
<div class="field">
<label>{{ newPosition.description.label }}</label>
{{ newPosition.description }}
</div>
<div class="field">
<label>Requisites</label>
<div class="requisitesList">
<table style="width: 100%;">
<thead>
<tr>
<th class="col-3">Subject</th>
<th>CGPA</th>
</tr>
</thead>
<tbody class='requisites'>
{% for form in requisitesForm %}
<tr id="{{ form.prefix }}-row" class="requisites-form">
<td>{{ form.Subject }}</td>
<td>{{ form.cgpa }}</td>
<td>
<a id="remove-{{ form.prefix }}-delete" name="remove-{{ form.prefix }}-delete" href="javascript:void(0)" class="delete-row" onclick="deleterequisitesForm(this,'{{ form.prefix }}')">Delete</a>
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan ="2"><a href="javascript:void(0)" class="add-row" onclick="addRequesiteForm()">Add another</a></td>
</tr>
</tfoot>
</table>
{{ requisitesForm.management_form }}
</div>
</div>
</form>
</div>
<div class="actions">
<button class="ui black button" type="reset" form="new-position-form">
Reset
</button>
<button class="ui positive right labeled icon button" type="submit" form="new-position-form">
Submit
<i class="checkmark icon"></i>
</button>
</div>
</div>
<div id="updateforms">
{% for updateform in updateforms %}
<div id="update-position-{{ forloop.counter0 }}" class="ui long modal">
<i class="close icon"></i>
<div class="header">
NEW POSITION
</div>
<div class="content">
<form class="ui form" id="update-position-form-{{ forloop.counter0 }}" method="POST">
{% csrf_token %}
<input type="hidden" id="id_positionId" name="positionId" value="{{ updateform.instance.id }}">
<div class="two fields">
<div class="twelve wide field">
<label>{{ updateform.title.label }}</label>
{{ updateform.title }}
</div>
<div class="four wide field">
<label>{{ updateform.total_positions.label }}</label>
{{ updateform.total_positions }}
</div>
</div>
<div class="field">
<label>{{ updateform.contact_details.label }}</label>
{{ updateform.contact_details }}
</div>
<div class="field">
<label>{{ updateform.description.label }}</label>
{{ updateform.description }}
</div>
<div class="field">
<label>Requisites</label>
<div class="requisitesList">
<table style="width: 100%;">
<thead>
<tr>
<th class="col-3">Subject</th>
<th>CGPA</th>
</tr>
</thead>
{% with updaterequisiteform=updaterequisiteforms|index:forloop.counter0 %}
<tbody class='update-requisites'>
{% for form in updaterequisiteform %}
<tr id="update-{{ form.prefix }}-row" class="update-requisites-form">
<td>{{ form.Subject }}</td>
<td>{{ form.cgpa }}</td>
<td>
<a id="remove-update-{{ form.prefix }}-delete" name="remove-update-{{ form.prefix }}-delete" href="javascript:void(0)" class="delete-row" onclick="deleteupdaterequisitesForm(this,'#update-position-form-{{ forloop.parentloop.counter0 }}',{% if form.id.value is not None %}true{% else %}false{% endif %})">Delete</a>
</td>
{% if form.id.value is not None %}
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}
{% endif %}
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
{{ updaterequisiteform.management_form }}
<td colspan ="2"><a href="javascript:void(0)" class="update-add-row" onclick="addUpdateRequesiteForm('#update-position-form-{{ forloop.counter0 }}')">Add another</a></td>
</tr>
</tfoot>
{% endwith %}
</table>
</div>
</div>
</form>
</div>
<div class="actions">
<button class="ui black button" type="reset" form="update-position-form-{{ forloop.counter0 }}">
Reset
</button>
<button class="ui positive right labeled icon button" type="submit" form="update-position-form-{{ forloop.counter0 }}">
Submit
<i class="checkmark icon"></i>
</button>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
{% block scripts %}
$(document).ready(function() {
window.requisitesformCount = parseInt($('#new-position #id_requisites-TOTAL_FORMS').val());
window.requisitesformInst = $('.requisites-form:first').clone(true).get(0);
window.updaterequisitesformInst = $('.update-requisites-form:last').clone(true).get(0);
window.requisitesPrefix = 'requisites-';
window.updaterequisitePrefix = 'update-requisites-'
$('#time-progress').progress();
$(".rating").rating('disable');
$('.menu .item').tab();
$('.date_picker').calendar({
type: 'date',
minDate: new Date(),
formatter: {
date: function (date, settings) {
if (!date) return '';
var day = date.getDate();
var month = date.getMonth() + 1;
var year = date.getFullYear();
return year + '-' + month + '-' + day;
}
}
});
$( function() {
{% for projects in ProjectWiseShortlistedApplications %}
$( "#sortable-{{ forloop.counter0 }}" ).sortable();
$( "#sortable-{{ forloop.counter0 }}" ).disableSelection();
{% endfor %}
});
$('#applications').DataTable({
columnDefs: [ { orderable: false, targets: [4] } ],
});
$('.ui.dropdown').dropdown();
sync_total_forms();
{% if messages %}
{% for message in messages %}
$('body')
.toast({
class: "error",
title: "Error logging in",
displayTime: 3000,
closeIcon: true,
position: "top center",
showIcon: "exclamation",
message: '{{ message }}',
});
{% endfor %}
{% endif %}
} );
function sync_total_forms(){
$('#updateforms .requisitesList').each(function(){
$(this).find('#id_requisites-TOTAL_FORMS').val($(this).find('.update-requisites-form').length);
});
}
function show_student_detail(id){
$(".modals #application-"+id).modal('show');
}
function show_update_form(id){
$(".modals #update-position-"+id).modal('show');
}
function show_new_position_form(){
$(".modals #new-position").modal('show');
}
function updateElementIndex(row,index) {
$(row).children().children().each(function(){
curr_id = $(this).attr('id');
if(curr_id==null){
curr_id = $(this).find('select').attr('id');
new_id = curr_id.replace(/[0-9]+/gi,index);
$(this).find('select').attr('id',new_id);
curr_name = $(this).find('select').attr('name');
new_name = curr_name.replace(/[0-9]+/gi,index);
$(this).find('select').attr('name',new_name);
}
else{
new_id = curr_id.replace(/[0-9]+/gi,index);
$(this).attr('id',new_id);
curr_name = $(this).attr('name');
new_name = curr_name.replace(/[0-9]+/gi,index);
$(this).attr('name',new_name);
}
});
}
function addRequesiteForm(){
var row = $(window.requisitesformInst).clone(true);
requisitesformCount = parseInt($('#new-position #id_requisites-TOTAL_FORMS').val());
$(row).find(".ui.dropdown").dropdown();
if(requisitesformCount == 0){
$('#new-position .requisites ').html(row);
}
else{
$(row).attr('id',window.requisitesPrefix+requisitesformCount+'-row').insertAfter($('#new-position .requisites-form:last'));
var forms = $('#new-position .requisites-form');
$(forms).each(function(index){
updateElementIndex(this,index);
});
}
$(row).find('.delete-row').attr('onclick','deleterequisitesForm(this,"'+window.requisitesPrefix+requisitesformCount+'")');
$('#new-position #id_requisites-TOTAL_FORMS').val(requisitesformCount+1);
return false;
}
function deleterequisitesForm(btn){
$(btn).parents('.requisites-form').remove();
var forms = $('#new-position .requisites-form');
requisitesformCount = parseInt($('#new-position #id_requisites-TOTAL_FORMS').val());
$('#new-position #id_requisites-TOTAL_FORMS').val(requisitesformCount-1);
$(forms).each(function(index){
$(this).attr('id',window.requisitesPrefix+index+'-row');
updateElementIndex(this,index);
});
return false;
}
function addUpdateRequesiteForm(id){
var row = $(window.updaterequisitesformInst).clone(true);
requisitesformCount = parseInt($(id + ' #id_requisites-TOTAL_FORMS').val());
$(row).find(".ui.dropdown").dropdown();
if(requisitesformCount == 0){
$(id+' .update-requisites ').html(row);
}
else{
$(row).attr('id',window.updaterequisitePrefix+requisitesformCount+'-row').insertAfter($(id +' .update-requisites-form:last'));
var forms = $(id + ' .update-requisites-form');
$(forms).each(function(index){
updateElementIndex(this,index);
});
}
$(row).find('.delete-row').attr('onclick','deleteupdaterequisitesForm(this,"'+String(id)+'")');
$(id + ' #id_requisites-TOTAL_FORMS').val(requisitesformCount+1);
return false;
}
function deleteupdaterequisitesForm(btn,id,filled_row){
if(filled_row){
count = $(id + ' #id_requisites-INITIAL_FORMS').val();
$(id + ' #id_requisites-INITIAL_FORMS').val(parseInt(count)-1);
}
$(btn).parents('.update-requisites-form').remove();
var forms = $(id + ' .update-requisites-form');
requisitesformCount = parseInt($(id + ' #id_requisites-TOTAL_FORMS').val());
$(id + ' #id_requisites-TOTAL_FORMS').val(requisitesformCount-1);
$(forms).each(function(index){
$(this).attr('id',window.updaterequisitePrefix+index+'-row');
updateElementIndex(this,index);
});
return false;
}
function submit_priorities(index,projectId){
}
{% endblock %}
\ No newline at end of file
{% extends "base.html" %}
{% load custom_tags %}
{% block styling %}
{% load static %}
.statistic:not(.last-stat){
border-right: 1px solid #e0e1e2 ;
}
.statistics th:not(.last-th){
border-right: 1px solid #dddddd;
}
{% endblock %}
{% block content %}
<br>
<div class="ui container">
<div class="ui grid" style="margin-top: 1rem;">
<div class="six wide column">
<div class="ui fluid raised card">
<div class="content">
<div class="ui two statistics">
<div class="teal statistic">
<div class="value">
{{ current_round.roundNo }}
</div>
<div class="label">
<br>
Current Round
</div>
</div>
<div class="red statistic last-stat">
<div class="text value" style="padding-top: 1rem;">
{{ current_round.endDate }}
</div>
<div class="label">
<br>
Last date
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ten wide column">
<div class="ui fluid raised card">
<div class="content">
<div class="ui three statistics divided">
<div class="yellow statistic">
<div class="value">
{{ unappliedPositions|length }}
</div>
<div class="label">
<br>
Available Positions
</div>
</div>
<div class="green statistic">
<div class="value">
{{ appliedPositions|length }}
</div>
<div class="label">
<br>
Submitted Applications
</div>
</div>
<div class="statistic last-stat">
<div class="text value" style="color:#5279a2;padding-top: 1rem;" >
{% if applicationDetails.alloted_project %}Alloted{% else %} Not alloted {% endif %}
</div>
<div class="label">
<br>
Status
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="ui yellow icon large floating message" style="margin-top: 3rem;">
<i class="calendar check icon"></i>
<div class="content">
<div class="header" style="padding-bottom:1rem;">
Time remaining for Round {{ current_round.roundNo }}
</div>
<div class="ui progress {% get_progress_color current_round.endDate %}" data-percent="{% get_progress_percent current_round %}" id="time-progress" style="opacity: 0.85">
<div class="bar">
<div class="progress"></div>
</div>
<div class="label header">{% get_remaining_days current_round.endDate %}</div>
</div>
</div>
</div>
{% if applicationDetails.alloted_project %}
<div class="ui success icon large message" style="padding-top: 1rem;margin-top: 3rem;">
<i class="university icon"></i>
<div class="content">
<div class="ui center aligned header">
CONGRATULATIONS {{ applicationDetails.student.get_full_name }} !!!
</div>
<ul class="list">
<li >You are alloted to <span class="header" style="display: inline;background-color:rgba(0, 0, 0, 0.06); "> {{ applicationDetails.alloted_project.title }} </span></li>
<li>You will be working with Prof.<span class="header" style="display: inline;background-color:rgba(0, 0, 0, 0.06); "> {{ applicationDetails.alloted_project.faculty.get_full_name }} </span> </li>
</ul>
</div>
</div>
{% endif %}
</div>
<br>
<br>
<div class="ui three item stackable tabs inverted menu " style="font-size: large;">
<a class="item active" data-tab="first">Available Projects</a>
<a class="item" data-tab="second">Applied Projects</a>
<a class="item" data-tab="third">My profile</a>
</div>
<div class="ui tab active" data-tab="first">
</div>
<div class="ui tab " data-tab="second">
</div>
<div class="ui tab" data-tab="third">
<div class="ui fluid raised card" style="width: 75%;margin-left: auto;margin-right: auto;margin-bottom: 1rem;">
<div class="content">
<div class="ui grid">
<div class="six wide column ui center aligned middle aligned" style="padding-top: 5rem;">
<div class="ui medium image">
<div class="ui large icon header">
<i class="user circle massive grey icon"></i>
</div>
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Personal Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="five wide column">
<div class="ui medium header left aligned">
Student Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="six wide column">
<div class="ui medium header center aligned grey">
{{ request.user.get_full_name }}
</div>
</div>
<div class="five wide column">
<div class="ui medium header left aligned">
Email ID
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="six wide column">
<div class="ui medium header center aligned grey">
{{ request.user.email }}
</div>
</div>
<div class="five wide column">
<div class="ui medium header left aligned">
Qualities
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="six wide column">
<div class="ui tiny header center aligned grey">
{{ applicationDetails.qualities }}
</div>
</div>
<div class="eleven wide column center aligned">
<div class="ui icon info message">
<i class="download icon"></i>
<div class="content">
<div class="header">
Resume of the applicant
</div>
{% if ResumeDetails %}
{% with 'resume-uploads/'|add:'/'|add:ResumeDetails.file.file.name as image_static %}
<div class="ui center aligned" ><a href="{% static image_static %}" target="_blank">Click me to download resume</a></div>
{% endwith %}
{% else %}
<div class="ui center aligned" ><div style="color:slategrey;">You have not uploaded the Resume.</div></div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui">
<div class="ui large header center aligned brown">
Applicant Details
</div>
<div class="ui divider"></div>
<div class="ui left aligned"><h3><u>Project Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">PROJECT TITLE</div>
<div class="four wide column ui tiny header">PROGRAMMING LANGUAGES</div>
<div class="six wide column ui tiny header">DESCRIPTION</div>
<div class="two wide column ui tiny header">GITHUB</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for project in projectDetails %}
<div class="item">
<div class="ui grid ">
<div class="column four wide center aligned middle aligned"><div class="ui medium ">{{ project.title }}</div></div>
<div class="column four wide center aligned middle aligned">
<div class="ui">
{% for language in project.languages %}
<a class="ui tiny {% get_color language %} inverted tag label">{{ language }}</a>
{% endfor %}
</div>
</div>
<div class="column six wide center aligned middle aligned">{{ project.description }}</div>
<div class="column two wide center aligned middle aligned"><a href="{{ project.link }}">Link</a></div>
</div>
</div>
{% endfor %}
</div>
</div>
<br>
<div class="ui left aligned"><h3><u>Educational Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="five wide column ui tiny header">EXAMINATION</div>
<div class="five wide column ui tiny header ">BOARD</div>
<div class="four wide column ui tiny header">PERCENTAGE or CGPA</div>
<div class="two wide column ui tiny header">YEAR</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for education in educationDetails %}
<div class="item">
<div class="ui grid">
<div class="column five wide center aligned middle aligned"><div class="ui medium">{{ education.exam }}</div></div>
<div class="column five wide center aligned middle aligned"><div class="ui medium ">{{ education.board }}</div></div>
<div class="column four wide center aligned middle aligned"><div class="ui star yellow rating" data-rating="{% get_normalized_grades education.cgpa %}" data-max-rating="5"></div></div>
<div class="column two wide center aligned middle aligned">{{ education.year }}</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
<br>
<br>
<div class="ui center aligned">
<button class="ui right labeled large icon button blue" onclick="edit_student_detail()">
<i class="pencil alternate icon"></i>
Edit
</button>
</div>
</div>
</div>
</div>
{% endblock %}
{% block modals %}
<div id="application-details" class="ui long fullscreen modal">
<i class="close icon"></i>
<div class="header">
My Profile
</div>
<div class="content">
<form class="ui form" method="POST" id="application-detail" enctype="multipart/form-data">
{% csrf_token %}
<div class="ui grid">
<div class="six wide column ui center aligned middle aligned" style="padding-top: 5rem;">
<div class="ui medium image">
<div class="ui large icon header">
<i class="user circle massive grey icon"></i>
</div>
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Application Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="six wide column">
<div class="ui medium header left aligned">
Student Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="eight wide column">
<div class="ui medium header center aligned grey">
{{ request.user.get_full_name }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Email ID
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="eight wide column">
<div class="ui medium header center aligned grey">
{{ request.user.email }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned middle aligned">
Qualities
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="eight wide column">
<div class="ui small header center aligned grey">
{{ studentDetailForm.qualities }}
</div>
</div>
<div class="eleven wide column center aligned">
<div class="ui icon info message" style="display: block;">
<div class="content">
<div class="header">
Resume of the applicant
</div>
</div>
<div class="content">
<input type="file" name="filepond">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<div class="ui">
<div class="ui large header center aligned brown">
Applicant Details
</div>
<div class="ui divider"></div>
<h3><u>Project Details</u></h3>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="four wide column ui tiny header">PROJECT TITLE</div>
<div class="two wide column ui tiny header">PROGRAMMING LANGUAGES</div>
<div class="five wide column ui tiny header">DESCRIPTION</div>
<div class="three wide column ui tiny header">GITHUB</div>
<div class="two wide column ui tiny header">ACTION</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;" id="projectDetail-rows">
{% for project in studentProjects %}
<div class="item projectDetail-row" id="projectDetail-{{ forloop.counter0 }}" >
<div class="ui grid">
<div class="column four wide center aligned middle aligned">
{{ project.title }}
</div>
<div class="column two wide center aligned middle aligned">
<select name="projects-{{forloop.counter0}}-{{ project.languages.name }}" multiple="" class="ui fluid search dropdown">
<option value="">Language used</option>
{% for value, text in project.languages.field.choices %}
<option id="id_projects_{{ forloop.counter0 }}" name="projects-{{forloop.parentloop.counter0}}-{{ project.languages.name }}" value="{{ value }}" {% if value in selected_project_languagues|index:forloop.parentloop.counter0 %} selected {% endif %}>{{ text }}</option>
{% endfor %}
</select>
</div>
<div class="column five wide center aligned middle aligned">
{{ project.description }}
</div>
<div class="column three wide center aligned middle aligned">
{{ project.link }}
</div>
<div class="column two wide center aligned middle aligned">
<button class="ui grey button" type="button" onclick="deleteProjectDetailForm(this,{% if project.id.value is not None %}true{% else %}false{% endif %})">
Remove
</button>
</div>
</div>
{% if project.id.value is not None %}
{% for hidden in project.hidden_fields %}
{{ hidden }}
{% endfor %}
{% endif %}
</div>
{% endfor %}
{{ studentProjects.management_form }}
</div>
</div>
<div class="ui container center aligned">
<button class="ui secondary right labeled icon button" type="button" onclick="addProjectDetailForm()">
Add another
<i class="icon plus"></i>
</button>
</div>
<br>
<div class="ui center aligned"><h3><u>Educational Details</u></h3></div>
<div class="ui segment fluid raised card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="three wide column ui tiny header">EXAMINATION</div>
<div class="five wide column ui tiny header ">BOARD</div>
<div class="three wide column ui tiny header">PERCENTAGE or CGPA</div>
<div class="three wide column ui tiny header">YEAR</div>
<div class="two wide column ui tiny header">ACTIONS</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;" id="educationDetail-rows">
{% for education in studentEducation %}
<div class="item educationDetail-row" id="educationDetail-{{ forloop.counter0 }}">
<div class="ui grid">
<div class="column three wide center aligned middle aligned">
{{ education.exam }}
</div>
<div class="column five wide center aligned middle aligned">
{{ education.board }}
</div>
<div class="column three wide center aligned middle aligned">
{{ education.cgpa }}
</div>
<div class="column three wide center aligned middle aligned">
<div class="ui">
<div class="ui input left icon">
<i class="calendar icon"></i>
{{ education.year }}
</div>
</div>
</div>
<div class="column two wide center aligned middle aligned">
<button class="ui grey button" type="button" onclick="deleteEducationDetailForm(this,{% if education.id.value is not None %}true{% else %}false{% endif %})">
Remove
</button>
</div>
</div>
{% if education.id.value is not None %}
{% for hidden in education.hidden_fields %}
{{ hidden }}
{% endfor %}
{% endif %}
</div>
{% endfor %}
{{ studentEducation.management_form }}
</div>
</div>
<div class="ui container center aligned">
<button class="ui secondary right labeled icon button" type="button" onclick="addEducationDetailForm()">
Add another
<i class="icon plus"></i>
</button>
</div>
</div>
</form>
</div>
<div class="actions">
<button class="ui black button" type="reset" form="application-detail">
Reset
</button>
<button class="ui positive right labeled icon button" type="submit" form="application-detail">
Submit
<i class="checkmark icon"></i>
</button>
</div>
</div>
{% for position in unappliedPositions %}
<div id="application-{{ position.id }}" class="ui long modal">
<i class="close icon"></i>
<div class="header">
APPLICATION
</div>
<div class="content">
<div class="ui grid">
<div class="six wide column ui center aligned middle aligned" style="padding-top: 5rem;">
<div class="ui medium image">
<div class="ui large icon header">
<i class="info circle massive grey icon"></i>
</div>
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Project Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="six wide column">
<div class="ui medium header left aligned">
Project Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ position.title }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Faculty Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ position.faculty.get_full_name }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Available positions
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ position.total_positions }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
How to contact me?
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ position.contact_details }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui grid">
<div class="eight wide column">
<div class="ui fluid card">
<div class="content">
<div class="ui center aligned header">Description</div>
</div>
<div class="content">
{{ position.description }}
</div>
</div>
</div>
<div class="eight wide column">
<div class="ui fluid card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="eight wide column ui tiny header">SUBJECT</div>
<div class="eight wide column ui tiny header ">CGPA</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;" >
{% for requisite in position.get_requisites %}
<div class="item">
<div class="ui grid">
<div class="column eight wide center aligned middle aligned">
{{ requisite.Subject }}
</div>
<div class="column eight wide center aligned middle aligned">
{{ requisite.cgpa }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div class="actions">
<div class="ui secondary right labeled deny icon button">
Close
<i class="times icon"></i>
</div>
</div>
</div>
{% endfor %}
{% for position in appliedPositions %}
<div id="application-{{ position.id }}" class="ui long modal">
<i class="close icon"></i>
<div class="header">
APPLICATION
</div>
<div class="content">
<div class="ui grid">
<div class="six wide column ui center aligned middle aligned" style="padding-top: 5rem;">
<div class="ui medium image">
<div class="ui large icon header">
<i class="info circle massive grey icon"></i>
</div>
</div>
</div>
<div class="ten wide fluid column">
<div class="ui image">
<div class="ui large header center aligned brown">Project Details</div>
<div class="ui divider"></div>
<br>
<div class="ui grid center aligned">
<div class="six wide column">
<div class="ui medium header left aligned">
Project Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ position.title }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Faculty Name
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ position.faculty.get_full_name }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
Available positions
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ position.total_positions }}
</div>
</div>
<div class="six wide column">
<div class="ui medium header left aligned">
How to contact me?
</div>
</div>
<div class="two wide column">
<div class="ui small header center aligned">
:
</div>
</div>
<div class="five wide column">
<div class="ui medium header center aligned grey">
{{ position.contact_details }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="ui grid">
<div class="eight wide column">
<div class="ui fluid card">
<div class="content">
<div class="ui center aligned header">Description</div>
</div>
<div class="content">
{{ position.description }}
</div>
</div>
</div>
<div class="eight wide column">
<div class="ui fluid card">
<div class="ui middle aligned selection divided list" style="margin-bottom: 0px;">
<div class="item" style="padding-bottom: 0px;padding-top: 0px;background-color: rgb(0,0,0,0.03);">
<div class="ui grid center aligned divided" style="margin-top: 0px;">
<div class="eight wide column ui tiny header">SUBJECT</div>
<div class="eight wide column ui tiny header ">CGPA</div>
</div>
</div>
<div class="ui divider" style="margin-bottom: 0px;"></div>
</div>
<div class="ui middle aligned selection divided list" style="margin-top: 0px;">
{% for requisite in position.get_requisites %}
<div class="item" >
<div class="ui grid">
<div class="column eight wide center aligned middle aligned">
{{ requisite.Subject }}
</div>
<div class="column eight wide center aligned middle aligned">
{{ requisite.cgpa }}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div class="actions">
<div class="ui secondary right labeled deny icon button">
Close
<i class="times icon"></i>
</div>
</div>
</div>
{% endfor %}
{% endblock %}
{% block scripts %}
$(document).ready(function() {
window.projectDetailformInst = $('.projectDetail-row:last').clone(true).get(0);
window.educationDetailformInst = $('.educationDetail-row:last').clone(true).get(0);
$('#time-progress').progress();
$(".rating").rating('disable');
$('.menu .item').tab();
$('.ui.calendar').calendar({
type: 'date'
});
$( function() {
$( "#sortable" ).sortable();
$( "#sortable" ).disableSelection();
});
$('#example').DataTable({
columnDefs: [ { orderable: false, targets: [4] } ],
});
$('.ui.dropdown').dropdown();
FilePond.setOptions({
server: {
url: 'http://127.0.0.1:8000/fp',
process: '/process/',
patch: '/patch/',
revert: '/revert/',
fetch: '/fetch/?target=',
load: '/load/?id='
}
});
window.pond = FilePond.create( document.querySelector('input[type="file"]') ,
{
maxFiles: 1,
files: [
{% if ResumeDetails %}
{
// the server file reference
source: '{{ ResumeDetails.file.upload_id }}',
// set type to local to indicate an already uploaded file
options: {
type: 'local'
}
}
{% endif %}
]
} );
sync_total_forms();
{% if messages %}
{% for message in messages %}
$('body')
.toast({
class: "error",
title: "Error logging in",
displayTime: 5000,
closeIcon: true,
position: "top center",
showIcon: "exclamation",
message: "{{ message }}",
});
{% endfor %}
{% endif %}
} );
function show_project_detail(id){
$(".modals #application-"+id).modal('show');
}
function edit_student_detail(){
$(".modals #application-details").modal('show');
}
function sync_total_forms(){
$('#id_projects-TOTAL_FORMS').val($('.projectDetail-row').length);
$('#id_education-TOTAL_FORMS').val($('.educationDetail-row').length);
}
function addProjectDetailForm(){
var row = $(window.projectDetailformInst).clone(true);
projectDetailCount = $('#id_projects-TOTAL_FORMS').val();
if(projectDetailCount == 0){
$('#projectDetail-rows').html(row);
}
else{
$(row).attr('id','projectDetail-'+String(projectDetailCount)).attr('class','item projectDetail-row').insertAfter($('.projectDetail-row:last'));
var forms = $('.projectDetail-row');
}
$(row).find('.ui.dropdown').dropdown();
updateProjectDetailIndex();
$('#id_projects-TOTAL_FORMS').val(parseInt(projectDetailCount)+1);
return false;
}
function updateProjectDetailIndex(){
$('.projectDetail-row').each(function(index){
$(this).attr('id','projectDetail-'+String(index));
inputs = $(this).find('input');
inputs[0].id = 'id_projects-'+String(index)+'-title';
inputs[0].name = 'projects-'+String(index)+'-title';
inputs[2].id = 'id_projects-'+String(index)+'-link';
inputs[2].name = 'projects-'+String(index)+'-link';
$(this).find('textarea').attr('id','id_projects-'+String(index)+'-description');
$(this).find('textarea').attr('name','projects-'+String(index)+'-description');
$(this).find('select').attr('name','projects-'+String(index)+'-languages');
options = $(this).find('option');
for (i = 0; i < options.length; i++){
if(options[i].id != ""){
options[i].name = 'projects-'+String(index)+'-languages"';
}
}
hidden_inputs = $(this).find('input[type=hidden]');
if(hidden_inputs.length !=0){
hidden_inputs[0].id = 'id_projects-'+String(index)+'-student';
hidden_inputs[0].name = 'projects-'+String(index)+'-student';
hidden_inputs[1].id = 'id_projects-'+String(index)+'-id';
hidden_inputs[1].name = 'projects-'+String(index)+'-id';
}
});
}
function deleteProjectDetailForm(btn,filled_row){
$(btn).parents('.projectDetail-row').remove();
if(filled_row){
count = $('#id_projects-INITIAL_FORMS').val();
$('#id_projects-INITIAL_FORMS').val(parseInt(count)-1);
}
var forms = $('.projectDetail-row');
$(forms).each(function(index){
$(this).attr('id','projectDetail-'+String(index));
});
projectDetailCount = $('#id_projects-TOTAL_FORMS').val();
$('#id_projects-TOTAL_FORMS').val(parseInt(projectDetailCount)-1);
updateProjectDetailIndex();
return false;
}
function addEducationDetailForm(){
var row = $(window.educationDetailformInst).clone(true);
educationDetailFormCount = $('#id_education-TOTAL_FORMS').val();
if(educationDetailFormCount == 0){
$('#educationDetail-rows').html(row);
}
else{
$(row).attr('id','educationDetail-'+String(educationDetailFormCount)).attr('class','item educationDetail-row').insertAfter($('.educationDetail-row:last'));
var forms = $('.educationDetail-row');
}
$('#id_education-TOTAL_FORMS').val(parseInt(educationDetailFormCount)+1);
updateEducationDetailIndex();
return false;
}
function updateEducationDetailIndex(){
$('.educationDetail-row').each(function(index){
$(this).attr('id','educationDetail-'+String(index));
inputs = $(this).find('input');
inputs[0].id = 'id_education-'+String(index)+'-board';
inputs[0].name = 'education-'+String(index)+'-board';
inputs[1].id = 'id_education-'+String(index)+'-cgpa';
inputs[1].name = 'education-'+String(index)+'-cgpa';
inputs[2].id = 'id_education-'+String(index)+'-year';
inputs[2].name = 'education-'+String(index)+'-year';
$(this).find('select').attr('id','id_education-'+String(index)+'-exam');
$(this).find('select').attr('name','education-'+String(index)+'-exam');
hidden_inputs = $(this).find('input[type=hidden]');
if(hidden_inputs.length !=0){
hidden_inputs[0].id = 'id_education-'+String(index)+'-student';
hidden_inputs[0].name = 'education-'+String(index)+'-student';
hidden_inputs[1].id = 'id_education-'+String(index)+'-id';
hidden_inputs[1].name = 'education-'+String(index)+'-id';
}
});
}
function deleteEducationDetailForm(btn,filled_row){
$(btn).parents('.educationDetail-row').remove();
if(filled_row){
count = $('#id_education-INITIAL_FORMS').val();
$('#id_education-INITIAL_FORMS').val(parseInt(count)-1);
}
educationDetailFormCount = $('#id_education-TOTAL_FORMS').val();
$('#id_education-TOTAL_FORMS').val(parseInt(educationDetailFormCount)-1);
updateEducationDetailIndex();
return false;
}
function submit_priorities(){
}
{% endblock %}
\ No newline at end of file
from django.urls import path, include
from .views import LoginView, LogoutView, dashboardView, shortlistView, updatePriorityView, generateMappingsView
urlpatterns = [
path('',dashboardView.as_view(),name="dashboard"),
path('generatemapping',generateMappingsView,name="generateMapping")
]
from django.shortcuts import render
from django.shortcuts import render, redirect
from django.views import View
from django.contrib import messages
from django.urls import reverse_lazy
from django.db import transaction
from django.http import JsonResponse
import json
from datetime import datetime
from .models import *
from django.contrib.auth.models import User
from .forms import *
from.LatexGen import mappedResult
from django_drf_filepond.api import store_upload, delete_stored_upload
from django_drf_filepond.models import TemporaryUpload, StoredUpload
# Dashboard for all users
class dashboardView(LoginRequiredMixin,UserPassesTestMixin,View):
login_url = reverse_lazy('gap:login')
redirect_field_name = 'next'
def test_func(self):
# used to set template name based on type of user
self.user_type = get_user_type(self.request.user)
if self.user_type == 'student':
self.template_name = 'student_dashboard.html'
else:
self.template_name = 'faculty_dashboard.html'
return True
def get(self,request,*args,**kwargs):
# Render dashboard based on type of user
context= get_context(self.user_type,request)
return render(request,self.template_name,context)
def post(self,request,*args,**kwargs):
if self.user_type == 'student':
# Handling student post requests
user_application = StudentDetailModel.objects.filter(student=request.user)
if user_application.exists():
# Update existing data
user_application = user_application.first()
form = StudentDetailModelForm(request.POST,instance=user_application)
education_detail = StudentEducationFormset(request.POST,instance=user_application)
project_detail = StudentProjectFormset(request.POST,instance=user_application)
else:
# Create new model row
form = StudentDetailModelForm(request.POST)
education_detail = StudentEducationFormset(request.POST)
project_detail = StudentProjectFormset(request.POST)
if form.is_valid():
# Form validated
self.object = form.save(commit=False)
self.object.student = request.user
# Save the main form , so it can be used for dependant models
self.object.save()
# Save education details of student
with transaction.atomic():
# Refer to the main model
education_detail.instance = self.object
if education_detail.is_valid():
ids = get_ids(request.POST,'education')
self.object.education.exclude(id__in=ids).delete()
education_detail.save()
else:
messages.error(request,education_detail.errors,extra_tags='Education Details')
# Save project details of student
with transaction.atomic():
# Refer to the main model
project_detail.instance = self.object
if project_detail.is_valid():
ids = get_ids(request.POST,'projects')
self.object.projects.exclude(id__in=ids).delete()
project_detail.save()
else:
messages.error(request,project_detail.errors,extra_tags='Project Details')
# Handle file upload
upload_id = request.POST.get('filepond')
user_application = StudentDetailModel.objects.get(student=request.user)
resume_record = StudentResumeModel.objects.filter(student=user_application)
if resume_record and resume_record.count() != 0:
# Handle already uploaded previous resume
resume_record = resume_record.first()
curr_upload_id = resume_record.file.upload_id
if upload_id == "":
# Delete the resume if user has requested to delete it
resume_record.delete()
delete_stored_upload(curr_upload_id,delete_file=True)
elif curr_upload_id != upload_id:
# Update previous resume if new one is different from old resume
temp_upload = TemporaryUpload.objects.get(upload_id=upload_id)
file_reference = store_upload(upload_id,destination_file_path=str(request.user.username) + "/"+ temp_upload.upload_name )
resume_record.file = file_reference
resume_record.save()
delete_stored_upload(curr_upload_id,delete_file=True)
else:
if upload_id != "":
# Create new resume model row
temp_upload = TemporaryUpload.objects.get(upload_id=upload_id)
file_reference = store_upload(upload_id,destination_file_path=str(request.user.username) + "/"+ temp_upload.upload_name )
resume_record = StudentResumeModel(student=user_application,file=file_reference)
resume_record.save()
else:
messages.error(request,form.errors,extra_tags='main_form')
if form.is_valid() and education_detail.is_valid() and project_detail.is_valid():
return redirect('gap:dashboard')
context = get_context(self.user_type,request)
return render(request,self.template_name,context)
else:
# Handle faculty and facad users
if request.POST.get('positionId'):
# Update the already present open positions
position = PositionsModel.objects.get(id=request.POST.get('positionId'))
form = PositionsModelForm(request.POST,instance=position)
requisite_lists = RequisitesFormset(request.POST,instance=position)
else:
# Create a new open position
form = PositionsModelForm(request.POST)
requisite_lists = RequisitesFormset(request.POST)
errors = form.errors
if form.is_valid():
self.object = form.save(commit=False)
self.object.faculty = request.user
self.object.initial_total_positions = self.object.total_positions
# Save the main form , so it can be used for dependant models
self.object.save()
# Save requisite details of project
with transaction.atomic():
# Refer to main model
requisite_lists.instance = self.object
if requisite_lists.is_valid():
ids = get_ids(request.POST,'requisites')
self.object.requisites.exclude(id__in=ids).delete()
requisite_lists.save()
else:
messages.error(request,requisite_lists.errors,extra_tags='Requisite details')
else:
messages.error(request,form.errors,extra_tags='Form Details')
if form.is_valid() and requisite_lists.is_valid():
return redirect('gap:dashboard')
messages.error(request,errors)
context = get_context(self.user_type,request)
return render(request,self.template_name,context)
# Helper codes
def get_preferences(pref_type):
'''
Input:
pref_type: Student, faculty
Output:
Ordered list of priorities pertaining to all the users of that type
'''
result = {}
emptyresult = {}
counts = {}
if pref_type=='student':
students = StudentPriorities.objects.values_list('student',flat=True).distinct()
for student in students:
emptyresult[student] = []
result[student] = list(StudentPriorities.objects.filter(student=student).order_by('current_priority').values_list('project',flat=True))
return result, emptyresult
else:
projects = ProjectPriorities.objects.values_list('project',flat=True).distinct()
for project in projects:
emptyresult[project] = []
counts[project] = PositionsModel.objects.get(id=project).total_positions
result[project] = list(ProjectPriorities.objects.filter(project=project).order_by('current_priority').values_list('student',flat=True))
return result, emptyresult , counts
def get_user_type(user):
'''
Input:
User: user object
Output:
Type of user
'''
if is_faculty(user):
if is_facad(user):
return 'facad'
return 'faculty'
return 'student'
def is_faculty(user):
# Function to check if user is a faculty
return user.groups.filter(name='faculty').exists()
def is_facad(user):
# Function to check if user is a facad
return user.groups.filter(name='facad').exists()
def get_context(user_type,request):
context = {}
if not RoundDetailsModel.objects.all().exists():
# Create a new round if it does not exist
RoundDetailsModel().save()
# Get current round details
current_round = RoundDetailsModel.objects.latest('roundNo')
context['current_round'] = current_round
if user_type == 'student':
print(request.POST)
# Get student context details
# User application with all student details
user_application = StudentDetailModel.objects.filter(student=request.user)
print(user_application)
if user_application.exists():
# All application details and prefilled forms
context['applicationDetails'] = user_application.first()
context['projectDetails'] = user_application.first().projects.all()
context['educationDetails'] = user_application.first().education.all()
context['ResumeDetails'] = user_application.first().resume.first()
context['studentDetailForm'] = StudentDetailModelForm(None,instance=user_application.first())
context['studentProjects'] = StudentProjectFormset(None,instance=user_application.first())
context['studentEducation'] = StudentEducationFormset(None,instance=user_application.first())
selected_vals = []
for project in user_application.first().projects.all():
selected_vals.append(project.languages)
context['selected_project_languagues'] = selected_vals
else:
# Empty forms as user has not created his profile
context['studentDetailForm'] = StudentDetailModelForm()
context['studentProjects'] = StudentProjectFormset()
context['studentEducation'] = StudentEducationFormset()
# Prefilled forms
context['user_type'] = user_type
context['requisitesForm'] = RequisitesFormset()
context['newPosition'] = PositionsModelForm()
context['availablePositions'] = PositionsModel.objects.filter(faculty=request.user)
updateforms = []
updaterequisiteforms = []
# List of all projects proposed by faculty
for position in context['availablePositions']:
updateforms.append(PositionsModelForm(None,instance=position))
updaterequisiteforms.append(RequisitesFormset(None,instance=position))
context['updateforms'] = updateforms
context['updaterequisiteforms'] = updaterequisiteforms
return context
def get_ids(data,prefix):
# Get a list of all ids from post request based on specific prefix
count = data[prefix + '-TOTAL_FORMS']
ids = []
for index in range(int(count)):
try:
curr_id = data[prefix + '-{}-id'.format(index)]
if curr_id:
ids.append(int(curr_id))
except:
break
return ids
# Create your views here.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment