From 0e06a98523dcd7a3bf789f4e750a77b649dbd9fc Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Mon, 5 Jul 2010 09:11:24 +0000 Subject: [PATCH] NarrativeWeb: Removed extra hyperlink in display_ind_sources(). Re-claimed valuable and expensive vertical real estatetoo. Web_Basic-Blue: added element to remove underline in display_ind_sources(). svn: r15619 --- src/data/Web_Basic-Blue.css | 7 +++-- src/plugins/webreport/NarrativeWeb.py | 40 +++++++++++++-------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/data/Web_Basic-Blue.css b/src/data/Web_Basic-Blue.css index 20d5338ec..bc2049dd3 100644 --- a/src/data/Web_Basic-Blue.css +++ b/src/data/Web_Basic-Blue.css @@ -1176,10 +1176,13 @@ div#sourcerefs { background-color: #BCEAF6; } div#sourcerefs ol { - list-style-type:decimal; + list-style-type: decimal; } div#sourcerefs ol li ol { - list-style-type:lower-alpha; + list-style-type: lower-alpha; +} +div#sourcerefs ol li a { + text-decoration: none; } /* Subsections : Summary Area diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 9b216fd4b..a9bcc7469 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -728,15 +728,26 @@ class BasePage(object): # return table to its callers return table - def source_link(self, handle, name, gid = None, up = False): + def source_link(self, handle, name, cindex = None, gid = None, up = False): """ - creates a link to the source + creates a link to the source object + + @param: handle - source handle + @param: cindex - count index + @param: name - source title + @param: gid - source gramps_id + @param: up - rather to add back directories or not? """ url = self.report.build_url_fname_html(handle, "src", up) # begin hyperlink - hyper = Html("a", html_escape(name), href = url, title = html_escape(name)) + hyper = Html("a", html_escape(name), href = url, + title = _("Source Reference: ") + html_escape(name), inline = True) + + # if not None, add name reference to hyperlink element + if cindex: + hyper.attr += ' name = "sref%d"' % cindex # add GRAMPS ID if not self.noid and gid: @@ -1636,13 +1647,7 @@ class BasePage(object): # Add this source and its references to the page source = db.get_source_from_handle(shandle) title = source.get_title() - list = Html("li") + ( - Html("a", - self.source_link(source.handle, title, source.gramps_id, - up=True), - name="sref%d" % cindex, - inline=True) - ) + list = Html("li", self.source_link(shandle, title, cindex, source.gramps_id, True)) ordered1 = Html("ol") citation_ref_list = citation.get_ref_list() @@ -1668,13 +1673,9 @@ class BasePage(object): )) for handle in sref.get_note_list()) if tmp: - list1 = Html("li", inline = True) + ( - Html("a", "
".join(tmp), - style="text-decoration: none;", - name="sref%d%s" % (cindex, key)) - ) - + list1 = Html("li", " ".join(tmp), inline = True) ordered1 += list1 + if citation_ref_list: list += ordered1 ordered += list @@ -3345,14 +3346,13 @@ class SourceListPage(BasePage): for index, key in enumerate(keys): (source, handle) = source_dict[key] - trow = ( Html("tr") + + trow = Html("tr") + ( Html("td", index + 1, class_ = "ColumnRowLabel", inline = True) ) tbody += trow trow += Html("td", - self.source_link(handle, source.get_title(), - source.gramps_id), - class_ = "ColumnName") + self.source_link(handle, source.get_title(), None, + source.gramps_id), class_ = "ColumnName") # add clearline for proper styling # add footer section