Use yesno instead of default to format inventory mutagen/carcinogen/teratogen.
[chemdb.git] / chemdb / templates / chemdb / doc / inventory.tex
1 {% extends "chemdb/doc/base.tex" %}
2 {% load latex %}
3
4 {% block comment %}
5 % Chemical inventory as per 
6 %   http://www.drexelsafetyandhealth.com/lab-chem.htm#chpe7
7 {% endblock %}
8
9 {% block preamble %}
10 % N of M style page numbering
11 \usepackage{fancyhdr}
12 \pagestyle{fancy}
13 \usepackage{lastpage}
14 \cfoot{\thepage\ of \pageref{LastPage}}
15 % Turn off the silly head and foot rules
16 \renewcommand{\headrule}{\relax}
17 \renewcommand{\footrule}{\relax}
18
19 % Break the table across several pages
20 % requires 2 latex runs.
21 \usepackage{longtable}
22 {% endblock %}
23
24 {% block document %}
25
26 \begin{center}
27 {\headfont {{ title }} }\\
28 \contfont
29 Generated \today\ by ChemDB.\\
30 \vskip 10pt
31 \end{center}
32
33 {% if chemical_instances %}
34 \footnotesize
35 \begin{longtable}{l l c c c c c c c c}
36 % Header for the remaining page(s) of the table...
37 ID & Name & Amount & H & F & R & O & M & C & T \\
38 \hline
39 \endhead{% for chemical_instance in chemical_instances %}
40 {{ chemical_instance.id }} &
41   {{ chemical_instance.chemical.abbrev|latex_safe|safe }} &
42   {{ chemical_instance.amount }} &
43   {{ chemical_instance.chemical.health }} &
44   {{ chemical_instance.chemical.fire }} &
45   {{ chemical_instance.chemical.reactivity }} &
46   {{ chemical_instance.chemical.special.all|latex_specials }} &
47   {{ chemical_instance.chemical.mutagen|yesno:"M," }} &
48   {{ chemical_instance.chemical.carcinogen|yesno:"C," }} &
49   {{ chemical_instance.chemical.teratogen|yesno:"T," }} \\
50 {% endfor %}\end{longtable}
51 {% else %}
52 No chemicals are available.
53 {% endif %}
54
55 {% endblock %}