diff options
author | Madhusudan.C.S | 2009-11-23 12:01:22 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2009-11-23 12:01:22 +0530 |
commit | 29286ab7df569702abd4b2226e45f58abf2549d0 (patch) | |
tree | db1c10c8c8abec4bab1b10da72f86df6fd84a9e8 /project | |
parent | 14523eaef04969f8c922df5f8f994fd74c22d110 (diff) | |
download | scipycon-29286ab7df569702abd4b2226e45f58abf2549d0.tar.gz scipycon-29286ab7df569702abd4b2226e45f58abf2549d0.tar.bz2 scipycon-29286ab7df569702abd4b2226e45f58abf2549d0.zip |
Added my talks list page.
Diffstat (limited to 'project')
-rw-r--r-- | project/kiwipycon/talk/views.py | 11 | ||||
-rw-r--r-- | project/static/css/styles.css | 28 | ||||
-rw-r--r-- | project/templates/_menu.html | 5 | ||||
-rw-r--r-- | project/urls.py | 6 |
4 files changed, 45 insertions, 5 deletions
diff --git a/project/kiwipycon/talk/views.py b/project/kiwipycon/talk/views.py index fdf6091..a595158 100644 --- a/project/kiwipycon/talk/views.py +++ b/project/kiwipycon/talk/views.py @@ -182,3 +182,14 @@ def submit_talk(request, template_name='talk/submit-talk.html'): 'login_form' : login_form })) +@login_required +def list_talks(request, id, template_name='talk/list-talks.html'): + '''List all the tasks submitted by a user. + ''' + + speaker = User.objects.get(pk=id) + talks = Talk.objects.filter(speaker=speaker) + + return render_to_response(template_name, RequestContext(request, { + 'talk_list': talks, + })) diff --git a/project/static/css/styles.css b/project/static/css/styles.css index e894c85..7620f3e 100644 --- a/project/static/css/styles.css +++ b/project/static/css/styles.css @@ -126,6 +126,32 @@ th vertical-align: top; } +/* list my talks table layout */ +table.list-talks +{ + border: 1px solid #ddd; + font-size: 1.1em; +} + +table.list-talks td +{ + border: 1px solid #ddd; + padding: 5px 15px; +} + +table.list-talks th +{ + border: 1px solid #ddd; + font-weight: bold; + align: center; + padding: 5px 15px; +} + +table.list-talks a +{ + text-decoration: none; +} + .important { color: #337799; @@ -307,7 +333,7 @@ div.picture img { font-weight: bold; font-family: Verdana, Arial, "Bitstream Vera Sans", Helvetica, sans-serif; - font-size: 1.3em; + font-size: 1em; padding-bottom: 15px; } /* forms */ diff --git a/project/templates/_menu.html b/project/templates/_menu.html index 634fb97..8549ad7 100644 --- a/project/templates/_menu.html +++ b/project/templates/_menu.html @@ -7,7 +7,10 @@ <ul> <li><a href="/talks-cfp/schedule/">Conference Schedule</a></li> <li><a href="/talks-cfp/speakers/">Speakers</a></li> - <li><a href="/talks/">Talks</a></li> + {% if user.is_authenticated %} + <li><a href="/talks-cfp/list-talks/{{ user.id }}">My talks</a></li> + {% endif %} + <li><a href="/talks/">Scheduled talks</a></li> </ul> </li> <li> diff --git a/project/urls.py b/project/urls.py index cc3714b..370ed78 100644 --- a/project/urls.py +++ b/project/urls.py @@ -18,9 +18,7 @@ admin.autodiscover() # Blog & Admin urlpatterns = patterns( '', - url(r'^$', - direct_to_template, {"template": "home.html"}, - name='home'), + url(r'^$', direct_to_template, {"template": "home.html"}, name='home'), (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}), (r'^comments/', include('django.contrib.comments.urls')), (r'^admin/(.*)', admin.site.root), @@ -32,6 +30,8 @@ urlpatterns += patterns('project.kiwipycon.talk.views', url(r'^talks/talk/(?P<id>\d+)/$', 'talk', name='talk_detail'), url(r'^submit-talk/$', 'submit_talk', name='kiwipycon_submit_talk'), url(r'^edit-talk/(?P<id>\d+)/$', 'edit_talk', name='kiwipycon_edit_talk'), + url(r'^talks-cfp/list-talks/(?P<id>\d+)/$', 'list_talks', + name='kiwipycon_list_talk'), ) # Registration |