Example #1
0
 /**
  * Bind data to the view.
  *
  * @param \Illuminate\Contracts\View\View $view
  */
 public function compose(View $view)
 {
     $view->withIssueCount(Issue::all()->count());
     $view->withProjectCount(Project::all()->count());
     $view->withGroupCount(Group::count());
     $view->withMomentCount(Moment::all()->count());
 }
Example #2
0
 /**
  * Returns the groups a user is authorized to access.
  *
  * @return \Illuminate\Database\Eloquent\Relations\HasMany
  */
 public function authorized_groups()
 {
     $groupIds = GroupMember::where('user_id', '=', $this->id)->where('target_type', '=', 'Group')->lists('target_id')->toArray();
     return Group::whereIn('id', $groupIds)->get();
 }
Example #3
0
 /**
  * Bind data to the view.
  *
  * @param \Illuminate\Contracts\View\View $view
  *
  * @return void
  */
 public function compose(View $view)
 {
     $view->withIssueCount(Issue::all()->count());
     $view->withProjectCount(Project::all()->count());
     $view->withGroupCount(Group::IsGroup()->Mine()->count());
 }
Example #4
0
 /**
  * Shows the project group view.
  *
  * @return \Illuminate\View\View
  */
 public function indexAction()
 {
     $this->subMenu['yours']['active'] = true;
     return View::make('dashboard.groups.index')->withPageTitle(trans_choice('gitamin.groups.groups', 2) . ' - ' . trans('dashboard.dashboard'))->withGroups(Group::all())->withSubMenu($this->subMenu);
 }
Example #5
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param string $owner_path
  * @param string $project_path
  *
  * @return \Illuminate\Http\Response
  */
 public function editAction($owner_path, $project_path)
 {
     $project = Project::findByPath($owner_path, $project_path);
     return View::make('projects.edit')->withPageTitle(trans('dashboard.projects.edit.title') . ' - ' . trans('dashboard.dashboard'))->withProject($project)->withGroupId('')->withActiveItem('project_edit')->withGroups(Group::all());
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($namespace, $project_path)
 {
     $project = Project::leftJoin('namespaces', function ($join) {
         $join->on('projects.namespace_id', '=', 'namespaces.id');
     })->where('projects.path', '=', $project_path)->where('namespaces.path', '=', $namespace)->first(['projects.*']);
     return View::make('projects.edit')->withPageTitle(trans('dashboard.projects.new.title') . ' - ' . trans('dashboard.dashboard'))->withProject($project)->withGroupId('')->withGroups(Group::all());
 }
Example #7
0
 /**
  * Shows the edit project team view.
  *
  * @param \Gitamin\Models\ProjectTeam $team
  *
  * @return \Illuminate\View\View
  */
 public function edit($namespace)
 {
     $group = Group::where('path', '=', $namespace)->first();
     return View::make('groups.edit')->withPageTitle(trans('dashboard.teams.edit.title') . ' - ' . trans('dashboard.dashboard'))->withGroup($group);
 }
Example #8
0
 /**
  * Shows the edit project namespace view.
  *
  * @param \Gitamin\Models\Owner $namespace
  *
  * @return \Illuminate\View\View
  */
 public function editAction($path)
 {
     $group = Group::findByPath($path);
     return View::make('groups.edit')->withPageTitle(trans('gitamin.groups.edit.title') . ' - ' . trans('dashboard.dashboard'))->withGroup($group);
 }
Example #9
0
 /**
  * Shows the add issue view.
  *
  * @return \Illuminate\View\View
  */
 public function showAddIssue()
 {
     return View::make('dashboard.issues.add')->withPageTitle(trans('dashboard.issues.add.title') . ' - ' . trans('dashboard.dashboard'))->withProjectsInTeams(Group::with('projects')->get())->withProjectsOutTeams(Project::where('namespace_id', 0)->get());
 }