From da0ff1ee84dd484ea482dfb8ded95573f4e7e164 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Thu, 6 Aug 2009 22:04:52 +0000 Subject: [PATCH] improved look of individual gallery on NarrativeWeb. svn: r12885 --- src/data/Web_Visually.css | 10 +++++----- src/plugins/webreport/NarrativeWeb.py | 13 ++++--------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/data/Web_Visually.css b/src/data/Web_Visually.css index 0dc42a053..95e5ffa92 100644 --- a/src/data/Web_Visually.css +++ b/src/data/Web_Visually.css @@ -1019,23 +1019,23 @@ div#Addresses table.infolist tbody tr td.ColumnPhone { #indivgallery h4 { margin-bottom:1em; } -#indivgallery .thumbnail tr { +#indivgallery .thumbnail { margin:0; float:left; width:130px; height:150px; text-align:center; } -#indivgallery .thumbnail tr a { +#indivgallery div.thumbnail a { display:block; margin:0; padding:0; background:none; } -#indivgallery .thumbnail tr a img { - margin:0; +#indivgallery div.thumbnail a img { + margin-bottom:.5cm; padding:0; - border:solid 1px #453619; + border:solid 1px #000; } #indivgallery div.thumbnail p { font:normal .7em/1.4em sans-serif; diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 951c5009d..50b4ebb51 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -891,10 +891,6 @@ class BasePage(object): # begin section title section += Html('h4', _('Gallery'), inline=True) - # begin table row - trow = Html('tr') - section += trow - displayed = [] for mediaref in photolist: @@ -914,9 +910,9 @@ class BasePage(object): real_path, newpath = self.report.prepare_copy_media(photo) # TODO. Check if build_url_fname can be used. newpath = '/'.join(['..']*3 + [newpath]) - + # begin hyperlink - trow += self.media_link(photo_handle, newpath, descr, up=True) + section += self.media_link(photo_handle, newpath, descr, True, False) except (IOError, OSError), msg: WarningDialog(_("Could not add photo to page"), str(msg)) @@ -924,7 +920,7 @@ class BasePage(object): try: # begin hyperlink - trow += self.doc_link(photo_handle, descr, up=True) + section += self.doc_link(photo_handle, descr, up=True) lnk = (self.report.cur_fname, self.page_title, self.gid) # FIXME. Is it OK to add to the photo_list of report? @@ -1139,8 +1135,7 @@ class BasePage(object): hyper = (Html('a', href=url, title=name) + Html('img', src=img_url, alt=name) + (Html('p', inline=True) + - html_escape(name) if usedescr else ' [Untitled] ' - ) + html_escape(name) if usedescr else '') ) # add hyperlink and description to thumbnail division thumbnail += hyper