0001750: Some problems with web pages

svn: r10012
This commit is contained in:
Brian Matherly 2008-02-10 21:17:43 +00:00
parent 04eb7fb913
commit 1f783f6545
3 changed files with 33 additions and 29 deletions

View File

@ -1,20 +1,25 @@
2008-02-10 Brian Matherly <brian@gramps-project.org>
* src/plugins/NarrativeWeb.py:
* src/PluginUtils/_GuiOptions.py:
0001750: Some problems with web pages
2008-02-08 Raphael Ackermann <raphael.ackermann@gmail.com> 2008-02-08 Raphael Ackermann <raphael.ackermann@gmail.com>
* src/Editors/_EditPrimary.py: 0001347: double gid. fix previous commit * src/Editors/_EditPrimary.py: 0001347: double gid. fix previous commit
2008-02-09 Brian Matherly <brian@gramps-project.org> 2008-02-09 Brian Matherly <brian@gramps-project.org>
* src/ReportBase/_WebReportDialog.py: * src/ReportBase/_WebReportDialog.py:
* src/ReportBase/_ReportDialog.py: * src/ReportBase/_ReportDialog.py:
* src/ReportBase/Makefile.am * src/ReportBase/Makefile.am
* src/ReportBase/_BareReportDialog.py: * src/ReportBase/_BareReportDialog.py:
* src/ReportBase/_ReportOptions.py: * src/ReportBase/_ReportOptions.py:
* src/plugins/WebCal.py: * src/plugins/WebCal.py:
* src/plugins/BookReport.py: * src/plugins/BookReport.py:
* src/plugins/NarrativeWeb.py: * src/plugins/NarrativeWeb.py:
* src/PluginUtils/__init__.py: * src/PluginUtils/__init__.py:
* src/PluginUtils/_MenuOptions.py: * src/PluginUtils/_MenuOptions.py:
* src/PluginUtils/_GuiOptions.py: * src/PluginUtils/_GuiOptions.py:
* src/BaseDoc.py: * src/BaseDoc.py:
Web Calendar and Narrative Web report now use Menu Options. Web Calendar and Narrative Web report now use Menu Options.
2008-02-08 Raphael Ackermann <raphael.ackermann@gmail.com> 2008-02-08 Raphael Ackermann <raphael.ackermann@gmail.com>
* src/Editors/_EditEvent.py: * src/Editors/_EditEvent.py:

View File

@ -1106,7 +1106,6 @@ class GuiDestinationOption(gtk.HBox):
status = fcd.run() status = fcd.run()
if status == gtk.RESPONSE_OK: if status == gtk.RESPONSE_OK:
path = unicode(fcd.get_filename(), sys.getfilesystemencoding()) path = unicode(fcd.get_filename(), sys.getfilesystemencoding())
print path
if path: if path:
if not self.__option.get_directory_entry() and \ if not self.__option.get_directory_entry() and \
not path.endswith(self.__option.get_extension()): not path.endswith(self.__option.get_extension()):

View File

@ -410,9 +410,9 @@ class BasePage:
def show_link(self,of,lpath,title,path): def show_link(self,of,lpath,title,path):
if path: if path:
of.write('<a href="%s/%s.%s">%s</a>\n' % (path,lpath,self.ext,title)) of.write('<a href="%s/%s%s">%s</a>\n' % (path,lpath,self.ext,title))
else: else:
of.write('<a href="%s.%s">%s</a>\n' % (lpath,self.ext,title)) of.write('<a href="%s%s">%s</a>\n' % (lpath,self.ext,title))
def display_first_image_as_thumbnail( self, of, db, photolist=None): def display_first_image_as_thumbnail( self, of, db, photolist=None):
@ -619,9 +619,9 @@ class BasePage:
def build_name(self,path,base): def build_name(self,path,base):
if path: if path:
return path + "/" + base + "." + self.ext return path + "/" + base + self.ext
else: else:
return base + "." + self.ext return base + self.ext
def person_link(self,of,path,name,gid="",up=True): def person_link(self,of,path,name,gid="",up=True):
if up: if up:
@ -636,20 +636,20 @@ class BasePage:
handle = self.lnkfmt(name) handle = self.lnkfmt(name)
dirpath = self.build_path(handle,'srn',up) dirpath = self.build_path(handle,'srn',up)
of.write('<a href="%s/%s.%s">%s' % (dirpath,handle,self.ext,name)) of.write('<a href="%s/%s%s">%s' % (dirpath,handle,self.ext,name))
if opt_val != None: if opt_val != None:
of.write('&nbsp;(%d)' % opt_val) of.write('&nbsp;(%d)' % opt_val)
of.write('</a>') of.write('</a>')
def media_ref_link(self,of,handle,name,up=False): def media_ref_link(self,of,handle,name,up=False):
dirpath = self.build_path(handle,'img',up) dirpath = self.build_path(handle,'img',up)
of.write('<a href="%s/%s.%s">%s</a>' % ( of.write('<a href="%s/%s%s">%s</a>' % (
dirpath,handle,self.ext,name)) dirpath,handle,self.ext,name))
def media_link(self,of,handle,path,name,up,usedescr=True): def media_link(self,of,handle,path,name,up,usedescr=True):
dirpath = self.build_path(handle,'img',up) dirpath = self.build_path(handle,'img',up)
of.write('<div class="thumbnail">\n') of.write('<div class="thumbnail">\n')
of.write('<p><a href="%s/%s.%s">' % (dirpath,handle,self.ext)) of.write('<p><a href="%s/%s%s">' % (dirpath,handle,self.ext))
of.write('<img src="../../../%s" ' % path) of.write('<img src="../../../%s" ' % path)
of.write('alt="%s" /></a></p>\n' % name) of.write('alt="%s" /></a></p>\n' % name)
if usedescr: if usedescr:
@ -660,7 +660,7 @@ class BasePage:
path = os.path.join('images','document.png') path = os.path.join('images','document.png')
dirpath = self.build_path(handle,'img',up) dirpath = self.build_path(handle,'img',up)
of.write('<div class="thumbnail">\n') of.write('<div class="thumbnail">\n')
of.write('<p><a href="%s/%s.%s">' % (dirpath,handle,self.ext)) of.write('<p><a href="%s/%s%s">' % (dirpath,handle,self.ext))
of.write('<img src="../../../%s" ' % path) of.write('<img src="../../../%s" ' % path)
of.write('alt="%s" /></a>' % name) of.write('alt="%s" /></a>' % name)
of.write('</p>\n') of.write('</p>\n')
@ -670,7 +670,7 @@ class BasePage:
def source_link(self,of,handle,name,gid="",up=False): def source_link(self,of,handle,name,gid="",up=False):
dirpath = self.build_path(handle,'src',up) dirpath = self.build_path(handle,'src',up)
of.write('<a href="%s/%s.%s">%s' % ( of.write('<a href="%s/%s%s">%s' % (
dirpath,handle,self.ext,name)) dirpath,handle,self.ext,name))
if not self.noid and gid != "": if not self.noid and gid != "":
of.write('&nbsp;<span class="grampsid">[%s]</span>' % gid) of.write('&nbsp;<span class="grampsid">[%s]</span>' % gid)
@ -678,7 +678,7 @@ class BasePage:
def place_link(self,of,handle,name,gid="",up=False): def place_link(self,of,handle,name,gid="",up=False):
dirpath = self.build_path(handle,'plc',up) dirpath = self.build_path(handle,'plc',up)
of.write('<a href="%s/%s.%s">%s' % ( of.write('<a href="%s/%s%s">%s' % (
dirpath,handle,self.ext,name)) dirpath,handle,self.ext,name))
if not self.noid and gid != "": if not self.noid and gid != "":
of.write('&nbsp;<span class="grampsid">[%s]</span>' % gid) of.write('&nbsp;<span class="grampsid">[%s]</span>' % gid)
@ -686,7 +686,7 @@ class BasePage:
def place_link_str(self,handle,name,gid="",up=False): def place_link_str(self,handle,name,gid="",up=False):
dirpath = self.build_path(handle,'plc',up) dirpath = self.build_path(handle,'plc',up)
retval = '<a href="%s/%s.%s">%s' % ( retval = '<a href="%s/%s%s">%s' % (
dirpath,handle,self.ext,name) dirpath,handle,self.ext,name)
if not self.noid and gid != "": if not self.noid and gid != "":
retval = retval + '&nbsp;<span class="grampsid">[%s]</span>' % gid retval = retval + '&nbsp;<span class="grampsid">[%s]</span>' % gid
@ -1306,13 +1306,13 @@ class SurnameListPage(BasePage):
of.write('<th>%s</th>\n' % _('Letter')) of.write('<th>%s</th>\n' % _('Letter'))
if not self.use_home and not self.use_intro: if not self.use_home and not self.use_intro:
of.write('<th><a href="%s.%s">%s</a></th>\n' % ("index", self.ext, of.write('<th><a href="%s%s">%s</a></th>\n' % ("index", self.ext,
_('Surname'))) _('Surname')))
else: else:
of.write('<th><a href="%s.%s">%s</a></th>\n' % ("surnames", of.write('<th><a href="%s%s">%s</a></th>\n' % ("surnames",
self.ext, _('Surname'))) self.ext, _('Surname')))
of.write('<th><a href="%s.%s">%s</a></th>\n' % ("surnames_count", self.ext, _('Number of people'))) of.write('<th><a href="%s%s">%s</a></th>\n' % ("surnames_count", self.ext, _('Number of people')))
of.write('</tr></thead>\n<tbody>\n') of.write('</tr></thead>\n<tbody>\n')
person_handle_list = sort_people(db,person_handle_list) person_handle_list = sort_people(db,person_handle_list)
@ -2719,7 +2719,7 @@ class NavWebOptions(MenuReportOptions):
self.__update_filters() self.__update_filters()
title = StringOption(_("Web site title"), _('My Family Tree')) title = StringOption(_("Web site title"), _('My Family Tree'))
title.set_help(_("The of the web site")) title.set_help(_("The title of the web site"))
menu.add_option(category_name, "title", title) menu.add_option(category_name, "title", title)
ext = EnumeratedListOption(_("File extension"), ".html" ) ext = EnumeratedListOption(_("File extension"), ".html" )