OpenLayers OpenLayers

Changeset 7254

Show
Ignore:
Timestamp:
05/22/08 12:10:03 (3 months ago)
Author:
crschmidt
Message:

adding item view and permalink

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • project/gallery.openlayers.org/openlayers/gallery/templates/item_list.html

    r7249 r7254  
    33{% for item in items %} 
    44  <div id="item{{ item.id }}"> 
    5     {% if item.thumbnail %}   
     5    {% if item.thumbnail and not single %}   
    66    <div style="float:left; padding: 0px 10px">  
    7     <a href="{{ item.url }}"><img src="{{ item.get_thumbnail_url }}" style="float:left" /></a> 
     7    <a href="{{ item.url }}"><img src="/{{ item.get_thumbnail_url }}" style="float:left" /></a> 
    88    </div> 
    99    {% endif %} 
     
    1717    {% endfor %} 
    1818</div> 
    19     <small><em>{{ item.type }}, uploaded at {{ item.created }}</em> (<a href="/edit/{{item.id}}/">Edit</a>)</small><br /> 
     19    <small><em>{{ item.type }}, uploaded at {{ item.created }}</em> (<a href="/edit/{{item.id}}/">Edit</a>)  
     20    {% if not single %} 
     21    (<a href="/item/{{item.id}}/">Permalink</a>) 
     22    {% endif %} 
     23    </small><br /> 
    2024    <p>   {{ item.description }} 
    2125    </p> 
    2226    <br style="clear:both" /> 
     27    {% if single %} 
     28    <a href="{{ item.url }}"><img src="/{{ item.get_image_url }}" style="float:left" /></a> 
     29    {% endif %} 
    2330  </div> 
    2431{% endfor %}   
  • project/gallery.openlayers.org/openlayers/gallery/views.py

    r7249 r7254  
    1818    return render_to_response("item_list.html", {'items':items})  
    1919 
     20def item(request, id): 
     21    items = [Item.objects.get(pk=id)] 
     22    for item in items: 
     23        item.tag_list = Tag.objects.get_for_object(item) 
     24    return render_to_response("item_list.html", {'items':items, 'single':True})  
     25 
    2026 
    2127def item_create(request, id = None):