Added cropped region thumbnail to ancestor tree
svn: r15138
This commit is contained in:
parent
14767e285f
commit
72ebf72840
@ -3678,10 +3678,26 @@ class IndividualPage(BasePage):
|
|||||||
photo = db.get_object_from_handle(photo_handle)
|
photo = db.get_object_from_handle(photo_handle)
|
||||||
mime_type = photo.get_mime_type()
|
mime_type = photo.get_mime_type()
|
||||||
if mime_type:
|
if mime_type:
|
||||||
|
region = self.media_ref_region_to_object(photo_handle, person)
|
||||||
|
if region:
|
||||||
|
lnkref = (self.report.cur_fname, self.page_title, self.gid)
|
||||||
|
self.report.add_lnkref_to_photo(photo, lnkref)
|
||||||
|
|
||||||
|
# make a thumbnail of this region
|
||||||
|
newpath = copy_thumbnail(self.report, photo_handle, photo, region)
|
||||||
|
# TODO. Check if build_url_fname can be used.
|
||||||
|
newpath = "/".join(['..']*3 + [newpath])
|
||||||
|
if constfunc.win():
|
||||||
|
newpath = newpath.replace('\\',"/")
|
||||||
|
thumbnailUrl = newpath
|
||||||
|
#snapshot += self.media_link(photo_handle, newpath, '', up = True)
|
||||||
|
|
||||||
|
else:
|
||||||
(photoUrl, thumbnailUrl) = self.report.prepare_copy_media(photo)
|
(photoUrl, thumbnailUrl) = self.report.prepare_copy_media(photo)
|
||||||
thumbnailUrl = "/".join(['..']*3 + [thumbnailUrl])
|
thumbnailUrl = "/".join(['..']*3 + [thumbnailUrl])
|
||||||
if constfunc.win():
|
if constfunc.win():
|
||||||
thumbnailUrl = thumbnailUrl.replace('\\',"/")
|
thumbnailUrl = thumbnailUrl.replace('\\',"/")
|
||||||
|
|
||||||
url = self.report.build_url_fname_html(person.handle, "ppl", True)
|
url = self.report.build_url_fname_html(person.handle, "ppl", True)
|
||||||
boxbg += self.person_link(url, person, name_style = True,
|
boxbg += self.person_link(url, person, name_style = True,
|
||||||
thumbnailUrl=thumbnailUrl)
|
thumbnailUrl=thumbnailUrl)
|
||||||
|
Loading…
Reference in New Issue
Block a user