<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>
   </style>
   </head>
   <body>
        {% if answers.search.options == option.InterdisciplinaryWorkflow %}
            <h1 id="InterdisciplinaryWorkflow"> Search Interdisciplinary Workflows </h1>
            {% if answers.search.via_research_objective == option.Yes %}
                <h2 id="ResearchObjective"> Research Objective Keywords</h1>
                {% for value in answers.search.research_objective.values %}
                    {{ value }}
                    {% if not forloop.last %}
	    		       , 
	    		    {% endif %} 
                {% endfor %}
            {% endif %}
            {% if answers.search.via_research_discipline == option.Yes %}
                <h2 id="ResearchDiscipline"> Research Disciplines </h1>
                {% for value in answers.search.research_discipline.values %}
                    {{ value.Name }} ({{ value.ID }})
                    {% if not forloop.last %}
	    		       , 
	    		    {% endif %} 
                {% endfor %}
            {% endif %}
            {% if answers.search.via_workflow_entity == option.Yes %}
                <h2 id="WorkflowEntity"> Workflow Entities </h1>
                {% for value in answers.search.workflow_entity.values %}
                    {{ value.Name }} ({{ value.ID }})
                    {% if not forloop.last %}
	    		       , 
	    		    {% endif %} 
                {% endfor %}
            {% endif %}
            <h1 id="SPARQLQuery"> SPARQL Query </h1>
            <pre><code>{{ answers.query|safe }}</code></pre>
        {% elif answers.search.options == option.MathematicalModel %}
        <h1 id="MathematicalModel"> Search Mathematical Models </h1>
        {% if answers.search.via_research_problem == option.Yes %}
            <h2 id="ResearchProblem"> Research Problem Keywords</h1>
            {% for value in answers.search.research_problem.values %}
                {{ value }}
                {% if not forloop.last %}
             , 
          {% endif %} 
            {% endfor %}
        {% endif %}
        {% if answers.search.via_research_field == option.Yes %}
            <h2 id="ResearchField"> Research Fields </h1>
            {% for value in answers.search.research_field.values %}
                {{ value.Name }} ({{ value.ID }})
                {% if not forloop.last %}
             , 
          {% endif %} 
            {% endfor %}
        {% endif %}
        {% if answers.search.via_model_entity == option.Yes %}
            <h2 id="ModelEntity"> Model Entities </h1>
            <b>Mathematical Formulations</b>
            <br>
            {% for value in answers.search.model_formulation.values %}
                {{ value.Name }} ({{ value.ID }})
                {% if not forloop.last %}
                    , 
                {% endif %} 
            {% endfor %}
            <br><br>
            <b>Computational Tasks</b>
            <br>
            {% for value in answers.search.model_task.values %}
                {{ value.Name }} ({{ value.ID }})
                {% if not forloop.last %}
                    , 
                {% endif %} 
            {% endfor %}
            <br><br>
            <b>Quantities or Quantity Kinds</b>
            <br>
            {% for value in answers.search.model_quantity.values %}
                {{ value.Name }} ({{ value.ID }})
                {% if not forloop.last %}
                    , 
                {% endif %} 
            {% endfor %}
        {% endif %}
        <h1 id="SPARQLQuery"> SPARQL Query </h1>
        <pre><code>{{ answers.query|safe }}</code></pre>
        {% elif answers.search.options == option.Algorithm %}
        <h1 id="Algorithm"> Search Algorithms </h1>
        {% if answers.search.via_algorithmic_problem == option.Yes %}
            <h2 id="AlgorithmicProblem"> Algorithmic Problem Keywords</h1>
            {% for value in answers.search.algorithmic_problem.values %}
                {{ value }}
                {% if not forloop.last %}
             , 
          {% endif %} 
            {% endfor %}
        {% endif %}
        {% if answers.search.via_software == option.Yes %}
            <h2 id="Software"> Software </h1>
            {% for value in answers.search.software.values %}
                {{ value.Name }} ({{ value.ID }})
                {% if not forloop.last %}
             , 
          {% endif %} 
            {% endfor %}
        {% endif %}
        <h1 id="SPARQLQuery"> SPARQL Query </h1>
        <pre><code>{{ answers.query|safe }}</code></pre>
    {% endif %}
   </body>
   
