 <head>
 {% load static %}
 <script type="text/javascript" id="MathJax-script" async
         src="{% static 'MaRDMO/js/mathjax/es5/tex-mml-chtml.js' %}">
 </script>
 <style>
         table {
           margin-left: 0;
           margin-right: auto;
           margin-bottom: 24px;
           border-spacing: 0;
           border-bottom: 2px solid black;
           border-top: 2px solid black;
         }
         table th {
           padding: 3px 10px;
           background-color: white;
           border-top: none;
           border-left: 1px solid black;
           border-right: 1px solid black;
           border-bottom: 1px solid black;
           text-align: center;
         }
         table td {
           padding: 3px 10px;
           border-top: 1px solid black;
           border-left: 1px solid black;
           border-bottom: 1px solid black;
           border-right: 1px solid black;
           text-align: center;
         }
</style>
</head>

<body>

<h1 id="title"> {{ title }} </h1>

<h2 id="problem-statement">Problem Statement</h2>

<p> {{ answers.general.problem }}</p>    

<h3 id="object-of-research-and-objective">Object of Research and Objective</h3>

<p> {{ answers.general.objective }} </p>    

<h3 id="procedure">Procedure</h3>

<p> {{ answers.general.procedure }} </p>    

<h3 id="involved-disciplines">Involved Disciplines</h3>    

    <p><b>Mathematical Subjects:</b></p>

        {% for values in answers.mathsubject.values %} 
            {{ forloop.counter }} - {{ values.Name }} [{{ values.ID }}] <br>
        {% endfor %}
    
    <br>        
    
    <p><b>Non-Mathematical Disciplines:</b></p>

        {% for values in answers.nonmathdiscipline.values %}
            {% if 'mardi' in values.ID %}
                {{ forloop.counter }} - <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
            {% elif 'wikidata' in values.ID %}
                {{ forloop.counter }} - <a href="{{ wikidataURI }}{{ values.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
            {% endif %}
        {% endfor %}

<h3 id="data-streams">Data Streams</h3>        

{% for value in answers.general.streams.values %}
{{ forloop.counter }} - {{ value }} <br>
{% endfor %}    

{% if answers.model.values %}
    <h2 id="model">Model</h2>   
        <table border="1">
            <colgroup>
                <col style="width: 30%" />
                <col style="width: 40%" />
                <col style="width: 15%" />
                <col style="width: 15%" />
            </colgroup>
            <thead>
                <tr class="header">
                    <th style="text-align: center; vertical-align: middle;">Name</th>
                    <th style="text-align: center; vertical-align: middle;">Description</th>
                    <th style="text-align: center; vertical-align: middle;">Time</th>
                    <th style="text-align: center; vertical-align: middle;">Space</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td style="text-align: center; vertical-align: middle;">
                        <a href="{{ mardiURI }}{{ model.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ answers.model.Name }}</a>
                    </td>
                    <td style="text-align: center; vertical-align: middle;">{{ answers.model.Description }}</td>
                    <td style="text-align: center; vertical-align: middle;">{{ answers.model.Time }}</td>
                    <td style="text-align: center; vertical-align: middle;">{{ answers.model.Space }}</td>
                </tr>
            </tbody>
        </table>
{% endif %}

{% if answers.variables.values %}
    <h3 id="variables">Variables</h3>

        <table border="1">
            <colgroup>
                <col style="width: 20%" />
                <col style="width: 10%" />
                <col style="width: 10%" />
                <col style="width: 30%" />
                <col style="width: 30%" />
            </colgroup>
            <thead>
                <tr class="header">
                    <th style="text-align: center; vertical-align: middle;">Name</th>
                    <th style="text-align: center; vertical-align: middle;">Unit</th>
                    <th style="text-align: center; vertical-align: middle;">Symbol</th>
                    <th style="text-align: center; vertical-align: middle;">Task</th>
                    <th style="text-align: center; vertical-align: middle;">Dependency Type</th>
                </tr>
            </thead>
            <tbody>
                {% for values in answers.variables.values %}
                    <tr>
                        <td style="text-align: center; vertical-align: middle;">
                            <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                        </td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.Unit }}</td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.Symbol|safe }}</td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.Task }}</td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.Type }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
{% endif %}

{% if answers.parameters.values %}
    <h3 id="parameters">Parameters</h3>

        <table border="1">
            <colgroup>
                <col style="width: 30%" />
                <col style="width: 15%" />
                <col style="width: 15%" />
                <col style="width: 40%" />
            </colgroup>
            <thead>
                <tr class="header">
                    <th style="text-align: center; vertical-align: middle;">Name</th>
                    <th style="text-align: center; vertical-align: middle;">Unit</th>
                    <th style="text-align: center; vertical-align: middle;">Symbol</th>
                    <th style="text-align: center; vertical-align: middle;">Task</th>
                </tr>
            </thead>
            <tbody>
                {% for values in answers.parameters.values %}
                    <tr>
                        <td style="text-align: center; vertical-align: middle;">
                            <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                        </td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.Unit }}</td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.Symbol|safe }}</td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.Task }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
{% endif %}

    <h2 id="process-information">Process Information</h2>

        <h3 id="process-steps">Process Steps</h3>
        {% if answers.processstep.values %}

                <table border="1">
                    <colgroup>
                        <col style="width: 12%" />
                        <col style="width: 12%" />
                        <col style="width: 12%" />
                        <col style="width: 12%" />
                        <col style="width: 12%" />
                        <col style="width: 12%" />
                        <col style="width: 12%" />
                        <col style="width: 12%" />
                    </colgroup>
                    <thead>
                        <tr class="header">
                            <th style="text-align: center; vertical-align: middle;">Name</th>
                            <th style="text-align: center; vertical-align: middle;">Description</th>
                            <th style="text-align: center; vertical-align: middle;">Input</th>
                            <th style="text-align: center; vertical-align: middle;">Output</th>
                            <th style="text-align: center; vertical-align: middle;">Method</th>
                            <th style="text-align: center; vertical-align: middle;">Parameter</th>
                            <th style="text-align: center; vertical-align: middle;">Environment</th>
                            <th style="text-align: center; vertical-align: middle;">Discipline</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for values in answers.processstep.values %}
                            <tr>
                                <td style="text-align: center; vertical-align: middle;">
                                    {% if 'mardi' in values.ID %}
                                        <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                    {% elif 'wikidata' in values.ID %}
                                        <a href="{{ wikidataURI }}{{ values.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                    {% elif values.ID == 'not found' %}
                                        {{ values.Name }}
                                    {% endif %}
                                <td style="text-align: center; vertical-align: middle;">{{ values.Description }}</td>
                                <td style="text-align: center; vertical-align: middle;">
                                    {% for input in values.input.values %}
                                        {% if 'mardi' in input.ID %}
                                            <a href="{{ mardiURI }}{{ input.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ input.Name }}</a>
                                        {% elif 'wikidata' in input.ID %}
                                            <a href="{{ wikidataURI }}{{ input.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ input.Name }}</a>
                                        {% else %}
                                            {{ input.Name }}
                                        {% endif %}
                                        {% if not forloop.last %}, {% endif %}
                                    {% endfor %}
                                </td>   
                                <td style="text-align: center; vertical-align: middle;">
                                    {% for output in values.output.values %}
                                        {% if 'mardi' in output.ID %}
                                            <a href="{{ mardiURI }}{{ output.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ output.Name }}</a>
                                        {% elif 'wikidata' in output.ID %}
                                            <a href="{{ wikidataURI }}{{ output.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ output.Name }}</a>
                                        {% else %}
                                            {{ output.Name }}
                                        {% endif %}
                                        {% if not forloop.last %}, {% endif %}
                                    {% endfor %}
                                </td>
                                <td style="text-align: center; vertical-align: middle;">
                                    {% for method in values.method.values %}
                                        {% if 'mathalgodb' in method.ID %}
                                            <a href="{{ mathalgodbURI }}object/al:{{ method.ID|cut:"mathalgodb:"}}"" style="color:dodgerblue;">{{ method.Name }}</a>
                                        {% elif 'mardi' in method.ID %}
                                            <a href="{{ mardiURI }}{{ method.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ method.Name }}</a>
                                        {% elif 'wikidata' in method.ID %}
                                            <a href="{{ wikidataURI }}{{ method.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ method.Name }}</a>
                                        {% else %}
                                            {{ method.Name }}
                                        {% endif %}
                                        {% if not forloop.last %}, {% endif %}
                                    {% endfor %}
                                </td>
                                <td style="text-align: center; vertical-align: middle;">
                                    {% for parameter in values.parameter.values %}
                                        {{ parameter }}
                                        {% if not forloop.last %}, {% endif %}
                                    {% endfor %}
                                </td>
                                <td style="text-align: center; vertical-align: middle;">
                                    {% for environment in values.environmentSoftware.values %}
                                        {% if 'mardi' in environment.ID %}
                                            <a href="{{ mardiURI }}{{ environment.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ environment.Name }}</a>
                                        {% elif 'wikidata' in environment.ID %}
                                            <a href="{{ wikidataURI }}{{ environment.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ environment.Name }}</a>
                                        {% else %}
                                            {{ environment.Name }}
                                        {% endif %}
                                        {% if not forloop.last %}, {% endif %}
                                    {% endfor %}
                                    {% for environment in values.environmentInstrument.values %}
                                        {% if 'mardi' in environment.ID %}
                                            <a href="{{ mardiURI }}{{ environment.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ environment.Name }}</a>
                                        {% elif 'wikidata' in environment.ID %}
                                            <a href="{{ wikidataURI }}{{ environment.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ environment.Name }}</a>
                                        {% else %}
                                            {{ environment.Name }}
                                        {% endif %}
                                        {% if not forloop.last %}, {% endif %}
                                    {% endfor %}
                                </td>
                                <td style="text-align: center; vertical-align: middle;">
                                    {% for discipline in values.discipline.values %}
                                        {% if 'mardi' in discipline.ID %}
                                            <a href="{{ mardiURI }}{{ discipline.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ discipline.Name }}</a>
                                        {% elif 'wikidata' in discipline.ID %}
                                            <a href="{{ wikidataURI }}{{ discipline.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ discipline.Name }}</a>
                                        {% elif 'msc' in discipline.ID %}
                                            {{ discipline.Name }}
                                        {% endif %}
                                        {% if not forloop.last %}, {% endif %}
                                    {% endfor %}
                                </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
        {% endif %}

    <h3 id="methods">Methods</h3>
    {% if answers.method.values %}

            <table border="1">
                <colgroup>
                    <col style="width: 20%" />
                    <col style="width: 20%" />
                    <col style="width: 20%" />
                    <col style="width: 20%" />
                    <col style="width: 20%" />
                </colgroup>
                <thead>
                    <tr class="header">
                        <th style="text-align: center; vertical-align: middle;">Name</th>
                        <th style="text-align: center; vertical-align: middle;">Description</th>
                        <th style="text-align: center; vertical-align: middle;">Process Step</th>
                        <th style="text-align: center; vertical-align: middle;">Parameter</th>
                        <th style="text-align: center; vertical-align: middle;">implemented by</th>
                    </tr>
                </thead>
                <tbody>
                    {% for values in answers.method.values %}
                        <tr>
                            <td style="text-align: center; vertical-align: middle;">
                                {% if 'mathalgodb' in values.ID %}
                                    <a href="{{ mathalgodbURI }}object/al:{{ values.ID|cut:"mathalgodb:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% elif 'mardi' in values.ID %}
                                    <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% elif 'wikidata' in values.ID %}
                                    <a href="{{ wikidataURI }}{{ values.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% else %}
                                    {{ values.Name }}
                                {% endif %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.Description }}</td>
                            <td style="text-align: center; vertical-align: middle;"> 
                                {% for processstep in answers.processstep.values %}
                                    {% for method in processstep.method.values %}
                                        {% if values.ID == method.ID %}
                                            {% if 'mardi' in processstep.ID %}
                                                <a href="{{ mardiURI }}{{ processstep.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ processstep.Name }}</a>
                                            {% elif 'wikidata' in processstep.ID %}
                                                <a href="{{ wikidataURI }}{{ processstep.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ processstep.Name }}</a>
                                            {% elif processstep.ID == 'not found' %}
                                                {{ processstep.Name }}
                                            {% endif %}
                                        {% endif %}
                                    {% endfor %}
                                {% endfor %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% for value in values.Parameter.values %}
                                    {{ value }}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% for software in values.software.values %}
                                    {% if 'mathalgodb' in software.ID %}
                                        <a href="{{ mathalgodbURI }}{{ software.ID|cut:"mathalgodb:"}}"" style="color:dodgerblue;">{{ software.Name }}</a>
                                    {% elif 'mardi' in software.ID %}
                                        <a href="{{ mardiURI }}{{ software.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ software.Name }}</a>
                                    {% elif 'wikidata' in software.ID %}
                                        <a href="{{ wikidataURI }}{{ software.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ software.Name }}</a>
                                    {% else %}
                                        {{ software.Name}}
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
                                {% for instrument in values.instrument.values %}
                                    {% if 'mardi' in instrument.ID %}
                                        <a href="{{ mardiURI }}{{ instrument.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ instrument.Name }}</a>
                                    {% elif 'wikidata' in instrument.ID %}
                                        <a href="{{ wikidataURI }}{{ instrument.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ instrument.Name }}</a>
                                    {% else %}
                                        {{ instrument.Name}}
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
                            </td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>
    {% endif %}

    <h3 id="software">Software</h3>
    {% if answers.software.values %}

            <table border="1">
                <colgroup>
                    <col style="width: 12.5%" />
                    <col style="width: 12.5%" />
                    <col style="width: 12.5%" />
                    <col style="width: 12.5%" />
                    <col style="width: 12.5%" />
                    <col style="width: 12.5%" />
                    <col style="width: 12.5%" />
                    <col style="width: 12.5%" />
                </colgroup>
                <thead>
                    <tr class="header">
                        <th style="text-align: center; vertical-align: middle;">Name</th>
                        <th style="text-align: center; vertical-align: middle;">Description</th>
                        <th style="text-align: center; vertical-align: middle;">Version</th>
                        <th style="text-align: center; vertical-align: middle;">Programming Language</th>
                        <th style="text-align: center; vertical-align: middle;">Dependencies</th>
                        <th style="text-align: center; vertical-align: middle;">versioned</th>
                        <th style="text-align: center; vertical-align: middle;">published</th>
                        <th style="text-align: center; vertical-align: middle;">documented</th>
                    </tr>
                </thead>
                <tbody>
                    {% for values in answers.software.values %}
                        <tr>
                            <td style="text-align: center; vertical-align: middle;">
                                {% if 'mathalgodb' in values.ID %}
                                    <a href="{{ mathalgodbURI }}object/al:{{ values.ID|cut:"mathalgodb:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% elif 'mardi' in values.ID %}
                                    <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% elif 'wikidata' in values.ID %}
                                    <a href="{{ wikidataURI }}{{ values.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% else %}
                                    {{ values.Name }}
                                {% endif %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.Description }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.Version }}</td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% for programminglanguage in values.programminglanguage.values %}
                                    {% if 'mardi' in programminglanguage.ID %}
                                        <a href="{{ mardiURI }}{{ programminglanguage.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ programminglanguage.Name }}</a>
                                    {% elif 'wikidata' in programminglanguage.ID %}
                                        <a href="{{ wikidataURI }}{{ programminglanguage.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ programminglanguage.Name }}</a>
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% for dependency in values.dependency.values %}
                                    {% if 'mardi' in dependency.ID %}
                                        <a href="{{ mardiURI }}{{ dependency.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ dependency.Name }}</a>
                                    {% elif 'wikidata' in dependency.ID %}
                                        <a href="{{ wikidataURI }}{{ dependency.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ dependency.Name }}</a>
                                    {% else %}
                                        {{ values.Name }}
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% if values.Version %}
                                    Yes
                                {% else %}
                                    No
                                {% endif %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% if values.Published.0 == option.YesText %}
                                        <a href=" {{values.Published.1}} ">Yes</a> <br>
                                {% elif values.Published.0 == option.NoText %}
                                        No
                                {% else %}
                                        -
                                {% endif %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% if values.Documented.0 == option.YesText %}
                                        <a href=" {{values.Documented.1}} ">Yes</a> <br>
                                {% elif values.Documented.0 == option.NoText %}
                                        No
                                {% else %}
                                        -
                                {% endif %}
                            </td>
                        </tr>
                    
                    {% endfor %}
                </tbody>
            </table>
    {% endif %}

    <h3 id="hardware">Hardware</h3>
    {% if answers.hardware.values %}  
            <table border="1">
                <colgroup>
                    <col style="width: 16.6%" />
                    <col style="width: 16.6%" />
                    <col style="width: 16.6%" />
                    <col style="width: 16.6%" />
                    <col style="width: 16.6%" />
                    <col style="width: 16.6%" />
                </colgroup>
                <thead>
                    <tr class="header">
                        <th style="text-align: center; vertical-align: middle;">Name</th>
                        <th style="text-align: center; vertical-align: middle;">Description</th>
                        <th style="text-align: center; vertical-align: middle;">CPU</th>
                        <th style="text-align: center; vertical-align: middle;">Compiler</th>
                        <th style="text-align: center; vertical-align: middle;">#Nodes</th>
                        <th style="text-align: center; vertical-align: middle;">#Cores</th>
                        <th style="text-align: center; vertical-align: middle;">Software</th>
                    </tr>
                </thead>
                <tbody>
                    {% for values in answers.hardware.values %}
                        <tr>
		                    <td style="text-align: center; vertical-align: middle;">
                                {% if 'mardi' in values.ID %}
                                    <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% elif 'wikidata' in values.ID %}
                                    <a href="{{ wikidataURI }}{{ values.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% else %}
                                    {{ values.Name }}
                                {% endif %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.Description }}
                            <td style="text-align: center; vertical-align: middle;">
                                {% for cpu in values.cpu.values %}
                                    {% if 'mardi' in cpu.ID %}
                                        <a href="{{ mardiURI }}{{ cpu.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ cpu.Name }}</a>
                                    {% elif 'wikidata' in cpu.ID %}
                                        <a href="{{ wikidataURI }}{{ cpu.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ cpu.Name }}</a>
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% for compiler in values.compiler.values %}
                                    {% if 'mardi' in compiler.ID %}
                                        <a href="{{ mardiURI }}{{ compiler.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ compiler.Name }}</a>
                                    {% elif 'wikidata' in compiler.ID %}
                                        <a href="{{ wikidataURI }}{{ compiler.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ compiler.Name }}</a>
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.Nodes }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.Cores }}</td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% for software in values.software.values %}
                                    {% if 'mardi' in software.ID %}
                                        <a href="{{ mardiURI }}{{ software.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ software.Name }}</a>
                                    {% elif 'wikidata' in software.ID %}
                                        <a href="{{ wikidataURI }}{{ software.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ software.Name }}</a>
                                    {% else %}
                                        {{ software.Name }}
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
			                </td>
                    	</tr>
		            {% endfor %}
                </tbody>
            </table>
    {% endif %}

    <h3 id="instrument">Instrument</h3>
    {% if answers.instrument.values %}
            <table border="1">
                <colgroup>
                        <col style="width: 14.2%" />
                        <col style="width: 14.2%" />
                        <col style="width: 14.2%" />
                        <col style="width: 14.2%" />
                        <col style="width: 14.2%" />
                        <col style="width: 14.2%" />
                        <col style="width: 14.2%" />
                </colgroup>
                <thead>
                       <tr class="header">
                                <th style="text-align: center; vertical-align: middle;">Name</th>
                                <th style="text-align: center; vertical-align: middle;">Description</th>
                                <th style="text-align: center; vertical-align: middle;">Version</th>
                                <th style="text-align: center; vertical-align: middle;">Part Number</th>
                                <th style="text-align: center; vertical-align: middle;">Serial Number</th>
            		            <th style="text-align: center; vertical-align: middle;">Location</th>
                                <th style="text-align: center; vertical-align: middle;">Software</th>
                        </tr>
                </thead>
                <tbody>
                        {% for values in answers.instrument.values %}
			            <tr>
                            <td style="text-align: center; vertical-align: middle;">
                                {% if 'mardi' in values.ID %}
                                    <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% elif 'wikidata' in values.ID %}
                                    <a href="{{ wikidataURI }}{{ values.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                                {% else %}
                                    {{ values.Name }}
                                {% endif %}
                            </td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.Description }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.Version }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.PartNumber }}</td>
                            <td style="text-align: center; vertical-align: middle;">{{ values.SerialNumber }}</td>
            				<td style="text-align: center; vertical-align: middle;">
                                {% for location in values.location.values %}
                                    {% if 'mardi' in location.ID %}
                                        <a href="{{ mardiURI }}{{ location.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ location.Name }}</a>
                                    {% elif 'wikidata' in location.ID %}
                                        <a href="{{ wikidataURI }}{{ location.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ location.Name }}</a>
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
			                </td>
                            <td style="text-align: center; vertical-align: middle;">
                                {% for software in values.software.values %}
                                    {% if 'mardi' in software.ID %}
                                        <a href="{{ mardiURI }}{{ software.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ software.Name }}</a>
                                    {% elif 'wikidata' in software.ID %}
                                        <a href="{{ wikidataURI }}{{ software.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ software.Name }}</a>
                                    {% else %}
                                        {{ software.Name }}
                                    {% endif %}
                                    {% if not forloop.last %}, {% endif %}
                                {% endfor %}
			                </td>
                        </tr>
			        {% endfor %}
                </tbody>
            </table>
    {% endif %}

    <h3 id="data-sets">Data Sets</h3>
    {% if answers.dataset.values %}
        <table border="1">
            <colgroup>
                <col style="width: 10%" />
                <col style="width: 19%" />
                <col style="width: 10%" />
                <col style="width: 10%" />
                <col style="width: 10%" />
                <col style="width: 10%" />
                <col style="width: 10%" />
                <col style="width: 7%" />
                <col style="width: 7%" />
                <col style="width: 7%" />
            </colgroup>
            <thead>
                <tr class="header">
                    <th style="text-align: center; vertical-align: middle;">Name</th>
                    <th style="text-align: center; vertical-align: middle;">Description</th>
                    <th style="text-align: center; vertical-align: middle;">Size</th>
                    <th style="text-align: center; vertical-align: middle;">Data Type</th>
                    <th style="text-align: center; vertical-align: middle;">Representation Format</th>
                    <th style="text-align: center; vertical-align: middle;">File Format</th>
                    <th style="text-align: center; vertical-align: middle;">binary/text</th>
                    <th style="text-align: center; vertical-align: middle;">proprietary</th>
                    <th style="text-align: center; vertical-align: middle;">to publish</th>
                    <th style="text-align: center; vertical-align: middle;">to archive</th>
                </tr>
            </thead>
            <tbody>
                {% for values in answers.dataset.values %}
                    <tr>
                        <td style="text-align: center; vertical-align: middle;">
                            {% if 'mardi' in values.ID %}
                                <a href="{{ mardiURI }}{{ values.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                            {% elif 'wikidata' in values.ID %}
                                <a href="{{ wikidataURI }}{{ values.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ values.Name }}</a>
                            {% else %}
                                {{ values.Name }}
                            {% endif %}
                        </td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.Description }}</td>
                        <td style="text-align: center; vertical-align: middle;">
                            {% if values.Size.0 == option.kilobyte %}
                                {{ values.Size.1 }} kilobyte
                            {% elif values.Size.0 == option.megabyte %}
                                {{ values.Size.1 }} megabyte
                            {% elif values.Size.0 == option.gigabyte %}  
                                {{ values.Size.1 }} gigabyte
                            {% elif values.Size.0 == option.terabyte %}  
                                {{ values.Size.1 }} terabyte
                            {% elif values.Size.0 == option.items %}  
                                {{ values.Size.1 }} items
                            {% endif %}
                        </td>
                        <td style="text-align: center; vertical-align: middle;">
                            {% for datatype in values.datatype.values %}
                                {% if 'mardi' in datatype.ID %}
                                    <a href="{{ mardiURI }}{{ datatype.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ datatype.Name }}</a>
                                {% elif 'wikidata' in datatype.ID %}
                                    <a href="{{ wikidataURI }}{{ datatype.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ datatype.Name }}</a>
                                {% endif %}
                                {% if not forloop.last %}, {% endif %}
                            {% endfor %}
                        </td>
                        <td style="text-align: center; vertical-align: middle;">
                            {% for representationformat in values.representationformat.values %}
                                {% if 'mardi' in representationformat.ID %}
                                    <a href="{{ mardiURI }}{{ representationformat.ID|cut:"mardi:"}}"" style="color:dodgerblue;">{{ representationformat.Name }}</a>
                                {% elif 'wikidata' in representationformat.ID %}
                                    <a href="{{ wikidataURI }}{{ representationformat.ID|cut:"wikidata:"}}"" style="color:dodgerblue;">{{ representationformat.Name }}</a>
                                {% endif %}{% if not forloop.last %}, {% endif %}
                            {% endfor %}
                        </td>
                        <td style="text-align: center; vertical-align: middle;">{{ values.FileFormat }}</td>
                        <td style="text-align: center; vertical-align: middle;">
                            {% if values.BinaryText == option.binary %}
                                binary
                            {% elif values.BinaryText == option.text %}
                                text
                            {% endif %}
                        </td>
                        <td style="text-align: center; vertical-align: middle;">
                            {% if values.Proprietary == option.Yes %}
                                Yes
                            {% elif values.Proprietary == option.No %}
                                No
                            {% endif %}
                        </td>
                        <td style="text-align: center; vertical-align: middle;">
                            {% if values.ToPublish.1 %}
                                <a href="{{ values.ToPublish.1.1 }}" style="color:dodgerblue;">Yes</a>
                            {% elif values.ToPublish.2 %}
                                <a href="{{ values.ToPublish.2.1 }}" style="color:dodgerblue;">Yes</a>
                            {% elif values.ToPublish.0 %}
                                Yes
                            {% elif values.ToPublish.3 %}
                                No
                            {% endif %}
                        </td>
                        <td style="text-align: center; vertical-align: middle;">
                            {% if values.ToArchive.0 == option.YesText %}
                                {% if values.ToArchive.1 %}
                                    {{ values.ToArchive.1 }}
                                {% else %}
                                    Yes
                                {% endif %}
                            {% elif values.ToArchive.0 == option.NoText %}
                                    No
                            {% endif %}
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    {% endif %}

    <h2 id="reproducibility">Reproducibility</h2>

        <h3 id="mathematical-reproducibility">Mathematical Reproducibility</h3>
            {% if answers.reproducibility.mathematical == option.Yes %}
                <p>Yes: {{ answers.reproducibility.mathematicalcondition }}</p>
            {% elif answers.reproducibility.mathematical == option.No %}
                <p>No</p>
            {% elif answers.reproducibility.mathematical == option.NotRelevant %}
                <p>Not relevant</p>                    
            {% endif %}
        <h3 id="runtime-reproducibility">Runtime Reproducibility</h3>
            {% if answers.reproducibility.runtime == option.Yes %}
                <p>Yes: {{ answers.reproducibility.runtimecondition }}</p>
            {% elif answers.reproducibility.runtime == option.No %}
                <p>No</p>
            {% elif answers.reproducibility.runtime == option.NotRelevant %}
                <p>Not relevant</p>
            {% endif %}
        <h3 id="reproducibility-of-results">Reproducibility of Results</h3>
            {% if answers.reproducibility.result == option.Yes %}
                <p>Yes: {{ answers.reproducibility.resultcondition }}</p>
            {% elif answers.reproducibility.result == option.No %}
                <p>No</p>
            {% elif answers.reproducibility.result == option.NotRelevant %}
                <p>Not relevant</p>
            {% endif %}
        <h3 id="reproducibility-on-original-platform">Reproducibility on original Platform (i.e. Hardware or Instrument)</h3>
            {% if answers.reproducibility.originalplatform == option.Yes %}
                <p>Yes: {{ answers.reproducibility.originalplatformcondition }}</p>
            {% elif answers.reproducibility.originalplatform == option.No %}
                <p>No</p>
            {% elif answers.reproducibility.originalplatform == option.NotRelevant %}
                <p>Not relevant</p>
            {% endif %}
        <h3 id="reproducibility-on-other-platform">Reproducibility on other Platform (i.e. Hardware or Instrument)</h3>
            {% if answers.reproducibility.otherplatform == option.Yes %}
                    <p>Yes: {{ answers.reproducibility.otherplatformcondition }}</p>
            {% elif answers.reproducibility.otherplatform == option.No %}
                    <p>No</p>
            {% elif answers.reproducibility.otherplatform == option.NotRelevant %}
                <p>Not relevant</p>
            {% endif %}
        <h3 id="transferability-to">Transferability to</h3>
            {% for value in answers.reproducibility.transferability.values %}
                {{ value }}
                {% if not forloop.last %}<br>{% endif %}
            {% endfor %}
    
<h2 id="related-publications">Workflow Published In</h2>
{% for values in answers.publication.values %}
    {% if values.workflow == option.Yes %}
        
        <h3 id="P{{ forloop.counter }}"> {{ values.Name }} </h2>
        
        <p> 
            {% for reference in values.reference.values %}
                {% if reference.0 == option.DOI %}
                    <b>DOI</b>: {{ reference.1 }} <br>
                {% endif %} 
                {% if reference.0 == option.URL %}
                    <b>URL</b>: {{ reference.1 }} <br>
                {% endif %}
            {% endfor %}
        </p>
    {% endif %}
{% endfor %}

<h2 id="related-publications">References For Individual Workflow Aspects</h2>
{% for values in answers.publication.values %}
    {% if values.workflow == option.No %}
        
        <p> 
            {% for reference in values.reference.values %}
                {% if reference.0 == option.DOI %}
                    <b>DOI</b>: {{ reference.1 }} <br>
                {% endif %} 
                {% if reference.0 == option.URL %}
                    <b>URL</b>: {{ reference.1 }} <br>
                {% endif %}
            {% endfor %}
        </p>
    {% endif %}
{% endfor %}

</body>
