コード例 #1
0
ファイル: activity.php プロジェクト: unDemian/gcdc-migrate
 public static function notifications()
 {
     $count = 0;
     if (isset($_SESSION['current'])) {
         $count = count(TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id'], 'status' => array(TasksModel::STATUS_FINISHED, TasksModel::STATUS_REVERTED), 'viewed' => '0')));
     }
     echo $count;
 }
コード例 #2
0
ファイル: _backup.php プロジェクト: unDemian/gcdc-migrate
 public static function feed()
 {
     $tasks = TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'type' => TasksModel::TYPE_BACKUP));
     if ($tasks) {
         $output = \Render::view('backup/table', compact('tasks'), 'return');
     } else {
         $output = \Render::view('common/empty', false, 'return');
     }
     echo $output;
 }
コード例 #3
0
ファイル: accounts.php プロジェクト: unDemian/gcdc-migrate
 public static function details($accountKey = false)
 {
     if ($accountKey) {
         $account = $_SESSION['usernames'][$accountKey];
     } else {
         $account = $_SESSION['current'];
     }
     $templateData = array('template' => 'accounts/details', 'title' => 'Migrate - Account details', 'bodyId' => 'accounts-details', 'styles' => array('accounts.css'), 'scripts' => array('accounts.js'), 'account' => $account, 'services' => ServicesModel::withPermissions(), 'selectedServices' => UsersServicesModel::all(array('user_id' => $account['username']['id']))->column('service_id'), 'tasks' => TasksModel::listingFor(array('user_id' => $account['username']['id'], 'user_affected_id' => $account['username']['id'])), 'intro' => (bool) IntroModel::first(array('page' => 'profile', 'group' => $_SESSION['current']['username']['group'])));
     if (!$templateData['intro']) {
         IntroModel::create(array('page' => 'profile', 'group' => $_SESSION['current']['username']['group']))->save();
     }
     \Render::layout('template', $templateData);
 }
コード例 #4
0
ファイル: dashboard.php プロジェクト: unDemian/gcdc-migrate
 /**
  * Dashboard index page
  */
 public static function index($finish = false)
 {
     if ($finish) {
         \Auth::showWizard('finish');
     } else {
         if (\Auth::showWizard()) {
             \Router::redirect('accounts/permissions');
         }
     }
     $templateData = array('template' => 'dashboard/content', 'title' => 'Migrate - Dashboard', 'bodyId' => 'dashboard', 'styles' => array('dashboard.css'), 'scripts' => array(), 'queue' => TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id']), 4), 'services' => ServicesModel::forUser(array('id' => $_SESSION['current']['username']['id'], 'limit' => 4)), 'usernames' => $_SESSION['usernames'], 'intro' => (bool) IntroModel::first(array('page' => 'dashboard', 'group' => $_SESSION['current']['username']['group'])));
     if (!$templateData['intro']) {
         IntroModel::create(array('page' => 'dashboard', 'group' => $_SESSION['current']['username']['group']))->save();
     }
     \Render::layout('template', $templateData);
 }
コード例 #5
0
ファイル: migrate.php プロジェクト: unDemian/gcdc-migrate
 public static function feed()
 {
     $tasks = TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'user_affected_id' => $_SESSION['current']['username']['id'], 'type' => array(TasksModel::TYPE_SYNC, TasksModel::TYPE_MIGRATE, TasksModel::TYPE_MOVE)));
     if ($tasks) {
         $output = \Render::view('migrate/table', compact('tasks'), 'return');
     } else {
         $output = \Render::view('common/empty', false, 'return');
     }
     echo $output;
 }
コード例 #6
0
ファイル: _import.php プロジェクト: unDemian/gcdc-migrate
 /**
  * Listing accounts
  */
 public static function index($selectedService = 0)
 {
     $templateData = array('template' => 'import/content', 'title' => 'Migrate - Import', 'bodyId' => 'import', 'styles' => array('import.css'), 'scripts' => array(), 'history' => TasksModel::listingFor(array('user_id' => $_SESSION['current']['username']['id'], 'type' => TasksModel::TYPE_IMPORT)), 'services' => $_SESSION['current']['services']);
     \Render::layout('template', $templateData);
 }