Created New Module Team

stable
Xavier Julián 2014-11-06 13:47:07 +01:00 committed by Jesús Espino
parent f2fffa3235
commit 8785a3ff8a
7 changed files with 127 additions and 2 deletions

View File

@ -63,6 +63,10 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven
$routeProvider.when("/project/:pslug/wiki/:slug",
{templateUrl: "/partials/wiki.html", resolve: {loader: tgLoaderProvider.add()}})
# Team
$routeProvider.when("/project/:pslug/team",
{templateUrl: "/partials/views/team/team.html", resolve: {loader: tgLoaderProvider.add()}})
# Issues
$routeProvider.when("/project/:pslug/issues",
{templateUrl: "/partials/issues.html", resolve: {loader: tgLoaderProvider.add()}})
@ -214,6 +218,7 @@ modules = [
"taigaIssues",
"taigaUserStories",
"taigaTasks",
"taigaTeam",
"taigaWiki",
"taigaSearch",
"taigaAdmin",

View File

@ -72,8 +72,11 @@ urls = {
"project-issues-detail": "/project/:project/issue/:ref"
"project-wiki": "/project/:project/wiki",
"project-wiki-page": "/project/:project/wiki/:slug",
"project-wiki": "/project/:project/wiki"
"project-wiki-page": "/project/:project/wiki/:slug"
# Team
"project-team": "/project/:project/team"
# Admin
"project-admin-home": "/project/:project/admin/project-profile/details"

View File

@ -243,6 +243,12 @@ ProjectMenuDirective = ($log, $compile, $auth, $rootscope, $tgAuth, $location, $
</a>
</li>
<% } %>
<li id="nav-team">
<a href="" title="Team" tg-nav="project-team:project=project.slug">
<span class="icon icon-team"></span>
<span class="item">Team</span>
</a>
</li>
<% if (project.videoconferences) { %>
<li id="nav-video">
<a href="<%- project.videoconferenceUrl %>" target="_blank" title="Meet Up">

View File

@ -0,0 +1,22 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/team.coffee
###
module = angular.module("taigaTeam", [])

View File

@ -0,0 +1,80 @@
###
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino Garcia <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán Merino <bameda@dbarragan.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# File: modules/team/main.coffee
###
taiga = @.taiga
mixOf = @.taiga.mixOf
groupBy = @.taiga.groupBy
module = angular.module("taigaTeam")
#############################################################################
## Task Detail Controller
#############################################################################
class TeamController extends mixOf(taiga.Controller, taiga.PageMixin)
@.$inject = [
"$scope",
"$rootScope",
"$tgRepo",
"$tgConfirm",
"$tgResources",
"$routeParams",
"$q",
"$tgLocation",
"$log",
"$appTitle",
"$tgNavUrls",
"$tgAnalytics",
"tgLoader"
]
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location,
@log, @appTitle, @navUrls, @analytics, tgLoader) ->
@scope.taskRef = @params.taskref
@scope.sectionName = "Team"
promise = @.loadInitialData()
promise.then () =>
@appTitle.set(@scope.project.name + " - Team")
tgLoader.pageLoaded()
loadProject: ->
return @rs.projects.get(@scope.projectId).then (project) =>
@scope.project = project
@scope.$emit('project:loaded', project)
@scope.statusList = project.task_statuses
@scope.statusById = groupBy(project.task_statuses, (x) -> x.id)
@scope.membersById = groupBy(project.memberships, (x) -> x.user)
return project
loadInitialData: ->
params = {
pslug: @params.pslug
}
promise = @repo.resolve(params).then (data) =>
@scope.projectId = data.project
return data
return promise.then(=> @.loadProject())
module.controller("TeamController", TeamController)

View File

@ -0,0 +1,8 @@
extends ../../dummy-layout
block head
title Taiga Your agile, free, and open source project management tool
block content
div.wrapper(ng-controller="TeamController as ctrl", ng-init="section='team'")
div Team

View File

@ -66,6 +66,7 @@ paths.coffee = [
paths.app + "coffee/modules/issues/*.coffee",
paths.app + "coffee/modules/userstories/*.coffee",
paths.app + "coffee/modules/tasks/*.coffee",
paths.app + "coffee/modules/team/*.coffee",
paths.app + "coffee/modules/wiki/*.coffee",
paths.app + "coffee/modules/admin/*.coffee",
paths.app + "coffee/modules/projects/*.coffee",