Document.html 2.96 KB
Newer Older
Thomas Löffler's avatar
Thomas Löffler committed
1
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
Markus Sommer's avatar
Markus Sommer committed
2 3
      xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
      xmlns:s="http://typo3.org/ns/ApacheSolrForTypo3/Solr/ViewHelpers">
Thomas Löffler's avatar
Thomas Löffler committed
4 5 6

<f:section name="Document">

Markus Sommer's avatar
Markus Sommer committed
7 8 9 10 11 12 13 14 15 16
    <li class="card card-size-medium{f:if(condition:document.isElevated, then: ' results-elevated')}"
        data-document-score="{document.score}"
        data-document-id="{document.id}"
        data-document-url="{document.url}"
    >
        <f:if condition="{document.isElevated}">
            <div class="results-elevated-label">
                <s:translate key="sponsored" />
            </div>
        </f:if>
Thomas Löffler's avatar
Thomas Löffler committed
17
        <div class="card-body">
Markus Sommer's avatar
Markus Sommer committed
18 19 20 21 22 23 24 25 26 27 28 29
            <div class="align-items-center">
                <h3 class="card-title">
                    <f:if condition="{document.extensionIcon_stringS}">
                        <img class="ter-ext-icon" alt="{document.title}" src="{document.extensionIcon_stringS}" height="32" width="32">
                    </f:if>
                    <a href="{s:uri.result.addSearchWordList(url:document.url, searchWords:resultSet.usedQuery.keywords)}">{document.title}</a>
                </h3>
                <h4 class="card-subtitle text-muted mb-2">
                    {document.extensionKey_stringS} /
                    <span class="ter-ext-state ter-ext-state-{document.extensionState_stringS}">{document.extensionState_stringS}</span>
                </h4>
                <p>
Markus Sommer's avatar
Markus Sommer committed
30 31
                    <small>
                        <f:format.crop maxCharacters="180" respectWordBoundaries="true">{s:document.highlightResult(resultSet:resultSet, document:document, fieldName:'content')}</f:format.crop>
32 33 34 35 36 37 38 39 40
                        <br>
                        <em>
                            Uploaded on
                            <f:format.date format="d M Y">@{document.extensionLastUpload_intS}</f:format.date>
                            <f:if condition="{document.author}">
                                by
                                <f:format.crop maxCharacters="50">{document.author}</f:format.crop>
                            </f:if>
                        </em>
Markus Sommer's avatar
Markus Sommer committed
41
                    </small>
Markus Sommer's avatar
Markus Sommer committed
42 43 44 45 46 47 48 49 50 51 52
                </p>
                <ul class="list-inline">
                    <f:if condition="{document.supports7_boolS}">
                        <li class="list-inline-item badge badge-success">7 LTS</li>
                    </f:if>
                    <f:if condition="{document.supports8_boolS}">
                        <li class="list-inline-item badge badge-success">8 LTS</li>
                    </f:if>
                </ul>
            </div>
        </div>
53 54
        <f:if condition="{document.insecure_boolS}">
            <f:else>
Thomas Löffler's avatar
Thomas Löffler committed
55 56 57
                <a class="btn btn-outline-primary btn-block mb-0" href="{document.extensionDownloadZipUrl_stringS}">
                    <i class="fa fa-download"></i> Download version {document.extensionVersion_stringS} as ZIP
                </a>
58 59
            </f:else>
        </f:if>
Markus Sommer's avatar
Markus Sommer committed
60
    </li>
Thomas Löffler's avatar
Thomas Löffler committed
61
</f:section>