@(ht: String, idPrefix: String, vuln: Vulnerability)
@row[T](name: String, render: T => String = {(_:T).toString})(valueOption: Option[T]) = {
    @for(value <- valueOption){
        <tr>
            <th>@name</th>
            <td>@render(value)</td>
        </tr>
    }
}
@section = @{views.html.genericSection(idPrefix)(ht) _}
<table class="vuln-details">
    @row("CWE")(vuln.cweOption)
    @row("CVSS: score")(vuln.cvss.score)
    @row("CVSS: authenticationr")(vuln.cvss.authenticationr)
    @row("CVSS: availability impact")(vuln.cvss.availabilityImpact)
    @row("CVSS: access vector")(vuln.cvss.accessVector)
    @row("CVSS: integrity impact")(vuln.cvss.integrityImpact)
    @row("CVSS: access complexity")(vuln.cvss.accessComplexity)
    @row("CVSS: confidential impact")(vuln.cvss.confidentialImpact)
</table>
@vuln.description
@section("vuln-sw", "Vulnerable software"){
    <ul id="@idPrefix-details">
    @for(sw <- vuln.vulnerableSoftware){
        <li>@sw.name@if(sw.allPreviousVersion){ and all previous versions}</li>
    }
    </ul>
}
@section("references", "References"){
    <ul>
    @for(reference <- vuln.references){
        <li>@secureLink(reference.url){@reference.source: @reference.name}</li>
    }
    </ul>
}
