Преглед на файлове

Producteur : correctif gestion champs 'bannière'

feature/rotating_product
Guillaume Bourgeois преди 6 месеца
родител
ревизия
6531c4f9e6
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. +1
    -1
      common/helpers/Upload.php
  2. +1
    -1
      producer/views/layouts/main.php

+ 1
- 1
common/helpers/Upload.php Целия файл

@@ -47,7 +47,7 @@ class Upload
{
$file = $model->$champsFile;
if ($file) {
$file_name = $file->baseName . '-' . uniqid();
$file_name = str_replace(' ', '-', $file->baseName) . '-' . uniqid();
$file_name_extension = $file_name . '.' . $file->extension;
$dir_file = '../../producer/web/uploads/';
$path_file = $dir_file . $file_name_extension;

+ 1
- 1
producer/views/layouts/main.php Целия файл

@@ -139,7 +139,7 @@ $mainColor = $producer->option_main_color ?: '#ee6f42' ;
<?php $hasLogo = strlen($producer->logo) && Image::isPhotoExist($producer->logo); ?>
<div id="header" class="<?= $hasLogo ? 'with-logo' : 'without-logo'; ?>">
<?php if (strlen($producer->photo) || strlen($producer->logo)): ?>
<div id="banner" style="background-color: <?= $mainColor ?>;<?php if(strlen($producer->photo)): ?>background-image:url(<?= \Yii::$app->urlManager->baseUrl; ?>/uploads/<?= $producer->photo; ?>);<?php endif; ?>">
<div id="banner" style="background-color: <?= $mainColor ?>;<?php if(strlen($producer->photo)): ?>background-image:url(<?= \Yii::$app->urlManager->baseUrl; ?>/uploads/<?= urlencode($producer->photo); ?>);<?php endif; ?>">
</div>
<?php endif; ?>
<?php if ($hasLogo): ?>

Loading…
Отказ
Запис