GEP18: no longer show default cite fields on source level. Flag could be reactivated in the future
svn: r22621
This commit is contained in:
parent
38d7ee72f2
commit
85cc487ee9
@ -202,6 +202,7 @@ class TemplateFields(object):
|
|||||||
Method that constructs the actual fields where user can enter data.
|
Method that constructs the actual fields where user can enter data.
|
||||||
Template must be the index of the template.
|
Template must be the index of the template.
|
||||||
"""
|
"""
|
||||||
|
show_default_cite_fields = False #we don't do this for now
|
||||||
#obtain the template of the key
|
#obtain the template of the key
|
||||||
if SrcTemplate.template_defined(key):
|
if SrcTemplate.template_defined(key):
|
||||||
#a predefined template,
|
#a predefined template,
|
||||||
@ -260,7 +261,7 @@ class TemplateFields(object):
|
|||||||
# now add citation values (optional on source level)
|
# now add citation values (optional on source level)
|
||||||
fieldsF = [fielddef for fielddef in template[REF_TYPE_F]
|
fieldsF = [fielddef for fielddef in template[REF_TYPE_F]
|
||||||
if fielddef[1] not in fieldsL]
|
if fielddef[1] not in fieldsL]
|
||||||
if fieldsF and self.cite is None:
|
if fieldsF and show_default_cite_fields and self.cite is None:
|
||||||
self.gridfields.insert_row(row)
|
self.gridfields.insert_row(row)
|
||||||
lbl = Gtk.Label('')
|
lbl = Gtk.Label('')
|
||||||
lbl.set_markup(_("<b>Optional Default Citation Fields:</b>"))
|
lbl.set_markup(_("<b>Optional Default Citation Fields:</b>"))
|
||||||
@ -268,6 +269,7 @@ class TemplateFields(object):
|
|||||||
self.gridfields.attach(lbl, 0, row-1, 2, 1)
|
self.gridfields.attach(lbl, 0, row-1, 2, 1)
|
||||||
self.lbls.append(lbl)
|
self.lbls.append(lbl)
|
||||||
row += 1
|
row += 1
|
||||||
|
if show_default_cite_fields or (not self.cite is None):
|
||||||
for fielddef in fieldsF:
|
for fielddef in fieldsF:
|
||||||
self._add_entry(row, fielddef[1], fielddef[2],
|
self._add_entry(row, fielddef[1], fielddef[2],
|
||||||
fielddef[9] or SrcAttributeType.get_default_hint(fielddef[1]),
|
fielddef[9] or SrcAttributeType.get_default_hint(fielddef[1]),
|
||||||
@ -285,6 +287,7 @@ class TemplateFields(object):
|
|||||||
self.gridfields.attach(lbl, 0, row-1, 2, 1)
|
self.gridfields.attach(lbl, 0, row-1, 2, 1)
|
||||||
self.lbls.append(lbl)
|
self.lbls.append(lbl)
|
||||||
row += 1
|
row += 1
|
||||||
|
if show_default_cite_fields or (not self.cite is None):
|
||||||
for fielddef in fieldsS:
|
for fielddef in fieldsS:
|
||||||
lblval = fielddef[2]
|
lblval = fielddef[2]
|
||||||
if lblval:
|
if lblval:
|
||||||
|
Loading…
Reference in New Issue
Block a user