blob: f40ca76a1dc0ebabbb2a35e51e5f1d25dd54a8e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
{% extends 'base.html' %}
{% load static %}
{% load widget_tweaks %}
<!DOCTYPE HTML>
<html>
<head>
<title>View Proposals</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="assets/css/main.css" />
</head>
<body>
{% block header %}
<header id="header1">
<h1>SciPy India 2016</h1>
<h2>View Proposals</h2>
</header>
{% endblock %}
<div id="wrapper">
{% block nav %}
<div id="navbar-main">
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="{% url 'website:home' %}" class="active">Home</a></li>
{% if user and not user.is_anonymous %}
<li><a href="{% url 'website:cfp' %}">{{ user.get_full_name|default:user.username }}</a>
<li><a href="{% url 'auth:logout' %}?next=/2016/cfp">Logout</a></li>
{% else %}
<li><a href="{% url 'website:cfp' %}" >Login</a></li>
{% endif %}
</ul>
</div>
</div>
</div>
{% endblock %}
{% block content %}
<div id="wrapper">
<div id="main">
<section id="content" class="main">
{% if not proposals %}
<center>
You have not submitted any proposal. To submit proposal click <a href="{% url 'website:cfp' %}">here </a></center>
{% else %}
<form action="{% url 'website:status_change' %}" method="post" onsubmit="return confirm('Are You Sure?');"> {% csrf_token %}
<table id = "myTable" class="tablesorter">
<colgroup>
{% if user.is_superuser %}
<col width="10%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="40%" />
<col width="10%" />
{% else %}
<col width="20%" />
<col width="70%" />
<col width="10%" />
<col width="10%" />
<col width="20%" />
{% endif %}
</colgroup>
{% if user.is_superuser %}
<th> <center>Select
<th>Speaker
{% endif %}
<th> Type
<th> Title
{% if not user.is_superuser %}
<th> View
{% endif %}
{% if user.is_superuser %}
<th> Ratings
{% else %}
<th> Comments
{% endif %}
<th> Status
{% for proposal in proposals %}
<tr>
{% if user.is_superuser %}
<td>
{% if proposal.status = 'Rejected' %}
{% else %}
<center> <input type = "checkbox" name="delete_proposal" value = {{proposal.id}}></input></center></td>
{% endif %}
<td>
{{ proposal.user.get_full_name}}
</td>
{% endif %}
<td> {{proposal.proposal_type }} </td>
{% if user.is_superuser %}
<td style="white-space: nowrap; text-overflow:ellipsis; overflow: hidden; max-width:.5px;"><a href="{% url 'website:comment_abstract' proposal.id %}">{{proposal.title }}</a> </td>
{% else %}
<td style="white-space: nowrap; text-overflow:ellipsis; overflow: hidden; max-width:.5px;"> {{proposal.title}}</td>
<td ><a href="{% url 'website:abstract_details' proposal.id %}">View</a> </td>
{% endif %}
<td>{% if user.is_superuser %}
{% for rating in proposal.ratings_set.all %}
{{ rating.rating}} - {{rating.user}}<br>
{% endfor %}
{% else %}
{{proposal.comments_set.count}}
{% endif %}
</td>
<td>
{% if proposal.status = 'Accepted' %}
<h5 style="color:green;">{{proposal.status}}</h5>
{% elif proposal.status = 'Rejected' %}
<h5 style="color:red;">{{proposal.status}}</h5>
{% elif proposal.status = 'Commented' %}
<h5 style="color:brown;">{{proposal.status}}</h5>
{% elif proposal.status = 'Edit' %}
{% if user.is_superuser %}
<h5 style="color:grey;">{{proposal.status}}</h5>
{% else %}
<a href="{% url 'website:edit_proposal' proposal.id %}">{{proposal.status}}</a>
{% endif %}
{% else %}
<h5 style="color:blue;">{{proposal.status}}</h5>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% if user.is_superuser %}
<center><input type="submit" id="delete" class ="button special" style="background:#D44727;" value="Delete" name="delete"/>
<input type="submit" id="dump" class ="button special" style="background:#D44727;" value="Export as csv" name="dump"/></center><br>
<center>
<input type="submit" id="accept" class ="button special" style="background:green;" value="Accept" name="accept"/>
<input type="submit" id="rejected" class ="button special" style="background:red;" value="Reject" name="reject"/>
<input type="submit" id="resubmit" class ="button special" style="background:grey;" value="Resubmit" name="resubmit"/></center>
{% endif %}
</form>
{% endif %}
</section>
</div>
{% endblock %}
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.scrollex.min.js"></script>
<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>
$(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 ");
}
});
});
</script>
</body>
</html>
|