Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linagora.esn.most
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sang D NGO
linagora.esn.most
Commits
3a89e698
Commit
3a89e698
authored
Apr 16, 2018
by
Tuan Tuan LE
⛅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'admin-aware' into 'master'
Admin aware See merge request
!15
parents
37b37b76
65fd95d4
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
6 deletions
+19
-6
backend/webserver/api/proposals/controller.js
backend/webserver/api/proposals/controller.js
+1
-1
frontend/app/common/most-proposal-api-client.service.js
frontend/app/common/most-proposal-api-client.service.js
+8
-1
frontend/app/proposal/detail/most-proposal-detail.controller.js
...nd/app/proposal/detail/most-proposal-detail.controller.js
+2
-0
frontend/app/proposal/detail/most-proposal-detail.pug
frontend/app/proposal/detail/most-proposal-detail.pug
+1
-0
frontend/app/proposal/detail/subheader/most-proposal-detail-subheader.component.js
...ail/subheader/most-proposal-detail-subheader.component.js
+1
-0
frontend/app/proposal/detail/subheader/most-proposal-detail-subheader.pug
...posal/detail/subheader/most-proposal-detail-subheader.pug
+1
-1
frontend/app/proposal/list/item/most-proposal-list-item.pug
frontend/app/proposal/list/item/most-proposal-list-item.pug
+1
-1
frontend/app/proposal/list/most-proposal-list.pug
frontend/app/proposal/list/most-proposal-list.pug
+0
-2
frontend/app/proposal/most-proposal.controller.js
frontend/app/proposal/most-proposal.controller.js
+2
-0
frontend/app/proposal/most-proposal.pug
frontend/app/proposal/most-proposal.pug
+2
-0
No files found.
backend/webserver/api/proposals/controller.js
View file @
3a89e698
...
@@ -37,7 +37,7 @@ module.exports = function(dependencies, lib) {
...
@@ -37,7 +37,7 @@ module.exports = function(dependencies, lib) {
function
getProposals
(
req
,
res
)
{
function
getProposals
(
req
,
res
)
{
var
listOptions
=
{
var
listOptions
=
{
creator
:
req
.
user
.
id
,
creator
:
req
.
query
.
creator
,
type
:
req
.
query
.
type
,
type
:
req
.
query
.
type
,
status
:
req
.
query
.
status
,
status
:
req
.
query
.
status
,
limit
:
Number
(
req
.
query
.
limit
),
limit
:
Number
(
req
.
query
.
limit
),
...
...
frontend/app/common/most-proposal-api-client.service.js
View file @
3a89e698
...
@@ -6,7 +6,10 @@
...
@@ -6,7 +6,10 @@
var
API_PATH
=
'
proposals
'
;
var
API_PATH
=
'
proposals
'
;
function
mostProposalApiClient
(
mostRestangular
)
{
function
mostProposalApiClient
(
session
,
mostRestangular
)
{
return
{
return
{
createProposal
:
createProposal
,
createProposal
:
createProposal
,
getProposals
:
getProposals
,
getProposals
:
getProposals
,
...
@@ -19,6 +22,10 @@
...
@@ -19,6 +22,10 @@
}
}
function
getProposals
(
options
)
{
function
getProposals
(
options
)
{
if
(
!
session
.
userIsDomainAdministrator
())
{
options
.
creator
=
session
.
user
.
_id
;
}
return
mostRestangular
.
all
(
API_PATH
).
getList
(
options
).
then
(
_stripAndReturnData
).
then
(
function
(
proposals
)
{
return
mostRestangular
.
all
(
API_PATH
).
getList
(
options
).
then
(
_stripAndReturnData
).
then
(
function
(
proposals
)
{
return
proposals
.
map
(
_decodeFormData
);
return
proposals
.
map
(
_decodeFormData
);
});
});
...
...
frontend/app/proposal/detail/most-proposal-detail.controller.js
View file @
3a89e698
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
$state
,
$state
,
$stateParams
,
$stateParams
,
$modal
,
$modal
,
session
,
mostProposalApiClient
mostProposalApiClient
)
{
)
{
var
self
=
this
;
var
self
=
this
;
...
@@ -18,6 +19,7 @@
...
@@ -18,6 +19,7 @@
self
.
onAcceptBtnClick
=
onAcceptBtnClick
;
self
.
onAcceptBtnClick
=
onAcceptBtnClick
;
function
$onInit
()
{
function
$onInit
()
{
self
.
showAction
=
session
.
userIsDomainAdministrator
();
mostProposalApiClient
.
getProposal
(
$stateParams
.
proposalId
)
mostProposalApiClient
.
getProposal
(
$stateParams
.
proposalId
)
.
then
(
function
(
proposal
)
{
.
then
(
function
(
proposal
)
{
self
.
proposal
=
proposal
;
self
.
proposal
=
proposal
;
...
...
frontend/app/proposal/detail/most-proposal-detail.pug
View file @
3a89e698
sub-header
sub-header
most-proposal-detail-subheader(
most-proposal-detail-subheader(
data-title="$ctrl.proposal.formJson.title",
data-title="$ctrl.proposal.formJson.title",
show-action="$ctrl.showAction",
on-reject-btn-click="$ctrl.onRejectBtnClick()",
on-reject-btn-click="$ctrl.onRejectBtnClick()",
on-review-btn-click="$ctrl.onReviewBtnClick()",
on-review-btn-click="$ctrl.onReviewBtnClick()",
on-accept-btn-click="$ctrl.onAcceptBtnClick()"
on-accept-btn-click="$ctrl.onAcceptBtnClick()"
...
...
frontend/app/proposal/detail/subheader/most-proposal-detail-subheader.component.js
View file @
3a89e698
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
templateUrl
:
'
/linagora.esn.most/app/proposal/detail/subheader/most-proposal-detail-subheader.html
'
,
templateUrl
:
'
/linagora.esn.most/app/proposal/detail/subheader/most-proposal-detail-subheader.html
'
,
bindings
:
{
bindings
:
{
title
:
'
<
'
,
title
:
'
<
'
,
showAction
:
'
<
'
,
onRejectBtnClick
:
'
&
'
,
onRejectBtnClick
:
'
&
'
,
onReviewBtnClick
:
'
&
'
,
onReviewBtnClick
:
'
&
'
,
onAcceptBtnClick
:
'
&
'
onAcceptBtnClick
:
'
&
'
...
...
frontend/app/proposal/detail/subheader/most-proposal-detail-subheader.pug
View file @
3a89e698
...
@@ -5,7 +5,7 @@ block left
...
@@ -5,7 +5,7 @@ block left
span.title.ellipsis {{::$ctrl.title}}
span.title.ellipsis {{::$ctrl.title}}
block right
block right
ul.actions.flex-space-around
ul.actions.flex-space-around
(ng-if="$ctrl.showAction")
li.contact-dropdown.dropdown
li.contact-dropdown.dropdown
a(href='', data-toggle='dropdown')
a(href='', data-toggle='dropdown')
i.mdi.mdi-dots-vertical
i.mdi.mdi-dots-vertical
...
...
frontend/app/proposal/list/item/most-proposal-list-item.pug
View file @
3a89e698
...
@@ -18,4 +18,4 @@
...
@@ -18,4 +18,4 @@
i.mdi.mdi-dots-vertical
i.mdi.mdi-dots-vertical
ul.dropdown-menu.dropdown-menu-right
ul.dropdown-menu.dropdown-menu-right
li
li
a(href="",
esn-modal-launcher="/group/app/delete/group-delete.html") #{__('Delete
')}
a(href="",
ui-sref="most.proposal.detail({proposalId: $ctrl.proposal.id})") #{__('Xem
')}
frontend/app/proposal/list/most-proposal-list.pug
View file @
3a89e698
...
@@ -5,5 +5,3 @@ sub-header
...
@@ -5,5 +5,3 @@ sub-header
.listview.lv-bordered.lv-lg
.listview.lv-bordered.lv-lg
.lv-body
.lv-body
most-proposal-list-item.lv-item(proposal='proposal', ng-repeat="proposal in $ctrl.proposals")
most-proposal-list-item.lv-item(proposal='proposal', ng-repeat="proposal in $ctrl.proposals")
fab(icon="plus", ui-sref="most.proposal.create")
frontend/app/proposal/most-proposal.controller.js
View file @
3a89e698
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
function
MostProposalController
(
function
MostProposalController
(
$stateParams
,
$stateParams
,
session
,
mostProposalApiClient
mostProposalApiClient
)
{
)
{
var
self
=
this
;
var
self
=
this
;
...
@@ -14,6 +15,7 @@
...
@@ -14,6 +15,7 @@
function
$onInit
()
{
function
$onInit
()
{
self
.
status
=
'
loading
'
;
self
.
status
=
'
loading
'
;
self
.
showCreateBtn
=
!
session
.
userIsDomainAdministrator
();
mostProposalApiClient
.
getProposals
({
status
:
$stateParams
.
status
}).
then
(
function
(
proposals
)
{
mostProposalApiClient
.
getProposals
({
status
:
$stateParams
.
status
}).
then
(
function
(
proposals
)
{
self
.
status
=
'
loaded
'
;
self
.
status
=
'
loaded
'
;
...
...
frontend/app/proposal/most-proposal.pug
View file @
3a89e698
...
@@ -2,3 +2,5 @@
...
@@ -2,3 +2,5 @@
most-proposal-list(proposals="$ctrl.proposals")
most-proposal-list(proposals="$ctrl.proposals")
.text-center(ng-if="$ctrl.status === 'loading'", openpaas-logo-spinner, spinner-start-active='1', spinner-size='0.5')
.text-center(ng-if="$ctrl.status === 'loading'", openpaas-logo-spinner, spinner-start-active='1', spinner-size='0.5')
fab(ng-if="$ctrl.showCreateBtn", icon="plus", ui-sref="most.proposal.create")
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment