Commit 75dda417 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[FEATURE] Builds result list and page browser in bootstrap style

* Uses cards for extension item in list
parent c51ebf68
Pipeline #182 passed with stages
in 1 minute and 48 seconds
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ter_layout/Configuration/TypoScript/Page.ts">
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:ter_layout/Configuration/TypoScript/Ext/" extensions="ts">
......@@ -2,6 +2,25 @@ plugin.tx_solr {
templateFiles {
search = EXT:ter_layout/Resources/Private/Ext/Solr/Search.html
results = EXT:ter_layout/Resources/Private/Ext/Solr/Results.html
pagebrowser = EXT:ter_layout/Resources/Private/Ext/Solr/Pagebrowser.html
}
cssFiles.results =
}
\ No newline at end of file
}
lib.solr.format_number = TEXT
lib.solr.format_number {
field = argument_0
numberFormat = 1
numberFormat.thousands_sep = ,
}
lib.solr.extensionkeywithdashes = TEXT
lib.solr.extensionkeywithdashes {
field = argument_0
replacement {
10 {
search = _
replace = -
}
}
}
page = PAGE
page {
bodyTagAdd = class="js-off"
meta {
description.data = field:description
description.ifEmpty (
TYPO3 is a free, feature-rich Enterprise class Open Source Web CMS based on PHP with a vast international
community of developers and supporters. typo3.org is the official resource for TYPO3 and offers tutorials,
downloads, an extension repository and information about the TYPO3 community like mailing lists, blog,
events
)
keywords.data = field:keywords
keywords.ifEmpty = typo3,typo3 cms,typo 3,content management system,opensource cms, web cms
robots = index, follow
includeCSS {
ter = EXT:ter_layout/Resources/Public/Css/ter.css
}
shortcutIcon = EXT:ter_layout/Resources/Public/Icons/favicon.ico
}
\ No newline at end of file
}
<!-- ###PAGE_BROWSER### begin -->
<nav aria-label="Pagination" class="tx-solr-pagination-page-browser tx-pagebrowse-pi1">
<!--TYPO3SEARCH_end-->
<ul class="pagination justify-content-center">
<!-- ###ACTIVE_FIRST### begin -->
<li class="page-item"><a class="page-link" href="###FIRST_LINK###">&laquo; ###TEXT_FIRST###</a></li>
<!-- ###ACTIVE_FIRST### end -->
<!-- ###INACTIVE_FIRST### begin -->
<li class="page-item disabled"><span class="page-link">&laquo; ###TEXT_FIRST###</span></li>
<!-- ###INACTIVE_FIRST### end -->
<!-- ###ACTIVE_PREV### begin -->
<li class="page-item"><a class="page-link" href="###PREV_LINK###">&lsaquo; ###TEXT_PREV###</a></li>
<!-- ###ACTIVE_PREV### end -->
<!-- ###INACTIVE_PREV### begin -->
<li class="page-item disabled"><span class="page-link">&lsaquo; ###TEXT_PREV###</span></li>
<!-- ###INACTIVE_PREV### end -->
<!-- ###PAGES### begin -->
<!-- ###LESS_PAGES### begin -->
<li class="page-item"><span class="page-link">...</span></li>
<!-- ###LESS_PAGES### end -->
<!-- ###PAGE### begin -->
<li class="page-item"><a class="page-link" href="###LINK###">###NUMBER_DISPLAY###</a></li>
<!-- ###PAGE### end -->
<!-- ###CURRENT### begin -->
<li class="page-item active"><span class="page-link">###NUMBER_DISPLAY###</span></li>
<!-- ###CURRENT### end -->
<!-- ###MORE_PAGES### begin -->
<li class="page-item"><span class="page-link">...</span></li>
<!-- ###MORE_PAGES### end -->
<!-- ###PAGES### end -->
<!-- ###ACTIVE_NEXT### begin -->
<li class="page-item"><a class="page-link" href="###NEXT_LINK###">###TEXT_NEXT### &rsaquo;</a></li>
<!-- ###ACTIVE_NEXT### end -->
<!-- ###INACTIVE_NEXT### begin -->
<li class="page-item disabled"><span class="page-link">###TEXT_NEXT### &rsaquo;</span></li>
<!-- ###INACTIVE_NEXT### end -->
<!-- ###ACTIVE_LAST### begin -->
<li class="page-item"><a class="page-link" href="###LAST_LINK###">###TEXT_LAST### &raquo;</a></li>
<!-- ###ACTIVE_LAST### end -->
<!-- ###INACTIVE_LAST### begin -->
<li class="page-item disabled"><span class="page-link">###TEXT_LAST### &raquo;</span></li>
<!-- ###INACTIVE_LAST### end -->
</ul>
<!--TYPO3SEARCH_begin-->
</nav>
<!-- ###PAGE_BROWSER### end -->
</body>
</html>
......@@ -8,197 +8,189 @@
<body>
<!-- ###SOLR_SEARCH### begin -->
<div class="container">
<div class="ter-ext-list-search">
<!-- ###SOLR_SEARCH_SORTING### begin -->
<span class="ter-ext-list-search-sorting cl">
<label for="ter-ext-list-search-sorting">###LLL:sorting_sortBy###: </label>
<select class="jsSubmit" id="ter-ext-list-search-sorting" name="###TX_SOLR.PREFIX###[sort]">
<!-- ###LOOP:SORT### begin -->
<!-- ###LOOP_CONTENT### -->
<option value="###SORT.url###" ###SORT.selected###>
###SORT.label###
</option>
<!-- ###LOOP_CONTENT### -->
<!-- ###LOOP:SORT### end -->
</select>
</span>
<!-- ###SOLR_SEARCH_SORTING### end -->
<!-- ###SOLR_SEARCH_FORM### begin -->
<form id="tx-solr-search-form-pi-results" action="###FORM.ACTION###" method="get" accept-charset="###FORM.ACCEPT-CHARSET###" data-suggest-url="###FORM.SUGGEST_URL_RAW###">
<input type="hidden" name="id" value="###FORM.ACTION_ID###" />
<input type="hidden" name="###FORM.ACTION_LANGUAGE_PARAMETER###" value="###FORM.ACTION_LANGUAGE###" />
<input type="text" id="ter-ext-list-search-needle" class="tx-solr-q form-input" name="###TX_SOLR.QUERY_PARAMETER###" value="###FORM.Q###" />
<input type="submit" class="bu" value="###LLL:submit###" />
<!-- ###SOLR_SEARCH_FORM### end -->
<!-- ###SOLR_SEARCH_FACETING### begin -->
###IF:###FACETING.search_has_results###|==|1|x###
<div id="ter-filter-toggle" class="ter-toggle
###IF:###FACETING.active###|==|1###
ter-toggle-showLess
###IF:###FACETING.active###|==|1###
">
<div id="ter-filter-toggler"><span class="bu bu-mini"><span>Filter</span></span></div>
<hr>
</div>
<div class="ter-ext-list-search">
<!-- ###SOLR_SEARCH_SORTING### begin -->
<span class="ter-ext-list-search-sorting cl">
<label for="ter-ext-list-search-sorting">###LLL:sorting_sortBy###: </label>
<select class="jsSubmit" id="ter-ext-list-search-sorting" name="###TX_SOLR.PREFIX###[sort]">
<!-- ###LOOP:SORT### begin -->
<!-- ###LOOP_CONTENT### -->
<option value="###SORT.url###" ###SORT.selected###>
###SORT.label###
</option>
<!-- ###LOOP_CONTENT### -->
<!-- ###LOOP:SORT### end -->
</select>
</span>
<!-- ###SOLR_SEARCH_SORTING### end -->
<!-- ###SOLR_SEARCH_FORM### begin -->
<form id="tx-solr-search-form-pi-results" action="###FORM.ACTION###" method="get" accept-charset="###FORM.ACCEPT-CHARSET###" data-suggest-url="###FORM.SUGGEST_URL_RAW###">
<input type="hidden" name="id" value="###FORM.ACTION_ID###" />
<input type="hidden" name="###FORM.ACTION_LANGUAGE_PARAMETER###" value="###FORM.ACTION_LANGUAGE###" />
<input type="text" id="ter-ext-list-search-needle" class="tx-solr-q form-input" name="###TX_SOLR.QUERY_PARAMETER###" value="###FORM.Q###" />
<input type="submit" class="bu" value="###LLL:submit###" />
<!-- ###SOLR_SEARCH_FORM### end -->
<!-- ###SOLR_SEARCH_FACETING### begin -->
###IF:###FACETING.search_has_results###|==|1|x###
<div id="ter-filter-toggle" class="ter-toggle
###IF:###FACETING.active###|==|1###
ter-toggle-showLess
###IF:###FACETING.active###|==|1###
">
<div id="ter-filter-toggler"><span class="bu bu-mini"><span>Filter</span></span></div>
<hr>
</div>
<div id="tx-solr-faceting" class="ter-filter"
###IF:###FACETING.active###|==|0###
style="display: none;"
###IF:###FACETING.active###|==|0###
>
<!-- ###AVAILABLE_FACETS### begin -->
<div id="tx-solr-facets-available" class="secondaryContentSection">
<!-- ###SINGLE_FACET### begin -->
<div class="facet facet-###FACET.name### facet-type-###FACET.type###">
<h5 class="facet-label csc-header">###FACET.label###</h5>
<!-- ###SINGLE_FACET_OPTION### begin -->
<!-- ###LOOP:FACET_LINKS### begin -->
<!-- ###LOOP_CONTENT### -->
<div class="facet-option">
<input type="checkbox"
###IF:###FACET_LINK.facetName###|==|outdated###
name="tx_solr[filter][###FACET_LINK.facetName###]"
###IF:###FACET_LINK.facetName###|==|outdated###
###IF:###FACET_LINK.facetName###|!=|outdated###
name="tx_solr[filter][]"
###IF:###FACET_LINK.facetName###|!=|outdated###
class="facet-item" id="facet-###FACET_LINK.facetName###-option-###FACET_LINK.value###" value="###FACET_LINK.facetName###:###FACET_LINK.value###"
###IF:###FACET_LINK.selected###|==|1###
checked="checked"
###IF:###FACET_LINK.selected###|==|1###
/>
<label for="facet-###FACET_LINK.facetName###-option-###FACET_LINK.value###">###FACET_LINK.text###</label>
</div>
<!-- ###LOOP_CONTENT### -->
<!-- ###LOOP:FACET_LINKS### end -->
<!-- ###SINGLE_FACET_OPTION### end -->
<div id="tx-solr-faceting" class="ter-filter"
###IF:###FACETING.active###|==|0###
style="display: none;"
###IF:###FACETING.active###|==|0###
>
<!-- ###AVAILABLE_FACETS### begin -->
<div id="tx-solr-facets-available" class="secondaryContentSection">
<!-- ###SINGLE_FACET### begin -->
<div class="facet facet-###FACET.name### facet-type-###FACET.type###">
<h5 class="facet-label csc-header">###FACET.label###</h5>
<!-- ###SINGLE_FACET_OPTION### begin -->
<!-- ###LOOP:FACET_LINKS### begin -->
<!-- ###LOOP_CONTENT### -->
<div class="facet-option">
<input type="checkbox"
###IF:###FACET_LINK.facetName###|==|outdated###
name="tx_solr[filter][###FACET_LINK.facetName###]"
###IF:###FACET_LINK.facetName###|==|outdated###
###IF:###FACET_LINK.facetName###|!=|outdated###
name="tx_solr[filter][]"
###IF:###FACET_LINK.facetName###|!=|outdated###
class="facet-item" id="facet-###FACET_LINK.facetName###-option-###FACET_LINK.value###" value="###FACET_LINK.facetName###:###FACET_LINK.value###"
###IF:###FACET_LINK.selected###|==|1###
checked="checked"
###IF:###FACET_LINK.selected###|==|1###
/>
<label for="facet-###FACET_LINK.facetName###-option-###FACET_LINK.value###">###FACET_LINK.text###</label>
</div>
<!-- ###SINGLE_FACET### end -->
<div class="facet facet-typo3-version">
<h5 class="facet-label csc-header">TYPO3 Version</h5>
<input value="###TS:lib.solr.selected_typo3_filter.min###" name="tx_solr[filter][extensionMinTYPO3Version]" id="ter-ext-list-typo3-min-version" type="hidden" />
<input value="###TS:lib.solr.selected_typo3_filter.max###" name="tx_solr[filter][extensionMaxTYPO3Version]" id="ter-ext-list-typo3-max-version" type="hidden" />
<div class="facet-type-slider">
<div id="ter-ext-list-version-slider" class="noUi-extended"></div>
</div>
<!-- ###LOOP_CONTENT### -->
<!-- ###LOOP:FACET_LINKS### end -->
<!-- ###SINGLE_FACET_OPTION### end -->
</div>
<!-- ###SINGLE_FACET### end -->
<div class="facet facet-typo3-version">
<h5 class="facet-label csc-header">TYPO3 Version</h5>
<input value="###TS:lib.solr.selected_typo3_filter.min###" name="tx_solr[filter][extensionMinTYPO3Version]" id="ter-ext-list-typo3-min-version" type="hidden" />
<input value="###TS:lib.solr.selected_typo3_filter.max###" name="tx_solr[filter][extensionMaxTYPO3Version]" id="ter-ext-list-typo3-max-version" type="hidden" />
<div class="facet-type-slider">
<div id="ter-ext-list-version-slider" class="noUi-extended"></div>
</div>
</div>
<!-- ###AVAILABLE_FACETS### end -->
<div style="clear: both;"> </div>
</div>
<!-- ###AVAILABLE_FACETS### end -->
<div style="clear: both;"> </div>
Please register or sign in to reply
</div>
###IF:###FACETING.search_has_results###|==|1|x###
<!-- ###SOLR_SEARCH_FACETING### end -->
</form>
</div>
###IF:###FACETING.search_has_results###|==|1|x###
<!-- ###SOLR_SEARCH_FACETING### end -->
</form>
</div>
<!-- ###SOLR_SEARCH_RESULTS### begin -->
<div class="ter-ext-list-count">
###IF:###RESULTS.count###|==|1###
###RESULTS.count### extension found
###IF:###RESULTS.count###|==|1###
###IF:###RESULTS.count###|>|1###
###RESULTS.count### extensions found
###IF:###RESULTS.count###|>|1###
</div>
<!-- ###SOLR_SEARCH_RESULTS### begin -->
<div class="ter-ext-list-count">
###IF:###RESULTS.count###|==|1###
###RESULTS.count### extension found
###IF:###RESULTS.count###|==|1###
###IF:###RESULTS.count###|>|1###
###RESULTS.count### extensions found
###IF:###RESULTS.count###|>|1###
</div>
<!-- RESULT LIST begin -->
<div start="###RESULTS.OFFSET###" class="results-list">
<!-- ###LOOP:RESULT_DOCUMENTS### begin -->
<!-- ###LOOP_CONTENT### -->
<div class="results-entry###IF:###RESULT_DOCUMENT.isElevated###|==|1|class### results-elevated###IF:###RESULT_DOCUMENT.isElevated###|==|1|class###">
<!--
Score: ###RESULT_DOCUMENT.SCORE###
Document ID: ###RESULT_DOCUMENT.ID###
-->
<div class="row">
<div class="col-md-6">
<a href="###RESULT_DOCUMENT.url###">
<h3>
###IF:###RESULT_DOCUMENT.extensionIcon_stringS###|!=|###
<img class="ter-ext-icon" alt="###RESULT_DOCUMENT.title###" src="###RESULT_DOCUMENT.extensionIcon_stringS###" height="16" width="16">
###IF:###RESULT_DOCUMENT.extensionIcon_stringS###|!=|###
###RESULT_DOCUMENT.title###
</h3>
</a>
</div>
<div class="col-md-6">
<span class="ter-ext-list-row-key">###RESULT_DOCUMENT.extensionKey_stringS###</span>
<!-- RESULT LIST begin -->
<ol start="###RESULTS.OFFSET###" class="list-unstyled results-list">
<!-- ###LOOP:RESULT_DOCUMENTS### begin -->
<!-- ###LOOP_CONTENT### -->
<li class="results-entry###IF:###RESULT_DOCUMENT.isElevated###|==|1|class### results-elevated###IF:###RESULT_DOCUMENT.isElevated###|==|1|class###">
<div class="mb-3">
<div class="card">
<!--
Score: ###RESULT_DOCUMENT.SCORE###
Document ID: ###RESULT_DOCUMENT.ID###
-->
<div class="card-header">
<h3 class="card-title">
###IF:###RESULT_DOCUMENT.extensionIcon_stringS###|!=|###
<img class="ter-ext-icon" alt="###RESULT_DOCUMENT.title###" src="###RESULT_DOCUMENT.extensionIcon_stringS###" height="16" width="16">
###IF:###RESULT_DOCUMENT.extensionIcon_stringS###|!=|###
<a href="###RESULT_DOCUMENT.url###">###RESULT_DOCUMENT.title###</a>
</h3>
<h6 class="card-subtitle mb-2 text-muted">
###RESULT_DOCUMENT.extensionKey_stringS### /
<span class="ter-ext-state ter-ext-state-###RESULT_DOCUMENT.extensionState_stringS###">###RESULT_DOCUMENT.extensionState_stringS###</span>
</h6>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="ter-ext-list-meta">
by ###RESULT_DOCUMENT.author###
</div>
<p>###RESULT_DOCUMENT.content###</p>
</div>
<div class="col-md-6">
<table class="table">
<tr>
<th>Version</th>
<td>###RESULT_DOCUMENT.extensionVersion_stringS### <span class="ter-ext-state ter-ext-state-###RESULT_DOCUMENT.extensionState_stringS###">###RESULT_DOCUMENT.extensionState_stringS###</span></td>
</tr>
<tr>
<th>Last Updated</th>
<td>###DATE:###RESULT_DOCUMENT.extensionLastUpload_intS######</td>
</tr>
<tr>
<th>Downloads</th>
<td>###TS:lib.solr.format_number|###RESULT_DOCUMENT.extensionDownloads_intS######</td>
</tr>
<tr>
<th>Compatibility</th>
<td>
###TS:lib.solr.compatibility_string|###RESULT_DOCUMENT.extensionMinTYPO3Version_sIntS###|###RESULT_DOCUMENT.extensionMaxTYPO3Version_sIntS######
</td>
</tr>
<tr>
<th>Manual</th>
<td>
###RESULT_DOCUMENT.extensionDocumentationLink_stringS###
</td>
</tr>
<div class="card-block">
<p class="card-text">###RESULT_DOCUMENT.content###</p>
<table class="table table-sm">
<thead>
<tr>
<th><i class="fa fa-info-circle"></i> Version</th>
<th><i class="fa fa-user"></i> Author</th>
<th><i class="fa fa-calendar"></i> Last updated</th>
<th><i class="fa fa-download"></i> Downloads</th>
<th>Compatibility</th>
<th><i class="fa fa-book"></i> Manual</th>
</tr>
</thead>
<tbody>
<tr>
<td>###RESULT_DOCUMENT.extensionVersion_stringS###</td>
<td>###RESULT_DOCUMENT.author###</td>
<td>###DATE:###RESULT_DOCUMENT.extensionLastUpload_intS######</td>
<td>###TS:lib.solr.format_number|###RESULT_DOCUMENT.extensionDownloads_intS######</td>
<td>###RESULT_DOCUMENT.extensionDependency_stringS###</td>
<td>###RESULT_DOCUMENT.extensionDocumentationLink_stringS###</td>
</tr>
</tbody>
</table>
<code>composer require typo3-ter/###TS:lib.solr.extensionkeywithdashes|###RESULT_DOCUMENT.extensionKey_stringS######</code>
</div>
<div class="card-footer">
<a class="btn btn-primary" href="###RESULT_DOCUMENT.extensionDownloadZipUrl_stringS###">
<i class="fa fa-download"></i> Download ZIP Archive
</a>
<a class="btn btn-default" href="###RESULT_DOCUMENT.extensionDownloadT3xUrl_stringS###">
<i class="fa fa-download"></i> Download T3X Package
</a>
</div>
</div>
<div class="ter-ext-list-row-downloadsCCC">
<a class="ter-download-icon ter-download-icon-t3x" href="###RESULT_DOCUMENT.extensionDownloadT3xUrl_stringS###">Download T3X Package</a>
<a class="ter-download-icon ter-download-icon-zip" href="###RESULT_DOCUMENT.extensionDownloadZipUrl_stringS###">Download ZIP Archive</a>
</div>
</div>
<!-- ###LOOP_CONTENT### -->
<!-- ###LOOP:RESULT_DOCUMENTS### end -->
</div>
<!-- RESULT LIST end -->
###RESULTS.PAGEBROWSER###
</li>
<!-- ###LOOP_CONTENT### -->
<!-- ###LOOP:RESULT_DOCUMENTS### end -->
</ol>
<!-- RESULT LIST end -->
<!-- ###SOLR_SEARCH_RESULTS### end -->
###RESULTS.PAGEBROWSER###
<!-- ###SOLR_SEARCH_RESULTS### end -->
<!-- ###SOLR_SEARCH_NO_RESULTS### begin -->
<div class="tx-solr-search-no-results">
<div class="typo3-message message-warning">
<div class="message-header">###NO_RESULTS.nothing_found###</div>
<div class="message-body">###NO_RESULTS.showing_results_suggestion###. ###NO_RESULTS.search_for_original###</div>
</div>
###NO_RESULTS.SUGGESTION_RESULTS###
<!-- ###SOLR_SEARCH_NO_RESULTS### begin -->
<div class="tx-solr-search-no-results">
<div class="typo3-message message-warning">
<div class="message-header">###NO_RESULTS.nothing_found###</div>
<div class="message-body">###NO_RESULTS.showing_results_suggestion###. ###NO_RESULTS.search_for_original###</div>
</div>
<!-- ###SOLR_SEARCH_NO_RESULTS### end -->
###NO_RESULTS.SUGGESTION_RESULTS###
</div>
<!-- ###SOLR_SEARCH_NO_RESULTS### end -->
<!-- ###SOLR_SEARCH### end -->
......@@ -213,4 +205,4 @@
</body>
</html>
\ No newline at end of file
</html>
span.ter-ext-state-stable {
color: #3db900;
}
span.ter-ext-state-beta {
color: #f4bd00;
}
span.ter-ext-state-alpha {
color: #f14400;
}
span.ter-ext-state-expiremental {
color: #000000;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment