<tr about="{{ res }}" class="softwaresourcecode" typeof="schema:SoftwareSourceCode">
    <td class="name" property="schema:name">
    {% if baseuri and toolstore %}
    <a href="{{ res }}">
    {% endif %}
    {% if g.value(res, SDO.name) %}
    {{ g.value(res, SDO.name) }}
    {% else %}
    {{ g.value(res, SDO.identifier) }}
    {% endif %}
    {% if baseuri %}
    </a>
    {% endif %}
    </td>
    <td class="version">
        {% if  (res, SDO.version, None) in g %}
        {% if g.value(res, SDO.releaseNotes) %}
        <a rel="schema:releaseNotes" href="{{ g.value(res, SDO.releaseNotes) }}" title="release notes for this version">
        {% endif %}
        <span property="schema:version">{{ g.value(res, SDO.version) }}</a>
        {% if g.value(res, SDO.releaseNotes) %}
        </a>
        {% endif %}
        {% else %}
        <span class="negative"><i class="fa fa-question"></i> unknown</span>
        {% endif %}
        {% if  (res, SDO.dateModified, None) in g %}
        <span class="dateModified" property="schema:dateModified" title="Date at which this version was last modified">{{ g.value(res, SDO.dateModified).replace("T"," ").replace("Z"," ") }}</span>
        {% endif %}
    </td>
    <td class="interface">
        <ul>
        {% for label, comment in get_interface_types(g, res, contextgraph,fallback=True) %}
        <li{% if comment %} title="{{ comment }}"{% endif %}{% if label == "Unknown" %} class="negative"{% endif %}>{% if label == "Unknown" %}<i class="fa fa-question"></i> {% endif %}{{ label }}</li>
        {% endfor %}
        </ul>
    </td>
    <td class="description">
        {% if  (res, SDO.description, None) in g %}
        <em property="schema:description">{{ g.value(res, SDO.description) }}</em> {% if baseuri %}[<a href="{{ res }}">view more</a>]{% endif %}
        {% else %}
        <span class="negative">No description provided</span>
        {% endif %}

        {% if (res, SDO.applicationCategory, None) in g %}
        <div class="keywords">
        <strong>Category:</strong> <ul>
             {% for label, catres in get_triples(g, res, SDO.applicationCategory, abcsort=True, contextgraph=contextgraph) %}
                <li property="schema:" title="{{ get_description(contextgraph, catres) }}">{{ label }}</li>
             {% endfor %}
        </ul>
        </div>
        {% endif %}

        {% if (res, SDO.keywords, None) in g %}
        <div class="keywords">
            <strong><i class="fa fa-tags"></i> Keywords:</strong> <ul>
             {% for label, _ in get_triples(g, res, SDO.keywords, abcsort=True, contextgraph=contextgraph) %}
                <li property="schema:keywords">{{ label }}</li>
             {% endfor %}
        </ul>
        </div>
        {% endif %}

    </td>
    <td class="links">
        <ul>
        {% if  (res, SDO.codeRepository, None) in g %}
        <li><i class="fa fa-code-branch"></i>&nbsp;<a rel="schema:codeRepository" href="{{ g.value(res, SDO.codeRepository) }}" title="Here you can find the source code of this software. This is geared towards technical users who want to install the software themselves.">{{ g.value(res, SDO.codeRepository) }}</a></li>
        {% endif %}
        {% for _,_, value in g.triples((res, SDO.url, None)) %}
        {% if value != g.value(res, SDO.codeRepository) %}
        <li><i class="fa fa-home"></i>&nbsp;<a rel="schema:url" href="{{ g.value(res, SDO.url) }}" title="This is the project website associated with this software">{{ g.value(res, SDO.url) }}</a></li>
        {% endif %}
        {% endfor %}
        </ul>
    </td>
    <td class="developmentStatus">
        {% if (res, CODEMETA.developmentStatus, None) in g %}
            <ul>
                {% for _,_, devstatres in g.triples((res, CODEMETA.developmentStatus, None)) %}
                {% include 'developmentstatus.html' %}
                {% endfor %}
            </ul>
        {% else %}
            <span class="negative" title="No development status was provided nor could be extracted automatically"><i class="fa fa-question"></i> unknown</span>
        {% endif %}
    
        {% if g.value(res, SDO.review) %}
        {% set sscres = res %}
        <br/>
        {% include 'validationrating.html' %}
        {% endif %}

        {% if (res, CODEMETAPY.errors, None) in g and int(g.value(res, CODEMETAPY.errors)) > 0 %}
        <br/><span class="negative" title="There were problems harvesting this metadata, please inspect the log"><a href="{{ res }}#log"><i class="fa fa-bug"></i> {{ g.value(res, CODEMETAPY.errors) }}</a></span>
        {% endif %}
    </td>
    <td class="maintainer">
        <ul>
         {% for label, pores in get_triples(g, res, SDO.maintainer) %}
         <li>{% include 'person_or_org_minimal.html' %}</li>
         {% endfor %}
        </ul>
    </td>
    <td class="author">
        <ul>
         {% for label, pores in get_triples(g, res, SDO.author) %}
         <li>{% include 'person_or_org_minimal.html' %}</li>
         {% endfor %}
        </ul>
    </td>
    <td class="producer">
        <ul>
         {% for label, pores in get_triples(g, res, SDO.producer) %}
         <li>{% include 'person_or_org.html' %}</li>
         {% endfor %}
        </ul>
    </td>
</tr>

{% if g.value(res, SDO.targetProduct) %}
{% for _,_,targetres in g.triples((res, SDO.targetProduct, None)) %}
{% if g.value(targetres, SDO.name) or g.value(targetres, STYPE.executableName) or g.value(targetres, SDO.url) %}
{% include 'item_targetproduct.html' %}
{% endif %}
{% endfor %}
{% endif %}
