initial display of links in gallery upload page

This commit is contained in:
Sanj 2012-12-26 14:47:22 +05:30
parent d80e2f5f9d
commit b1ae133639
2 changed files with 9 additions and 2 deletions

View File

@ -28,9 +28,11 @@ def edit(request, id):
gallery = get_object_or_404(GalleryAlbum, pk=id)
photos = Photo.objects.filter(album=gallery)
youtube_videos = YoutubeVideo.objects.filter(album=gallery)
links = GalleryLink.objects.filter(album=gallery)
context = RequestContext(request, {
'gallery': gallery,
'photos': photos,
'links': links,
'youtube_videos': youtube_videos
})
return render_to_response("mediagallery/upload.html", context)

View File

@ -195,7 +195,6 @@ $(function() {
<div class="videoTitle">{{ vid.title }}</div>
<span class="deleteVideo">X</span>
</li>
{% endfor %}
</ul>
</div>
@ -208,7 +207,13 @@ $(function() {
<button id="addLink">Add</button>
<ul id="links">
{% for link in links %}
<li>
<div class="linkTitle">{{ link.title }}</div>
<a target="_blank" href="{{ link.url }}">{{ link.url }}</a>
<span class="deleteLink">X</span>
</li>
{% endfor %}
</ul>
</div>