Exemplo n.º 1
0
 public function createUrl($params)
 {
     if (isset($params['lang_id'])) {
         //Если указан идентификатор языка, то делаем попытку найти язык в БД,
         //иначе работаем с языком по умолчанию
         $lang = Lang::findOne($params['lang_id']);
         if ($lang === null) {
             $lang = Lang::getDefaultLang();
         }
         unset($params['lang_id']);
     } else {
         //Если не указан параметр языка, то работаем с текущим языком
         $lang = Lang::getCurrent();
     }
     //Получаем сформированный URL(без префикса идентификатора языка)
     $url = parent::createUrl($params);
     //Добавляем к URL префикс - буквенный идентификатор языка
     if ($url == '/') {
         return '/' . $lang->url;
     } else {
         if (YII_DEBUG && !empty(Yii::$app->params['mainPathCount'])) {
             $url_list = explode('/', $url);
             $mainPath = [];
             for ($i = 0; $i <= Yii::$app->params['mainPathCount']; $i++) {
                 $mainPath[] = array_shift($url_list);
             }
             $url_list = array_merge($mainPath, [$lang->url], $url_list);
             return join('/', $url_list);
         }
         return '/' . $lang->url . $url;
     }
 }
Exemplo n.º 2
0
 public function afterSave($insert, $changedAttributes)
 {
     if ($this->default) {
         Lang::updateAll(['`default`' => 0], '`default` = :default AND id <> :lang_id', [':default' => 1, ':lang_id' => $this->id]);
     }
     return parent::afterSave($insert, $changedAttributes);
 }
Exemplo n.º 3
0
 /**
  * Resets password.
  *
  * @return boolean if password was reset.
  */
 public function changePassword()
 {
     $user = $this->_user;
     if ($user->validatePassword($this->password)) {
         $user->setPassword($this->newPassword);
         return $user->save(false);
     }
     $this->addError('password', Lang::t('page/accountProfile', 'changePasswordIncorrect'));
     return false;
 }
Exemplo n.º 4
0
 public function actionSettings()
 {
     $user = User::thisUser();
     $changePasswordModel = new ChangePasswordForm();
     if ($changePasswordModel->load(Yii::$app->request->post()) && $changePasswordModel->validate() && $changePasswordModel->changePassword()) {
         Yii::$app->session->setFlash('success', Lang::t('page/accountProfile', 'changePasswordSuccess'));
         return $this->redirect(['account/settings']);
     }
     $ulogins = Ulogin::findAll(['user_id' => $user->id]);
     return $this->render('settings', ['user' => $user, 'changePasswordModel' => $changePasswordModel, 'ulogins' => $ulogins]);
 }
Exemplo n.º 5
0
 public static function label($code)
 {
     $languages = Lang::find()->all();
     if (self::$_labels === null) {
         self::$_labels = array();
         foreach ($languages as $language) {
             self::$_labels[$language->getAttribute('url')] = Yii::t('frontend', $language->getAttribute('name'));
         }
     }
     return isset(self::$_labels[$code]) ? self::$_labels[$code] : null;
 }
Exemplo n.º 6
0
 public function getLangUrl()
 {
     if ($this->_lang_url === null) {
         $this->_lang_url = $this->getUrl();
         $url_list = explode('/', $this->_lang_url);
         $lang_url = isset($url_list[1]) ? $url_list[1] : null;
         Lang::setCurrent($lang_url);
         if ($lang_url !== null && $lang_url === Lang::getCurrent()->url && strpos($this->_lang_url, Lang::getCurrent()->url) === 1) {
             $this->_lang_url = substr($this->_lang_url, strlen(Lang::getCurrent()->url) + 1);
         }
     }
     return $this->_lang_url;
 }
Exemplo n.º 7
0
 static function getLangByUrl($url = null)
 {
     if ($url === null) {
         return null;
     } else {
         $language = Lang::find()->where('url = :url', [':url' => $url])->one();
         if ($language === null) {
             return null;
         } else {
             return $language;
         }
     }
 }
Exemplo n.º 8
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     $languagesModel = Lang::find()->all();
     $languageDefault = Lang::findOne(['default' => 1]);
     $language_rules = [];
     foreach ($languagesModel as $language) {
         $message = Yii::t('backend', 'Please specify {name} category name', ['name' => $language->name]);
         if ($languageDefault->url == $language->url) {
             array_push($language_rules, [['title'], 'required', 'message' => $message]);
         } else {
             array_push($language_rules, [['title_' . $language->url], 'required', 'message' => $message]);
         }
     }
     $rules_general = [[['content', 'meta_keywords', 'meta_description'], 'string'], [['code_id', 'no_code_id', 'category_id', 'created_at', 'updated_at'], 'safe'], [['is_active', 'sort_order'], 'integer'], [['title', 'content_heading'], 'string', 'max' => 255], [['identifier'], 'string', 'max' => 128]];
     return array_merge($language_rules, $rules_general);
 }
Exemplo n.º 9
0
 public function createUrl($params)
 {
     if (isset($params['lang_id'])) {
         //Если указан идентификатор языка, то делаем попытку найти язык в БД,
         //иначе работаем с языком по умолчанию
         $lang = Lang::findOne($params['lang_id']);
         if ($lang === null) {
             $lang = Lang::getDefaultLang();
         }
         unset($params['lang_id']);
     } else {
         //Если не указан параметр языка, то работаем с текущим языком
         $lang = Lang::getCurrent();
     }
     //Получаем сформированный URL(без префикса идентификатора языка)
     $url = parent::createUrl($params);
     //Добавляем к URL префикс - буквенный идентификатор языка
     if ($url == '/') {
         return '/' . $lang->url;
     } else {
         return '/' . $lang->url . $url;
     }
 }
Exemplo n.º 10
0
 public function getLangUrl()
 {
     if ($this->_lang_url === null) {
         $this->_lang_url = $this->getUrl();
         $url_list = explode('/', $this->_lang_url);
         $urlListIndex = YII_DEBUG && !empty(\Yii::$app->params['mainPathCount']) ? \Yii::$app->params['mainPathCount'] + 1 : 1;
         $lang_url = isset($url_list[$urlListIndex]) ? $url_list[$urlListIndex] : null;
         Lang::setCurrent($lang_url);
         if ($lang_url !== null && $lang_url === Lang::getCurrent()->url) {
             if (YII_DEBUG && !empty(\Yii::$app->params['mainPathCount'])) {
                 if ($url_list[$urlListIndex] == $lang_url) {
                     unset($url_list[$urlListIndex]);
                     $this->_lang_url = join('/', $url_list);
                 }
             } else {
                 if (strpos($this->_lang_url, Lang::getCurrent()->url) === 1) {
                     $this->_lang_url = substr($this->_lang_url, strlen(Lang::getCurrent()->url) + 1);
                 }
             }
         }
     }
     return $this->_lang_url;
 }
Exemplo n.º 11
0
?>
        </div>

        <div>
            <?php 
if (!Yii::$app->user->isGuest && $thisUser->reputation >= Comment::MIN_REPUTATION_COMMENT_CREATE) {
    echo Html::button(Lang::t('main/comments', 'replyComment'), ['class' => 'btn-link no-focus reply-comment', 'data-parent-id' => $comment->id]);
}
if (!Yii::$app->user->isGuest && $thisUser->reputation >= Comment::MIN_REPUTATION_COMMENT_VOTE) {
    echo Html::button($comment->getVoteCount(), ['class' => 'btn-link no-focus comment-vote-count']);
    echo Html::button('<i class="glyphicon glyphicon-thumbs-up"></i>', ['class' => 'btn-link no-focus comment-vote-up' . (!empty($voteItem) && $voteItem->vote == Vote::VOTE_UP ? ' voted' : ''), 'data-id' => $comment->id, 'data-href' => Url::to(['vote/add']), 'data-vote' => Vote::VOTE_UP, 'data-entity' => Vote::ENTITY_COMMENT]);
    echo Html::button('<i class="glyphicon glyphicon-thumbs-down"></i>', ['class' => 'btn-link no-focus comment-vote-down' . (!empty($voteItem) && $voteItem->vote == Vote::VOTE_DOWN ? ' voted' : ''), 'data-id' => $comment->id, 'data-href' => Url::to(['vote/add']), 'data-vote' => Vote::VOTE_DOWN, 'data-entity' => Vote::ENTITY_COMMENT]);
}
if (!Yii::$app->user->isGuest) {
    echo Html::button('<i class="glyphicon glyphicon-flag"></i>', ['class' => 'btn-link no-focus btn-show-alarm-comment', 'data-id' => $comment->id, 'title' => Lang::t('main/comments', 'alarmComment')]);
}
if (!Yii::$app->user->isGuest && $thisUser->id == $comment->user_id) {
    echo Html::button('<i class="glyphicon glyphicon-trash"></i>', ['class' => 'btn-link no-focus btn-show-delete-comment', 'data-url' => Url::to(['comment/delete', 'id' => $comment->id]), 'title' => Lang::t('main/comments', 'deleteComment')]), ' ';
}
?>
        </div>
        <div class="comment-reply" data-parent-id="<?php 
echo $comment->id;
?>
">
        </div>

    </div>

</div>
Exemplo n.º 12
0
</h4>
            </div>
            <div class="modal-body">
                <?php 
echo Lang::t('page/eventView', 'deleteConfirm');
?>
            </div>
            <div class="modal-footer">
                <a href="<?php 
echo Url::to(['events/delete', 'id' => $event->id]);
?>
" type="button"
                   class="btn btn-danger"><?php 
echo Lang::t('page/eventView', 'deleteBtn');
?>
</a>
                <button type="button" class="btn btn-default"
                        data-dismiss="modal"><?php 
echo Lang::t('page/eventView', 'cancel');
?>
</button>
            </div>
        </div>
    </div>
</div>

<?php 
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_ALARM, 'id' => $event->id]);
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_SHOW_IMG]);
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_SHOW_LOCATION]);
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_SHOW_VIDEO]);
Exemplo n.º 13
0
</td>
                                <td><?php 
    echo Html::button(Lang::t('main/music', 'btnAdd'), ['class' => 'btn btn-link btn-music-add no-focus', 'data-music-id' => $music->id, 'data-url' => Url::to(['music/sound', 'id' => $music->id])]);
    ?>
</td>
                            </tr>
                            <?php 
}
?>
                    </table>
                </div>
                <div class="block-add-sound hide">
                    <?php 
echo \frontend\widgets\AddMusicWidget::widget([]);
?>
                </div>
            </div>
            <div class="modal-footer">
                <?php 
echo Html::button(Lang::t('main/music', 'modalAddMusic_addFromList'), ['class' => 'btn btn-link btn-add-from-list pull-left no-focus hide']);
?>
                <button type="button" class="btn btn-default"
                        data-dismiss="modal"><?php 
echo Lang::t('page/listView', 'cancel');
?>
</button>
            </div>
        </div>
    </div>
</div>
Exemplo n.º 14
0
        <?php 
echo EventList::widget(['orderBy' => EventList::ORDER_BY_DATE, 'dateCreateType' => EventList::DATE_CREATE_AFTER, 'events' => $events, 'display' => EventList::EVENT_LIST_DISPLAY_MINI]);
?>
    </div>
    <div class="col-md-2 text-center">
        <h4><b><?php 
echo Html::a($year - 1, ['event/year', 'year' => $year - 1]);
?>
</b></h4>
        <h4><b><?php 
echo Html::a($year, ['event/year', 'year' => $year]);
?>
</b></h4>
        <?php 
for ($i = 1; $i <= 12; $i++) {
    $monthText = Lang::t('month', 'month' . str_pad($i, 2, '0', STR_PAD_LEFT));
    if ($i == $month) {
        $monthText = Html::tag('b', $monthText);
    } else {
        $monthText = Html::a($monthText, ['event/month', 'year' => $year, 'month' => $i]);
    }
    echo Html::tag('div', $monthText);
}
?>
        <h4><b><?php 
echo Html::a($year + 1, ['event/year', 'year' => $year + 1]);
?>
</b></h4>
    </div>
</div>
Exemplo n.º 15
0
                    </tr>
                    <?php 
}
?>
            </table>

            <div class="input-group margin-bottom">
                <span class="input-group-addon" id="basic-addon1">Метки</span>
                <?php 
echo Html::textInput('tags', '', array('id' => 'tokenfield', 'data-tokens' => '', 'class' => 'form-control'));
?>
            </div>

            <div class="form-group">
                <?php 
echo Html::submitButton(Lang::t('page/listAdd', 'buttonAdd'), ['class' => 'btn btn-primary', 'name' => 'list-add-button']);
?>
            </div>

            <?php 
ActiveForm::end();
?>
        </div>
    </div>

    <?php 
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_ADD_MUSIC, 'musics' => $musics]);
?>
    <?php 
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_ADD_IMG, 'imgs' => $userImgs]);
?>
Exemplo n.º 16
0
use frontend\models\Lang;
use frontend\widgets\EventList;
use yii\bootstrap\Html;
use yii\helpers\Url;
$this->title = Lang::t('main/index', 'title');
$keywords = 'brazilian zouk, zouk, бразильский зук, бразильский танец зук, конгресс, congress, мастер класс, фестиваль, потанцевать, научиться';
$description = 'Зук – это современный, романтичный и ритмичный танец. Найти вечиринку, конгресс по бразильскому зуку. Разместить своё мероприятие.';
$this->registerMetaTag(['name' => 'keywords', 'content' => $keywords], 'keywords');
$this->registerMetaTag(['name' => 'description', 'content' => $description], 'description');
Yii::$app->params['jsZoukVar']['dateCreateType'] = EventList::DATE_CREATE_AFTER;
?>
<div class="site-index">
    <div class="body-content">
        <div class="row">
            <div class="col-md-8">
                <?php 
echo $this->render('/event/tabs', ['selectTab' => 2]);
?>
                <?php 
echo EventList::widget(['orderBy' => EventList::ORDER_BY_DATE, 'dateCreateType' => EventList::DATE_CREATE_AFTER]);
?>
            </div>
            <div class="col-md-4">
                <?php 
echo Html::a(Lang::t('main', 'mainButtonAddEvent'), ['/events/add'], ['class' => 'btn btn-success btn-label-main add-item']);
echo $this->render('/list/listRightBlock');
?>
            </div>
        </div>
    </div>
</div>
Exemplo n.º 17
0
echo Lang::t('page/accountProfile', 'about_me');
?>
</h4>
            <?php 
echo $userinfo->getContactInfo('about_me');
?>
            <h4><?php 
echo Lang::t('page/accountProfile', 'contact_info');
?>
</h4>
            <table class="contact-table">
                <?php 
$arrContactInfo = ['telephone', 'skype', 'vk', 'fb'];
foreach ($arrContactInfo as $info) {
    if (!empty($userinfo->{$info})) {
        echo Html::tag('tr', Html::tag('td', Html::tag('b', Lang::t('page/accountProfile', 'info_' . $info))) . Html::tag('td', $userinfo->getContactInfo($info)));
    }
}
?>
            </table>
        </div>
        <div id="block-user-item" class="block-user-tab-info hide">
            <?php 
echo ItemList::widget(['orderBy' => ItemList::ORDER_BY_ID, 'userId' => $user->id, 'display' => ItemList::ITEM_LIST_DISPLAY_MINI, 'onlyItem' => true, 'limit' => 50]);
?>
        </div>
        <div id="block-user-audio" class="block-user-tab-info hide">
            <div class="block-item-list-sound">
                <?php 
foreach ($musics as $music) {
    echo \frontend\widgets\SoundWidget::widget(['music' => $music]);
Exemplo n.º 18
0
 /**
  * Finds the Lang model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Lang the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Lang::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 19
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     $languages = Lang::find()->all();
     foreach ($languages as $language) {
         $this->languages[] = $language->getAttribute('url');
     }
     if ($this->enableLocaleUrls && $this->languages) {
         if (!$this->enablePrettyUrl) {
             throw new InvalidConfigException('Locale URL support requires enablePrettyUrl to be set to true.');
         }
     }
     $this->_defaultLanguage = Lang::getDefaultLang()->getAttribute('url');
     return parent::init();
 }
Exemplo n.º 20
0
use frontend\models\Lang;
use frontend\widgets\ItemList;
use yii\helpers\Html;
$keywords = 'brazilian zouk, zouk, бразильский зук, бразильский танец зук, бразильский зук школа танцев, научиться танцевать бразильский зук, видео бразильский зук, онлайн бразильсий зук, посмотреть бразильский зук, бразильский зук для начинающих, уроки зука базовые шаги';
$description = 'Зук – это современный, романтичный и ритмичный танец. Как музыкальное направление, зук появился приблизительно в 80-х годах XX-го века. Его ритмы начали звучать на французских островах Гваделупа, Мартиника, Гаити, Сент-Люсия и приобрели большую популярность за счет исполнителей Grammacks и Exile One. Однако бразильцы считают что эта музыка появилась во Французкой Полинезии.';
$this->registerMetaTag(['name' => 'keywords', 'content' => $keywords], 'keywords');
$this->registerMetaTag(['name' => 'description', 'content' => $description], 'description');
?>
<div class="site-index">
    <div class="body-content">
        <div class="row">
            <div class="col-md-8">
                <?php 
echo $this->render('/list/tabs', ['selectTab' => 3, 'searchTag' => $searchTag]);
?>
                <?php 
echo ItemList::widget(['orderBy' => ItemList::ORDER_BY_LIKE_SHOW, 'dateCreateType' => ItemList::DATE_CREATE_MONTH, 'searchTag' => $searchTag]);
?>
            </div>
            <div class="col-md-4">
                <?php 
echo Html::a(Lang::t('main', 'mainButtonAddRecord'), ['/list/add'], ['class' => 'btn btn-success btn-label-main add-item']);
echo $this->render('/list/listRightBlock');
?>
            </div>
        </div>

    </div>
</div>
Exemplo n.º 21
0
?>
</h3>
            <table style="border-collapse: separate; border-spacing: 5px;">
                <tr>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                <?php 
if (!empty($ulogins)) {
    foreach ($ulogins as $ulogin) {
        echo "<tr>";
        echo Html::tag('td', Html::tag('b', $ulogin->network));
        echo Html::tag('td', Html::a($ulogin->identity, $ulogin->identity));
        echo Html::tag('td', Html::a("<span class='glyphicon glyphicon-remove btn btn-link'></span>", Url::to(['account/settings']), ['data-social' => $ulogin->id, 'class' => 'social-unbind', 'target' => '_blank']));
        echo "</tr>";
    }
}
?>
            </table>
            <label><?php 
echo Lang::t('page/accountProfile', 'socialConnect');
?>
</label>
            <div id="uLogin"
                 data-ulogin="******"></div>

        </div>
    </div>
</div>
Exemplo n.º 22
0
$this->beginBody();
?>

<div class="wrap">
    <?php 
NavBar::begin(['brandLabel' => 'Improving LIVES', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
if (\frontend\models\User::isActive() || true) {
    $menuItems = [['label' => Yii::t('frontend', 'My Page'), 'items' => [['label' => Yii::t('frontend', 'Weight Tracker'), 'url' => ['/members/weight-tracker']], ['label' => Yii::t('frontend', 'Meal Plan'), 'url' => ['/members/meal-plan']]]], ['label' => Yii::t('frontend', 'PDFs'), 'url' => ['/members/pdfs']], ['label' => Yii::t('frontend', 'Recipes'), 'url' => ['/recipes/categories']], ['label' => Yii::t('frontend', 'Articles'), 'url' => ['/articles/categories']], ['label' => Yii::t('frontend', 'FAQ'), 'url' => ['/faq/categories']]];
}
if (Yii::$app->user->isGuest) {
    $menuItems[] = ['label' => Yii::t('frontend', 'Signup'), 'url' => ['/site/signup']];
    $menuItems[] = ['label' => Yii::t('frontend', 'Login'), 'url' => ['/site/login']];
} else {
    $menuItems[] = ['label' => Yii::t('frontend', 'Logout ({name})', ['name' => Yii::$app->user->identity->email]), 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']];
}
$menuItems[] = ['label' => Yii::t('frontend', Lang::getLangByUrl(Yii::$app->language)->name), 'items' => WLang::getItems()];
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
NavBar::end();
?>

    <div class="container">
        <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        <?php 
echo Alert::widget();
?>
        <?php 
echo $content;
?>
        <?php 
Exemplo n.º 23
0
 public function actionAlarm()
 {
     $id = Yii::$app->request->post('id');
     $msg = Yii::$app->request->post('msg');
     $event = Event::findOne($id);
     if ($event && !empty($msg)) {
         if (Alarm::addAlarm(Alarm::ENTITY_EVENT, $event->id, $msg)) {
             $resultMsg = Lang::t('main/dialogs', 'modalAlarm_msgAlarmResultTrue');
             Yii::$app->session->setFlash('success', Lang::t('main/dialogs', 'modalAlarm_msgAlarmResultTrue'));
         } else {
             $resultMsg = Lang::t('main/dialogs', 'modalAlarm_msgAlarmResultFalse');
             Yii::$app->session->setFlash('success', Lang::t('main/dialogs', 'modalAlarm_msgAlarmResultFalse'));
         }
         return json_encode(['msg' => $resultMsg]);
     }
     return "";
 }
Exemplo n.º 24
0
<?php

/**
 *
 */
use common\models\Music;
use frontend\models\Lang;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
$this->registerJsFile(Yii::$app->request->baseUrl . '/js/music/addMusic.js', ['depends' => [\yii\web\JqueryAsset::className()]]);
$music = new Music();
echo "<b>" . Lang::t('main/music', 'limitLabel') . "</b>";
echo "<ul>";
echo "<li>" . Lang::t('main/music', 'limitMaxSize') . "</li>";
echo "<li>" . Lang::t('main/music', 'limitCopyright') . "</li>";
echo "</ul>";
$form = ActiveForm::begin(['id' => 'musicAddForm', 'options' => ['enctype' => 'multipart/form-data'], 'action' => Url::to(['music/add'], true)]);
echo $form->field($music, 'musicFile')->label(false)->fileInput(['id' => 'soundUpload', 'class' => 'hide']);
echo Html::button(Lang::t('main/music', 'musicFileField'), ['id' => 'btnSoundUpload', 'class' => 'btn btn-primary']);
?>
<div class="alert alert-info loading-info hide" role="alert"><?php 
echo Lang::t('main/music', 'loading');
?>
</div>

<?php 
ActiveForm::end();
Exemplo n.º 25
0
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title"><?php 
echo Lang::t('main/dialogs', 'modalAlarm_title');
?>
</h4>
            </div>
            <div class="modal-body">
                <?php 
echo Lang::t('main/dialogs', 'modalAlarm_msg');
?>
                <?php 
echo Html::input('text', 'alarmMsg', '', ['class' => 'form-control']);
?>
            </div>
            <div class="modal-footer">
                <?php 
echo Html::a(Lang::t('main/dialogs', 'modalAlarm_alarmBtn'), Url::to(['list/alarm']), ['id' => 'alarm-item', 'class' => 'btn btn-danger', 'data-href' => Url::to(['list/alarm']), 'data-msg-alarm' => Lang::t('main/dialogs', 'modalAlarm_msg'), 'data-id' => $itemId]), ' ';
?>
                <button type="button" class="btn btn-default"
                        data-dismiss="modal"><?php 
echo Lang::t('main/dialogs', 'cancel');
?>
</button>
            </div>
        </div>
    </div>
</div>
Exemplo n.º 26
0
<div id="eventMap">

</div>

<div class="row">
    <div class="col-md-10">
        <?php 
echo EventList::widget(['orderBy' => EventList::ORDER_BY_DATE, 'dateCreateType' => EventList::DATE_CREATE_AFTER, 'events' => $events, 'display' => EventList::EVENT_LIST_DISPLAY_MINI]);
?>
    </div>
    <div class="col-md-2 text-center">
        <h4><b><?php 
echo Html::a($year - 1, ['event/year', 'year' => $year - 1]);
?>
</b></h4>
        <h4><b><?php 
echo $year;
?>
</b></h4>
        <?php 
for ($i = 1; $i <= 12; $i++) {
    echo Html::tag('div', Html::a(Lang::t('month', 'month' . str_pad($i, 2, '0', STR_PAD_LEFT)), ['event/month', 'year' => $year, 'month' => $i]));
}
?>
        <h4><b><?php 
echo Html::a($year + 1, ['event/year', 'year' => $year + 1]);
?>
</b></h4>
    </div>
</div>
Exemplo n.º 27
0
            <div class="input-group margin-bottom">
                <span class="input-group-addon"><?php 
echo Lang::t('page/schoolEdit', 'tags');
?>
</span>
                <?php 
echo Html::textInput('tags', $tagValue, ['id' => 'tokenfield', 'data-tokens' => $tagValue, 'class' => 'form-control']);
?>
            </div>

            <div class="form-group">
                <?php 
echo Html::submitButton(Lang::t('page/schoolEdit', 'buttonSave'), ['class' => 'btn btn-primary', 'name' => 'list-add-button']);
?>
                <?php 
echo Html::a(Lang::t('page/schoolEdit', 'buttonCancel'), $school->getUrl(), ['class' => 'btn btn-default pull-right']);
?>
            </div>

            <?php 
ActiveForm::end();
?>
        </div>
    </div>

    <?php 
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_ADD_IMG, 'imgs' => $userImgs]);
?>

    <?php 
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_ADD_LOCATION, 'setLocationType' => 'school']);
Exemplo n.º 28
0
</span><br/>
                            <span title="<?php 
echo $showTitle;
?>
"><i
                                    class="glyphicon glyphicon-eye-open"></i> <?php 
echo $item->show_count;
?>
</span>
                        </div>
                    </td>
                    <td>
                        <div class="pull-right user-info">
                            <div class="user-action-time">
                                <?php 
echo Lang::t("main", "created") . " " . date("d.m.Y", $item->date_create) . " " . Lang::t("main", "at") . " " . date("H:i", $item->date_create);
?>
                            </div>
                            <div class="user-gravatar32">
                                <?php 
echo Html::a('<div class="background-img" style="background-image: url(\'' . $author->getAvatarPic() . '\')"></div>', ['user/' . $author->display_name]);
?>
                            </div>
                            <div class="user-details">
                                <?php 
echo Html::a($author->getDisplayName() . ' (<b>' . $author->reputation . '</b>)', ['user/' . $author->display_name]);
?>
                            </div>
                        </div>
                    </td>
                </tr>
Exemplo n.º 29
0
?>
</h4>
            </div>
            <div class="modal-body">
                <?php 
echo Lang::t('page/schoolView', 'deleteConfirm');
?>
            </div>
            <div class="modal-footer">
                <a href="<?php 
echo Url::to(['schools/delete', 'id' => $school->id]);
?>
" type="button"
                   class="btn btn-danger"><?php 
echo Lang::t('page/schoolView', 'deleteBtn');
?>
</a>
                <button type="button" class="btn btn-default"
                        data-dismiss="modal"><?php 
echo Lang::t('page/schoolView', 'cancel');
?>
</button>
            </div>
        </div>
    </div>
</div>

<?php 
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_ALARM, 'id' => $school->id]);
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_SHOW_IMG]);
echo ModalDialogsWidget::widget(['action' => ModalDialogsWidget::ACTION_MODAL_SHOW_LOCATION]);
Exemplo n.º 30
0
<div id="school-<?php 
echo $school->id;
?>
" data-id="<?php 
echo $school->id;
?>
" class="block-school-summary block-school-summary-mini margin-bottom">
    <div class="mini-block-school-vote">
        <span class="glyphicon glyphicon-thumbs-up"></span>
        <?php 
echo Html::tag('span', $school->like_count, ['title' => $school->like_count . ' ' . Lang::tn('main', 'vote', $school->like_count)]);
?>
    </div>
    <div class="mini-block-school-show">
        <span class="glyphicon glyphicon-eye-open"></span>
        <?php 
echo Html::tag('span', $school->show_count, ['title' => $school->show_count . ' ' . Lang::tn('main', 'showCount', $school->show_count)]);
?>
    </div>
    <div>
        <b><?php 
echo Html::a($school->getTitle(), $url, ['class' => 'school-hyperlink']);
?>
</b>
    </div>
    <div class="mini-block-school-date">
        <?php 
echo date("d.m.Y", $school->date_create) . " " . Lang::t("main", "at") . " " . date("H:i", $school->date_create);
?>
    </div>
</div>