2017 © Pedro Peláez
 

yii2-extension widgets

Widgets for Yii

image

grozzzny/widgets

Widgets for Yii

  • Friday, June 29, 2018
  • by grozzzny
  • Repository
  • 1 Watchers
  • 0 Stars
  • 146 Installations
  • JavaScript
  • 6 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 38 % Grown

The README.md

Widgets for Yii2

Installation guide

Please, install User module for EasyiiCMS by following these instructions before going further, (*1)

$ php composer.phar require grozzzny/widgets "dev-master"
Sidebar::widget([
    'options' => [
        'class' => 'sidebar__menu-list',
        'encode' => false,
        'itemOptions' => ['class' => 'sidebar__menu-item']
    ],
    'items' => [
        Html::a('Список чемпионатов, турниров', ['/championships']),
        Html::a('Список команд', ['/teames']),
        Html::a('Расписание', ['/schedules?filter=last']),
        Html::a('Список игроков', ['/players']),
        Html::a('Тренера', ['/trainers'], ['class' => 'active']),
        Html::a('Судьи', ['/referees']),
        Html::a('Ледовые арены', ['/ice_arenas']),
        Html::a('Хоккейные магазины', ['/shops']),
        Html::a('Прочие учреждения, организации', ['/others']),
    ],
    'footer' => $this->render('_sidebar_footer')
]);
<div class="sidebar__contacts">
    Отдел продаж<br>
    <a class="sidebar__contacts-phone sells_phone" href="tel:+79114587142">+7 (911) 458 71 42</a><br>
    <a class="sidebar__contacts-vk" target="_blank">vk.com/<span>mysite</span></a>
</div>
<div class="sidebar__copy-logo"></div>
<div class="sidebar__copy">© 2017 GROZZZNY</div>

Seo widget

<html prefix="og: http://ogp.me/ns#">
</html>
//Register metatags + og
Seo::widget([
    'title' => $page->seo('title', $page->model->title),
    'description' => $page->seo('description'),
    'image' => '/images/logo.png',
    'keywords' => 'Губка боб, квадратные штаны'
]);

Schema organization widget

use yii\easyii\models\Setting;
<?=\grozzzny\widgets\schema_organization\SchemaOrganizationWidget::widget([
    'name' => Setting::get('organization_name'),
    'logo' => Setting::get('organization_logo'),
    'index' => Setting::get('organization_index'),
    'city' => Setting::get('organization_city'),
    'address' => Setting::get('organization_address'),
    'phone' => Setting::get('organization_phone'),
    'email' => Setting::get('organization_email'),
])?>

Map yandex widget

input
<?= MapConstructorWidget::widget([
    'model' => $this->model,
    'attribute' => $this->attribute,
    'search_id' => $settings->search_id,
    'type' => $type //  placemark | polygon | polyline | route 
]); ?>
Show coords
= MapWidget::widget([
        'coords' => [
            [
                'hash' => 'event_20',
                'type' => 'placemark', //  placemark | polygon | polyline | route 
                'coords' => [54.718504, 20.509194],
                'src' => null,
                //'src' => 'images/location-14-512.png',
                'icoColor' => 'darkGreen', //blue | darkGreen | red | violet | darkOrange | black | night | brown | yellow | darkBlue | green | pink | orange | gray | lightBlue | olive
                'sizeIco' => 1,
                'title' => 'Новая метка',
                'content' => 'Контент новой метки HTML'
            ],
            [
                'hash' => 'event_5',
                'type' => 'polygon',
                'coords' => [
                    [54.719444, 20.505435],
                    [54.719891, 20.508139],
                    [54.716376, 20.509555],
                    [54.715898, 20.505896]
                ],
                'title' => 'Полигон',
                'content' => 'Контент полигона HTML',
                'fillColor' => '#ff0600',
                'strokeColor' => '#5b0003',
                'strokeWidth' => 1,
                'fillOpacity' => '0.1'
            ],
            [
                'hash' => 'event_6',
                'type' => 'polyline',
                'coords' => [
                    [54.716407, 20.509812],
                    [54.716948, 20.512902],
                    [54.717985, 20.512859],
                    [54.720398, 20.514133]
                ],
                'title' => 'Ломанная',
                'content' => 'Контент ломанной HTML',
                'strokeWidth' => 2,
                'strokeColor' => '#002eb8'
            ],
            [
                'hash' => 'event_7',
                'type' => 'route',
                'mode' => 'auto', //masstransit | pedestrian | auto
                'coords' => [
                    [54.715547, 20.513425],
                    [54.715920, 20.505893]
                ],
                'contentStart' => 'Контент маршрута в точке START HTML',
                'srcStart' => 'images/20151120224636875.png',
                'sizeIcoStart' => 1,

                'contentFinish' => 'Контент маршрута в точке FINISH HTML',
                'srcFinish' => 'images/2015923223658445.png',
                'sizeIcoFinish' => 1,

                'strokeWidth' => 20,
                'strokeColor' => '#002eb8'
            ],
            [
                'hash' => 'event_1',
                'type' => 'placemark',
                'coords' => [54.722695, 20.408430],
                //'src' => null,
                'src' => 'images/location-14-512.png',
                'icoColor' => 'darkGreen', //blue | darkGreen | red | violet | darkOrange | black | night | brown | yellow | darkBlue | green | pink | orange | gray | lightBlue | olive
                'sizeIco' => 1,
                'title' => 'Концерт Руки Верх',
                'content' => 'Концерт Руки Верх. Подробнее..'
            ],
            [
                'hash' => 'event_2',
                'type' => 'polyline',
                'coords' => [
                    [54.670993, 20.494947],
                    [54.680543, 20.543013]
                ],
                'title' => 'Концерт Баскова',
                'content' => 'Концерт Баскова. Подробнее..',
                'strokeWidth' => 2,
                'strokeColor' => '#002eb8'
            ],
            [
                'hash' => 'event_3',
                'type' => 'route',
                'mode' => 'auto', //masstransit | pedestrian | auto
                'coords' => [
                    [54.749713, 20.539236],
                    [54.737597, 20.573225]
                ],
                'contentStart' => 'Коцерт Пугачевой, Галкина, Урганта, Харламова, Бондарчука иииии Паши Воли. Подробнее..',
                'srcStart' => 'images/20151120224636875.png',
                'sizeIcoStart' => 1,

                'contentFinish' => 'Коцерт Пугачевой, Галкина, Урганта, Харламова, Бондарчука иииии Паши Воли. Подробнее..',
                'srcFinish' => 'images/2015923223658445.png',
                'sizeIcoFinish' => 1,

                'strokeWidth' => 20,
                'strokeColor' => '#002eb8'
            ],
        ],
    ]) ?>

The Versions

29/06 2018

dev-master

9999999-dev

Widgets for Yii

  Sources   Download

MIT

The Requires

 

yii widgets