diff options
author | hardythe1 | 2013-11-27 12:17:06 +0530 |
---|---|---|
committer | hardythe1 | 2013-11-27 12:17:06 +0530 |
commit | f2d4d20e0906c89ac655b48f242c9f0bfa8b741c (patch) | |
tree | 4e658d40041ea3498c92e26d33e9f8c69625e871 | |
parent | 1d6100617b0eae1bdd7a4c4b5fb8721c29f61e79 (diff) | |
download | SciPy2013-f2d4d20e0906c89ac655b48f242c9f0bfa8b741c.tar.gz SciPy2013-f2d4d20e0906c89ac655b48f242c9f0bfa8b741c.tar.bz2 SciPy2013-f2d4d20e0906c89ac655b48f242c9f0bfa8b741c.zip |
adding list of abstracts page
-rw-r--r-- | website/static/css/main.css | 10 | ||||
-rw-r--r-- | website/templates/abstract_details.html | 21 | ||||
-rw-r--r-- | website/templates/index.html | 1 | ||||
-rw-r--r-- | website/templates/list_abstracts.html | 18 | ||||
-rw-r--r-- | website/templates/page.html | 1 | ||||
-rw-r--r-- | website/urls.py | 2 | ||||
-rw-r--r-- | website/views.py | 16 |
7 files changed, 69 insertions, 0 deletions
diff --git a/website/static/css/main.css b/website/static/css/main.css index f57acd7..3542404 100644 --- a/website/static/css/main.css +++ b/website/static/css/main.css @@ -197,3 +197,13 @@ left: 0; bottom: 0; } + +/* for list of abstracts */ +#abstract{ + background-color:#F0F8FF; + border: 1px solid #C9C9C9; + border-radius: 5px 5px 5px 5px; + margin-bottom: 10px; + min-width: 805px; + +} diff --git a/website/templates/abstract_details.html b/website/templates/abstract_details.html new file mode 100644 index 0000000..4706d61 --- /dev/null +++ b/website/templates/abstract_details.html @@ -0,0 +1,21 @@ +{% extends 'page.html'%} +{% load static %} + +{% block breadcrumbs %} +<li><a href="{% url 'website:invited-speakers'%}">Invited Speakers</a></li> +<li><a href="{% url 'website:list-abstracts'%}">List of Abstracts</a></li> +{% endblock %} + +{% block content %} +<center><h4>{{ paper.title }}</h4></center> + +<p>Speaker: {{ paper.user.first_name }} {{ paper.user.last_name }}</p> +<p>Speaker Bio: {{ paper.bio }}</p> +<div id="abstract"> +<p>Abstract: {{ paper.abstract }}</p> +</div> +<p>Affiliation: {{ paper.affiliation }}</p> +<p>Links: {{ paper.links }}</p> +<p><a href="/static/{{ paper.attachments }}">Attachment</a></p> + +{% endblock %} diff --git a/website/templates/index.html b/website/templates/index.html index 2675c4f..b30a60e 100644 --- a/website/templates/index.html +++ b/website/templates/index.html @@ -51,6 +51,7 @@ <ul class="dropdown"> <!-- <li><a href="{% url 'website:schedule' %}">Schedule</a></li> --> <li><a href="{% url 'website:invited-speakers' %}">Invited Speakers</a></li> + <li><a href="{% url 'website:list-abstracts' %}">List of Abstracts</a></li> <!-- <li><a href="{% url 'website:accepted-abstracts' %}">Accepted Abstracts</a></li> --> </ul> </li> diff --git a/website/templates/list_abstracts.html b/website/templates/list_abstracts.html new file mode 100644 index 0000000..4389d2d --- /dev/null +++ b/website/templates/list_abstracts.html @@ -0,0 +1,18 @@ +{% extends 'page.html'%} + +{% block breadcrumbs %} +<li><a href="{% url 'website:invited-speakers'%}">Invited Speakers</a></li> +<li><a href="{% url 'website:list-abstracts'%}">List of Abstracts</a></li> +{% endblock %} + +{% block content %} +<center><h4>List of Abstracts</h4></center> + +<table align="center"> +<th>Title +<th>Speaker +{% for paper in papers %} + <tr><td><a href="{% url 'website:abstract-details' paper.id %}">{{ paper.title }}</a></td><td>{{ paper.user.first_name }} {{ paper.user.last_name }}</td></tr> +{% endfor %} +</table> +{% endblock %} diff --git a/website/templates/page.html b/website/templates/page.html index 3a89b1c..e398e3f 100644 --- a/website/templates/page.html +++ b/website/templates/page.html @@ -51,6 +51,7 @@ <ul class="dropdown"> <!-- <li><a href="{% url 'website:schedule' %}">Schedule</a></li> --> <li><a href="{% url 'website:invited-speakers' %}">Invited Speakers</a></li> + <li><a href="{% url 'website:list-abstracts' %}">List of Abstracts</a></li> <!-- <li><a href="{% url 'website:accepted-abstracts' %}">Accepted Abstracts</a></li> --> </ul> </li> diff --git a/website/urls.py b/website/urls.py index 380f13d..161df22 100644 --- a/website/urls.py +++ b/website/urls.py @@ -15,6 +15,8 @@ urlpatterns = patterns('', # Conference Section url(r'^schedule/$', 'website.views.schedule_page', name='schedule'), url(r'^invited-speakers/$', 'website.views.invited_speakers_page', name='invited-speakers'), + url(r'^abstracts/$', 'website.views.list_of_abstracts', name='list-abstracts'), + url(r'^abstract-details/(?P<paper_id>\d+)/$', 'website.views.abstract_details', name="abstract-details"), url(r'^accepted-abstracts/$', 'website.views.accepted_abstracts_page', name='accepted-abstracts'), # Register diff --git a/website/views.py b/website/views.py index c3f2918..747f9d4 100644 --- a/website/views.py +++ b/website/views.py @@ -1,5 +1,6 @@ from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response +from models import Paper # Home section def home_page(request): @@ -39,6 +40,21 @@ def schedule_page(request): def invited_speakers_page(request): return render_to_response('invited_speakers.html') +def list_of_abstracts(request): + context = {} + papers = Paper.objects.all() + context['papers'] = papers + return render_to_response('list_abstracts.html', context) + +def abstract_details(request, paper_id=None): + context = {} + paper = Paper.objects.get(id=paper_id) + context['paper'] = paper + if(len(paper.abstract)<=0): + return HttpResponse(paper.abstract) + return render_to_response('abstract_details.html', context) + + def accepted_abstracts_page(request): return render_to_response('accepted_abstracts.html') |