Пример #1
0
 private function getControllerJs(Tag $t, $controllerName)
 {
     $path = 'js/' . $controllerName . '.js';
     if (file_exists($path)) {
         return $t->script(a::src(asset($path)));
     }
     return '';
 }
Пример #2
0
 private function comments()
 {
     $t = new Tag();
     echo "\n";
     $comment = "!--";
     echo (string) new DomElements([$t->{$comment}("HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries"), $t->{$comment}("WARNING: Respond.js doesn't work if you view the page via file://"), $t->{$comment}(['[if lt IE 9]', $t->script(a::src("https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js")), $t->script(a::src("https://oss.maxcdn.com/respond/1.4.2/respond.min.js")), '[endif]'])]);
     echo "\n";
 }
Пример #3
0
 protected function content()
 {
     $t = (new Layout())->getTag();
     /** @var User $user */
     $user = $this->user;
     $dataToggle = "data-toggle";
     $dataRel = "data-rel";
     /** @noinspection PhpMethodParametersCountMismatchInspection */
     return $this->setContent(get_called_class(), '', $t->div(a::c1ass('content'), $t->div(a::c1ass('row'), $t->div(a::c1ass('col-md-3'), $t->div(a::c1ass('panel widget light-widget panel-bd-top'), $t->div(a::c1ass('panel-heading no-title')), $t->div(a::c1ass('panel-body'), $t->div(a::c1ass('text-center vd_info-parent'), $t->img(a::alt('Your Avatar '), a::src(asset('img/profile-icon.png')))), $t->h2(a::c1ass('font-semibold mgbt-xs-5'), $user->getFullName()), $t->h4($user->getPosition()), $t->p(a::c1ass('mgtp-20 font-x13'), trans('layout.details')), $t->div(a::c1ass('font-x13'), $t->table(a::c1ass('table table-striped table-hover'), $t->tr($t->td('Status'), $t->td($t->span(a::c1ass('label label-' . $this->getStatusColor($user)), $user->getStatus()))), $t->tr($t->td('E-mail'), $t->td($t->a(a::href('mailto:' . $user->getEmail()), $user->getEmail()))), $t->tr($t->td(trans('menu.member.info', ['date' => ''])), $t->td($user->getCreated()->format('d.m.Y') . ' r.'))))))), $t->div(a::c1ass('col-md-9'), $t->div(a::c1ass('tabs widget'), $t->ul(a::c1ass('nav nav-tabs widget'), $t->li(a::c1ass('active'), $t->a(a::$dataToggle('tab'), a::href('#activity-tab'), trans('menu.activity'))), $t->li($t->a(a::$dataToggle('tab'), a::href('#groups-tab'), trans('menu.groups'))), $t->li($t->a(a::$dataToggle('tab'), a::href('#projects-tab'), trans('menu.projects')))), $this->renderEditButton($t, $user), $t->div(a::c1ass('tab-content'), $t->div(a::id('activity-tab'), a::c1ass('tab-pane active'), $t->div(a::c1ass('col-md-12 pd-5'), $t->h3(a::c1ass('mgbt-xs-15 font-semibold'), $t->i(a::c1ass('fa fa-globe mgr-10 profile-icon')), trans('menu.activity')), $t->div($t->div(a::c1ass('content-list'), $t->div(a::$dataRel('scroll'), new ActivitiesList($user->getActivities())))))), $t->div(a::id('groups-tab'), a::c1ass('tab-pane'), $t->div(a::c1ass('col-md-12 pd-5'), $t->h3(a::c1ass('mgbt-xs-15 font-semibold'), $t->i(a::c1ass('fa fa-users mgr-10 profile-icon')), trans('menu.groups')))), $t->div(a::id('projects-tab'), a::c1ass('tab-pane'), $t->div(a::c1ass('col-md-12 pd-5'), $t->h3(a::c1ass('mgbt-xs-15 font-semibold'), $t->i(a::c1ass('fa fa-folder mgr-10 profile-icon')), trans('menu.projects'))))))))));
 }
Пример #4
0
 private function layout()
 {
     $layout = new Layout();
     $t = $layout->getTag();
     $footerJs = array('lib/plugins/iCheck/icheck.min', 'js/lib/bootstrap-validator/validator.min');
     $layout->addAllFooterJs($footerJs);
     $layout->addBodyAttribute(a::c1ass('login-page'));
     /** @noinspection PhpMethodParametersCountMismatchInspection */
     $layout->setContent($t->div(a::c1ass('login-box'), [$t->div(a::c1ass('login-logo'), $t->img(a::id('profile-img'), a::c1ass('login-box-logo'), a::src(asset('img/solvre128.png')))), $this->renderForm($t)]));
     return $layout;
 }
Пример #5
0
 /**
  * @param Tag $t
  * @return mixed
  */
 private function getImageFromData($t)
 {
     /** @noinspection PhpUndefinedMethodInspection */
     $icon = $this->getData()[1]->getIcon();
     if ($icon != null) {
         /** @noinspection PhpMethodParametersCountMismatchInspection */
         return $t->img(a::src($icon), a::c1ass('img-circle'), a::alt('User Image'));
     } else {
         return $t->i(a::c1ass('fa fa-user fa-3x white'));
     }
 }
Пример #6
0
 /**
  * @param $iconPath
  * @param Tag $t
  * @return mixed
  */
 private function getImageBig($iconPath, $t)
 {
     if ($iconPath != null) {
         return $t->img(a::c1ass('user-image'), a::src($iconPath));
     } else {
         return $t->i(a::c1ass('fa fa-user fa-5x white'), ' ');
     }
 }
Пример #7
0
 /**
  * @param Activity $activity
  * @return a
  */
 private function renderImage($activity)
 {
     if ($activity->getUser()->getAvatar() !== null) {
         return a::src($activity->getUser()->getAvatar());
     } else {
         return a::src(asset('img/profile-icon.png'));
     }
 }