Document.html 4.83 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
        </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>
Markus Sommer's avatar
Markus Sommer committed
61
        </div>
62
    </div>
63 64 65 66 67
    <f:if condition="{document.typo3supportold_stringM} || {document.typo3support_stringM} || {document.typo3supportdev_stringS}">
        <div>
            <p class="col-sm-12">
                <small>This extension supports TYPO3:</small><br>
                <f:for each="{document.typo3supportold_stringM}" as="oldVersion">
68
                    <button class="btn btn-warning btn-sm mr-2" disabled title="{f:translate(key:'title_warning', arguments: {0: oldVersion})}">{oldVersion}</button>
69 70
                </f:for>
                <f:for each="{document.typo3support_stringM}" as="maintainedVersion">
71
                    <button class="btn btn-success btn-sm mr-2" disabled title="{f:translate(key:'title_success', arguments: {0: maintainedVersion})}">{maintainedVersion}</button>
72 73
                </f:for>
                <f:if condition="{document.typo3supportdev_stringS}">
74
                    <button class="btn btn-info btn-sm" disabled title="{f:translate(key:'title_info', arguments: {0: document.typo3supportdev_stringS})}">{document.typo3supportdev_stringS}</button>
75 76 77
                </f:if>
            </p>
        </div>
78
    </f:if>
79 80 81 82 83 84 85 86 87 88 89 90 91 92
    <div class="btn-group d-flex" role="group">
        <f:if condition="{document.insecure_boolS}">
            <f:else>
                <a class="btn {f:if(condition:exactMatchFound, then: 'btn-primary-lg', else: 'btn-primary')} btn-block mb-0 w-100" href="{document.extensionDownloadZipUrl_stringS}" title="Downlad version {document.extensionVersion_stringS} of TYPO3 extension {document.extensionKey_stringS}">
                    <i class="fa fa-download"></i> v{document.extensionVersion_stringS} (zip)
                </a>
            </f:else>
        </f:if>
        <f:if condition="{document.hasManual_boolS}">
            <f:link.external class="btn {f:if(condition:exactMatchFound, then: 'btn-info-lg', else: 'btn-info')}  btn-block mb-0 w-100" uri="{document.extensionDocumentationLink_stringS}" rel="nofollow" title="Go to documentation of extension {document.extensionKey_stringS}">
                <i class="fa fa-book"></i> Documentation
            </f:link.external>
        </f:if>
    </div>
Thomas Löffler's avatar
Thomas Löffler committed
93
</f:section>