Adding project features to admin
parent
c5d65acc1a
commit
92f501d519
|
@ -54,6 +54,9 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide,
|
||||||
$routeProvider.when("/project/:pslug/admin/project-profile/details",
|
$routeProvider.when("/project/:pslug/admin/project-profile/details",
|
||||||
{templateUrl: "/partials/admin-project-profile.html"})
|
{templateUrl: "/partials/admin-project-profile.html"})
|
||||||
|
|
||||||
|
$routeProvider.when("/project/:pslug/admin/project-profile/features",
|
||||||
|
{templateUrl: "/partials/admin-project-features.html"})
|
||||||
|
|
||||||
# Auth
|
# Auth
|
||||||
$routeProvider.when("/login", {templateUrl: "/partials/login.html"})
|
$routeProvider.when("/login", {templateUrl: "/partials/login.html"})
|
||||||
$routeProvider.when("/register", {templateUrl: "/partials/register.html"})
|
$routeProvider.when("/register", {templateUrl: "/partials/register.html"})
|
||||||
|
|
|
@ -78,11 +78,7 @@ module.controller("ProjectProfileController", ProjectProfileController)
|
||||||
|
|
||||||
ProjectProfileDirective = ($log, $repo, $confirm) ->
|
ProjectProfileDirective = ($log, $repo, $confirm) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
$log.info "ProjectProfileDirective:link"
|
|
||||||
|
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
console.log form, $el.find("form")
|
|
||||||
|
|
||||||
submit = =>
|
submit = =>
|
||||||
return if not form.validate()
|
return if not form.validate()
|
||||||
|
|
||||||
|
@ -96,14 +92,53 @@ ProjectProfileDirective = ($log, $repo, $confirm) ->
|
||||||
|
|
||||||
$el.on "submit", "form", (event) ->
|
$el.on "submit", "form", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
$log.error "ProjectProfileDirective:submit"
|
|
||||||
submit()
|
submit()
|
||||||
|
|
||||||
$el.on "click", "form a.button-green", (event) ->
|
$el.on "click", "form a.button-green", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
$log.error "ProjectProfileDirective:submit a button"
|
|
||||||
submit()
|
submit()
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
## Project Features Directive
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
ProjectFeaturesDirective = ($log, $repo, $confirm) ->
|
||||||
|
link = ($scope, $el, $attrs) ->
|
||||||
|
form = $el.find("form").checksley()
|
||||||
|
submit = =>
|
||||||
|
return if not form.validate()
|
||||||
|
|
||||||
|
promise = $repo.save($scope.project)
|
||||||
|
promise.then ->
|
||||||
|
$confirm.notify("success")
|
||||||
|
|
||||||
|
promise.then null, (data) ->
|
||||||
|
console.log "FAIL"
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
$el.on "submit", "form", (event) ->
|
||||||
|
event.preventDefault()
|
||||||
|
submit()
|
||||||
|
|
||||||
|
$el.on "click", "form a.button-green", (event) ->
|
||||||
|
event.preventDefault()
|
||||||
|
submit()
|
||||||
|
|
||||||
|
$scope.$watch "isVideoconferenceActivated", (isVideoconferenceActivated) ->
|
||||||
|
if isVideoconferenceActivated
|
||||||
|
$el.find(".videoconference-attributes").show()
|
||||||
|
else
|
||||||
|
$el.find(".videoconference-attributes").hide()
|
||||||
|
$scope.project.videoconferences = null
|
||||||
|
$scope.project.videoconferences_salt = ""
|
||||||
|
|
||||||
|
$scope.$watch "project", (project) ->
|
||||||
|
if project.videoconferences?
|
||||||
|
$scope.isVideoconferenceActivated = true
|
||||||
|
|
||||||
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgProjectProfile", ["$log", "$tgRepo", "$tgConfirm", ProjectProfileDirective])
|
module.directive("tgProjectProfile", ["$log", "$tgRepo", "$tgConfirm", ProjectProfileDirective])
|
||||||
|
module.directive("tgProjectFeatures", ["$log", "$tgRepo", "$tgConfirm", ProjectFeaturesDirective])
|
||||||
|
|
|
@ -68,6 +68,7 @@ urls = {
|
||||||
# Admin
|
# Admin
|
||||||
"project-admin-home": "/project/:project/admin/project-profile/details",
|
"project-admin-home": "/project/:project/admin/project-profile/details",
|
||||||
"project-admin-project-profile-details": "/project/:project/admin/project-profile/details"
|
"project-admin-project-profile-details": "/project/:project/admin/project-profile/details"
|
||||||
|
"project-admin-project-profile-features": "/project/:project/admin/project-profile/features"
|
||||||
}
|
}
|
||||||
|
|
||||||
init = ($log, $navurls) ->
|
init = ($log, $navurls) ->
|
||||||
|
|
|
@ -74,7 +74,7 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
|
|
||||||
if historyResult.values_diff.is_iocaine
|
if historyResult.values_diff.is_iocaine
|
||||||
historyResult.values_diff.is_iocaine = _.map(historyResult.values_diff.is_iocaine, (v) -> {true: 'Yes', false: 'No'}[v])
|
historyResult.values_diff.is_iocaine = _.map(historyResult.values_diff.is_iocaine, (v) -> {true: 'Yes', false: 'No'}[v])
|
||||||
|
|
||||||
delete historyResult.values_diff.description_html
|
delete historyResult.values_diff.description_html
|
||||||
delete historyResult.values_diff.description_diff
|
delete historyResult.values_diff.description_diff
|
||||||
|
|
||||||
|
|
|
@ -1,63 +1,64 @@
|
||||||
extends layout
|
extends dummy-layout
|
||||||
|
|
||||||
block head
|
block head
|
||||||
title Taiga Project management web application with scrum in mind!
|
title Taiga Project management web application with scrum in mind!
|
||||||
|
|
||||||
block content
|
block content
|
||||||
div.wrapper
|
div.wrapper(tg-project-features, ng-controller="ProjectProfileController as ctrl",
|
||||||
sidebar.menu-secondary.sidebar
|
ng-init="section='admin'")
|
||||||
|
sidebar.menu-secondary.sidebar(tg-admin-navigation="project-profile")
|
||||||
include views/modules/admin-menu
|
include views/modules/admin-menu
|
||||||
sidebar.menu-tertiary.sidebar
|
|
||||||
include views/modules/admin-submenu
|
sidebar.menu-tertiary.sidebar(tg-admin-navigation="features")
|
||||||
|
include views/modules/admin-submenu-project-profile
|
||||||
|
|
||||||
section.main.admin-functionalities
|
section.main.admin-functionalities
|
||||||
header
|
header
|
||||||
include views/components/mainTitle
|
include views/components/mainTitle
|
||||||
|
|
||||||
section
|
form
|
||||||
div.functionality
|
div.functionality(ng-class="{true:'active', false:''}[project.is_backlog_activated]")
|
||||||
|
input(type="checkbox", style="width:40px; height: 40px;", ng-model="project.is_backlog_activated")
|
||||||
div.icon.icon-backlog
|
div.icon.icon-backlog
|
||||||
div.desc
|
div.desc
|
||||||
p
|
p
|
||||||
span Backlog
|
span Backlog
|
||||||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
||||||
|
|
||||||
div.functionality.active
|
div.functionality(ng-class="{true:'active', false:''}[project.is_kanban_activated]")
|
||||||
|
input(type="checkbox", style="width:40px; height: 40px;", ng-model="project.is_kanban_activated")
|
||||||
div.icon.icon-kanban
|
div.icon.icon-kanban
|
||||||
div.desc
|
div.desc
|
||||||
p
|
p
|
||||||
span Kanban
|
span Kanban
|
||||||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
||||||
|
|
||||||
div.functionality
|
div.functionality(ng-class="{true:'active', false:''}[project.is_issues_activated]")
|
||||||
|
input(type="checkbox", style="width:40px; height: 40px;", ng-model="project.is_issues_activated")
|
||||||
div.icon.icon-issues
|
div.icon.icon-issues
|
||||||
div.desc
|
div.desc
|
||||||
p
|
p
|
||||||
span Issues
|
span Issues
|
||||||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
||||||
|
|
||||||
div.functionality.active
|
div.functionality(ng-class="{true:'active', false:''}[project.is_wiki_activated]")
|
||||||
|
input(type="checkbox", style="width:40px; height: 40px;", ng-model="project.is_wiki_activated")
|
||||||
div.icon.icon-wiki
|
div.icon.icon-wiki
|
||||||
div.desc
|
div.desc
|
||||||
p
|
p
|
||||||
span Wiki
|
span Wiki
|
||||||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
||||||
|
|
||||||
div.functionality.active
|
div.functionality(ng-class="{true:'active', false:''}[isVideoconferenceActivated]")
|
||||||
|
input(type="checkbox", style="width:40px; height: 40px;", ng-model="isVideoconferenceActivated")
|
||||||
div.icon.icon-video
|
div.icon.icon-video
|
||||||
div.desc
|
div.desc
|
||||||
p
|
p
|
||||||
span Video
|
span Video
|
||||||
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
| Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean sagittis quam augue, quis bibendum lectus porta eget. Nunc dictum imperdiet venenatis. Curabitur vitae augue ut est rhoncus pellentesque. Nunc sed ultricies est, tincidunt euismod nunc. Nunc nec posuere metus.
|
||||||
|
|
||||||
select
|
div.videoconference-attributes.hidden
|
||||||
option Option 1
|
select(ng-model="project.videoconferences", ng-options="e.id as e.name for e in [{'id':'appear-in', 'name':'AppearIn'},{'id':'talky', 'name': 'Talky'}]")
|
||||||
option Option 2
|
input(ng-model="project.videoconferences_salt", placeholder="write a name for the chat room (ej. the name of the project)")
|
||||||
option Option 3
|
input(type="submit", class="hidden")
|
||||||
option Option 4
|
a.button.button-green(href="") Save
|
||||||
|
|
||||||
select
|
|
||||||
option Option 1
|
|
||||||
option Option 2
|
|
||||||
option Option 3
|
|
||||||
option Option 4
|
|
|
@ -13,6 +13,6 @@ section.admin-submenu
|
||||||
span.title Default Values
|
span.title Default Values
|
||||||
span.icon.icon-arrow-right
|
span.icon.icon-arrow-right
|
||||||
li#adminmenu-features
|
li#adminmenu-features
|
||||||
a(href="")
|
a(href="", tg-nav="project-admin-project-profile-features:project=project.slug")
|
||||||
span.title Features
|
span.title Features
|
||||||
span.icon.icon-arrow-right
|
span.icon.icon-arrow-right
|
||||||
|
|
Loading…
Reference in New Issue