示例#1
0
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)
示例#2
0
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())
示例#3
0
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
示例#4
0
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())
示例#5
0
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)
示例#6
0
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)
示例#7
0
def showAdmin():
    auth.require(role='admin', fail_redirect='/login.html')

    return template('views/admin/admin.tpl', role=auth.getRole())
示例#8
0
def assignCards():
    auth.require(role='admin', fail_redirect='/login.html')

    return template('views/admin/assignCards.tpl', role=auth.getRole())