PHRAS-3340 story title bar fix

This commit is contained in:
aina esokia
2021-01-18 17:05:50 +03:00
parent 6de0852c2d
commit c99f645fb8
6 changed files with 23 additions and 8 deletions

View File

@@ -65504,6 +65504,8 @@ var previewRecordService = function previewRecordService(services) {
basketIcon = "<img src='/assets/common/images/icons/basket_validation.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else if (data.containerType === 'push') {
basketIcon = "<img src='/assets/common/images/icons/basket_push.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else if (data.containerType === 'regroup') {
basketIcon = "<img src='/assets/common/images/icons/story.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else {
basketIcon = "<img src='/assets/common/images/icons/basket.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
}

View File

@@ -65504,6 +65504,8 @@ var previewRecordService = function previewRecordService(services) {
basketIcon = "<img src='/assets/common/images/icons/basket_validation.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else if (data.containerType === 'push') {
basketIcon = "<img src='/assets/common/images/icons/basket_push.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else if (data.containerType === 'regroup') {
basketIcon = "<img src='/assets/common/images/icons/story.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else {
basketIcon = "<img src='/assets/common/images/icons/basket.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
}

View File

@@ -387,6 +387,8 @@ const previewRecordService = services => {
basketIcon = "<img src='/assets/common/images/icons/basket_validation.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else if (data.containerType === 'push') {
basketIcon = "<img src='/assets/common/images/icons/basket_push.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else if (data.containerType === 'regroup') {
basketIcon = "<img src='/assets/common/images/icons/story.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
} else {
basketIcon = "<img src='/assets/common/images/icons/basket.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
}

View File

@@ -113,6 +113,8 @@ class RecordController extends Controller
} else {
$containerType = 'basket';
}
} elseif ($env === 'REG') {
$containerType = 'regroup';
}
return $this->app->json([

View File

@@ -118,6 +118,7 @@ class record_preview extends record_adapter
$this->container = new record_adapter($app, $sbas_id, $record_id);
$this->original_item = $this->container;
$this->name = $this->container->get_title();
if ($pos == 0) {
$number = 0;
} else {
@@ -273,14 +274,14 @@ class record_preview extends record_adapter
$this->title .= $this->name . ' (' . $this->getNumber() . '/' . $this->total . ') - ' . parent::get_title($options);
break;
case "REG":
$title = parent::get_title($options);
if ($this->getNumber() == 0) {
$this->title .= $title;
} else {
$this->title .= $this->name;
if ($this->getNumber() != 0) {
$this->title .= sprintf(
'%s %s', $title, $this->getNumber() . '/' . $this->total
' (%s) - %s',$this->getNumber() . '/' . $this->total, parent::get_title($options)
);
}
break;
default:
$this->title .= parent::get_title($options);

View File

@@ -7,8 +7,14 @@
data-position="0"
data-id="{{par.get_serialize_key()}}"
data-reload="true"
class="otherRegToolTip open-preview-action" {% if app['conf'].get(['registry', 'classic', 'stories-preview']) %}tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : par.get_sbas_id(), 'record_id' : par.get_record_id(), 'context' : 'basket' }) }}" {% endif %}>
class="otherRegToolTip to-open-preview-action" {% if app['conf'].get(['registry', 'classic', 'stories-preview']) %}tooltipsrc="{{ path('prod_tooltip_caption', { 'sbas_id' : par.get_sbas_id(), 'record_id' : par.get_record_id(), 'context' : 'basket' }) }}" {% endif %}>
{% if par.get_thumbnail().is_physically_present() %}
<img src="{{par.get_thumbnail().get_url()}}" style="width:25px;height:25px;"/>
{% else %}
<img src="/assets/common/images/icons/story.png" style="width:25px;height:25px;"/>
{% endif %}
<span class="title" title="{{ par.get_title() }}"> {{ par.get_title() }} </span>
</li>
{% endfor %}