Document.html 3.88 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 7 8 9 10 11 12 13 14

<f:section name="DocumentWrap">
    <f:if condition="{exactMatchFound}">
        <f:then>
            <div class="card card-size-medium mb-3 border-primary bg-light"
                data-document-score="{document.score}"
                data-document-id="{document.id}"
                data-document-url="{document.url}"
            >
                <f:render section="Document" arguments="{_all}" />
Markus Sommer's avatar
Markus Sommer committed
15
            </div>
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
        </f:then>
        <f:else>
            <li class="card card-size-medium mb-3"
                data-document-score="{document.score}"
                data-document-id="{document.id}"
                data-document-url="{document.url}"
            >
                <f:render section="Document" arguments="{_all}" />
            </li>
        </f:else>
    </f:if>
</f:section>

<f:section name="Document">
    <f:if condition="{document.isElevated}">
        <div class="results-elevated-label">
            <s:translate key="sponsored" />
        </div>
    </f:if>
    <div class="card-body">
        <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>
                <small>
                    <f:format.crop maxCharacters="{f:if(condition:exactMatchFound, then: '360', else: '180')}" respectWordBoundaries="true">{s:document.highlightResult(resultSet:resultSet, document:document, fieldName:'content')}</f:format.crop>
                    <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="{f:if(condition:exactMatchFound, then: '100', else: '50')}">{document.author}</f:format.crop>
                        </f:if>
                    </em>
                </small>
            </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>
                <f:if condition="{document.hasManual_boolS}">
69 70 71 72 73
                    <li class="list-inline-item">
                        <f:link.external class="badge badge-info" uri="{document.extensionDocumentationLink_stringS}" rel="nofollow">
                            <i class="fa fa-book"></i> Show manual
                        </f:link.external>
                    </li>
74 75
                </f:if>
            </ul>
Markus Sommer's avatar
Markus Sommer committed
76
        </div>
77 78 79 80 81 82 83 84
    </div>
    <f:if condition="{document.insecure_boolS}">
        <f:else>
            <a class="btn {f:if(condition:exactMatchFound, then: 'btn-primary', else: '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>
        </f:else>
    </f:if>
Thomas Löffler's avatar
Thomas Löffler committed
85
</f:section>