Closed mfrasca closed 9 years ago
per esempio, il primo dei precedenti:
<%! from bauble.plugins.report import get_all_plants %>\
PlantCenterIDNumber Family Genus ScientificName CommonName
% for p in get_all_plants(values):
${p} ${p.accession.species.genus.family} ${p.accession.species.genus} ${p.accession.species} ${p.accession.species.default_vernacular_name}
% endfor
<%! from bauble.plugins.report import get_all_species %>\
Genus \
Specific epithet \
Infrasp1 rank \
Infrasp1 epithet \
Infrasp2 rank \
Infrasp2 epithet \
Infrasp3 rank \
Infrasp3 epithet \
Infrasp4 rank \
Infrasp4 epithet
% for species in get_all_species(values):
${species.genus} \
${species.sp} \
${species.infrasp1_rank or ''} \
${species.infrasp1 or ''} \
${species.infrasp2_rank or ''} \
${species.infrasp2 or ''} \
${species.infrasp3_rank or ''} \
${species.infrasp3 or ''} \
${species.infrasp4_rank or ''} \
${species.infrasp4 or ''}
% endfor
<%
from bauble.plugins.report import get_all_plants
def glue(r, e):
if not r:
return ''
else:
return "%s %s" % (r, e)
%>\
Species Infrasp1 Infrasp2 Infrasp3 Infrasp4 Common Name Date Accessioned (planted) Accession Number Location Family
% for p in get_all_plants(values):
<% sp = p.accession.species %>\
${glue(sp.genus, sp.sp)} ${glue(sp.infrasp1_rank, sp.infrasp1)} ${glue(sp.infrasp2_rank, sp.infrasp2)} ${glue(sp.infrasp3_rank, sp.infrasp3)} ${glue(sp.infrasp4_rank, sp.infrasp4)} ${sp.default_vernacular_name or ''} ${p.accession.date_accd or ''} ${str(p)} Pearson ${p.location} ${sp.genus.family}
% endfor
<% from bauble.plugins.report import get_all_plants $>\
Accession Number Species Common Name Location Date Number Living Source Distribution
% for p in get_all_plants(values):
${str(p)} \
${p.accession.species_str()} \
${str(p.accession.species.default_vernacular_name or ''} \
${str(p.location)} \
${str(p.accession.date_accd or '')} \
${str(p.quantity)} \
${p.accession.source and p.accession.source.source_detail or ' '} \
${p.accession.species.label_distribution or ' '}
% endfor
should correct the originals, our user based their work on.
Nick Baker from the Lovett Pinetum sent us a couple of report generation scripts, which might help us do more/better to satisfy user needs. the scripts are based on our own stuff, which does not look much different, so I'm somehow reviewing our own templates...