Ejemplo n.º 1
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', 'Game' => 'game_id', trans('app.title') => 'title', trans('app.ip') => 'ip'], 'tableRow' => function ($server) {
         $gameIcon = ($server->game and $server->game->icon) ? HTML::image($server->game->uploadPath() . $server->game->icon, $server->game->title) : null;
         return [$server->id, raw($gameIcon), raw(Hover::modelAttributes($server, ['creator'])->pull(), $server->title), $server->ip];
     }]);
 }
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title'], 'tableRow' => function ($tournament) {
         Hover::modelAttributes($tournament, ['icon', 'creator']);
         return [$tournament->id, raw(Hover::pull(), $tournament->title)];
     }]);
 }
Ejemplo n.º 3
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.published') => 'published', trans('app.title') => 'title', trans('app.category') => 'teamcat_id'], 'tableRow' => function ($team) {
         Hover::modelAttributes($team, ['image', 'access_counter', 'creator']);
         return [$team->id, raw($team->published ? HTML::fontIcon('check') : null), raw(Hover::pull() . HTML::link('teams/' . $team->id . '/' . $team->slug, $team->title)), $team->teamcat->title];
     }]);
 }
 public function index()
 {
     $this->indexPage(['buttons' => ['new', 'category'], 'tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.category') => 'downloadcat_id'], 'tableRow' => function ($download) {
         Hover::modelAttributes($download, ['access_counter', 'creator']);
         return [$download->id, raw(Hover::pull() . HTML::link('downloads/' . $download->id . '/' . $download->slug, $download->title)), $download->downloadcat->title];
     }]);
 }
Ejemplo n.º 5
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.provider') => 'provider'], 'tableRow' => function ($video) {
         Hover::modelAttributes($video, ['creator']);
         return [$video->id, raw(Hover::pull(), $video->title), Video::$providers[$video->provider]];
     }]);
 }
Ejemplo n.º 6
0
 public function index()
 {
     $this->indexPage(['searchFor' => ['leftTeam', 'title'], 'tableHead' => [trans('app.id') => 'id', trans('app.state') => 'state', trans('matches::left_team') => 'left_team_id', trans('matches::right_team') => 'right_team_id', trans('app.object_tournament') => 'tournament_id', trans('matches::played_at') => 'played_at'], 'tableRow' => function ($match) {
         Hover::modelAttributes($match, ['access_counter', 'creator']);
         return [$match->id, raw($match->state == 1 ? HTML::fontIcon('check') : null), raw(Hover::pull() . HTML::link('matches/' . $match->id, $match->left_team->title)), raw(HTML::link('matches/' . $match->id, $match->right_team->title)), $match->tournament->short, $match->played_at];
     }]);
 }
Ejemplo n.º 7
0
 /**
  * Fiinish a process
  *
  * @param $is_completed
  * @param null $message
  * @return $this
  */
 public function finish($is_completed)
 {
     $this->is_completed = $is_completed;
     $this->duration = raw('TIMESTAMPDIFF(SECOND, created_at, NOW())');
     $this->finished_at = Carbon::now();
     return $this;
 }
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title'], 'tableRow' => function ($gallery) {
         Hover::modelAttributes($gallery, ['access_counter', 'creator']);
         return [$gallery->id, raw(Hover::pull() . HTML::link('galleries/' . $gallery->id, $gallery->title))];
     }]);
 }
Ejemplo n.º 9
0
 public function index()
 {
     $this->indexPage(['buttons' => ['new', 'category', 'config'], 'tableHead' => [trans('app.id') => 'id', trans('app.published') => 'published', trans('app.title') => 'title', trans('app.author') => 'creator_id', trans('app.created_at') => 'created_at'], 'tableRow' => function ($news) {
         Hover::modelAttributes($news, ['access_counter']);
         return [$news->id, raw($news->published ? HTML::fontIcon('check') : null), raw(Hover::pull() . HTML::link(URL::route('news.show', [$news->id]), $news->title)), raw(HTML::link(URL::route('users.show', [$news->creator->id]), $news->creator->username)), $news->created_at];
     }]);
 }
Ejemplo n.º 10
0
 public function index()
 {
     $this->indexPage(['buttons' => ['new', 'category'], 'tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.category') => 'advertcat_id'], 'tableRow' => function ($advert) {
         Hover::modelAttributes($advert, ['image', 'access_counter', 'creator']);
         return [$advert->id, raw(Hover::pull(), $advert->title), $advert->advertcat->title];
     }]);
 }
Ejemplo n.º 11
0
 public function index()
 {
     $this->indexPage(['buttons' => null, 'dataSource' => Module::findAll(), 'brightenFirst' => false, 'tableHead' => [trans('app.title') => null, trans('modules::enabled') => null, trans('app.state') => null], 'tableRow' => function ($module) {
         if ($module->enabled()) {
             $enabled = HTML::fontIcon('check');
         } else {
             $enabled = HTML::fontIcon('close');
         }
         /*
          * Display if the module is installed
          */
         $state = Cache::get(self::CACHE_KEY . $module->title, null);
         if ($state === true) {
             $state = trans('app.valid');
         }
         if ($state === false) {
             $state = trans('app.invalid');
         }
         return [$module->title, raw($enabled), $state];
     }, 'actions' => ['install', function ($module) {
         if ($module->installer() !== false) {
             return icon_link('plus-circle', trans('modules::install'), url('admin/modules/' . $module->title . '/install/0'), false, ['data-confirm' => trans('modules::installation')]);
         }
     }]]);
 }
Ejemplo n.º 12
0
 public function index()
 {
     $this->indexPage(['buttons' => ['new', 'category'], 'tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.category') => 'slidecat_id'], 'tableRow' => function ($slide) {
         Hover::modelAttributes($slide, ['image', 'creator']);
         return [$slide->id, raw(Hover::pull(), $slide->title), $slide->slidecat->title];
     }]);
 }
Ejemplo n.º 13
0
 public function index()
 {
     $this->indexPage(['buttons' => ['new', 'category'], 'tableHead' => [trans('app.id') => 'id', trans('app.published') => 'published', trans('app.title') => 'title', trans('app.category') => 'partnercat_id'], 'tableRow' => function ($partner) {
         Hover::modelAttributes($partner, ['image', 'access_counter', 'creator']);
         return [$partner->id, raw($partner->published ? HTML::fontIcon('check') : null), raw(Hover::pull(), $partner->title), $partner->partnercat->title];
     }]);
 }
Ejemplo n.º 14
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.provider') => 'provider'], 'tableRow' => function ($stream) {
         Hover::modelAttributes($stream, ['creator']);
         return [$stream->id, raw(Hover::pull() . HTML::link('streams/' . $stream->id . '/' . $stream->slug, $stream->title)), Stream::$providers[$stream->provider]];
     }]);
 }
Ejemplo n.º 15
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.category') => 'teamcat_id'], 'tableRow' => function ($team) {
         Hover::modelAttributes($team, ['image', 'access_counter', 'creator']);
         return [$team->id, raw(Hover::pull(), $team->title), $team->teamcat->title];
     }]);
 }
Ejemplo n.º 16
0
 public function index()
 {
     $this->indexPage(['buttons' => null, 'tableHead' => [trans('app.title') => 'title', trans('app.category') => 'newscat_id', trans('app.date') => 'created_at'], 'tableRow' => function ($news) {
         return [raw(HTML::link(url('news/' . $news->id . '/' . $news->slug), $news->title)), $news->newscat->title, $news->created_at];
     }, 'actions' => null, 'filter' => true, 'permaFilter' => function ($query) {
         return $query->published();
     }], 'front');
 }
Ejemplo n.º 17
0
 public function index()
 {
     $this->indexPage(['buttons' => null, 'dataSource' => ForumReportCase::findAll(), 'tableHead' => ['#' => null, trans('app.object_post') . ' (' . trans('app.text') . ')' => null, trans('app.object_reports') => null, trans('app.date') => null], 'tableRow' => function ($forumReportCase) {
         $forumPost = $forumReportCase->post;
         $link = HTML::link($forumPost->paginatedPostUrl(), $forumPost->plainText(80));
         return [$forumReportCase->index, raw($link), $forumReportCase->report_counter, $forumReportCase->updated_at];
     }, 'actions' => ['delete'], 'sortBy' => 'level', 'order' => 'asc']);
 }
Ejemplo n.º 18
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title'], 'tableRow' => function ($opponent) {
         Hover::modelAttributes($opponent, ['image', 'creator']);
         $icon = $opponent->country->icon ? HTML::image($opponent->country->uploadPath() . $opponent->country->icon, $opponent->country->title) : null;
         return [$opponent->id, raw(Hover::pull() . $icon, ' ' . $opponent->title)];
     }]);
 }
Ejemplo n.º 19
0
 public function index()
 {
     $this->indexPage(['buttons' => null, 'tableHead' => [trans('app.id') => 'id', trans('app.username') => 'username', trans('app.name') => 'first_name', trans('users::registration') => 'created_at', trans('users::last_login') => 'last_login'], 'tableRow' => function ($user) {
         return [$user->id, raw(link_to('users/' . $user->id . '/' . $user->slug, $user->username)), $user->first_name . ' ' . $user->last_name, $user->created_at, $user->last_login ? $user->last_login->toDateString() : null];
     }, 'actions' => null, 'searchFor' => 'username', 'permaFilter' => function ($users) {
         return $users->where('id', '!=', 1);
         // Do not keep the daemon user
     }], 'front');
 }
Ejemplo n.º 20
0
 public function index()
 {
     if (!$this->checkAccessRead()) {
         return;
     }
     $this->indexPage(['buttons' => null, 'tableHead' => [trans('app.id') => 'id', trans('contact::new') => 'new', trans('app.title') => 'title', trans('app.creator') => 'username', trans('app.created_at') => 'created_at'], 'tableRow' => function ($msg) {
         return [$msg->id, raw($msg->new ? HTML::fontIcon('envelope') : null), raw(link_to_route('admin.contact.show', $msg->title, [$msg->id])), $msg->username, $msg->created_at];
     }, 'actions' => ['delete', 'restore']]);
 }
Ejemplo n.º 21
0
 public function index()
 {
     $this->indexPage(['buttons' => ['new', 'config'], 'tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title'], 'tableRow' => function ($forum) {
         $title = e($forum->title);
         if ($forum->level == 0) {
             $title = '<strong>' . $title . '</strong>';
         }
         return [$forum->id, raw(Hover::modelAttributes($forum, ['creator'])->pull() . $title)];
     }, 'sortBy' => 'level', 'order' => 'asc']);
 }
Ejemplo n.º 22
0
 public function index()
 {
     $this->indexPage(['buttons' => null, 'brightenFirst' => false, 'tableHead' => [trans('app.position') => 'position', trans('app.title') => 'title', trans('app.object_tournament') => 'tournament_id', trans('app.object_game') => 'game_id', trans('app.date') => 'achieved_at'], 'tableRow' => function ($award) {
         $game = '';
         if ($award->game->icon) {
             $game = HTML::image($award->game->uploadPath() . $award->game->icon, e($award->game->title), ['title' => e($award->game->title)]);
             // "title" attribute
         }
         return [raw($award->positionIcon()), raw($award->url ? HTML::link($award->url, e($award->title)) : e($award->title)), $award->tournament ? $award->tournament->short : null, raw($game), $award->achieved_at];
     }, 'actions' => null], 'front');
 }
Ejemplo n.º 23
0
 public function getIndex()
 {
     $this->indexPage(['buttons' => null, 'tableHead' => [trans('app.id') => 'id', trans('app.username') => 'username', trans('users::teams') => null], 'tableRow' => function ($user) {
         $data = [];
         foreach ($user->teams as $team) {
             $data[$team->id] = e($team->title);
         }
         return [$user->id, $user->username, raw('<div class="data" data-user-id="' . $user->id . '">' . json_encode($data) . '</div>')];
     }, 'searchFor' => 'username', 'actions' => null]);
     $this->pageOutput(HTML::script('vendor/contentify/members.js'));
 }
Ejemplo n.º 24
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.image') => null, trans('app.created_at') => 'created_at'], 'tableRow' => function ($image) {
         $imgCode = HTML::image($image->uploadPath() . '100/' . $image->image, 'Image-Preview', ['class' => 'image']);
         $preview = '<a href="' . $image->uploadPath() . $image->image . '" target="_blank">' . $imgCode . '</a>' . '<br>' . e($image->tags);
         if ($image->gallery) {
             $preview .= '<br>' . link_to('galleries/' . $image->gallery->id, 'Gallery: ' . e($image->gallery->title));
         }
         return [$image->id, raw($preview), $image->created_at];
     }, 'searchFor' => 'tags']);
 }
 public function index()
 {
     $this->indexPage(['buttons' => ['<a href="' . url('admin/activities/delete/all') . '" class="btn btn-default" data-confirm-delete="1">' . HTML::fontIcon('trash') . ' ' . trans('app.delete') . '</a>'], 'tableHead' => [trans('app.id') => 'id', trans('users::frontend') => 'frontend', trans('users::model_class') => 'model_class', trans('users::activity') => 'activity', trans('app.username') => 'user_id', trans('app.date') => 'created_at'], 'tableRow' => function ($userActivity) {
         if ($userActivity->frontend) {
             $frontend = HTML::fontIcon('check');
         } else {
             $frontend = HTML::fontIcon('close');
         }
         return [$userActivity->id, raw($frontend), $userActivity->model_class, $userActivity->activity_id, raw(HTML::link(URL::route('users.show', [$userActivity->user->id]), $userActivity->user->username)), $userActivity->created_at];
     }, 'searchFor' => 'model_class', 'actions' => []]);
 }
Ejemplo n.º 26
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.icon') => null, trans('app.title') => 'title'], 'tableRow' => function ($country) {
         if ($country->icon) {
             $icon = HTML::image(asset($country->uploadPath() . $country->icon), $country->title);
         } else {
             $icon = null;
         }
         return [$country->id, raw($icon), $country->title];
     }]);
 }
Ejemplo n.º 27
0
 public function index()
 {
     $this->pageView('matches::filter');
     $this->indexPage(['buttons' => null, 'brightenFirst' => false, 'filter' => true, 'searchFor' => ['rightTeam', 'title'], 'tableHead' => [trans('app.date') => 'played_at', trans('app.object_game') => 'game_id', trans('matches::right_team') => 'right_team_id', trans('matches::score') => 'left_score'], 'tableRow' => function ($match) {
         if ($match->game->icon) {
             $game = HTML::image($match->game->uploadPath() . $match->game->icon, $match->game->title, ['width' => 16, 'height' => 16]);
         } else {
             $game = null;
         }
         return [$match->played_at, raw($game), raw(HTML::link(url('matches/' . $match->id), $match->right_team->title)), raw($match->scoreCode())];
     }, 'actions' => null, 'pageTitle' => false], 'front');
 }
Ejemplo n.º 28
0
 public function index()
 {
     $this->pageView('messages::page_navigation', ['active' => 'inbox']);
     $this->indexPage(['buttons' => null, 'tableHead' => [trans('app.new') => 'new', trans('app.title') => 'title', trans('app.creator') => 'creator_id', trans('app.date') => 'created_at'], 'tableRow' => function ($message) {
         $icon = HTML::fontIcon('close');
         if ($message->new) {
             $icon = HTML::fontIcon('check');
         }
         $creator = $message->creator;
         return [raw($icon), raw(link_to('messages/' . $message->id . '/' . $message->slug, $message->title)), raw(link_to('users/' . $creator->id . '/' . $creator->slug, $creator->username)), $message->created_at->dateTime()];
     }, 'actions' => null, 'permaFilter' => function ($query) {
         return $query->whereReceiverId(user()->id)->whereReceiverVisible(true);
     }, 'brightenFirst' => false, 'pageTitle' => false], 'front');
 }
Ejemplo n.º 29
0
 public function index()
 {
     $this->indexPage(['buttons' => ['new', 'config'], 'tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title'], 'tableRow' => function ($forum) {
         $title = e($forum->title);
         $url = url('forums');
         if ($forum->level == 0) {
             $title = '<strong>' . $title . '</strong>';
         } else {
             $url .= '/' . $forum->id . '/' . $forum->slug;
         }
         $link = '<a href="' . $url . '">' . $title . '</a>';
         return [$forum->id, raw(Hover::modelAttributes($forum, ['creator'])->pull() . $link)];
     }, 'sortBy' => 'level', 'order' => 'asc']);
 }
Ejemplo n.º 30
0
 public function index()
 {
     $this->indexPage(['tableHead' => [trans('app.id') => 'id', trans('app.title') => 'title', trans('app.object_game') => 'game_id'], 'tableRow' => function ($map) {
         $icon = null;
         if ($map->image) {
             Hover::image($map->uploadPath() . $map->image);
             $icon = HTML::image($map->uploadPath() . '16/' . $map->image, $map->title);
         }
         $gameTitle = null;
         if ($map->game) {
             $gameTitle = $map->game->title;
         }
         Hover::modelAttributes($map, ['creator']);
         return [$map->id, raw(Hover::pull() . $icon, ' ' . $map->title), $gameTitle];
     }]);
 }