Skip to content
Snippets Groups Projects
Commit cd69e318 authored by Alexander Purr's avatar Alexander Purr Committed by Mathias Maaß
Browse files

refs #26036 [fid_adlr] create & show subtitle just in case the record provides appropriate data

parent 1dca4444
Branches
No related merge requests found
......@@ -14,6 +14,9 @@
* 1. get-it-box-tabs (right side / next to record-details)
* 2. other tabs (on bottom of record-details and get-it-box)
* - Resolve name of RecordDataFormatter specification by record type (using record-view-helper)
* - #16676 separate title_sub from title_short
* - #25761 show title in core table if truncated in heading
* - #26036 create & show subtitle just in case the record provides appropriate data
*
* parent template: record/view.phtml
*
......@@ -74,13 +77,16 @@
$shortTitle = $this->escapeHtml(
preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->driver->getShortTitle())
);
$subtitle = $this->escapeHtml(
// fid_adlr: #26036 create subtitle if record provides appropriate data
$subtitle = ($this->driver->getSubtitle() || $this->driver->getTitleSection()) ?
$this->escapeHtml(
preg_replace(
'/(\s[\/\.:]\s*)*$/',
'',
$this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection()
)
);
) :
null;
$shortTitleMaxLength = 100;
$subTitleMaxLength = 125;
?>
......@@ -162,8 +168,11 @@
<tr>
<th><?= $this->transEsc('Title') ?>:</th>
<td lang="" data-title="<?= $this->transEscAttr('Title') ?>:">
<?=$shortTitle?>;
<span class="sub"><?=$subtitle?></span>
<?=$shortTitle?>
<?php // fid_adlr: #26036 prints subtitle if existing ?>
<?php if(!empty($subtitle)): ?>
<span class="sub">; <?=$subtitle?></span>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
......
......@@ -71,13 +71,16 @@
$shortTitle = $this->escapeHtml(
preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->driver->getShortTitle())
);
$subtitle = $this->escapeHtml(
// fid_adlr: #26036 create subtitle if record provides appropriate data
$subtitle = ($this->driver->getSubtitle() || $this->driver->getTitleSection()) ?
$this->escapeHtml(
preg_replace(
'/(\s[\/\.:]\s*)*$/',
'',
$this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection()
)
);
) :
null;
$shortTitleMaxLength = 100;
$subTitleMaxLength = 125;
?>
......@@ -159,8 +162,11 @@
<tr>
<th><?= $this->transEsc('Title') ?>:</th>
<td lang="" data-title="<?= $this->transEscAttr('Title') ?>:">
<?=$shortTitle?>;
<span class="sub"><?=$subtitle?></span>
<?=$shortTitle?>
<?php // fid_adlr: #26036 prints subtitle if existing ?>
<?php if(!empty($subtitle)): ?>
<span class="sub">; <?=$subtitle?></span>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
......
......@@ -71,13 +71,16 @@
$shortTitle = $this->escapeHtml(
preg_replace('/(\s[\/\.:]\s*)*$/', '', $this->driver->getShortTitle())
);
$subtitle = $this->escapeHtml(
preg_replace(
'/(\s[\/\.:]\s*)*$/',
'',
$this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection()
)
);
// fid_adlr: #26036 create subtitle if record provides appropriate data
$subtitle = ($this->driver->getSubtitle() || $this->driver->getTitleSection()) ?
$this->escapeHtml(
preg_replace(
'/(\s[\/\.:]\s*)*$/',
'',
$this->driver->getSubtitle() . ' ' . $this->driver->getTitleSection()
)
) :
null;
$shortTitleMaxLength = 100;
$subTitleMaxLength = 125;
?>
......@@ -159,8 +162,11 @@
<tr>
<th><?= $this->transEsc('Title') ?>:</th>
<td lang="" data-title="<?= $this->transEscAttr('Title') ?>:">
<?=$shortTitle?>;
<span class="sub"><?=$subtitle?></span>
<?=$shortTitle?>
<?php // fid_adlr: #26036 prints subtitle if existing ?>
<?php if(!empty($subtitle)): ?>
<span class="sub">; <?=$subtitle?></span>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
......
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