diff options
author | komalsheth286 | 2016-09-20 17:29:09 +0530 |
---|---|---|
committer | komalsheth286 | 2016-09-20 17:29:09 +0530 |
commit | 170d96914f0226118a9d1a46ec55973b91c7bdf2 (patch) | |
tree | 8fb14a11591df9aaebebd3b77b08508a5bf77a9a | |
parent | fe4cae16b848c9aa24f71b7a0c3947090c985bfe (diff) | |
download | SciPy2016-170d96914f0226118a9d1a46ec55973b91c7bdf2.tar.gz SciPy2016-170d96914f0226118a9d1a46ec55973b91c7bdf2.tar.bz2 SciPy2016-170d96914f0226118a9d1a46ec55973b91c7bdf2.zip |
New Commit
33 files changed, 981 insertions, 367 deletions
diff --git a/requirements.txt b/requirements.txt index 94c8ee1..0504778 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,9 @@ Django==1.9 MySQL-python==1.2.5 oauthlib==0.7.2 -#PyJWT==1.3.0 +PyJWT==1.3.0 python-openid==2.2.5 python-social-auth==0.2.11 requests==2.7.0 requests-oauthlib==0.5.0 six==1.9.0 - diff --git a/scipy2016/__init__.pyc b/scipy2016/__init__.pyc Binary files differindex 9584aa2..646985b 100644 --- a/scipy2016/__init__.pyc +++ b/scipy2016/__init__.pyc diff --git a/scipy2016/settings.py b/scipy2016/settings.py index fa8430a..a8314a1 100755 --- a/scipy2016/settings.py +++ b/scipy2016/settings.py @@ -61,6 +61,8 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.contrib.messages.context_processors.messages', 'social.apps.django_app.context_processors.backends', 'social.apps.django_app.context_processors.login_redirect', + # 'website.context_processors.contact_us_context_processor' + ) AUTHENTICATION_BACKENDS = ( @@ -102,14 +104,16 @@ DATABASES = { } } -# SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_KEY -# SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET +LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '628178553368-dvc6sjtgp90cm0591b8p4da62rhttn35.apps.googleusercontent.com' +LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'eoiek3jLz9Ax3dv7k3mXFrbU' +# API key AIzaSyDxRqGfJNJJIFw6traKTG5nC1mY8TNODu4 + -# SOCIAL_AUTH_FACEBOOK_KEY = LOCAL_SOCIAL_AUTH_FB_KEY -# SOCIAL_AUTH_FACEBOOK_SECRET = LOCAL_SOCIAL_AUTH_FB_SECRET +LOCAL_SOCIAL_AUTH_FB_KEY = '160224867760606' +LOCAL_SOCIAL_AUTH_FB_SECRET = '45eb71682352723c44d79471ecab5894' -# SOCIAL_AUTH_GITHUB_KEY = LOCAL_SOCIAL_AUTH_GITHUB_KEY -# SOCIAL_AUTH_GITHUB_SECRET = LOCAL_SOCIAL_AUTH_GITHUB_SECRET +LOCAL_SOCIAL_AUTH_GITHUB_KEY = '0bcac418003a6d06fb50' +LOCAL_SOCIAL_AUTH_GITHUB_SECRET = 'cd1b070917d0a5c8cd27ef997fd353a4' # Internationalization # https://docs.djangoproject.com/en/1.6/topics/i18n/ @@ -136,11 +140,3 @@ MEDIA_URL = "/downloads/" LOGIN_REDIRECT_URL = '/cfp' # smtp - -ACCOUNT_ACTIVATION_DAYS = 7 -EMAIL_HOST = 'localhost' -EMAIL_PORT = 1025 -EMAIL_HOST_USER = '' -EMAIL_HOST_PASSWORD = '' -EMAIL_USE_TLS = False -DEFAULT_FROM_EMAIL = 'komal@gmail.com' diff --git a/scipy2016/settings.pyc b/scipy2016/settings.pyc Binary files differindex 304a8ed..a5ef033 100644 --- a/scipy2016/settings.pyc +++ b/scipy2016/settings.pyc diff --git a/scipy2016/urls.pyc b/scipy2016/urls.pyc Binary files differindex d797f72..6daec6d 100644 --- a/scipy2016/urls.pyc +++ b/scipy2016/urls.pyc diff --git a/scipy2016/wsgi.pyc b/scipy2016/wsgi.pyc Binary files differindex ae7c175..798bf1f 100644 --- a/scipy2016/wsgi.pyc +++ b/scipy2016/wsgi.pyc diff --git a/website/__init__.pyc b/website/__init__.pyc Binary files differindex e122838..647354d 100644 --- a/website/__init__.pyc +++ b/website/__init__.pyc diff --git a/website/admin.pyc b/website/admin.pyc Binary files differindex d3d12dd..3a3c1a0 100644 --- a/website/admin.pyc +++ b/website/admin.pyc diff --git a/website/context_processors.py b/website/context_processors.py new file mode 100644 index 0000000..acd6cdc --- /dev/null +++ b/website/context_processors.py @@ -0,0 +1,9 @@ +from website.forms import ContactForm +from django.core.urlresolvers import reverse + + +def contact_us_context_processor(request): + return { + 'contact_form': ContactForm(), + 'contact_form_url': reverse("website:contact_us", args=(request.path)) + }
\ No newline at end of file diff --git a/website/forms.py b/website/forms.py index 870c54a..65524d5 100755 --- a/website/forms.py +++ b/website/forms.py @@ -9,34 +9,68 @@ from django.core.validators import MinLengthValidator, MinValueValidator, \ RegexValidator, URLValidator -class CommentForm(forms.Form): - pass +MY_CHOICES = ( + ('Beginner', 'Beginner'), + ('intermediate', 'Intermediate'), + ('Advanced', 'Advanced'), +) +rating=( + ('1','1'), + ('2','2'), + ('3','3'), + ('4','4'), + ('5','5'), + ('6','6'), + ('7','7'), + ('8','8'), + ('9','9'), + ('10','10'), +) + + +class ContactForm(forms.Form): + name = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'About Me'}), + required = True, + error_messages = {'required':'Name field required.'}, + ) + email = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'About Me'}), + required = True, + error_messages = {'required':'Email field required.'}, + ) + # subject = forms.CharField(required=True) + message = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Title'}), + required = True, + error_messages = {'required':'Message field required.'}, + ) + # rate = forms.ChoiceField(choices=rating) class ProposalForm(forms.ModelForm): - error_css_class = 'error' - required_css_class = 'required' - # content_link = forms.CharField(required=False, help_text='Link to the content of your Talk') - # speaker_link = forms.CharField(required=False, help_text='Link to information about the Speaker') about_me = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'About Me'}), required = True, error_messages = {'required':'Title field required.'}, - label = '') - attachment = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': True})) - phone = forms.CharField(max_length = 12, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Phone'}),required=False, label = '', validators = [RegexValidator(regex = '^[0-9-_+.]*$')]) + ) + attachment = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': True}), + required = True, + error_messages = {'required':'Attachment field required.'},) + phone = forms.CharField(max_length = 12, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Phone'}),required=False, validators = [RegexValidator(regex = '^[0-9-_+.]*$', message='Enter a Valid Phone Number',)], + # error_messages = {'required':'Title field required.'}, + ) title = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Title'}), required = True, error_messages = {'required':'Title field required.'}, - label = '' - ) + ) abstract = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Abstract'}), required = True, - error_messages = {'required':'Title field required.'}, - label = '' + error_messages = {'required':'Abstract field required.'}, ) + proposal_type = forms.CharField(widget = forms.HiddenInput(), label = '', initial = 'ABSTRACT', required=False) + + tags = forms.ChoiceField(choices=MY_CHOICES) + class Meta: model = Proposal - exclude = ('user', 'email','prerequisite','status') + exclude = ('user', 'email','prerequisite','status','rate') def clean_title(self): title = self.cleaned_data['title'] @@ -50,7 +84,7 @@ class ProposalForm(forms.ModelForm): attachment = cleaned_data.get('attachment', None) if attachment: ext = os.path.splitext(attachment.name)[1] - valid_extensions = ['.pdf','.zip','.rar'] + valid_extensions = ['.pdf'] if not ext in valid_extensions: raise forms.ValidationError(u'File not supported!') if attachment.size > (5*1024*1024): @@ -59,32 +93,38 @@ class ProposalForm(forms.ModelForm): class WorkshopForm(forms.ModelForm): - # content_link = forms.CharField(required=False, help_text='Link to the content of your Talk') - # speaker_link = forms.CharField(required=False, help_text='Link to information about the Speaker') about_me = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'About Me'}), required = True, error_messages = {'required':'Title field required.'}, - label = '') - attachment = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': True})) - phone = forms.CharField(max_length = 12, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Phone'}),required=False, label = '', validators = [RegexValidator(regex = '^[0-9-_+.]*$')]) + ) + attachment = forms.FileField(widget=forms.ClearableFileInput(attrs={'multiple': True}), + required = True, + error_messages = {'required':'Attachment field required.'},) + phone = forms.CharField(max_length = 12, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Phone'}),required=False, validators = [RegexValidator(regex = '^[0-9-_+.]*$', message='Enter a Valid Phone Number',)], + error_messages = {'required':'Title field required.'}, + ) title = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Title'}), required = True, error_messages = {'required':'Title field required.'}, - label = '' - ) - abstract = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Abstract'}), + ) + abstract = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Desciption'}), required = True, - error_messages = {'required':'Title field required.'}, - label = '' + label = 'Description', + error_messages = {'required':'Abstract field required.'}, ) - prerequisite = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Prerequisite'}), - required = True, - error_messages = {'required':'Title field required.'}, - label = '' + prerequisite = forms.CharField(widget=forms.Textarea(attrs={'class': 'form-control', 'placeholder': 'Prerequisite'}), + label = 'Prerequisites', + required = False, + ) + proposal_type = forms.CharField(widget = forms.HiddenInput(), label = '', required=False, initial = 'WORKSHOP') + + tags = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Tags'}), + required = False, ) + class Meta: model = Proposal - exclude = ('user', 'email','status') + exclude = ('user', 'email','status','rate') def clean_title(self): title = self.cleaned_data['title'] @@ -92,6 +132,18 @@ class WorkshopForm(forms.ModelForm): raise forms.ValidationError("This title already exist.") return title + def clean_attachment(self): + import os + cleaned_data = self.cleaned_data + attachment = cleaned_data.get('attachment', None) + if attachment: + ext = os.path.splitext(attachment.name)[1] + valid_extensions = ['.pdf',] + if not ext in valid_extensions: + raise forms.ValidationError(u'File not supported!') + if attachment.size > (5*1024*1024): + raise forms.ValidationError('File size exceeds 5MB') + return attachment class UserRegisterForm(UserCreationForm): class Meta: @@ -99,30 +151,30 @@ class UserRegisterForm(UserCreationForm): fields = ('first_name', 'last_name', 'email', 'username', 'password1', 'password2') first_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'First Name'}), - label = '' + label = 'First Name' ) last_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Last Name'}), - label = '' + label = 'Last Name' ) email = forms.EmailField(widget=forms.TextInput(attrs={'placeholder': 'Email'}), required = True, error_messages = {'required':'Email field required.'}, - label = '' + label = 'Email' ) username = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Username'}), required = True, error_messages = {'required':'Username field required.'}, - label = '' + label = 'Username' ) password1 = forms.CharField(widget=forms.PasswordInput(attrs={'placeholder': 'Password'}), required = True, error_messages = {'required':'Password field required.'}, - label = '' + label = 'Password' ) password2 = forms.CharField(widget=forms.PasswordInput(attrs={'placeholder': 'Confirm Password'}), required = True, error_messages = {'required':'Password Confirm field required.'}, - label = '' + label = 'RePassword' ) diff --git a/website/forms.pyc b/website/forms.pyc Binary files differindex c8ac7e4..7596b4f 100644 --- a/website/forms.pyc +++ b/website/forms.pyc diff --git a/website/models.py b/website/models.py index 53c5422..fff26ce 100755 --- a/website/models.py +++ b/website/models.py @@ -5,9 +5,9 @@ from social.apps.django_app.default.models import UserSocialAuth from scipy2016 import settings def get_document_dir(instance, filename): - ename, eext = instance.user.email.split("@") + # ename, eext = instance.user.email.split("@") fname, fext = filename.split(".") - return '%s/attachment/%s.%s' % (instance.user, str(instance.user)+str(fext), fext) + return '%s/attachment/%s/%s.%s' % (instance.user, instance.proposal_type, str(instance.user)+str(fext), fext) class Proposal(models.Model): user = models.ForeignKey(User) @@ -16,14 +16,18 @@ class Proposal(models.Model): phone = models.CharField(max_length = 20) title = models.CharField(max_length=250) abstract = models.TextField(max_length=700) - prerequisite = models.CharField(max_length=250) + prerequisite = models.CharField(max_length=750) + duration = models.DurationField() attachment = models.FileField(upload_to=get_document_dir) date_created = models.DateTimeField(auto_now_add=True) date_modified = models.DateTimeField(auto_now=True) status = models.CharField(max_length = 100, default='Pending', editable=True) - + proposal_type = models.CharField(max_length = 100) + tags = models.CharField(max_length = 250) + rate = models.CharField(max_length=100) class Comments(models.Model): proposal = models.ForeignKey(Proposal) user = models.ForeignKey(User) comment = models.CharField(max_length=700) + # rate = models.CharField(max_length =100) diff --git a/website/models.pyc b/website/models.pyc Binary files differindex aaf3760..df394eb 100644 --- a/website/models.pyc +++ b/website/models.pyc diff --git a/website/static/css/base.css b/website/static/css/base.css index e0dde7c..262604b 100755 --- a/website/static/css/base.css +++ b/website/static/css/base.css @@ -1,3 +1,19 @@ +.myIframe { +position: relative; +padding-bottom: 65.25%; +padding-top: 30px; +height: 0; +overflow: auto; +-webkit-overflow-scrolling:touch; +} +.myIframe iframe { +position: absolute; +left: 0; +right: 0; +width: 100%; +height: 100%; +} + .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { position: relative; @@ -1770,14 +1786,14 @@ select[multiple].input-lg { } .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { - color: #636363; + color: white; background-color: transparent; } .navbar-inverse .navbar-nav > .active > a, .navbar-inverse .navbar-nav > .active > a:hover, .navbar-inverse .navbar-nav > .active > a:focus { color: white; - background-color: #636363; + background-color: #D44727 ; } .navbar-inverse .navbar-nav > .disabled > a, .navbar-inverse .navbar-nav > .disabled > a:hover, @@ -1845,6 +1861,7 @@ select[multiple].input-lg { #my_form input{ width: 300px; + height:35px; } #my_form a{ diff --git a/website/static/css/main.css b/website/static/css/main.css index 24ee442..4fee9fc 100755 --- a/website/static/css/main.css +++ b/website/static/css/main.css @@ -1628,7 +1628,7 @@ background-image: url("images/overlay.png"), -webkit-linear-gradient(45deg, #e37682 15%, #5f4d93 85%); background-image: url("images/overlay.png"), -ms-linear-gradient(45deg, #e37682 15%, #5f4d93 85%); /*background-image: url("images/overlay.png"), linear-gradient(45deg, #e37682 15%, #5f4d93 85%);*/ - background-image: url("images/overlay.png"), linear-gradient(45deg, #3a3a3b 15%, #F9896D 85%); + background-image: url("images/overlay.png"), linear-gradient(0deg, #3a3a3b 25%, #D44727 75%); } body.is-loading *, body.is-loading *:before, body.is-loading *:after { @@ -1690,11 +1690,13 @@ transition: color 0.2s ease, border-bottom 0.2s ease; text-decoration: none; /* border-bottom: dotted 1px; -*/ color: blue; +*/ color: #D44727; } a:hover { border-bottom-color: transparent; + border-bottom: dotted 1px; + } strong, b { @@ -1706,7 +1708,7 @@ } p { - margin: 0 0 2em 0; + margin: 0 0 .5em 0; } p.content { @@ -2069,7 +2071,7 @@ input[type="text"], input[type="password"], input[type="email"], - select, + /*select,*/ textarea { -moz-appearance: none; -webkit-appearance: none; @@ -2129,7 +2131,7 @@ input[type="password"], input[type="email"], select { - height: 2.75em; + /*height: 2.75em;*/ } textarea { @@ -2835,7 +2837,7 @@ } .features li { - width: 20%; + /*width: 20%;*/ margin-left: 2em; padding: 0; @@ -3378,7 +3380,8 @@ } #main a:hover { - color: #636363; + color:#D44727; +; } #main strong, #main b { @@ -3478,13 +3481,24 @@ color: #636363; } - #main input[type="text"], + #main input[type="text"]{ + background: rgba(222, 222, 222, 0.25); + border-color: #dddddd; + width : 98%; + } + + #main select{ + background: rgba(222, 222, 222, 0.25); + border-color: #dddddd; + width: 30%; + + } #main input[type="password"], #main input[type="email"], - #main select, #main textarea { background: rgba(222, 222, 222, 0.25); border-color: #dddddd; + width: 98%; } #main input[type="text"]:focus, @@ -3579,6 +3593,7 @@ background-image: -webkit-linear-gradient(90deg, #efa8b0, #a89cc8, #8cc9f0); background-image: -ms-linear-gradient(90deg, #efa8b0, #a89cc8, #8cc9f0); background-image: linear-gradient(90deg, #efa8b0, #a89cc8, #8cc9f0); + } #main table tbody tr { diff --git a/website/templates/abstract-details.html b/website/templates/abstract-details.html index 319feb2..9ee8331 100755 --- a/website/templates/abstract-details.html +++ b/website/templates/abstract-details.html @@ -18,7 +18,7 @@ {% block header %} <header id="header1"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Abstract Details</h2> </header> {% endblock %} @@ -33,7 +33,9 @@ <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> + <li><a href="{% url 'website:home' %}" class="active">Home</a></li> + <li><a href="{% url 'website:view_abstracts' %}" class="active">View Proposals</a></li> + {% if user and not user.is_anonymous %} <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.get_full_name|default:user.username }}</a> @@ -68,10 +70,9 @@ <p><b>Attachment: </b> <a href="{{ proposal.attachment.url }}" class="btn btn-info" target="_blank">{{proposal.attachment}}</a></p> {% endif %} - - <hr> - <h4>Comments</h4> - <hr> + <b>Rate: </b></b> {{proposal.rate}} /10 + <p><b>Comments: </b> + <hr> {% for comment in comments %} <div> <strong>Comment By:</strong> @@ -84,7 +85,57 @@ </section> </div> - + + <!-- <footer id="footer"> + <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" action="" class="form" role="form" method=POST 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> + <div class="col-md-6 form-group"> + <input class="form-control" id="email" name="email" placeholder="Email" type="email" required /> + </div> + <br><br> + <textarea class="form-control" id="message" name="message" placeholder="Message" rows="5"></textarea> + <br> + <div class = "col-md-3"> + <input class="form-control" style="color:black;" readonly type="text" id="a" /> + </div> + <div class = "col-md-3"> + <input placeholder = "Answer" class="form-control" type="text" id="b"/> + </div> + <div class = "col-md-3"> + <button class="button" id = "c" type="submit">Send Message</button> + </div> + </section> + <section> + <h2>Contact Us</h2> + <dl class="alt"> + <dt>Address</dt> + <dd>1234 Somewhere Road • Nashville, TN 00000 • USA</dd> + <dt>Phone</dt> + <dd>(000) 000-0000 x 0000</dd> + <dt>Email</dt> + <dd><a style="color:white;" href="#">information@untitled.tld</a></dd> + </dl> + <ul class="icons"> + <li><a style="color:white;" href="#" class="icon-twitter alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-facebook alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-instagram alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-github alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-dribbble alt"><span class="label"></span></a></li> + </ul> + Visit SciPy.in/ <a style="color:white;" href="">2009</a>/ + <a style="color:white;" href="">2010</a>/ + <a style="color:white;" href="">2011</a>/ + <a style="color:white;" href="">2012</a>/ + <a style="color:white;" href="">2013</a>/ + <a style="color:white;" href="">2014</a>/ + <a style="color:white;" href="">2015</a> + </section> + </footer> --> {% endblock %} <!-- Scripts --> @@ -96,5 +147,18 @@ <!--[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>
\ No newline at end of file diff --git a/website/templates/base.html b/website/templates/base.html index 2197957..1c0360f 100755 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -3,17 +3,17 @@ <!DOCTYPE HTML>
<html>
<head>
- <title>Scipy India 2016</title>
+ <link rel="icon" href="http://fossee.in/data/emails/images/favicon.ico" type="icon">
+ <title>SciPy India 2016</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="{% static 'js/ie/html5shiv.js' %}"></script>
<link rel="stylesheet" href="{% static 'css/main.css'%}" />
<link rel="stylesheet" href="{% static 'css/fileuploader.css'%}" />
- <!-- <link rel="stylesheet" href="{% static 'css/ie9.css' %}" /> -->
- <!-- <link rel="stylesheet" href="{% static 'css/ie8.css' %}" /> -->
<link href="{% static 'css/base.css' %}" rel="stylesheet">
- <link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet">
- </head>
+ <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
+ <link href="{% static 'css/bootstrap-social.css' %}" rel="stylesheet">
+ </head>
<body>
<!-- Wrapper -->
@@ -22,19 +22,16 @@ <header id="header" class="alt">
<span class="logo"><img src="{% static 'img/logo.png' %}" alt="" /></span>
- <h1 >Scipy India 2016</h1>
- <p style="color:#636363; font-weight:500" >DECEMBER 9, 10 & 11</p><br><br>
+ <h1 >SciPy India 2016</h1>
+ <p style="color:#484848; font-weight:700; font-size:28px;" >DECEMBER 9, 10 & 11</p><br><br>
<a href="{% url 'website:cfp' %}" class="button special" style="width : 220px;" >Attend</a></center>
- <a href="#callforabstract" class="button special" style="width : 220px;">Submit Abstract</a></center>
- <a href="#callforabstract" class="button special" style="width : 220px;" >Propose Workshop</a></center>
+ <a href="{% url 'website:cfp' %}" class="button special" style="width : 220px;">Call for Proposal</a></center>
+ <!-- <a href="#callforabstract" class="button special" style="width : 220px;" >Propose Workshop</a></center> -->
</header>
{% endblock %}
-
-
-
<body data-spy="scroll" data-offset="0" data-target="#navbar-main">
{% block nav %}
@@ -47,7 +44,7 @@ <li> <a href="#about" class="smoothScroll">About</a></li>
<li> <a href="#speakers" class="smoothScroll">Speakers</a></li>
<li> <a href="#attend" class="smoothScroll">Attend</a></li>
- <li> <a href="#callforabstract">Call for Proposal</a></li>
+ <li> <a href="{% url 'website:cfp' %}">Call for Proposal</a></li>
<li> <a href="#schedule" class="smoothScroll">Schedule</a></li>
<li> <a href="#venue" class="smoothScroll">Venue</a></li>
<li> <a href="#sponsors" class="smoothScroll">Sponsors</a></li>
@@ -80,34 +77,11 @@ <header class="major">
<h2>ABOUT</h2>
</header>
- <p style= "font-size: 20px;">We look forward to your proposals. Conference aims to promote Python for Scientific Computing and Education. Topics like pedagogy, exploration, modeling or from both applied and developmental perspectives are welcome. Contributions from academia as well as industry are welcome. If you wish to propose a talk at the conference, kindly follow the guidelines given below.</p>
+ <p align="justify" style= "font-size: 20px;">We look forward to your proposals. Conference aims to promote Python for Scientific Computing and Education. Topics like pedagogy, exploration, modeling or from both applied and developmental perspectives are welcome. Contributions from academia as well as industry are welcome. If you wish to propose a talk at the conference, kindly follow the guidelines given below.</p>
</div>
</div>
- <div><h3>SciPy India Conferences down the lane</h3>
- <ul class="features">
- <li>
- <span><img src="{% static 'img/s15.jpg' %}" width="200" alt="" /></span>
- <h4><a href="http://scipy.in/2015" target="_blank">SciPy India 2015</a></h4>
-
- </li>
- <li>
- <span><img src="{% static 'img/s14.jpg' %}" width="200" alt="" /></span>
- <h4><a href="http://scipy.in/2014" target="_blank">SciPy India 2014</a></h4>
-
- </li>
- <li>
- <span><img src="{% static 'img/s13.jpg' %}" width="200" alt="" /></span>
- <h4><a href="http://scipy.in/2013" target="_blank">SciPy India 2013</a></h4>
-
- </li>
- <li>
- <span><img src="{% static 'img/s12.jpg' %}" width="200" alt="" /></span>
- <h4><a href="http://scipy.in/2012" target="_blank">SciPy India 2012</a></h4>
-
- </li>
- </ul>
- </div>
+
</section>
@@ -121,28 +95,28 @@ <center>
<div class = "col-md-4">
- <img class="img-responsive" src="{% static 'img/pic01.png' %}" alt="">
- <p>Dr. Abc Xyz</p>
- <a href="https://github.com/expeyes" targer"_blank"><i class="icon-github" style="font-size:30px;"></i></a>
+ <img class="img-responsive" src="{% static 'img/ajith.jpg' %}" height="300" width="300" alt="">
+ <p>Dr. Ajit Kumar</p>
+ <a style = "color:#636363;" href="https://github.com/expeyes" target="_blank"><i class="icon-github" style="font-size:30px;"></i></a>
- <a href="http://expeyes.in/" target="_blank"><i class="icon-info" style="font-size:30px;"></i></a>
+ <a style = "color:#636363;" href="http://expeyes.in/" target="_blank"><i class="icon-info" style="font-size:30px;"></i></a>
</div>
<div class = "col-md-4">
- <img class="img-responsive" src="{% static 'img/pic01.png' %}" alt="">
+ <img class="img-responsive" src="{% static 'img/pic01.png' %}" height="300" width="300" alt="">
<p>Dr. Abc Xyz</p>
- <a href="https://github.com/expeyes" targer"_blank"><i class="icon-github" style="font-size:30px;"></i></a>
+ <a style = "color:#636363;" href="https://github.com/expeyes" target="_blank"><i class="icon-github" style="font-size:30px;"></i></a>
- <a href="http://expeyes.in/" target="_blank"><i class="icon-info" style="font-size:30px;"></i></a>
+ <a style = "color:#636363;" href="http://expeyes.in/" target="_blank"><i class="icon-info" style="font-size:30px;"></i></a>
</div>
<div class = "col-md-4">
- <img class="img-responsive" src="{% static 'img/pic01.png' %}" alt="">
+ <img class="img-responsive" src="{% static 'img/pic01.png' %}" height="300" width="300" alt="">
<p>Dr. Abc Xyz</p>
- <a href="https://github.com/expeyes" targer"_blank"><i class="icon-github" style="font-size:30px;"></i></a>
+ <a style = "color:#636363;" href="https://github.com/expeyes" target="_blank"><i class="icon-github" style="font-size:30px;"></i></a>
- <a href="http://expeyes.in/" target="_blank"><i class="icon-info" style="font-size:30px;"></i></a>
+ <a style = "color:#636363;" href="http://expeyes.in/" target="_blank"><i class="icon-info" style="font-size:30px;"></i></a>
</div>
</center>
-
+
</div>
</div>
@@ -155,6 +129,7 @@ <h2>ATTEND</h2>
</header>
+ <!-- <div style="overflow-x:auto;"> -->
<table >
<colgroup>
<col width="20%" />
@@ -163,13 +138,9 @@ </colgroup>
<tr>
<center>
- <!-- <ul class="statistics"> -->
<td bgcolor="#efa8b0">
- <!-- <ul class="statistics"> -->
- <!-- <li class="style1"> -->
<h9 style="color:white;">Early Bird</h9>
<h2 style="color:white;" style ="font-size: 25px;">₹1000</h2>
- <!-- </ul> -->
</td>
<td>
This ticket includes conference (tutorials + talks), lunch and snacks for 3 days. It does not include Accommodation & T-Shirt. This is a non-refundable ticket.
@@ -177,56 +148,40 @@ </tr>
<tr>
<td bgcolor = "#c79cc8">
- <!-- <ul class="statistics"> -->
- <!-- <li class="style2"> -->
<h9 style="color:white;">Light</h9>
<h2 style="color:white;"style ="font-size: 25px;">₹300</h2>
- <!-- </li> -->
- <!-- </ul> -->
</td>
<td>
This Ticket allows you to ONLY attend the conference for 3 Days. Does not include any conference amenities (Accommodation, Kit, Food & T-shirt). This is a non-refundable ticket. </td>
</tr>
<tr>
<td bgcolor="#a89cc8">
- <!-- <ul class="statistics"> -->
- <!-- <li class="style3"> -->
<h9 style="color:white;">Regular</h9>
<h2 style="color:white;" style ="font-size: 25px;">₹1200</h2>
- <!-- </li> -->
- <!-- </ul> -->
</td>
<td>
This ticket includes conference (tutorials + talks), lunch and snacks for 3 days. It does not include Accommodation & T-Shirt. This is a non-refundable ticket.</td>
</tr>
<tr>
<td bgcolor ="#9bb2e1">
- <!-- <ul class="statistics"> -->
- <!-- <li class="style5"> -->
<h9 style="color:white;">Accomodation</h9>
<h2 style="color:white;" style ="font-size: 25px;">₹750</h2>
- <!-- </li> -->
- <!-- </ul> -->
</td>
<td>
Accommodation is provided on a shared basis (twin sharing) inside IIT-B campus (Boys/Girls hostel). Accommodation will be provided for 3 days, i.e, 13-14, 14-15 and 15-16 December. Accommodation does not include other amenities like dinner, etc. Extension of period of stay is not available. This is a non-refundable ticket.
</td>
<tr>
<td bgcolor= "#8cc9f0">
- <!-- <ul class="statistics"> -->
- <!-- <li class="style4"> -->
<h9 style="color:white;">T-Shirt</h9>
<h2 style="color:white;" style ="font-size: 25px;">₹250</h2>
- <!-- </li> -->
- <!-- </ul> -->
</td>
<td>
Change of size, exchange at the venue is not available. This is a non-refundable ticket.
</td>
</tr>
</tr>
-
+
</table>
<p id="demo"></p>
@@ -238,32 +193,6 @@ </section>
-<section id="callforabstract" class="main special">
- <div class="spotlight">
- <div class="content">
- <header class="major">
- <h2>CALL FOR PROPOSAL</h2></header>
- <div class="col-md-6">
- <p align="justify">We look forward to your proposals. Conference aims to promote <strong>Python for Scientific Computing and Education</strong>. Topics like pedagogy, exploration, modeling or from both applied and developmental perspectives are welcome. Contributions from academia as well as industry are welcome. If you wish to propose a talk at the conference, kindly follow the guidelines given below.</p><br><br>
- {% if user and not user.is_anonymous and not login_required %}
- <a class="button" href="{% url 'website:submitcfp' %}">Submit Abstract</a>
- {% else %}
- <a class="button" href="{% url 'website:cfp' %}">Submit Abstract</a>
- {% endif %}
- </div>
- <div class="col-md-6">
- <p align="justify">We look forward to your proposals. Conference aims to promote <strong>Python for Scientific Computing and Education</strong>. Topics like pedagogy, exploration, modeling or from both applied and developmental perspectives are welcome. Contributions from academia as well as industry are welcome. If you wish to propose a talk at the conference, kindly follow the guidelines given below.</p><br><br>
- {% if user and not user.is_anonymous and not login_required %}
- <a class="button" href="{% url 'website:submitcfw' %}">Propose Workshop</a>
- {% else %}
- <a class="button" href="{% url 'website:cfp' %}">Propose Workshop</a>
- {% endif %}
-
- </div>
- </section>
-
-
-
<section id="schedule" class="main special">
<div class="spotlight">
<div class="content">
@@ -280,11 +209,9 @@ <li><a style="background: #a89cc8;" data-toggle="tab" href="http://scipy.in/2015#day3">Day 3</a></li>
<li><a style="background: #9bb2e1;"data-toggle="tab" href="http://scipy.in/2015#paper">Workshop Resources</a></li>
<li><a style="background: #8cc9f0;" data-toggle="tab" href="http://scipy.in/2015#workshop">Workshop Instructions</a></li>
-
</ul>
<div class="tab-content">
-
<div id="day1" class="tab-pane fade in active">
<p>
</p><center><h4>14 Dec 2015: Day 1</h4></center>
@@ -425,8 +352,10 @@ <div class="content">
<header class="major">
<h2>VENUE</h2>
- <center><h4>Lecture Hall Complex, IIT Bombay</h4>
- <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3769.472585331343!2d72.916895!3d19.130779999999994!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3be7c7f4215f57bf%3A0xcf0c03ea45a113e1!2sLecture+Hall+Complex+(LHC)!5e0!3m2!1sen!2sin!4v1434726932900" width="550" height="300" frameborder="0" style="border:0"></iframe></center>
+ <center><h4>Lecture Hall Complex, IIT Bombay</h4></center>
+ <!-- <div class='myIframe' > -->
+ <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3769.472585331343!2d72.916895!3d19.130779999999994!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3be7c7f4215f57bf%3A0xcf0c03ea45a113e1!2sLecture+Hall+Complex+(LHC)!5e0!3m2!1sen!2sin!4v1434726932900" width="550" height="300" frameborder="0" style="border:0"></iframe>
+ <!-- </div> -->
</section>
@@ -451,17 +380,15 @@ <p align="justify">The Annual SciPy India conference is organised by the team members of FOSSEE project which is part of the National Mission on Education through ICT with the thrust area being Adaptation and deployment of open source simulation packages equivalent to proprietary software, funded by MHRD, based at the Indian Institute of Technology Bombay (IITB).</p>
</div>
</section>
-<!--
-
-
---><br><br><br>
</div>
+ {% endblock %}
+ {% block footer %}
<footer id="footer">
<section id="contact">
- <h2>Write Us</h2>
+ <h2>Write to Us</h2>
<p>Feel free to send us an email if you have any questions.</p>
- <form id="contact" action="" class="form" role="form" method=POST enctype="multipart/form-data">{% csrf_token %}
+ <form id="contact_us" action='{{ contact_form_url}}' class="form" role="form" method=POST 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>
@@ -470,9 +397,20 @@ </div>
<br><br>
<textarea class="form-control" id="message" name="message" placeholder="Message" rows="5"></textarea>
- <br>
- <button class="button" type="submit">Send Message</button>
+ <br>
+ <div class = "col-md-3">
+ <input class="form-control" style="color:black;" readonly type="text" id="a" />
+ </div>
+ <div class = "col-md-3">
+ <input placeholder = "Answer" class="form-control" type="text" id="b"/>
+ </div>
+ <div class = "col-md-3">
+ <button class="button" href="" id = "c" type="submit">Send Message</button>
+ </div>
+ </form>
</section>
+
+
<section>
<h2>Contact Us</h2>
<dl class="alt">
@@ -481,20 +419,26 @@ <dt>Phone</dt>
<dd>(000) 000-0000 x 0000</dd>
<dt>Email</dt>
- <dd><a href="#">information@untitled.tld</a></dd>
+ <dd><a style="color:white;" href="#">information@untitled.tld</a></dd>
</dl>
<ul class="icons">
- <li><a href="#" class="icon fa-twitter alt"><span class="label">Twitter</span></a></li>
- <li><a href="#" class="icon fa-facebook alt"><span class="label">Facebook</span></a></li>
- <li><a href="#" class="icon fa-instagram alt"><span class="label">Instagram</span></a></li>
- <li><a href="#" class="icon fa-github alt"><span class="label">GitHub</span></a></li>
- <li><a href="#" class="icon fa-dribbble alt"><span class="label">Dribbble</span></a></li>
+ <li><a style="color:white;" href="#" class="icon-twitter alt"><span class="label"></span></a></li>
+ <li><a style="color:white;" href="#" class="icon-facebook alt"><span class="label"></span></a></li>
+ <li><a style="color:white;" href="#" class="icon-instagram alt"><span class="label"></span></a></li>
+ <li><a style="color:white;" href="#" class="icon-github alt"><span class="label"></span></a></li>
+ <li><a style="color:white;" href="#" class="icon-dribbble alt"><span class="label"></span></a></li>
</ul>
+ Visit SciPy.in/ <a style="color:white;" href="">2009</a>/
+ <a style="color:white;" target="_blank" href="">2010</a>/
+ <a style="color:white;" target="_blank" href="">2011</a>/
+ <a style="color:white;" target="_blank" href="http://scipy.in/2012">2012</a>/
+ <a style="color:white;" target="_blank" href="http://scipy.in/2013" >2013</a>/
+ <a style="color:white;" target="_blank" href="http://scipy.in/2014">2014</a>/
+ <a style="color:white;" target="_blank" href="http://scipy.in/2015">2015</a>
</section>
</footer>
</div>
-
</div>
<!-- end wrapper -->
{% endblock %}
@@ -511,5 +455,18 @@ <script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/smoothscroll.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>
\ No newline at end of file diff --git a/website/templates/cfp.html b/website/templates/cfp.html index 594f86b..e587d47 100755 --- a/website/templates/cfp.html +++ b/website/templates/cfp.html @@ -17,7 +17,7 @@ {% block header %} <header id="header1"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Call For Proposal</h2> </header> {% endblock %} @@ -51,66 +51,120 @@ {% block content %} - <div id="wrapper"> -<div id="main" class="col-md-5"> - -<section id="content" class="main"> + <!-- <div id="wrapper"> --> + <div id="main"> + <section id="content" class="main"> + {% if proposal_submit %} + <center> + <p>Thank You for your submission. Your proposal has been saved successfully and is under review. You can check the status of submission <a href="{% url 'website:view_abstracts' %}">here </a>!</p> + </center> + {% endif %} {% if user and not user.is_anonymous and not login_required %} - <h2><u>Main Menu</u></h2> - <a href="{% url 'website:submitcfp' %}" class="btn btn btn-primary">Submit an Abstract</a> - <br><a href="{% url 'website:submitcfw' %}" class="btn btn btn-primary">Submit a Workshop Proposal</a> - <br> - <a href="{% url 'website:view_abstracts' %}" class="btn btn btn-primary">View Proposals</a> - {% else %} - <h2><u>Login</u></h2> + {% if user.is_superuser %} + <center><a href="{% url 'website:view_abstracts' %}" style="background:#D44727" class="button special">View Proposals</a> </center> + {% else %} + <center> + <a href="{% url 'website:submitcfp' %}" style="background:#D44727" class="button special">Submit an Abstract</a> + <a href="{% url 'website:submitcfw' %}" style="background:#D44727" class="button special">Submit a Workshop</a> + <a href="{% url 'website:view_abstracts' %}" style="background:#D44727" class="button special">View Proposals</a> + </center> + {% endif %} + + {% else %} + <ul class="features"> +<li> + <span><h2><u>Login</u></h2></span> <p>Login/Register to Submit a Proposal</p> {% if invalid %} - <center> - <p>Invalid Username/Password</p> - </center> - {% endif %} + <p style="color:red; font-size:15px;">* Invalid Username/Password</p> + {% endif %} - <div id = "my_form"> + <!-- <div id = "my_form"> --> <form action="" method="POST"> {{ form.as_p }} - <br> - <button class="button" type="submit">Login</button><br><br> + <button class="button special" style="background:#D44727" name ="login"type="submit">Login</button><br><br> <a style="padding-right : 20px;" href="{% url 'website:userregister' %}" class="btn btn btn-primary">Create an Account</a> <a href="/forgotpassword/">Forgot Password?</a> {% csrf_token %} </form> - </div> - <br> - {% endif %} - - - </section> - - </div> - <div id="wrapper" > -<div id="main" class="col-md-7" > - -<section id="content" class="main"> - - <h2><u>Proposal Guidelines</u></h2> - <ul> - <li>The project you are willing to present should be an actual implementation rather than just an idea. - <li>Abstract should be of 300 to 700 words describing the topic, including its relevance to scientific computing. - <li>Proposals with an aim to promote a commercial product or service will be rejected. - <li>In your abstract mention about various tools/libraries used for development. - <li>Notification for selection/rejection of your proposal will be given through email. - <li>All selected proposals must be presented at the conference by at least one author. - </ul> - <h2><u>Important Dates</u></h2> - <ul> + <!-- </div> --> + <p>Or Sign in with: + <a href="{% url 'social:begin' 'google-oauth2' %}?next={{ request.path }}" class="btn btn-social-icon " style="color:#dd4b39;"><i class="icon-google-plus"></i></a> + <a href="{% url 'social:begin' 'facebook' %}?next={{ request.path }}" class=" btn btn-social-icon" style="color:#3b5998"><i class="icon-facebook"></i></a></p> + </li> + <!-- </div> --> + + <!-- <div class="col-md-6" > --> +<li> + <span><h2><u>Important Dates</u></h2></span> + <ul> <li>CFP Open: July 5, 2015 <li>CFP Close: November 24, 2015 <li>Announcement of selected proposals: December 1, 2015 </ul> - </section> +</li> + <!-- </div> --> + {% endif %} + + </section> + </div> + <!-- </div> --> + + +<!-- + <footer id="footer"> + <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" action="" class="form" role="form" method=POST 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> + <div class="col-md-6 form-group"> + <input class="form-control" id="email" name="email" placeholder="Email" type="email" required /> + </div> + <br><br> + <textarea class="form-control" id="message" name="message" placeholder="Message" rows="5"></textarea> + <br> + <div class = "col-md-3"> + <input class="form-control" style="color:black;" readonly type="text" id="a" /> + </div> + <div class = "col-md-3"> + <input placeholder = "Answer" class="form-control" type="text" id="b"/> + </div> + <div class = "col-md-3"> + <button class="button" id = "c" name="send" type="submit">Send Message</button> + </div> + </section> + <section> + <h2>Contact Us</h2> + <dl class="alt"> + <dt>Address</dt> + <dd>1234 Somewhere Road • Nashville, TN 00000 • USA</dd> + <dt>Phone</dt> + <dd>(000) 000-0000 x 0000</dd> + <dt>Email</dt> + <dd><a style="color:white;" href="#">information@untitled.tld</a></dd> + </dl> + <ul class="icons"> + <li><a style="color:white;" href="#" class="icon-twitter alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-facebook alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-instagram alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-github alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-dribbble alt"><span class="label"></span></a></li> + </ul> + Visit SciPy.in/ <a style="color:white;" href="">2009</a>/ + <a style="color:white;" href="">2010</a>/ + <a style="color:white;" href="">2011</a>/ + <a style="color:white;" href="">2012</a>/ + <a style="color:white;" href="">2013</a>/ + <a style="color:white;" href="">2014</a>/ + <a style="color:white;" href="">2015</a> + </section> + </footer> --> + - </div> {% endblock %} <!-- Scripts --> @@ -122,5 +176,20 @@ <!--[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>
\ No newline at end of file diff --git a/website/templates/comment-abstract.html b/website/templates/comment-abstract.html index 42b66d2..2ed996a 100755 --- a/website/templates/comment-abstract.html +++ b/website/templates/comment-abstract.html @@ -30,6 +30,7 @@ <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li><a href="{% url 'website:home' %}" class="active">Home</a></li> + <li><a href="{% url 'website:view_abstracts' %}" class="active">View Proposals</a></li> {% if user and not user.is_anonymous %} <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.get_full_name|default:user.username }}</a> @@ -47,7 +48,6 @@ </div> {% endblock %} - {% block content %} <div id="wrapper"> <div id="main"> @@ -60,37 +60,66 @@ <p><b>Prerequisite: </b> {{ proposal.prerequisite }}</p> {% endif%} {% if proposal.attachment.url %} - <a href="{{ proposal.attachment.url }}" class="btn btn-info" target="_blank">Attachment</a> + <b>Attachment: </b> <a href="{{ proposal.attachment.url }}" class="btn btn-info" target="_blank">{{ proposal.attachment}}</a> {% endif %} - <p><b>Date Created: </b> {{ proposal.date_created }}</p> - <hr> - <form action="{% url 'website:status' proposal.id %}" method='POST'>{% csrf_token %} - - <input type="submit" value="Accept" name="accept"/> - <input type="submit" value="Reject" name="reject"/> - - </form> - <hr> + <p><b>Date Created: </b> {{ proposal.date_created }}</p> + + + <form action="{% url 'website:rate_proposal' proposal.id %}" method='POST' enctype="multipart/form-data"> {% csrf_token %} + <b>Rate :</b> + <select name="rating" style="width:70px;" onchange="run()"> <!--Call run() function--> + <option value="0">0</option> + <option value="1">1</option> + <option value="2">2</option> + <option value="3">3</option> + <option value="4">4</option> + <option value="5">5</option> + <option value="6">6</option> + <option value="7">7</option> + <option value="8">8</option> + <option value="9">9</option> + <option value="10">10</option> + + </select> /10 + <input class="btn btn btn_primary" type="submit" value="Rate"> +</form> + {% if proposal.rate %} + {{proposal.rate}} /10 + + {% endif %} + + <hr> <h4>Comments</h4> {% for comment in comments %} <div> <strong>Comment By:</strong> {{ comment.user.first_name }} {{ comment.user.last_name }} - <p>{{ comment.comment|safe }}</p> - <!-- <a href="#">Edit</a> - <a href="#">Delete</a> --> + <p>{{ comment.comment|safe }}</p> + {% if user == comment.user %} + <form action="" method='POST' enctype="multipart/form-data"> + {% csrf_token %} + {% endif %} </div> <hr> + </form> {% endfor %} <form action="{% url 'website:comment_abstract' proposal.id %}" method='POST' enctype="multipart/form-data"> {% csrf_token %} <textarea rows="5" cols="100" id="comment" class= "comment" name="comment" placeholder = "Add commnet here..."></textarea><br> - <button type="submit" class="button">Comment</button> + <input class="button special" style="background:#d44727" type="submit" class="button" value="Comment"> </form> + <form action="{% url 'website:status' proposal.id %}" method='POST'>{% csrf_token %} + + <input type="submit" class="button special" style="background:green" value="Accept" name="accept"/> + <input type="submit" class="button special" style="background:red "value="Reject" name="reject"/> + <input type="submit" class="button special" style="background:grey "value="Resubmit" name="resubmit"/> + + </form> </section> - </div> + </div> + </div> {% endblock %} @@ -122,10 +151,17 @@ mySubmitButton.onclick = function() { <script> -$(function(){ - -} -) +$(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> diff --git a/website/templates/registration/password_change_done.html b/website/templates/registration/password_change_done.html index 7edddfa..753daa5 100755 --- a/website/templates/registration/password_change_done.html +++ b/website/templates/registration/password_change_done.html @@ -17,7 +17,7 @@ {% block header %} <header id="header"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Reset Password</h2> </header> {% endblock %} diff --git a/website/templates/registration/password_change_form.html b/website/templates/registration/password_change_form.html index 4884aca..61b4e6c 100755 --- a/website/templates/registration/password_change_form.html +++ b/website/templates/registration/password_change_form.html @@ -17,7 +17,7 @@ {% block header %} <header id="header"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Reset Password</h2> </header> {% endblock %} diff --git a/website/templates/registration/password_reset_complete.html b/website/templates/registration/password_reset_complete.html index c36c1f2..c2a765e 100755 --- a/website/templates/registration/password_reset_complete.html +++ b/website/templates/registration/password_reset_complete.html @@ -17,7 +17,7 @@ {% block header %} <header id="header"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Reset Password</h2> </header> {% endblock %} diff --git a/website/templates/registration/password_reset_confirm.html b/website/templates/registration/password_reset_confirm.html index 32c6bbd..86d5cdb 100755 --- a/website/templates/registration/password_reset_confirm.html +++ b/website/templates/registration/password_reset_confirm.html @@ -17,7 +17,7 @@ {% block header %} <header id="header"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Reset Password</h2> </header> {% endblock %} diff --git a/website/templates/registration/password_reset_done.html b/website/templates/registration/password_reset_done.html index 1a3dfae..64e28aa 100755 --- a/website/templates/registration/password_reset_done.html +++ b/website/templates/registration/password_reset_done.html @@ -17,7 +17,7 @@ {% block header %} <header id="header"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Reset Password</h2> </header> {% endblock %} diff --git a/website/templates/registration/password_reset_form.html b/website/templates/registration/password_reset_form.html index 5b40bbf..7f1d67c 100755 --- a/website/templates/registration/password_reset_form.html +++ b/website/templates/registration/password_reset_form.html @@ -17,7 +17,7 @@ {% block header %} <header id="header"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Reset Password</h2> </header> {% endblock %} diff --git a/website/templates/submit-cfp.html b/website/templates/submit-cfp.html index ac77975..e4ea1ae 100755 --- a/website/templates/submit-cfp.html +++ b/website/templates/submit-cfp.html @@ -19,21 +19,24 @@ {% block header %} <header id="header1"> - <h1>Scipy India 2016</h1> - <h2>Submit Abstract</h2> + <h1>SciPy India 2016</h1> + <h2>Submit Workshop Proposal</h2> </header> {% endblock %} <div id="wrapper"> {% block nav %} - <div id="navbar-main"> +<div id="navbar-main"> <!-- Fixed navbar --> <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 %} + {% if proposals_a %} + <li><a href="{% url 'website:view_abstracts' %}" >View Proposals</a></li> + {% endif %} <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.get_full_name|default:user.username }}</a> <ul class="dropdown-menu"> @@ -55,25 +58,91 @@ <div id="wrapper"> <div id="main"> <section id="content" class="main"> - - +{% if proposals_a > 1 %} You have exceeded the abstract submission limit. + You may view your submitted proposals by clicking <a href="{% url 'website:view_abstracts' %}" class="btn "> here</a> + </div> +</div> +</section> + <!-- <footer id="footer"> + <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" action="" class="form" role="form" method=POST 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> + <div class="col-md-6 form-group"> + <input class="form-control" id="email" name="email" placeholder="Email" type="email" required /> + </div> + <br><br> + <textarea class="form-control" id="message" name="message" placeholder="Message" rows="5"></textarea> + <br> + <button class="button" type="submit">Send Message</button> + </section> + <section> + <h2>Contact Us</h2> + <dl class="alt"> + <dt>Address</dt> + <dd>1234 Somewhere Road • Nashville, TN 00000 • USA</dd> + <dt>Phone</dt> + <dd>(000) 000-0000 x 0000</dd> + <dt>Email</dt> + <dd><a style="color:white;" href="#">information@untitled.tld</a></dd> + </dl> + <ul class="icons"> + <li><a style="color:white;" href="#" class="icon-twitter alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-facebook alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-instagram alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-github alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-dribbble alt"><span class="label"></span></a></li> + </ul> + Visit SciPy.in/ <a style="color:white;" href="">2009</a>/ + <a style="color:white;" href="">2010</a>/ + <a style="color:white;" href="">2011</a>/ + <a style="color:white;" href="">2012</a>/ + <a style="color:white;" href="">2013</a>/ + <a style="color:white;" href="">2014</a>/ + <a style="color:white;" href="">2015</a> + </section> + </footer> + --> + {% else %} +<div id="wrapper"> +<!-- <div id="main"> --> +<section id="content" class="main"> + -<div> - <h2>{{ user.get_full_name|default:user.username }} </h2> + <!-- <h2>{{ user.get_full_name|default:user.username }} </h2> --> + <h2><u>Proposal Guidelines</u></h2> + <ul> + <li>The project you are willing to present should be an actual implementation rather than just an idea. + <li>Abstract should be of 300 to 700 words describing the topic, including its relevance to scientific computing. + <li>Proposals with an aim to promote a commercial product or service will be rejected. + <li>In your abstract mention about various tools/libraries used for development. + <li>Notification for selection/rejection of your proposal will be given through email. + <li>All selected proposals must be presented at the conference by at least one author. + </ul> <form action="" method=POST enctype="multipart/form-data"> + <div class="row1"> - {{ proposal_form.as_p }} + {% for field in proposal_form %} + + <p>{{ field.label}} + {% if field.field.required %} <span style="color:red;">*</span> {% endif %} + {{ field }}</p> + <a style="color:red; ">{{ field.errors }}</a> + {% endfor %} </div> {% csrf_token %} - <center><button class="button" type="submit">Submit</button></center> + <center><button class="button special" style="background:#D44727" type="submit">Submit</button></center> - </div> - </section> - </div> - -{% endblock %} + {% endif %} + +{% endblock %} +{% block footer %} +{% endblock %} <!-- Scripts --> <script src="assets/js/jquery.min.js"></script> diff --git a/website/templates/submit-cfw.html b/website/templates/submit-cfw.html index f43b378..a3207cd 100755 --- a/website/templates/submit-cfw.html +++ b/website/templates/submit-cfw.html @@ -19,7 +19,7 @@ {% block header %} <header id="header1"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Submit Workshop Proposal</h2> </header> {% endblock %} @@ -34,6 +34,9 @@ <ul class="nav navbar-nav"> <li><a href="{% url 'website:home' %}" class="active">Home</a></li> {% if user and not user.is_anonymous %} + {% if proposals_w %} + <li><a href="{% url 'website:view_abstracts' %}" >View Proposals</a></li> + {% endif %} <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ user.get_full_name|default:user.username }}</a> <ul class="dropdown-menu"> @@ -55,25 +58,91 @@ <div id="wrapper"> <div id="main"> <section id="content" class="main"> - - +{% if proposals_w > 1 %} You have exceeded the abstract submission limit. + You may view your submitted proposals by clicking <a href="{% url 'website:view_abstracts' %}" class="btn "> here</a> + </div> +</div> +</section> + <!-- <footer id="footer"> + <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" action="" class="form" role="form" method=POST 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> + <div class="col-md-6 form-group"> + <input class="form-control" id="email" name="email" placeholder="Email" type="email" required /> + </div> + <br><br> + <textarea class="form-control" id="message" name="message" placeholder="Message" rows="5"></textarea> + <br> + <button class="button" type="submit">Send Message</button> + </section> + <section> + <h2>Contact Us</h2> + <dl class="alt"> + <dt>Address</dt> + <dd>1234 Somewhere Road • Nashville, TN 00000 • USA</dd> + <dt>Phone</dt> + <dd>(000) 000-0000 x 0000</dd> + <dt>Email</dt> + <dd><a style="color:white;" href="#">information@untitled.tld</a></dd> + </dl> + <ul class="icons"> + <li><a style="color:white;" href="#" class="icon-twitter alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-facebook alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-instagram alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-github alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-dribbble alt"><span class="label"></span></a></li> + </ul> + Visit SciPy.in/ <a style="color:white;" href="">2009</a>/ + <a style="color:white;" href="">2010</a>/ + <a style="color:white;" href="">2011</a>/ + <a style="color:white;" href="">2012</a>/ + <a style="color:white;" href="">2013</a>/ + <a style="color:white;" href="">2014</a>/ + <a style="color:white;" href="">2015</a> + </section> + </footer> --> + + {% else %} +<div id="wrapper"> +<!-- <div id="main"> --> +<section id="content" class="main"> + + + <!-- <h2>{{ user.get_full_name|default:user.username }} </h2> --> + <h2><u>Proposal Guidelines</u></h2> + <ul> + <li>The project you are willing to present should be an actual implementation rather than just an idea. + <li>Abstract should be of 300 to 700 words describing the topic, including its relevance to scientific computing. + <li>Proposals with an aim to promote a commercial product or service will be rejected. + <li>In your abstract mention about various tools/libraries used for development. + <li>Notification for selection/rejection of your proposal will be given through email. + <li>All selected proposals must be presented at the conference by at least one author. + </ul> + <form action="" method=POST enctype="multipart/form-data"> -<div> - <h2>{{ user.get_full_name|default:user.username }} </h2> - <form id="contact" action="" method=POST enctype="multipart/form-data"> <div class="row1"> - {{ proposal_form.as_p }} + {% for field in proposal_form %} + <p>{{ field.label}} + {% if field.field.required %} <span style="color:red;">*</span> {% endif %} + {{ field }}</p> + <a style="color:red; ">{{ field.errors }}</a> + {% endfor %} </div> {% csrf_token %} - <center><button class="button" type="submit">Submit</button></center> + <center><button class="button special" style="background:#D44727" type="submit">Submit</button></center> - </div> - </section> - </div> - -{% endblock %} + {% endif %} + +{% endblock %} +{% block footer %} +{% endblock %} + <!-- Scripts --> <script src="assets/js/jquery.min.js"></script> diff --git a/website/templates/user-register.html b/website/templates/user-register.html index dfeba84..dffce77 100755 --- a/website/templates/user-register.html +++ b/website/templates/user-register.html @@ -19,7 +19,7 @@ {% block header %} <header id="header1"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>Register</h2> </header> {% endblock %} @@ -45,9 +45,6 @@ <div id="wrapper"> <div id="main"> <section id="content" class="main"> - - - {% if email_registered %} <center> @@ -63,20 +60,77 @@ {% if registration_complete %} <p> Your Account is Created Successfully !</p> {% endif %} - <div> - <form action="" method="POST"> - {{ form.as_p}} - <div class="col-md-8"> - <button class="button" type="submit" >SignUp</button> - <a class="btn btn-primary" href="{% url 'website:cfp' %}">I have an account</a> - </div> - {% csrf_token %} + <!-- <div class = "col-md-7"> --> + <!-- <div id = "my_form"> --> + <form action="" method="POST"> {% csrf_token %} + {% for field in form %} + {{ field.errors }} + <p>{{ field.label}} + {% if field.field.required %} <span style="color:red;">*</span> {% endif %} + {{ field }}</p> + {% endfor %} + <br> + <button class="button special" style="background:#D44727" type="submit" >SignUp</button> + <a class="btn btn-primary" href="{% url 'website:cfp' %}"><u>I have an account</u></a> + <!-- </div> --> + </form> - </div> - + <!-- </div> --> + <!-- </div> --> + </section> </div> + <!-- <footer id="footer"> + <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" action="" class="form" role="form" method=POST 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> + <div class="col-md-6 form-group"> + <input class="form-control" id="email" name="email" placeholder="Email" type="email" required /> + </div> + <br><br> + <textarea class="form-control" id="message" name="message" placeholder="Message" rows="5"></textarea> + <br> + <div class = "col-md-3"> + <input class="form-control" style="color:black;" readonly type="text" id="a" /> + </div> + <div class = "col-md-3"> + <input placeholder = "Answer" class="form-control" type="text" id="b"/> + </div> + <div class = "col-md-3"> + <button class="button" id = "c" type="submit">Send Message</button> + </div> + </section> + <section> + <h2>Contact Us</h2> + <dl class="alt"> + <dt>Address</dt> + <dd>1234 Somewhere Road • Nashville, TN 00000 • USA</dd> + <dt>Phone</dt> + <dd>(000) 000-0000 x 0000</dd> + <dt>Email</dt> + <dd><a style="color:white;" href="#">information@untitled.tld</a></dd> + </dl> + <ul class="icons"> + <li><a style="color:white;" href="#" class="icon-twitter alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-facebook alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-instagram alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-github alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-dribbble alt"><span class="label"></span></a></li> + </ul> + Visit SciPy.in/ <a style="color:white;" href="">2009</a>/ + <a style="color:white;" href="">2010</a>/ + <a style="color:white;" href="">2011</a>/ + <a style="color:white;" href="">2012</a>/ + <a style="color:white;" href="">2013</a>/ + <a style="color:white;" href="">2014</a>/ + <a style="color:white;" href="">2015</a> + </section> + </footer> --> {% endblock %} @@ -88,6 +142,20 @@ <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> diff --git a/website/templates/view-abstracts.html b/website/templates/view-abstracts.html index 0df72e7..5d64f05 100755 --- a/website/templates/view-abstracts.html +++ b/website/templates/view-abstracts.html @@ -20,7 +20,7 @@ {% block header %} <header id="header1"> - <h1>Scipy India 2016</h1> + <h1>SciPy India 2016</h1> <h2>View Proposals</h2> </header> {% endblock %} @@ -56,57 +56,75 @@ <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:delete' %}" method="post"> {% csrf_token %} + <form action="{% url 'website:delete' %}" method="post" onsubmit="return confirm('Sure?');"> {% csrf_token %} <table class="table"> <colgroup> {% if user.is_superuser %} <col width="10%" /> + <col width="30%" /> <col width="20%" /> <col width="60%" /> + <!-- <col width="10%" /> --> <col width="10%" /> <col width="10%" /> <col width="20%" /> {% else %} - <col width="10%" /> - <col width="60%" /> + <col width="20%" /> + <col width="70%" /> + <col width="10%" /> <col width="10%" /> <col width="10%" /> <col width="20%" /> {% endif %} </colgroup> + {% if user.is_superuser %} <th> <center>Select - {% if user.is_superuser %} + <th>Speaker {% endif %} - <th> <center>Title + <th> Type + <th> Title + {% if not user.is_superuser %} <th> View + {% endif %} <th> Comments - <th> Status</center> + <th> Rate + <th> Status {% for proposal in proposals %} <tr> + {% if user.is_superuser %} <td><center> <input type = "checkbox" name="delete_proposal" value = {{proposal.id}}></input></center></td> - {% if user.is_superuser %} + <td> {{ proposal.user.get_full_name}} </td> {% endif %} - <td style="white-space: nowrap; text-overflow:ellipsis; overflow: hidden; max-width:.5px;"> <center>{{proposal.title}}</td> + <td> {{proposal.proposal_type }} </td> + {% if user.is_superuser %} - <td ><a href="{% url 'website:comment_abstract' proposal.id %}">View</a> </td> + <td ><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><center> 0 </center></td> + <td><center> {{ proposal.comments_set.count }} </center></td> + <td><center> {{ proposal.rate }} </center></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 = 'Resubmit' %} + <h5 style="color:grey;">{{proposal.status}}</h5> {% else %} <h5 style="color:blue;">{{proposal.status}}</h5> {% endif %} @@ -115,12 +133,71 @@ </tr> {% endfor %} </table> - <center><input type="submit" value="Delete" name="delete"/></center> + {% 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="Dump" name="dump"/></center> + + {% endif %} </form> + {% endif %} + + </section> </div> + + <!-- <footer id="footer"> + <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" action="" class="form" role="form" method=POST 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> + <div class="col-md-6 form-group"> + <input class="form-control" id="email" name="email" placeholder="Email" type="email" required /> + </div> + <br><br> + <textarea class="form-control" id="message" name="message" placeholder="Message" rows="5"></textarea> + <br> + <div class = "col-md-3"> + <input class="form-control" style="color:black;" readonly type="text" id="a" /> + </div> + <div class = "col-md-3"> + <input placeholder = "Answer" class="form-control" type="text" id="b"/> + </div> + <div class = "col-md-3"> + <button class="button" id = "c" type="submit">Send Message</button> + </div> + </section> + <section> + <h2>Contact Us</h2> + <dl class="alt"> + <dt>Address</dt> + <dd>1234 Somewhere Road • Nashville, TN 00000 • USA</dd> + <dt>Phone</dt> + <dd>(000) 000-0000 x 0000</dd> + <dt>Email</dt> + <dd><a style="color:white;" href="#">information@untitled.tld</a></dd> + </dl> + <ul class="icons"> + <li><a style="color:white;" href="#" class="icon-twitter alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-facebook alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-instagram alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-github alt"><span class="label"></span></a></li> + <li><a style="color:white;" href="#" class="icon-dribbble alt"><span class="label"></span></a></li> + </ul> + Visit SciPy.in/ <a style="color:white;" href="">2009</a>/ + <a style="color:white;" href="">2010</a>/ + <a style="color:white;" href="">2011</a>/ + <a style="color:white;" href="">2012</a>/ + <a style="color:white;" href="">2013</a>/ + <a style="color:white;" href="">2014</a>/ + <a style="color:white;" href="">2015</a> + </section> + </footer> --> + {% endblock %} <!-- Scripts --> @@ -132,13 +209,19 @@ <!--[if lte IE 8]><script src="assets/js/ie/respond.min.js"></script><![endif]--> <script src="assets/js/main.js"></script> - <script> -function hello(){ - alert('hi'); -} +$(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> +</html>
\ No newline at end of file diff --git a/website/urls.py b/website/urls.py index d88d204..6bcaf3c 100755 --- a/website/urls.py +++ b/website/urls.py @@ -6,6 +6,7 @@ from django.conf import settings urlpatterns = patterns('', url(r'^$', 'website.views.home', name='home'), + # url(r'^contact/$', 'website.views.contact_us', name='contact'), url(r'^cfp/$', 'website.views.cfp', name='cfp'), url(r'^submit-cfp/$', 'website.views.submitcfp', name='submitcfp'), url(r'^submit-cfw/$', 'website.views.submitcfw', name='submitcfw'), @@ -16,5 +17,7 @@ urlpatterns = patterns('', url(r'^view-abstracts/delete/$', 'website.views.delete', name='delete'), url(r'^comment-abstract/(?P<proposal_id>\d+)$', 'website.views.comment_abstract', name='comment_abstract'), url(r'^comment-abstract/status/(?P<proposal_id>\d+)$', 'website.views.status', name='status'), - - )+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + url(r'^comment-abstract/rate/(?P<proposal_id>\d+)$', 'website.views.rate_proposal', name='rate_proposal'), + url(r'^process-contact-form/(?P<next_url>\d+)', 'website.views.contact_us', name='contact_us'), + # url(r'^view-abstracts/download_csv/$','website.views.download_csv', name='download_csv') + )+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/website/urls.pyc b/website/urls.pyc Binary files differindex 7886023..a41a5ee 100644 --- a/website/urls.pyc +++ b/website/urls.pyc diff --git a/website/views.py b/website/views.py index fbd368a..316ff19 100755 --- a/website/views.py +++ b/website/views.py @@ -11,9 +11,10 @@ from django.contrib.auth.models import User from django.contrib.admin.models import CHANGE from django.contrib.auth.decorators import login_required from django.core.mail import send_mail +from django.db.models import F +import csv - -from website.forms import ProposalForm, UserRegisterForm, UserLoginForm, WorkshopForm, CommentForm +from website.forms import ProposalForm, UserRegisterForm, UserLoginForm, WorkshopForm, ContactForm from website.models import Proposal, Comments from social.apps.django_app.default.models import UserSocialAuth import random @@ -53,9 +54,30 @@ def userregister(request): context['user'] = request.user return render_to_response('cfp.html', context) +def contact_us(request,next_url): + pass + context = {} + if request.method == "POST": + form = ContactForm(request.POST) + sender_name = request.POST['name'] + sender_email = request.POST['email'] + to = ('scipy@fossee.in',) + subject = "Query from - "+sender_name + message = request.POST['message'] + try: + send_mail(subject, message, sender_email, to) + context['mailsent'] = True + context['user'] = user + except: + context['mailfailed'] = True + context['user'] = user + return redirect(next_url,context) + def home(request): + #pass context = {} + user = request.user context.update(csrf(request)) if request.method == "POST": sender_name = request.POST['name'] @@ -66,8 +88,12 @@ def home(request): try: send_mail(subject, message, sender_email, to) context['mailsent'] = True + if user.is_authenticated(): + context['user'] = user except: context['mailfailed'] = True + if user.is_authenticated(): + context['user'] = user return render_to_response('base.html', context) @@ -78,29 +104,19 @@ def cfp(request): username = request.POST['username'] password = request.POST['password'] user = authenticate(username=username, password=password) - if user.is_superuser : - login(request, user) - print"in cfp view" - proposals = Proposal.objects.all() - context['proposals'] = proposals - context['user'] = user - return render_to_response('cfp.html', context) - elif user is not None: + if user is not None: login(request, user) if 'next' in request.GET: next = request.GET['next'] return HttpResponseRedirect(next) - if Proposal.objects.filter(user = user).exists : - print "---------------------->>>>>>>>>>", user - proposals = Proposal.objects.filter(user = user) - for p in proposals: - print "-------->", p - context['proposals'] = proposals - context['user'] = user + proposals = Proposal.objects.filter(user = request.user).count() + context['user'] = user + context['proposals'] = proposals return render_to_response('cfp.html', context) else: context['invalid'] = True context['form'] = UserLoginForm + context['user'] = user return render_to_response('cfp.html', context) else: form = UserLoginForm() @@ -112,8 +128,6 @@ def cfp(request): context_instance=context) - - def submitcfp(request): context = {} if request.user.is_authenticated(): @@ -121,6 +135,7 @@ def submitcfp(request): context.update(csrf(request)) django_user = User.objects.get(username=social_user) context['user'] = django_user + proposals_a = Proposal.objects.filter(user = request.user, proposal_type = 'ABSTRACT').count() if request.method == 'POST': form = ProposalForm(request.POST, request.FILES) if form.is_valid(): @@ -137,9 +152,11 @@ def submitcfp(request): return render_to_response('cfp.html', context) else: context['proposal_form'] = form + context['proposals_a'] = proposals_a return render_to_response('submit-cfp.html', context) else: form = ProposalForm() + context['proposals_a'] = proposals_a context['proposal_form'] = form return render_to_response('submit-cfp.html', context) #when link clicked else: @@ -153,6 +170,7 @@ def submitcfw(request): context.update(csrf(request)) django_user = User.objects.get(username=social_user) context['user'] = django_user + proposals_w = Proposal.objects.filter(user = request.user, proposal_type = 'WORKSHOP').count() if request.method == 'POST': form = WorkshopForm(request.POST, request.FILES) if form.is_valid(): @@ -169,10 +187,12 @@ def submitcfw(request): return render_to_response('cfp.html', context) else: context['proposal_form'] = form + context['proposals_w'] = proposals_w return render_to_response('submit-cfw.html', context) else: form = WorkshopForm() context['proposal_form'] = form + context['proposals_w'] = proposals_w return render_to_response('submit-cfw.html', context) else: context['login_required'] = True @@ -182,28 +202,24 @@ def submitcfw(request): def view_abstracts(request): user = request.user context = {} + count_list =[] if user.is_authenticated(): if user.is_superuser : proposals = Proposal.objects.all() context['proposals'] = proposals + for proposal in proposals: + count = Comments.objects.filter(proposal = proposal).count() + # print "-----------count ", count + count_list.append(count) + print "-----------count ", count_list + context['counts'] = count_list context['user'] = user return render(request, 'view-abstracts.html', context) elif user is not None: - # if request.method == "POST": - # if request.POST.get('delete'): - # Proposal.objects.filter(id__in=request.POST.getlist('delete_proposal')).delete() - # # print "---------------------",request.POST - # # delete_proposal = request.POST.getlist('delete_proposal') - # # for propsal_id in delete_proposal: - # # proposal = Proposal.objects.get(id = proposal_id) - # # proposal.remove() - # context = RequestContext(request, {'request': request, - # 'user': request.user}) - # context.update(csrf(request)) - # return render(request, 'view-abstracts.html',context_instance=context) if Proposal.objects.filter(user = user).exists : - print "in view-abstracts ---------------------->>>>>>>>>>", user proposals = Proposal.objects.filter(user = user) + print "-----------count ", count_list + context['counts'] = count_list context['proposals'] = proposals context['user'] = user return render(request, 'view-abstracts.html', context) @@ -235,6 +251,33 @@ def abstract_details(request, proposal_id=None): else: return render(request, 'cfp.html') +def rate_proposal(request, proposal_id = None): + user = request.user + context = {} + if user.is_authenticated(): + proposal = Proposal.objects.get(id=proposal_id) + if request.method == 'POST': + print"in rating" + rate = request.POST.get('rating') + print"rate-------" , rate + proposal.rate = rate + proposal.save() + comments = Comments.objects.filter(proposal=proposal) + context['proposal'] = proposal + context['comments'] = comments + context.update(csrf(request)) + return render(request, 'comment-abstract.html', context) + else: + comments = Comments.objects.filter(proposal=proposal) + context['proposal'] = proposal + context['comments'] = comments + context.update(csrf(request)) + return render(request, 'comment-abstract.html', context) + else: + return render(request, 'comment-abstract.html', context) + + + def comment_abstract(request, proposal_id = None): user = request.user @@ -254,20 +297,16 @@ def comment_abstract(request, proposal_id = None): print "proposal poster", proposal.user.email sender_name = "SciPy India 2016" sender_email = "scipy@fossee.in" - subject = "SciPy India - Comment of Your Proposal" + subject = "SciPy India - Comment on Your Proposal" to = (proposal.user.email, ) message = """Dear """+proposal.user.first_name+""",\n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" send_mail(subject, message, sender_email, to) + proposal.status="Commented" + proposal.save() context['proposal'] = proposal context['comments'] = comments - # if request.GET.get("accept"): - # print "-----------user clicked list" context.update(csrf(request)) return render(request, 'comment-abstract.html', context) - # elif request.GET.get("accept"): - # print"----------------- accept" - # context.update(csrf(request)) - # return render(request, 'comment-abstract.html', context) else: comments = Comments.objects.filter(proposal=proposal) context['proposal'] = proposal @@ -304,6 +343,16 @@ def status(request, proposal_id= None): message = """Dear """+proposal.user.first_name+""",\n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" send_mail(subject, message, sender_email, to) context.update(csrf(request)) + elif 'resubmit' in request.POST: + proposal.status="Resubmit" + proposal.save() + sender_name = "SciPy India 2016" + sender_email = "scipy@fossee.in" + subject = "SciPy India - Resubmit" + to = (proposal.user.email, ) + message = """Dear """+proposal.user.first_name+""",\n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay""" + send_mail(subject, message, sender_email, to) + context.update(csrf(request)) proposals = Proposal.objects.all() context['proposals'] = proposals context['user'] = user @@ -322,10 +371,65 @@ def delete(request): print proposal_id proposal = Proposal.objects.get(id = proposal_id) proposal.delete() - context.update(csrf(request)) - proposals = Proposal.objects.all() - context['proposals'] = proposals - context['user'] = user - return render(request, 'view-abstracts.html', context) + context.update(csrf(request)) + elif 'dump' in request.POST: + print" in dump" + delete_proposal = request.POST.getlist('delete_proposal') + 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', + 'rate', + ] + writer.writerow(header) + for proposal_id in delete_proposal: + proposal = Proposal.objects.get(id = proposal_id) + print"proposal", proposal + 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, + proposal.rate + ] + writer.writerow(row) + return response + except: + proposals = Proposal.objects.all() + context['proposals'] = proposals + context['user'] = user + return render(request, 'view-abstracts.html', context) + else: + proposals = Proposal.objects.all() + context['proposals'] = proposals + context['user'] = user + return render(request, 'view-abstracts.html', context) + else: + return render(request, 'view-abstracts.html', context) diff --git a/website/views.pyc b/website/views.pyc Binary files differindex c175eea..cddb2b3 100644 --- a/website/views.pyc +++ b/website/views.pyc |