No such name order = %s
") % order + retval += "No such name order = %s
" % order if has_data: - retval += cuni(""" \n""") % cssid + retval += """ \n""" % cssid return retval def citation_table(obj, user, act, url=None, *args): # FIXME: how can citation_table and source_table both be on same # page? This causes problems with form names, tab names, etc. - retval = cuni("") + retval = "" has_data = False cssid = "tab-sources" table = Table("citation_table") @@ -549,8 +548,8 @@ def citation_table(obj, user, act, url=None, *args): citation_ref.citation.handle) table.row(Link("{{[[x%d]][[^%d]][[v%d]]}}" % (count, count, count)) if user.is_superuser and url and act == "view" else "", citation.gramps_id, - cuni(citation.confidence), - cuni(citation.page), + str(citation.confidence), + str(citation.page), ) links.append(('URL', citation_ref.get_url())) has_data = True @@ -570,16 +569,16 @@ def citation_table(obj, user, act, url=None, *args): count = 1 for citation_ref in citation_refs: item = obj.__class__.__name__.lower() - retval = retval.replace("[[x%d]]" % count, make_button("x", cuni("/%s/%s/remove/citationref/%d") % (item, obj.handle, count))) - retval = retval.replace("[[^%d]]" % count, make_button("^", cuni("/%s/%s/up/citationref/%d") % (item, obj.handle, count))) - retval = retval.replace("[[v%d]]" % count, make_button("v", cuni("/%s/%s/down/citationref/%d") % (item, obj.handle, count))) + retval = retval.replace("[[x%d]]" % count, make_button("x", "/%s/%s/remove/citationref/%d" % (item, obj.handle, count))) + retval = retval.replace("[[^%d]]" % count, make_button("^", "/%s/%s/up/citationref/%d" % (item, obj.handle, count))) + retval = retval.replace("[[v%d]]" % count, make_button("v", "/%s/%s/down/citationref/%d" % (item, obj.handle, count))) count += 1 if has_data: - retval += cuni(""" \n""") % cssid + retval += """ \n""" % cssid return retval def repository_table(obj, user, act, url=None, *args): - retval = cuni("") + retval = "" has_data = False cssid = "tab-repositories" table = Table("repository_table") @@ -610,7 +609,7 @@ def repository_table(obj, user, act, url=None, *args): repository.gramps_id, repository.name, repo_ref.call_number, - cuni(repository.repository_type), + str(repository.repository_type), ) has_data = True count += 1 @@ -620,17 +619,17 @@ def repository_table(obj, user, act, url=None, *args): count = 1 for repo_ref in refs: item = obj.__class__.__name__.lower() - text = text.replace("[[x%d]]" % count, make_button("x", cuni("/%s/%s/remove/repositoryref/%d") % (item, obj.handle, count))) - text = text.replace("[[^%d]]" % count, make_button("^", cuni("/%s/%s/up/repositoryref/%d") % (item, obj.handle, count))) - text = text.replace("[[v%d]]" % count, make_button("v", cuni("/%s/%s/down/repositoryref/%d") % (item, obj.handle, count))) + text = text.replace("[[x%d]]" % count, make_button("x", "/%s/%s/remove/repositoryref/%d" % (item, obj.handle, count))) + text = text.replace("[[^%d]]" % count, make_button("^", "/%s/%s/up/repositoryref/%d" % (item, obj.handle, count))) + text = text.replace("[[v%d]]" % count, make_button("v", "/%s/%s/down/repositoryref/%d" % (item, obj.handle, count))) count += 1 retval += text if has_data: - retval += cuni(""" \n""") % cssid + retval += """ \n""" % cssid return retval def note_table(obj, user, act, url=None, *args): - retval = cuni("") + retval = "" has_data = False cssid = "tab-notes" table = Table("note_table") @@ -650,7 +649,7 @@ def note_table(obj, user, act, url=None, *args): note = note_ref.ref_object table.row(Link("{{[[x%d]][[^%d]][[v%d]]}}" % (count, count, count)) if user.is_superuser else "", note.gramps_id, - cuni(note.note_type), + str(note.note_type), note.text[:50] ) links.append(('URL', note_ref.get_url())) @@ -671,17 +670,17 @@ def note_table(obj, user, act, url=None, *args): count = 1 for note_ref in note_refs: item = obj.__class__.__name__.lower() - text = text.replace("[[x%d]]" % count, make_button("x", cuni("/%s/%s/remove/noteref/%d") % (item, obj.handle, count))) - text = text.replace("[[^%d]]" % count, make_button("^", cuni("/%s/%s/up/noteref/%d") % (item, obj.handle, count))) - text = text.replace("[[v%d]]" % count, make_button("v", cuni("/%s/%s/down/noteref/%d") % (item, obj.handle, count))) + text = text.replace("[[x%d]]" % count, make_button("x", "/%s/%s/remove/noteref/%d" % (item, obj.handle, count))) + text = text.replace("[[^%d]]" % count, make_button("^", "/%s/%s/up/noteref/%d" % (item, obj.handle, count))) + text = text.replace("[[v%d]]" % count, make_button("v", "/%s/%s/down/noteref/%d" % (item, obj.handle, count))) count += 1 retval += text if has_data: - retval += cuni(""" \n""") % cssid + retval += """ \n""" % cssid return retval def data_table(obj, user, act, url=None, *args): - retval = cuni("") + retval = "" has_data = False cssid = "tab-data" table = Table("data_table") @@ -722,9 +721,9 @@ def data_table(obj, user, act, url=None, *args): text = text.replace("}}", """""") count = 1 for repo_ref in refs: - text = text.replace("[[x%d]]" % count, make_button("x", cuni("/%s/%s/remove/attribute/%d") % (item_class, obj.handle, count))) - text = text.replace("[[^%d]]" % count, make_button("^", cuni("/%s/%s/up/attribute/%d") % (item_class, obj.handle, count))) - text = text.replace("[[v%d]]" % count, make_button("v", cuni("/%s/%s/down/attribute/%d") % (item_class, obj.handle, count))) + text = text.replace("[[x%d]]" % count, make_button("x", "/%s/%s/remove/attribute/%d" % (item_class, obj.handle, count))) + text = text.replace("[[^%d]]" % count, make_button("^", "/%s/%s/up/attribute/%d" % (item_class, obj.handle, count))) + text = text.replace("[[v%d]]" % count, make_button("v", "/%s/%s/down/attribute/%d" % (item_class, obj.handle, count))) count += 1 retval += text if has_data: @@ -732,7 +731,7 @@ def data_table(obj, user, act, url=None, *args): return retval def attribute_table(obj, user, act, url=None, *args): - retval = cuni("") + retval = "" has_data = False cssid = "tab-attributes" table = Table("attribute_table") @@ -759,7 +758,7 @@ def attribute_table(obj, user, act, url=None, *args): return retval def address_table(obj, user, act, url=None, *args): - retval = cuni("") + retval = "" has_data = False cssid = "tab-addresses" table = Table("address_table") @@ -790,7 +789,7 @@ def address_table(obj, user, act, url=None, *args): return retval def media_table(obj, user, act, url=None, *args): - retval = cuni("") + retval = "" has_data = False cssid = "tab-media" table = Table("media_table") @@ -806,7 +805,7 @@ def media_table(obj, user, act, url=None, *args): media = table.db.get_object_from_handle( media_ref.ref_object.handle) table.row(table.db.get_object_from_handle(media.handle), - cuni(media_ref.ref_object.desc), + str(media_ref.ref_object.desc), media_ref.ref_object.path) has_data = True retval += """