def showAssignment(): auth.require(role='admin', fail_redirect='/login.html') data = cardsObj.getCardsByUser(board_id) return template('views/admin/cardsByUser.tpl', data=data, role=auth.getRole(), lists=idLists)
def setupLabels(): auth.require(role='admin', fail_redirect='/login.html') labelsDetails = boards.getLabelDetail(board_id) cardsObj.labels = boards.getLabels(board_id) return template('views/admin/setupLabels.tpl', data=labelsDetails, user=auth.getUser(), role=auth.getRole())
def review(cardId): auth.require(fail_redirect='/login.html') user = auth.getUser() data = cardsObj.getCard(cardId, user) #print (json.dumps(data,indent=4)) output = template('views/showCard.tpl', card=data, user=user, decisions=decisionMap, role=auth.getRole()) return output
def setupLists(): auth.require(role='admin', fail_redirect='/login.html') listDetails = boards.getListDetail(board_id) cardsObj.lists = boards.getLists(board_id) print(cardsObj.lists) return template('views/admin/setupLists.tpl', data=listDetails, decisionList=list(decisionMap.values()), user=auth.getUser(), role=auth.getRole())
def showProposalsByType(): auth.require(role='admin', fail_redirect='/login.html') data = cardsObj.getCardsByType(board_id, types=cardsObj.presentationTypes, exclude=['Rejected', 'Inbox']) return template('views/admin/proposalTypes.tpl', data=data, user=auth.getUser(), role=auth.getRole(), lists=idLists, cardsObj=cardsObj)
def showIndex(): auth.require(fail_redirect='/login.html') user = auth.getUser() try: data = cardsObj.getCardsForUserFromBoard(user['id'], board_id) (lists, idLists) = boards.getLists(board_id) return template('views/showSubmissions.tpl', cardsJson=data, user=user, role=auth.getRole(), lists=idLists) except HTTPError as error: return showPermissionDenied(error)
def showAdmin(): auth.require(role='admin', fail_redirect='/login.html') return template('views/admin/admin.tpl', role=auth.getRole())
def assignCards(): auth.require(role='admin', fail_redirect='/login.html') return template('views/admin/assignCards.tpl', role=auth.getRole())