Skip to content
Snippets Groups Projects
Verified Commit 4cec4580 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Remove inline styles from plugin preview and move the templates to the...

[TASK] Remove inline styles from plugin preview and move the templates to the more appropriate place
parent 3860ea0e
No related branches found
No related tags found
1 merge request!45Cleanup backend module
......@@ -177,8 +177,9 @@ class PreviewService {
*/
protected function createViewWithTemplate(string $templateName): StandaloneView {
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setTemplateRootPaths(['EXT:sg_jobs/Resources/Private/Templates/Backend']);
$view->setPartialRootPaths(['EXT:sg_jobs/Resources/Private/Partials/Backend']);
$view->setTemplateRootPaths(['EXT:sg_jobs/Resources/Private/Backend/Templates/']);
$view->setPartialRootPaths(['EXT:sg_jobs/Resources/Private/Backend/Partials/']);
$view->setLayoutRootPaths(['EXT:sg_jobs/Resources/Private/Backend/Layouts/']);
if (!str_ends_with($templateName, '.html')) {
$templateName .= '.html';
}
......
<thead>
<tr>
<th scope="col" style="width: 50%">
<th scope="col">
<f:translate key="LLL:EXT:sg_jobs/Resources/Private/Language/locallang_backend.xlf:backend.plugin.preview.settings"/>
</th>
<th scope="col" style="width: 50%">
<th scope="col">
<f:translate key="LLL:EXT:sg_jobs/Resources/Private/Language/locallang_backend.xlf:backend.plugin.preview.values"/>
</th>
</tr>
......
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<style type="text/css">
.backend-preview-table > tbody > tr > th {
white-space: normal;
}
</style>
<f:asset.css identifier="sg_jobs-pluginpreview" href="EXT:sg_jobs/Resources/Public/StyleSheets/pluginpreview.css" />
<be:link.editRecord table="tt_content" uid="{uid}">
<br/>
<table class="table table-striped table-bordered backend-preview-table">
<table class="table table-striped table-bordered sg_jobs-backend-preview-table">
<f:render partial="PluginDataTableHeader"/>
<tbody>
......
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<style type="text/css">
.backend-preview-table > tbody > tr > th {
white-space: normal;
}
</style>
<f:asset.css identifier="sg_jobs-pluginpreview" href="EXT:sg_jobs/Resources/Public/StyleSheets/pluginpreview.css" />
<be:link.editRecord table="tt_content" uid="{uid}">
<br/>
<table class="table table-striped table-bordered backend-preview-table">
<table class="table table-striped table-bordered sg_jobs-backend-preview-table">
<f:render partial="PluginDataTableHeader"/>
<tbody>
......
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
<style type="text/css">
.backend-preview-table > tbody > tr > th {
white-space: normal;
}
</style>
<f:asset.css identifier="sg_jobs-pluginpreview" href="EXT:sg_jobs/Resources/Public/StyleSheets/pluginpreview.css" />
<be:link.editRecord table="tt_content" uid="{uid}">
<br/>
<table class="table table-striped table-bordered backend-preview-table">
<table class="table table-striped table-bordered sg_jobs-backend-preview-table">
<f:render partial="PluginDataTableHeader"/>
<tbody>
......
.sg_jobs-backend-preview-table > tbody > tr > th {
white-space: normal;
}
.sg_jobs-backend-preview-table > thead > tr > th {
width: 50%;
}
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