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,11 +269,12 @@ 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
|
||||||
for fielddef in fieldsF:
|
if show_default_cite_fields or (not self.cite is None):
|
||||||
self._add_entry(row, fielddef[1], fielddef[2],
|
for fielddef in fieldsF:
|
||||||
fielddef[9] or SrcAttributeType.get_default_hint(fielddef[1]),
|
self._add_entry(row, fielddef[1], fielddef[2],
|
||||||
fielddef[10] or SrcAttributeType.get_default_tooltip(fielddef[1]))
|
fielddef[9] or SrcAttributeType.get_default_hint(fielddef[1]),
|
||||||
row += 1
|
fielddef[10] or SrcAttributeType.get_default_tooltip(fielddef[1]))
|
||||||
|
row += 1
|
||||||
fieldsS = [fielddef for fielddef in template[REF_TYPE_S]
|
fieldsS = [fielddef for fielddef in template[REF_TYPE_S]
|
||||||
if fielddef[1] not in fieldsL and fielddef[7]==EMPTY]
|
if fielddef[1] not in fieldsL and fielddef[7]==EMPTY]
|
||||||
if not self.cite is None:
|
if not self.cite is None:
|
||||||
@ -285,13 +287,14 @@ 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
|
||||||
for fielddef in fieldsS:
|
if show_default_cite_fields or (not self.cite is None):
|
||||||
lblval = fielddef[2]
|
for fielddef in fieldsS:
|
||||||
if lblval:
|
lblval = fielddef[2]
|
||||||
lblval = _('%(normal_version_label)s (Short)') % {
|
if lblval:
|
||||||
'normal_version_label': lblval}
|
lblval = _('%(normal_version_label)s (Short)') % {
|
||||||
self._add_entry(row, tempsattrt.short_version(fielddef[1]), lblval)
|
'normal_version_label': lblval}
|
||||||
row += 1
|
self._add_entry(row, tempsattrt.short_version(fielddef[1]), lblval)
|
||||||
|
row += 1
|
||||||
|
|
||||||
self.gridfields.show_all()
|
self.gridfields.show_all()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user