forked from 0x2620/pandora
no preview for html pages
This commit is contained in:
parent
6e283ad870
commit
30af377ecb
1 changed files with 7 additions and 6 deletions
|
@ -28,12 +28,13 @@ def index(request, fragment):
|
||||||
link = request.build_absolute_uri(document.get_absolute_url())
|
link = request.build_absolute_uri(document.get_absolute_url())
|
||||||
# FIXME: get preview image or fragment parse from url
|
# FIXME: get preview image or fragment parse from url
|
||||||
public_id = ox.toAZ(document.id)
|
public_id = ox.toAZ(document.id)
|
||||||
preview = '/documents/%s/512p.jpg' % public_id
|
if self.extension != 'html':
|
||||||
if page:
|
preview = '/documents/%s/512p.jpg' % public_id
|
||||||
preview = '/documents/%s/512p%s.jpg' % (public_id, page)
|
if page:
|
||||||
if crop:
|
preview = '/documents/%s/512p%s.jpg' % (public_id, page)
|
||||||
preview = '/documents/%s/512p%s.jpg' % (public_id, ','.join(crop))
|
if crop:
|
||||||
context['preview'] = request.build_absolute_uri(preview)
|
preview = '/documents/%s/512p%s.jpg' % (public_id, ','.join(crop))
|
||||||
|
context['preview'] = request.build_absolute_uri(preview)
|
||||||
|
|
||||||
elif parts[0] == 'edits':
|
elif parts[0] == 'edits':
|
||||||
type = 'edit'
|
type = 'edit'
|
||||||
|
|
Loading…
Reference in a new issue