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
This commit is contained in:
Rob G. Healey 2010-07-05 09:11:24 +00:00
parent 76d7588339
commit 0e06a98523
2 changed files with 25 additions and 22 deletions

View File

@ -1176,10 +1176,13 @@ div#sourcerefs {
background-color: #BCEAF6; background-color: #BCEAF6;
} }
div#sourcerefs ol { div#sourcerefs ol {
list-style-type:decimal; list-style-type: decimal;
} }
div#sourcerefs ol li ol { 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 /* Subsections : Summary Area

View File

@ -728,15 +728,26 @@ class BasePage(object):
# return table to its callers # return table to its callers
return table 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) url = self.report.build_url_fname_html(handle, "src", up)
# begin hyperlink # 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 # add GRAMPS ID
if not self.noid and gid: if not self.noid and gid:
@ -1636,13 +1647,7 @@ class BasePage(object):
# Add this source and its references to the page # Add this source and its references to the page
source = db.get_source_from_handle(shandle) source = db.get_source_from_handle(shandle)
title = source.get_title() title = source.get_title()
list = Html("li") + ( list = Html("li", self.source_link(shandle, title, cindex, source.gramps_id, True))
Html("a",
self.source_link(source.handle, title, source.gramps_id,
up=True),
name="sref%d" % cindex,
inline=True)
)
ordered1 = Html("ol") ordered1 = Html("ol")
citation_ref_list = citation.get_ref_list() citation_ref_list = citation.get_ref_list()
@ -1668,13 +1673,9 @@ class BasePage(object):
)) for handle in sref.get_note_list()) )) for handle in sref.get_note_list())
if tmp: if tmp:
list1 = Html("li", inline = True) + ( list1 = Html("li", " ".join(tmp), inline = True)
Html("a", "<br/> ".join(tmp),
style="text-decoration: none;",
name="sref%d%s" % (cindex, key))
)
ordered1 += list1 ordered1 += list1
if citation_ref_list: if citation_ref_list:
list += ordered1 list += ordered1
ordered += list ordered += list
@ -3345,14 +3346,13 @@ class SourceListPage(BasePage):
for index, key in enumerate(keys): for index, key in enumerate(keys):
(source, handle) = source_dict[key] (source, handle) = source_dict[key]
trow = ( Html("tr") + trow = Html("tr") + (
Html("td", index + 1, class_ = "ColumnRowLabel", inline = True) Html("td", index + 1, class_ = "ColumnRowLabel", inline = True)
) )
tbody += trow tbody += trow
trow += Html("td", trow += Html("td",
self.source_link(handle, source.get_title(), self.source_link(handle, source.get_title(), None,
source.gramps_id), source.gramps_id), class_ = "ColumnName")
class_ = "ColumnName")
# add clearline for proper styling # add clearline for proper styling
# add footer section # add footer section