content.php 2.56 KB
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
3
4
5
6
<?php

/**
 * Art-ER Attrattività, ricerca e territorio dell’Emilia-Romagna
 * OPEN 2.0
 *
7
8
9
 * @see https://www.open2.0.regione.lombardia.it Developers'community
 * @license GPLv3
 * @license https://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3
Marcello Pivanti's avatar
Marcello Pivanti committed
10
 *
waltermazza's avatar
waltermazza committed
11
 * @package    arter\amos\notificationmanager\views\email
Marcello Pivanti's avatar
Marcello Pivanti committed
12
13
14
15
 * @category   CategoryName
 * @author     Elite Division S.r.l.
 */

waltermazza's avatar
waltermazza committed
16
17
18
19
20
use arter\amos\core\helpers\Html;
use arter\amos\core\interfaces\ContentModelInterface;
use arter\amos\core\interfaces\ViewModelInterface;
use arter\amos\core\record\Record;
use arter\amos\cwh\base\ModelContentInterface;
Marcello Pivanti's avatar
Marcello Pivanti committed
21
22
23

/**
 * @var Record|ContentModelInterface|ViewModelInterface $model
waltermazza's avatar
waltermazza committed
24
 * @var \arter\amos\admin\models\UserProfile $profile
Marcello Pivanti's avatar
Marcello Pivanti committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 */

if (!empty($profile)) {
    $this->params['profile'] = $profile;
}

?>

<div style="border:1px solid #cccccc;padding:10px;margin-bottom: 10px;background-color: #ffffff;">
    <div style="padding:0;margin:0">
        <h3 style="font-size:2em;line-height: 1;margin:0;padding:10px 0;">
            <?= Html::a($model->getTitle(), Yii::$app->urlManager->createAbsoluteUrl($model->getFullViewUrl()), ['style' => 'color: #297A38;']) ?>
        </h3>
    </div>
    <div style="box-sizing:border-box;font-size:13px;font-weight:normal;color:#000000;">
        <?= $model->getDescription(true); ?>
    </div>
    <div style="box-sizing:border-box;padding-bottom: 5px;">
        <div style="margin-top:20px; display: flex; padding: 10px;">
            <div style="width: 50px; height: 50px; overflow: hidden;-webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%;float: left;">
                <?php
                $layout = '{publisher}';
                if ($model instanceof ModelContentInterface) {
                    $layout = '{publisher}{publishingRules}{targetAdv}';
                }
                $user = $model->createdUserProfile;
                ?>

                <?php if (!is_null($user)): ?>
                    <?=
waltermazza's avatar
waltermazza committed
55
                    \arter\amos\admin\widgets\UserCardWidget::widget([
Marcello Pivanti's avatar
Marcello Pivanti committed
56
57
58
59
60
61
62
63
64
65
                        'model' => $user,
                        'onlyAvatar' => true,
                        'absoluteUrl' => true
                    ])
                    ?>
                <?php endif; ?>
            </div>

            <div style="margin-left: 20px; max-width: 430px;">
                <?=
waltermazza's avatar
waltermazza committed
66
                \arter\amos\core\forms\PublishedByWidget::widget([
Marcello Pivanti's avatar
Marcello Pivanti committed
67
68
69
70
71
72
73
74
                    'model' => $model,
                    'layout' => $layout,
                ])
                ?>
            </div>
        </div>
    </div>
</div>