initial display of links in gallery upload page
This commit is contained in:
parent
d80e2f5f9d
commit
b1ae133639
|
@ -28,9 +28,11 @@ def edit(request, id):
|
||||||
gallery = get_object_or_404(GalleryAlbum, pk=id)
|
gallery = get_object_or_404(GalleryAlbum, pk=id)
|
||||||
photos = Photo.objects.filter(album=gallery)
|
photos = Photo.objects.filter(album=gallery)
|
||||||
youtube_videos = YoutubeVideo.objects.filter(album=gallery)
|
youtube_videos = YoutubeVideo.objects.filter(album=gallery)
|
||||||
|
links = GalleryLink.objects.filter(album=gallery)
|
||||||
context = RequestContext(request, {
|
context = RequestContext(request, {
|
||||||
'gallery': gallery,
|
'gallery': gallery,
|
||||||
'photos': photos,
|
'photos': photos,
|
||||||
|
'links': links,
|
||||||
'youtube_videos': youtube_videos
|
'youtube_videos': youtube_videos
|
||||||
})
|
})
|
||||||
return render_to_response("mediagallery/upload.html", context)
|
return render_to_response("mediagallery/upload.html", context)
|
||||||
|
|
|
@ -195,7 +195,6 @@ $(function() {
|
||||||
<div class="videoTitle">{{ vid.title }}</div>
|
<div class="videoTitle">{{ vid.title }}</div>
|
||||||
<span class="deleteVideo">X</span>
|
<span class="deleteVideo">X</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -208,7 +207,13 @@ $(function() {
|
||||||
<button id="addLink">Add</button>
|
<button id="addLink">Add</button>
|
||||||
|
|
||||||
<ul id="links">
|
<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>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user