Skip to content
Snippets Groups Projects
Commit 125f32b8 authored by Paul Ilea's avatar Paul Ilea
Browse files

[TASK] BE Module update

- Alternative page links (if no category page selected)
- BE listing with filters
- Multilanguage feature
- Edit page content link
- User restrictions respected
- Licensing service
- News/Category records creation links
parent 8d47e382
No related branches found
No related tags found
1 merge request!2Feature be module
{namespace core=TYPO3\CMS\Core\ViewHelpers}
{namespace sg=SGalinski\SgRoutes\ViewHelpers}
<f:if condition="{configuration.insertAbove}">
<thead>
<tr>
<td colspan="6">
<f:render section="paginator" arguments="{pagination: pagination, position:'top', recordsLabel: configuration.recordsLabel}" />
</td>
</tr>
</thead>
</f:if>
<f:renderChildren arguments="{contentArguments}" />
<f:if condition="{configuration.insertBelow}">
<tfoot>
<tr>
<td colspan="6">
<f:render section="paginator" arguments="{pagination: pagination, position:'bottom', recordsLabel: configuration.recordsLabel}" />
</td>
</tr>
</tfoot>
</f:if>
<f:section name="paginator">
<nav class="pagination-wrap">
<ul class="pagination pagination-block">
<f:if condition="{pagination.hasLessPages}">
<f:then>
<li>
<a href="{sg:widget.uri(arguments:{currentPage: 1})}" title="{f:translate(key:'widget.pagination.first')}">
<core:icon identifier="actions-view-paging-first" />
</a>
</li>
<li>
<a href="{sg:widget.uri(arguments:{currentPage: pagination.previousPage})}" title="{f:translate(key:'widget.pagination.previous')}">
<core:icon identifier="actions-view-paging-previous" />
</a>
</li>
</f:then>
<f:else>
<li class="disabled">
<span>
<core:icon identifier="actions-view-paging-first" />
</span>
</li>
<li class="disabled">
<span>
<core:icon identifier="actions-view-paging-previous" />
</span>
</li>
</f:else>
</f:if>
<li>
<span>
<f:if condition="{recordsLabel}">
<f:then>
{recordsLabel}
</f:then>
<f:else>
<f:translate key="widget.pagination.records" />
</f:else>
</f:if>
{pagination.startRecord} - {pagination.endRecord} / {pagination.totalObjects}
</span>
</li>
<li>
<span>
<f:translate key="widget.pagination.page" />
<form id="paginator-form-{position}" onsubmit="goToPage{position}(this); return false;" style="display:inline;">
<script type="text/javascript">
function goToPage{position}(formObject){
var url = '{sg:widget.uri(arguments:{currentPage: 987654321}) -> f:format.raw()}';
var page = formObject.elements['paginator-target-page'].value;
if (page > {pagination.numberOfPages}) {
page = {pagination.numberOfPages};
}
else
if (page < 1) {
page = 1;
}
url = url.replace('987654321', page);
self.location.href = url;
}
</script>
<f:form.textfield id="paginator-{position}" name="paginator-target-page" additionalAttributes="{min: '1'}" class="form-control input-sm paginator-input" size="5" value="{pagination.current}" type="number" />
</form>
/ {pagination.numberOfPages}
</span>
</li>
<f:if condition="{pagination.hasMorePages}">
<f:then>
<li>
<a href="{sg:widget.uri(arguments:{currentPage: pagination.nextPage})}" title="{f:translate(key:'widget.pagination.next')}">
<core:icon identifier="actions-view-paging-next" />
</a>
</li>
<li>
<a href="{sg:widget.uri(arguments:{currentPage: pagination.numberOfPages})}" title="{f:translate(key:'widget.pagination.last')}">
<core:icon identifier="actions-view-paging-last" />
</a>
</li>
</f:then>
<f:else>
<li class="disabled">
<span>
<core:icon identifier="actions-view-paging-next" />
</span>
</li>
<li class="disabled">
<span>
<core:icon identifier="actions-view-paging-last" />
</span>
</li>
</f:else>
</f:if>
<li>
<a href="{sg:widget.uri(arguments:{currentPage: pagination.current})}" title="{f:translate(key:'widget.pagination.refresh')}">
<core:icon identifier="actions-refresh" />
</a>
</li>
</ul>
</nav>
</f:section>
<?xml version="1.0" encoding="utf-8"?>
<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
<path fill="#335056" d="M0 0h18v18H0z"/>
<circle fill="#59F" cx="9" cy="9" r="8"/>
<path fill="#AAD400" d="M 15.973 8.378 C 15.762 6.08 14.437 4.033 12.428 2.898 C 12.336 2.995 12.311 2.938 12.311 3.035 C 12.034 3.132 11.665 2.938 11.388 2.841 C 10.712 2.57 9.964 2.536 9.266 2.744 C 8.989 2.841 8.344 2.938 8.62 3.52 C 8.804 3.812 9.265 4.103 9.727 3.715 C 9.911 3.521 10.097 3.23 10.372 3.521 C 10.465 3.619 10.465 3.716 10.465 3.813 C 10.372 4.103 10.095 4.201 9.819 4.201 C 9.449 4.298 9.079 4.201 8.711 4.298 C 8.341 4.395 7.788 4.492 7.788 4.978 C 7.788 5.558 7.603 5.656 7.141 5.753 C 6.771 5.753 6.588 5.947 6.771 6.335 C 6.864 6.625 7.141 6.625 7.326 6.529 C 8.064 6.141 8.71 5.171 9.54 6.335 L 9.724 6.238 C 9.909 5.462 10.094 5.948 10.278 6.238 L 10.555 6.528 C 11.662 5.462 11.385 7.014 11.755 7.304 C 11.015 7.11 10.185 7.886 9.54 7.401 C 8.433 6.529 7.695 6.917 6.68 7.789 C 5.85 8.469 5.665 9.341 5.85 10.117 C 6.126 11.087 7.14 11.184 7.972 10.99 C 8.248 10.892 8.802 10.892 8.802 11.086 C 8.617 11.959 9.632 12.541 9.262 13.51 C 8.986 14.286 9.448 15.256 10.092 15.547 C 10.739 15.837 11.292 15.062 11.57 14.383 C 11.662 14.286 11.57 14.093 11.662 13.995 C 12.4 13.025 12.308 11.571 13.23 10.601 C 13.507 10.311 14.43 9.244 13.69 8.371 C 15.444 7.886 14.8 9.631 15.168 10.408 C 15.444 9.826 15.628 9.244 15.813 8.758 C 15.905 8.468 15.973 8.378 15.973 8.378 Z M 5.948 3.21 C 6.238 2.904 6.251 2.854 6.542 2.445 C 5.845 2.703 5.195 3.074 4.619 3.544 L 4.787 3.721 L 5.66 3.721 C 5.66 3.721 5.757 3.721 5.757 3.621 L 5.854 3.518 C 5.854 3.518 5.951 3.518 5.951 3.416 L 6.047 3.314 L 6.144 3.211 C 5.854 3.416 5.854 3.314 5.95 3.211 C 5.95 3.314 5.95 3.314 5.95 3.211 C 5.95 3.314 5.95 3.211 5.95 3.211 L 5.948 3.21 Z M 4.666 12.65 C 4.666 12.65 4.57 12.558 4.666 12.65 C 4.57 12.558 4.57 12.558 4.666 12.65 L 4.666 12.374 L 4.57 12.282 C 4.475 12.282 4.475 12.189 4.38 12.189 C 4.285 12.189 4.19 12.096 4.094 12.096 L 3.903 12.096 C 3.903 12.096 3.808 12.096 3.808 12.004 C 3.14 11.634 2.855 10.989 2.664 10.252 C 2.664 10.067 2.569 9.882 2.569 9.698 C 2.475 9.605 2.475 9.513 2.379 9.42 C 2.189 9.236 2.285 8.867 2.475 8.498 L 2.475 8.314 C 2.475 8.221 2.475 8.221 2.57 8.129 C 2.57 8.039 2.57 8.039 2.666 7.946 C 2.856 7.576 3.238 7.3 3.428 7.023 C 3.523 6.931 3.523 6.931 3.523 6.839 L 3.523 6.747 C 3.618 6.655 3.618 6.47 3.713 6.377 C 3.713 6.287 3.809 6.101 3.809 6.009 C 3.809 5.824 3.809 5.732 3.713 5.549 C 3.617 5.271 3.559 5.031 3.369 4.846 C 2.511 6.046 1.999 7.392 1.999 8.959 C 1.999 11.082 2.902 12.965 4.413 14.283 C 4.413 14.283 4.474 14.309 4.474 14.219 L 4.474 14.125 C 4.474 14.033 4.569 14.033 4.569 13.941 C 4.665 13.571 4.665 13.019 4.666 12.65 Z"/>
<path opacity=".2" d="M 9 17 C 4.589 17 1 13.411 1 9 C 1 4.589 4.589 1 9 1 C 13.411 1 17 4.589 17 9 C 17 13.411 13.411 17 9 17 Z M 9 2 C 5.14 2 2 5.14 2 9 C 2 12.859 5.14 16 9 16 C 12.859 16 16 12.859 16 9 C 16 5.14 12.859 2 9 2 Z"/>
<path fill="#FFF" d="M 14 7 L 4 7 L 4 13.894 C 5.314 15.242 7.117 16.001 9 16 C 10.96 16 12.729 15.192 14 13.894 L 14 7 Z"/>
<path fill="#666" d="M 14 7 L 4 7 L 4 13.894 C 4.306 14.206 4.641 14.489 5 14.74 L 5 8 L 13 8 L 13 14.74 C 13.359 14.49 13.694 14.207 14 13.894 L 14 7 Z"/>
<path fill="#333" d="M 6 9 L 12 9 L 12 11 L 6 11 Z"/>
<path fill="#B9B9B9" d="M 6 12 L 12 12 L 12 13 L 6 13 Z M 6 14 L 12 14 L 12 15 L 6 15 Z"/>
</svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="33.857" viewBox="0 14.071 150 33.857"><path fill="#7C2623" d="M14.679 14.071V19l.053-.054 10.339 6v5.197l-10.393-6.268-4.339 2.571 4.339 2.518 10.393 5.946v2.144L14.732 43.16h-.053v4.769l14.678-8.464V22.536"/><path fill="#BC3A2F" d="M14.679 33.143L4.286 27.304v-2.357L14.679 19v-4.929L0 22.536v16.929l14.679 8.464V43.16L4.286 37.268V32.34l10.393 5.839h.053l4.393-2.571"/><path fill="#565D5D" d="M47.679 26.232a.55.55 0 0 1-.268.321c-.107.054-.214.106-.321.106-.107 0-.268-.053-.429-.16s-.375-.215-.589-.321c-.214-.107-.482-.269-.803-.321a3.229 3.229 0 0 0-1.072-.161c-.375 0-.696.054-.964.161-.268.107-.536.214-.696.375-.214.16-.321.375-.429.589a1.712 1.712 0 0 0-.161.75c0 .321.107.644.268.857.214.214.429.429.75.589a6.33 6.33 0 0 0 1.071.429c.375.107.804.269 1.232.429.428.16.803.321 1.232.482.375.214.75.428 1.071.696.322.268.589.643.75 1.071.214.429.268.91.268 1.554 0 .643-.107 1.286-.321 1.821a4.018 4.018 0 0 1-.964 1.5c-.429.429-.964.75-1.554 1.018-.643.268-1.339.375-2.143.375a5.4 5.4 0 0 1-1.339-.16 11.764 11.764 0 0 1-1.286-.375 5.551 5.551 0 0 1-1.125-.59 3.51 3.51 0 0 1-.964-.803l.803-1.286c.054-.107.161-.161.268-.214.107-.055.214-.107.321-.107.161 0 .321.053.536.214s.429.269.697.429c.268.16.589.321.911.482.375.16.803.214 1.286.214.75 0 1.339-.161 1.768-.536.429-.375.643-.91.643-1.553 0-.375-.107-.697-.268-.911-.214-.214-.428-.429-.75-.589a6.33 6.33 0 0 0-1.071-.429c-.375-.107-.804-.214-1.232-.375-.429-.107-.804-.269-1.232-.482-.375-.161-.75-.429-1.071-.75s-.589-.696-.75-1.125c-.214-.429-.268-1.018-.268-1.661 0-.535.107-1.018.322-1.553.214-.482.536-.965.911-1.34a4.69 4.69 0 0 1 1.5-.91 5.73 5.73 0 0 1 2.036-.375c.857 0 1.661.107 2.357.375.697.268 1.339.643 1.822 1.125l-.753 1.125zm11.035 9.858c.589 0 1.125-.055 1.607-.161.429-.107.857-.269 1.286-.429v-2.625h-1.821a.615.615 0 0 1-.429-.16.488.488 0 0 1-.161-.375v-1.5h4.822v5.839c-.375.268-.75.481-1.125.696s-.804.375-1.286.482c-.428.107-.911.214-1.446.268s-1.071.107-1.661.107c-1.071 0-2.036-.161-2.893-.536-.911-.375-1.661-.856-2.303-1.554a6.338 6.338 0 0 1-1.5-2.357c-.375-.91-.536-1.875-.536-2.945 0-1.072.161-2.09.536-3a7.681 7.681 0 0 1 1.5-2.357 6.338 6.338 0 0 1 2.357-1.5c.911-.375 1.982-.536 3.107-.536 1.178 0 2.196.161 3.053.536.857.375 1.607.803 2.197 1.339l-.804 1.232c-.161.268-.375.375-.589.375a.865.865 0 0 1-.482-.161c-.214-.107-.429-.268-.643-.375s-.482-.214-.75-.321c-.268-.106-.589-.161-.911-.214a7.333 7.333 0 0 0-1.179-.107c-.696 0-1.339.107-1.929.375-.589.215-1.071.59-1.5 1.018-.428.429-.696.965-.964 1.607a6.582 6.582 0 0 0-.322 2.09c0 .856.107 1.553.375 2.25.214.643.536 1.178.964 1.66.429.429.911.804 1.5 1.018a5.651 5.651 0 0 0 1.93.321m21.911 1.981h-2.09c-.214 0-.428-.054-.589-.161a.825.825 0 0 1-.321-.428l-1.071-2.947h-6l-1.072 2.947c-.053.16-.161.268-.321.428-.161.107-.375.215-.589.215h-2.089l5.679-14.465h2.732l5.731 14.411zm-9.375-5.464h4.607l-1.768-4.822c-.054-.214-.161-.481-.268-.75a4.182 4.182 0 0 1-.268-.964c-.107.321-.161.644-.268.964-.107.269-.161.536-.268.75l-1.767 4.822zm14.946 3.268h5.786v2.196h-8.465V23.607h2.679m9.429 0h2.679v14.464h-2.679V23.607zm9.054.053c.054 0 .161.055.214.055.054.053.107.053.161.106l.214.214 7.607 9.697c-.054-.215-.054-.482-.054-.697v-9.428h2.357v14.464h-1.394c-.214 0-.375-.054-.535-.106-.16-.055-.268-.161-.429-.375l-7.554-9.644c0 .214.054.429.054.644v9.481h-2.356V23.607h1.393c.108 0 .214 0 .322.053m22.553 2.572a.55.55 0 0 1-.268.321c-.107.054-.215.106-.322.106s-.268-.053-.428-.16a5.625 5.625 0 0 0-.59-.321c-.215-.107-.482-.269-.804-.321a3.223 3.223 0 0 0-1.071-.161c-.375 0-.696.054-.965.161-.268.107-.535.214-.695.375-.215.16-.322.375-.43.589-.106.214-.16.482-.16.75 0 .321.107.644.268.857.215.214.429.429.75.589.322.161.697.322 1.072.429.375.107.803.269 1.231.429s.804.321 1.232.482c.375.214.75.428 1.071.696.321.268.59.643.75 1.071.215.429.268.91.268 1.554 0 .643-.107 1.286-.321 1.821a4.018 4.018 0 0 1-.964 1.5c-.429.429-.965.75-1.554 1.018-.644.268-1.339.375-2.144.375-.481 0-.91-.053-1.339-.16s-.856-.215-1.286-.375a5.551 5.551 0 0 1-1.125-.59 3.525 3.525 0 0 1-.964-.803l.804-1.286c.054-.107.16-.161.268-.214.107-.055.215-.107.322-.107.16 0 .32.053.535.214s.429.269.696.429c.269.16.589.321.911.482.375.16.803.214 1.285.214.75 0 1.34-.161 1.768-.536.43-.375.644-.91.644-1.553 0-.375-.107-.697-.269-.911-.214-.214-.428-.429-.75-.589-.32-.161-.643-.322-1.07-.429-.375-.107-.805-.214-1.232-.375-.429-.107-.804-.269-1.232-.482-.375-.161-.75-.429-1.071-.75s-.589-.696-.75-1.125c-.214-.429-.269-1.018-.269-1.661 0-.535.107-1.018.322-1.553a4.56 4.56 0 0 1 .91-1.34 4.69 4.69 0 0 1 1.5-.91 5.735 5.735 0 0 1 2.036-.375c.856 0 1.661.107 2.356.375.697.268 1.34.643 1.822 1.125l-.748 1.125zm7.178 3.428h.644c.268 0 .481-.053.643-.106s.321-.161.429-.321l3.965-5.036c.16-.214.32-.375.535-.429.16-.107.429-.107.696-.107h2.304l-4.875 6c-.16.161-.321.322-.429.482-.161.107-.268.215-.429.322.215.106.429.214.59.32.16.161.375.322.535.536l5.036 6.75h-2.357c-.321 0-.536-.054-.696-.161a1.242 1.242 0 0 1-.375-.375l-4.071-5.356c-.107-.161-.269-.321-.429-.375s-.429-.107-.696-.107h-.857v6.375h-2.679V23.607h2.679v6.053h-.163zm12.911-6.053H150v14.464h-2.679V23.607z"/></svg>
\ No newline at end of file
(function($) {
$(document).ready(function() {
$.get(TYPO3.settings.ajaxUrls['sg_news::ajaxPing']);
});
})(TYPO3.jQuery);
// functions for backend docheader functionality
function jumpExt(URL, anchor) { //
var anc = anchor ? anchor : "";
window.location.href = URL + (T3_THIS_LOCATION ? "&returnUrl=" + T3_THIS_LOCATION : "") + anc;
return false;
}
function jumpSelf(URL) { //
window.location.href = URL + (T3_RETURN_URL ? "&returnUrl=" + T3_RETURN_URL : "");
return false;
}
function jumpToUrl(URL) {
window.location.href = URL;
return false;
}
function setHighlight(id) { //
top.fsMod.recentIds["web"] = id;
top.fsMod.navFrameHighlightedID["web"] = "pages" + id + "_" + top.fsMod.currentBank; // For highlighting
if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav) {
top.content.nav_frame.refresh_nav();
}
}
/**
* Switches to the spefied page in the BE
*
* @param {number} uid
* @param {string} path
*/
function sgNewsGoToPage(uid, path, selectOnly) {
if(typeof selectOnly === 'undefined') {
selectOnly = false;
}
selectOnly = Boolean(selectOnly);
if (top.nav) {
if (selectOnly) {
top.nav.invokePageId(uid, gotToPageCallbackNoFollow);
} else {
top.nav.invokePageId(uid, gotToPageCallback);
}
} else {
var tree = top.Ext.getCmp('typo3-pagetree');
if (tree) {
tree.activeTree.selectPath(path);
}
if (selectOnly) {
return;
}
var separator = '?';
if (top.currentSubScript.indexOf('?') !== -1) {
separator = '&';
}
top.TYPO3.Backend.ContentContainer.setUrl(
top.currentSubScript + separator + 'id=' + uid
);
}
}
/**
* Callback for page selection in the pagetree without follow
*/
function gotToPageCallbackNoFollow(path){
var callback = top.Ext.createDelegate(top.nav.mainTree.selectPath, top.nav.mainTree);
callback.apply(this, arguments);
}
/**
* Callback for page selection in the pagetree
*/
function gotToPageCallback(path){
var callback = top.Ext.createDelegate(top.nav.mainTree.selectPath, top.nav.mainTree);
callback.apply(this, arguments);
var node = top.nav.getSelected();
if (node) {
top.TYPO3.Components.PageTree.Actions.singleClick(node, top.TYPO3.Components.PageTree.Tree);
}
}
/**
* opens the selected category edit form
*
* @return {boolean}
*/
function editSelectedCategory(){
var selected = TYPO3.jQuery('#filter-categories').val();
if(selected && CategoryEditLinks[selected[0]]) {
jumpToUrl(CategoryEditLinks[selected[0]] + '&returnUrl=' + T3_THIS_LOCATION);
}
return false;
}
function sgNewsGoToPageModule(uid, path) {
sgNewsGoToPage(uid, path, true);
parent.fsMod.recentIds['web'] = uid;
parent.TYPO3.ModuleMenu.App.showModule('web_layout');
return false;
}
# cat=license; type=string; label=LLL:EXT:sg_news/Resources/Private/Language/locallang.xlf:configuration.licenseKey
key =
......@@ -23,7 +23,7 @@ $EM_CONF[$_EXTKEY] = [
'constraints' => [
'depends' => [
'typo3' => '7.6.0-8.7.99',
'php' => '5.5.0-7.1.99',
'php' => '5.6.0-7.1.99',
],
'conflicts' => [],
'suggests' => [
......
......@@ -83,3 +83,13 @@ if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/realurl/class.tx_realurl_autoconfgen.php']['extensionConfiguration']['sgnews'] =
\SGalinski\SgNews\Hooks\RealUrlAutoConfiguration::class . '->addNewsConfig';
}
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$signalSlotDispatcher->connect(
\TYPO3\CMS\Backend\Controller\EditDocumentController::class,
'preInitAfter',
\SGalinski\SgNews\Hooks\EditDocumentController::class,
'preInitAfter'
);
\ No newline at end of file
......@@ -39,7 +39,7 @@ if (TYPO3_MODE === 'BE') {
],
[
'access' => 'user,group',
'icon' => 'EXT:sg_news/Resources/Public/Images/News.png',
'icon' => 'EXT:sg_news/Resources/Public/Icons/module-sgnews.svg',
'labels' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang.xlf',
]
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment