Merge pull request #11 from taigaio/project-profile-privacy-settings-saas
Project profile privacy settings directivestable
commit
a543100dcb
|
@ -53,11 +53,14 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
|
|
||||||
promise = @.loadInitialData()
|
promise = @.loadInitialData()
|
||||||
|
|
||||||
promise.then () =>
|
promise.then =>
|
||||||
@appTitle.set("Project profile - " + @scope.sectionName + " - " + @scope.project.name)
|
@appTitle.set("Project profile - " + @scope.sectionName + " - " + @scope.project.name)
|
||||||
|
|
||||||
promise.then null, ->
|
promise.then null, (xhr) =>
|
||||||
console.log "FAIL" #TODO
|
if xhr and xhr.status == 404
|
||||||
|
@location.path("/not-found")
|
||||||
|
@location.replace()
|
||||||
|
return @q.reject(xhr)
|
||||||
|
|
||||||
loadProject: ->
|
loadProject: ->
|
||||||
return @rs.projects.get(@scope.projectId).then (project) =>
|
return @rs.projects.get(@scope.projectId).then (project) =>
|
||||||
|
@ -77,10 +80,6 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
@scope.projectId = data.project
|
@scope.projectId = data.project
|
||||||
return data
|
return data
|
||||||
|
|
||||||
promise.then null, =>
|
|
||||||
@location.path("/not-found")
|
|
||||||
@location.replace()
|
|
||||||
|
|
||||||
return promise.then(=> @.loadProject())
|
return promise.then(=> @.loadProject())
|
||||||
|
|
||||||
openDeleteLightbox: ->
|
openDeleteLightbox: ->
|
||||||
|
|
|
@ -43,16 +43,17 @@ block content
|
||||||
textarea(name="description", placeholder="Description", id="project-description",
|
textarea(name="description", placeholder="Description", id="project-description",
|
||||||
ng-model="project.description", data-required="true")
|
ng-model="project.description", data-required="true")
|
||||||
|
|
||||||
|
tg-privacy-settings-inputs
|
||||||
div.privacy-settings
|
div.privacy-settings
|
||||||
div
|
div
|
||||||
input.hidden(type="radio", id="public-project", name="project-privacy",
|
input.hidden(type="radio", disabled="disabled")
|
||||||
ng-model="project.is_private", ng-value="false")
|
|
||||||
label.button(for="public-project") Public Project
|
label.button(for="public-project") Public Project
|
||||||
div
|
div
|
||||||
input.hidden(type="radio", id="private-project", name="project-privacy",
|
input.hidden(type="radio", checked="checked", disabled="disabled")
|
||||||
ng-model="project.is_private", ng-value="true")
|
|
||||||
label.button(for="private-project") Private Project
|
label.button(for="private-project") Private Project
|
||||||
|
|
||||||
|
p This feature is not available at this momment but it will be available in very near future
|
||||||
|
|
||||||
input(type="submit", class="hidden")
|
input(type="submit", class="hidden")
|
||||||
a.button.button-green(href="") Save
|
a.button.button-green(href="") Save
|
||||||
a.delete-project(href="", title="Delete this project", ng-click="ctrl.openDeleteLightbox()") Delete this project
|
a.delete-project(href="", title="Delete this project", ng-click="ctrl.openDeleteLightbox()") Delete this project
|
||||||
|
|
Loading…
Reference in New Issue