Commit f5dd76ca authored by Jan Helke's avatar Jan Helke Committed by Anja Leichsenring
Browse files

[!!!][TASK] Fluidification of Clipboard

Moves most of the HTML from the PHP to an own Template.
In fact in line 408 and in the function linkItemText are some remaining
html tags, but removing those would require some major refactoring.

Resolves: #73016
Releases: master
Change-Id: Ie9859758885be0516ff8aeb58c473c5634848c81
Reviewed-on: https://review.typo3.org/46367

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarFlorian Mast <flo.mast@web.de>
Reviewed-by: default avatarMarkus Sommer <markussom@posteo.de>
Tested-by: default avatarMarkus Sommer <markussom@posteo.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 4fa0dbe2
<div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" id="copymodeSelector" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<f:if condition="{currentMode} == 'copy'">
<f:then>
{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_misc.xlf:copyElements')}
</f:then>
<f:else>
{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_misc.xlf:moveElements')}
</f:else>
</f:if>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="copymodeSelector">
<li><a href="#" onclick="document.getElementById('clipboard_form').method='POST'; document.getElementById('clipboard_form').action={actionCopyModeUrl}; document.getElementById('clipboard_form').submit(); return true;">{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_misc.xlf:moveElements')}</a></li>
<li><a href="#" onclick="document.getElementById('clipboard_form').method='POST'; document.getElementById('clipboard_form').action={actionCopyModeUrl1}; document.getElementById('clipboard_form').submit(); return true;">{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_misc.xlf:copyElements')}</a></li>
</ul>
</div>
<div class="btn-group">
<button class="btn btn-default dropdown-toggle" type="button" id="menuSelector" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="true">
{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.menu')}
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="menuSelector">
<f:for each="{optionArray}" as="option" key="key">
<li>
<f:link.external uri="{option.uri}" data="{option.data}" additionalAttributes="{option.additionalAttributes}" defaultScheme="">{option.label}</f:link.external>
</li>
</f:for>
</ul>
</div>
<tr>
<td colspan="3"><a href="{tab.url}#clip_head"
title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:{tab.description}')}">
<f:if condition="{current} == {tab.id}">
<f:then>
<span class="t3-icon fa fa-check-circle"></span><strong>
<f:format.printf
arguments="{1: '{tab.number}'}" value="{f:translate(key:'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:{tab.label}')}">{f:translate(key:'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:{tab.label}')}
</f:format.printf>
{tab.padding}
</strong>
</f:then>
<f:else>
<span class="t3-icon fa fa-circle-o"></span><span class="text-muted"><f:format.printf
arguments="{1: '{tab.number}'}" value="{f:translate(key:'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:{tab.label}')}">{f:translate(key:'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:{tab.label}')}
</f:format.printf>{tab.padding}</span>
</f:else>
</f:if>
</a></td>
</tr>
<f:if condition="{current} == {tab.id}">
<f:format.raw>{tab.content_old}</f:format.raw>
<f:if condition="{tab.content}">
<f:for each="{tab.content}" as="content" key="key">
<f:render partial="Clipboard/TabContent" arguments="{tab: tab, content: content, currentMode: currentMode}"/>
</f:for>
</f:if>
</f:if>
{namespace core = TYPO3\CMS\Core\ViewHelpers}
<tr>
<td nowrap="nowrap" class="col-icon">
<f:format.raw>{content.icon}</f:format.raw>
</td>
<td nowrap="nowrap" width="95%">
<f:format.raw>{content.title}</f:format.raw>
<f:if condition="{tab.id} == 'normal'">
<strong>(
<f:if condition="{currentMode} == 'copy'">
<f:then>
{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.copy')}
</f:then>
<f:else>
{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.cut')}
</f:else>
</f:if>
)</strong>
</f:if>
<f:if condition="{content.thumb}">
<br>
<f:image image="{content.thumb.image}" title="{content.thumb.title}"/>
</f:if>
</td>
<td nowrap="nowrap" class="col-control">
<div class="btn-group">
<f:if condition="{content.infoLink}">
<a class="btn btn-default" href="#" onclick="{content.infoLink}"
title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.info')}">
<f:format.raw><core:icon identifier="actions-document-info" alternativeMarkupIdentifier="inline"/></f:format.raw>
</a>
</f:if>
<f:if condition="{content.removeLink}">
<a class="btn btn-default" href="{content.removeLink}#clip_head"
title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.removeItem')}">
<f:format.raw><core:icon identifier="actions-selection-delete" alternativeMarkupIdentifier="inline"/></f:format.raw>
</a>
</f:if>
</div>
</td>
</tr>
{namespace core = TYPO3\CMS\Core\ViewHelpers}
<form action="" id="clipboard_form">
<a name="clip_head"></a>
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading">
<f:format.raw>{clipboardHeader}</f:format.raw>
</div>
<table class="table">
<tr>
<td colspan="2" nowrap="nowrap" width="95%">
<f:render partial="Clipboard/CopymodeSelector" arguments="{_all}"/>
<f:if condition="{elementCount}">
<f:render partial="Clipboard/MenuSelector" arguments="{_all}"/>
</f:if>
</td>
<td nowrap="nowrap" class="col-control">
<f:if condition="{elementCount}">
<a href="{removeAllUrl}#clip_head"
title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:buttons.clear')}" class="btn btn-danger">
<f:format.raw><core:icon identifier="actions-document-close" alternativeMarkupIdentifier="inline"></core:icon></f:format.raw>
</a>
</f:if>
</td>
</tr>
<f:for each="{tabArray}" as="tab" key="key">
<f:render partial="Clipboard/Tab" arguments="{tab: tab, current: current, currentMode: currentMode}"/>
</f:for>
</table>
</div>
</div>
</div>
</form>
.. include:: ../../Includes.txt
==================================================================================
Breaking: #73016 - Renaming of Clipboard->printContentFromTab to getContentFromTab
==================================================================================
See :issue:`73016`
Description
===========
During the fluidification of the clipboard, it became obvious that the method name printContentFromTab doesn't describe the function of the method correctly anymore. So it has been renamed into getContentFromTab.
Impact
======
This is a public method, so it could be the case that some unknown extension calls the old function. But as no TER extension or the core itself calls the method, no deprecation was needed.
Affected Installations
======================
Every extension that calls Clipboard->printContentFromTab().
Migration
=========
Change the call from Clipboard->printContentFromTab to Clipboard->getContentFromTab.
.. index:: Backend
\ No newline at end of file
Supports Markdown
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