示例#1
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)
示例#2
0
    def project(self, projectname):
        cur = model.get_cursor()
        cur.execute('''SELECT projectname FROM projects WHERE projectname = ?''',
                    (projectname,))
        if cur.fetchone() is None:
            raise cherrypy.HTTPError(404, "Project not found")

        users = model.get_project_users(projectname)
        posts = model.get_project_posts(projectname)
        late = model.get_project_late(projectname)
        iteration, daysleft = model.get_current_iteration()
        projects = model.get_projects()

        return render('project.xhtml', projectname=projectname, users=users,
                      posts=posts, late=late, team=[projectname], iteration=iteration,
                      daysleft=daysleft, projects=projects)
示例#3
0
    def project(self, projectname):
        cur = model.get_cursor()
        cur.execute(
            '''SELECT projectname FROM projects WHERE projectname = ?''',
            (projectname, ))
        if cur.fetchone() is None:
            raise cherrypy.HTTPError(404, "Project not found")

        users = model.get_project_users(projectname)
        posts = model.get_project_posts(projectname)
        late = model.get_project_late(projectname)
        iteration, daysleft = model.get_current_iteration()
        projects = model.get_projects()

        return render('project.xhtml',
                      projectname=projectname,
                      users=users,
                      posts=posts,
                      late=late,
                      team=[projectname],
                      iteration=iteration,
                      daysleft=daysleft,
                      projects=projects)
示例#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)