diff options
-rwxr-xr-x | website/templates/base.html | 5 | ||||
-rwxr-xr-x | website/templates/comment-abstract.html | 6 | ||||
-rwxr-xr-x | website/templates/view-abstracts.html | 25 | ||||
-rwxr-xr-x | website/views.py | 91 |
4 files changed, 71 insertions, 56 deletions
diff --git a/website/templates/base.html b/website/templates/base.html index e5612c3..65215d1 100755 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -314,6 +314,9 @@ </td></tr>
<tr> <td><li style ="font-weight:700">Advanced Track</li></br>
<ul>1. Microhope </ul>
+ <ul>2. Algorithm to Application: Using Traits and ETS</ul>
+ <ul>3. Introduction to Automated Testing in Python</ul>
+ <ul>4. Introduction to Git and GitHub</ul>
<ul style ="font-weight:700">Other topics: TBD</ul>
</td></tr>
@@ -419,7 +422,7 @@ <section id="contact">
<h2>Write to Us</h2>
<p>Feel free to send us an email if you have any questions.</p>
- <form id="contact_us" action='#' class="form" role="form" method=POST onSubmit="alert('Your query has been submitted. We will email our img-responsive to you shortly!');" enctype="multipart/form-data">{% csrf_token %}
+ <form id="contact_us" action='#' class="form" role="form" method=POST onSubmit="alert('Your query has been submitted. We will email our response to you shortly!');" enctype="multipart/form-data">{% csrf_token %}
<div class="col-md-6 form-group">
<input class="form-control" id="name" name="name" placeholder="Name" type="text" required />
</div>
diff --git a/website/templates/comment-abstract.html b/website/templates/comment-abstract.html index 992ae91..c01aa1c 100755 --- a/website/templates/comment-abstract.html +++ b/website/templates/comment-abstract.html @@ -60,6 +60,12 @@ {% if proposal.prerequisite %} <p><b>Prerequisite: </b> {{ proposal.prerequisite }}</p> {% endif%} + <p><b>Duration: </b> {{ proposal.duration }} {% if proposal.proposal_type == "ABSTRACT"%} Mins {% else %}Hours {%endif%}</p> + {% if proposal.proposal_type == "ABSTRACT"%} + <p><b>Tags: </b> {{ proposal.tags }}</p> + {% else %} + <p><b>Level: </b> {{ proposal.tags }}</p> + {% endif %} {% if url %} <b>Attachment: </b> <a href="{{ url }}" class="btn btn-info" target="_blank">{{ filename }}</a> {% endif %} diff --git a/website/templates/view-abstracts.html b/website/templates/view-abstracts.html index f40ca76..5117013 100755 --- a/website/templates/view-abstracts.html +++ b/website/templates/view-abstracts.html @@ -76,8 +76,8 @@ You have not submitted any proposal. To submit proposal click <a href="{% url 'w {% endif %} </colgroup> {% if user.is_superuser %} - <th> <center>Select - + <th> <center><input type="checkbox" onClick="toggle(this)" /> + </center></th> <th>Speaker {% endif %} <th> Type @@ -168,22 +168,17 @@ You have not submitted any proposal. To submit proposal click <a href="{% url 'w <script src="assets/js/jquery.scrolly.min.js"></script> <script src="assets/js/skel.min.js"></script> <script src="assets/js/util.js"></script> - <!--[if lte IE 8]><script src="assets/js/ie/respond.min.js"></script><![endif]--> <script src="assets/js/main.js"></script> - + <script src="https://cdnjs.cloudflare.com/ajax/libs/processing.js/1.4.1/processing-api.min.js"></script> <script> -$(document).ready(function() { - var n1 = Math.round(Math.random() * 10 + 1); - var n2 = Math.round(Math.random() * 10 + 1); - $("#a").val(n1 + " + " + n2 + " = "); - $("#c").click(function() { - if (eval($("#a").val()) == $("#b").val()) { - } else { - alert("Write the correct value "); - } - }); -}); +function toggle(source) { + alert('hi'); + checkboxes = document.getElementsByName('delete_proposal'); + for(var i=0, n=checkboxes.length;i<n;i++) { + checkboxes[i].checked = source.checked; + } +} </script> </body> </html>
\ No newline at end of file diff --git a/website/views.py b/website/views.py index c8c5212..ec1688e 100755 --- a/website/views.py +++ b/website/views.py @@ -61,6 +61,7 @@ def userregister(request): context['user'] = request.user return render_to_response('cfp.html', context) +@csrf_exempt def contact_us(request,next_url): pass # user = request.user @@ -82,6 +83,7 @@ def contact_us(request,next_url): # return redirect(next_url,context) +@csrf_exempt def home(request): #pass context = {} @@ -562,47 +564,56 @@ def status_change(request): return render(request, 'view-abstracts.html', context) elif 'dump' in request.POST: delete_proposal = request.POST.getlist('delete_proposal') + blank = False + if delete_proposal == [] : + blank = True try: - response = HttpResponse(content_type='text/csv') - response['Content-Disposition'] = 'attachment; filename="Proposals.csv"' - writer = csv.writer(response) - header = [ - 'name', - 'username', - 'email', - 'about_me', - 'phone', - 'title', - 'abstract', - 'prerequisite', - 'duration', - 'attachment', - 'date_created', - 'status', - 'proposal_type', - 'tags', - ] - writer.writerow(header) - for proposal_id in delete_proposal: - proposal = Proposal.objects.get(id = proposal_id) - row = [ - '{0} {1}'.format(proposal.user.first_name, proposal.user.last_name), - proposal.user.username, - proposal.user.email, - proposal.about_me, - proposal.phone, - proposal.title, - proposal.abstract, - proposal.prerequisite, - proposal.duration, - proposal.attachment, - proposal.date_created, - proposal.status, - proposal.proposal_type, - proposal.tags, - ] - writer.writerow(row) - return response + if blank == False: + response = HttpResponse(content_type='text/csv') + response['Content-Disposition'] = 'attachment; filename="Proposals.csv"' + writer = csv.writer(response) + header = [ + 'name', + 'username', + 'email', + 'about_me', + 'phone', + 'title', + 'abstract', + 'prerequisite', + 'duration', + 'attachment', + 'date_created', + 'status', + 'proposal_type', + 'tags', + ] + writer.writerow(header) + for proposal_id in delete_proposal: + proposal = Proposal.objects.get(id = proposal_id) + row = [ + '{0} {1}'.format(proposal.user.first_name, proposal.user.last_name), + proposal.user.username, + proposal.user.email, + proposal.about_me, + proposal.phone, + proposal.title, + proposal.abstract, + proposal.prerequisite, + proposal.duration, + proposal.attachment, + proposal.date_created, + proposal.status, + proposal.proposal_type, + proposal.tags, + ] + writer.writerow(row) + return response + else: + proposals = Proposal.objects.all() + context['proposals'] = proposals + context['user'] = user + return render(request, 'view-abstracts.html', context) except: proposals = Proposal.objects.all() context['proposals'] = proposals |