'HTML Representation
- page with Filters'

def html(self, r, **attr):

    T = current.T
    db = current.db
    s3db = current.s3db
    settings = current.deployment_settings
    project_id = r.id
    goals = {}
    table = s3db.project_goal
    query = ((table.project_id == project_id) & (table.deleted == False))
    rows = db(query).select(table.id, table.code, table.name)
    for row in rows:
        goals[row.id] = ('%s:    %s' % (row.code, row.name))
    indicators = {}
    table = s3db.project_indicator
    query = ((table.project_id == project_id) & (table.deleted == False))
    rows = db(query).select(table.id, table.code, table.name)
    for row in rows:
        indicators[row.id] = ('%s:    %s' % (row.code, row.name))
    filter_widgets = [S3DateFilter('date', _name='date', label=T('Time    Period'), hide_time=True), S3OptionsFilter('goal_id', _name='goal_id', label=T('Goals'), options=goals), S3OptionsFilter('indicator_id', _name='indicator_id', label=T('Indicators'), options=indicators)]
    if settings.get_project_status_from_activities():
        activities = {}
        table = s3db.project_activity
        query = ((table.project_id == project_id) & (table.deleted == False))
        rows = db(query).select(table.id, table.name)
        for row in rows:
            activities[row.id] = row.name
        filter_widgets.append(S3OptionsFilter('activity_id', _name='activity_id', label=T('Activities'), options=activities))
    settings.ui.filter_auto_submit = False
    form = S3FilterForm(filter_widgets, submit=T('Generate    PDF'), url=r.url(representation='pdf'))
    form = form.html(None)
    output = {'item': form, 'title': T('Project    Summary    Report')}
    current.response.view = 'simple.html'
    return output
