Esempio n. 1
0
    def userteamposts(self, userid):
        teamposts = model.get_teamposts(userid)
        team = model.get_userteam(userid)
        projects = model.get_projects()

        return render('teamposts.xhtml', userid=userid, team=team,
                      teamposts=teamposts, projects=projects)
Esempio n. 2
0
    def user(self, userid):
        cur = model.get_cursor()

        cur.execute('''SELECT userid FROM users WHERE userid = ?''',
                    (userid,))
        if cur.fetchone() is None:
            raise cherrypy.HTTPError(404, "User not found")

        userposts, thispost = model.get_user_posts(userid)

        projects = model.get_userprojects(userid)
        teamposts = model.get_teamposts(userid)

        return render('user.xhtml', userid=userid, projects=projects,
                      teamposts=teamposts, userposts=userposts)
Esempio n. 3
0
    def index(self):
        loginid = cherrypy.request.loginid

        projects = model.get_projects()

        if loginid is None:
            teamposts = None
            userposts = None
            todaypost = None
            recent = model.get_recentposts()
        else:
            teamposts = model.get_teamposts(loginid)
            userposts, todaypost = model.get_user_posts(loginid)
            recent = None

        return render('index.xhtml', projects=projects, recent=recent,
                      teamposts=teamposts, userposts=userposts, todaypost=todaypost)
Esempio n. 4
0
    def index(self):
        loginid = cherrypy.request.loginid

        projects = model.get_projects()
        iteration, daysleft = model.get_current_iteration()

        if loginid is None:
            team = ()
            teamposts = None
            userposts = None
            todaypost = None
            bugs = None
            recent = model.get_recentposts()
        else:
            team = model.get_user_projects(loginid)
            teamposts = model.get_teamposts(loginid)
            userposts, todaypost = model.get_user_posts(loginid)
            bugs = model.get_currentbugs(loginid, iteration)
            recent = None

        return render('index.xhtml', projects=projects, recent=recent, team=team, bugs=bugs,
                      iteration=iteration, daysleft=daysleft, teamposts=teamposts, userposts=userposts,
                      todaypost=todaypost)
Esempio n. 5
0
    def userteampostsfeed(self, userid):
        teamposts = model.get_teamposts(userid)

        return renderatom(feedposts=teamposts,
                          feedurl=cherrypy.url('/user/%s/teamposts/feed' % userid),
                          title="Mozilla Status Board Updates: User Team: %s" % userid)
Esempio n. 6
0
    def userteamposts(self, userid):
        teamposts = model.get_teamposts(userid)
        team = model.get_userteam(userid)

        return render('teamposts.xhtml', userid=userid,
                      teamposts=teamposts, team=team)