Exemplo n.º 1
0
def modcontrol_contentbyuser_(request):
    form = request.web_input(name='', features=[])

    submissions = moderation.submissionsbyuser(request.userid, form) if 's' in form.features else []
    characters = moderation.charactersbyuser(request.userid, form) if 'c' in form.features else []
    journals = moderation.journalsbyuser(request.userid, form) if 'j' in form.features else []

    return Response(define.webpage(request.userid, "modcontrol/contentbyuser.html", [
        form.name,
        sorted(submissions + characters + journals, key=lambda item: item['unixtime'], reverse=True),
    ]))
Exemplo n.º 2
0
    def GET(self):
        form = web.input(name='', features=[])

        submissions = moderation.submissionsbyuser(self.user_id, form) if 's' in form.features else []
        characters = moderation.charactersbyuser(self.user_id, form) if 'c' in form.features else []
        journals = moderation.journalsbyuser(self.user_id, form) if 'j' in form.features else []

        return define.webpage(self.user_id, "modcontrol/contentbyuser.html", [
            form.name,
            sorted(submissions + characters + journals, key=lambda item: item['unixtime'], reverse=True),
        ])
Exemplo n.º 3
0
def modcontrol_contentbyuser_(request):
    form = request.web_input(name='', features=[])

    # Does the target user exist? There's no sense in displaying a blank page if not.
    target_userid = profile.resolve(None, None, form.name)
    if not target_userid:
        raise WeasylError("userRecordMissing")

    submissions = moderation.submissionsbyuser(request.userid, form) if 's' in form.features else []
    characters = moderation.charactersbyuser(request.userid, form) if 'c' in form.features else []
    journals = moderation.journalsbyuser(request.userid, form) if 'j' in form.features else []

    return Response(define.webpage(request.userid, "modcontrol/contentbyuser.html", [
        form.name,
        sorted(submissions + characters + journals, key=lambda item: item['unixtime'], reverse=True),
    ], title=form.name + "'s Content"))
Exemplo n.º 4
0
def modcontrol_contentbyuser_(request):
    form = request.web_input(name='', features=[])

    # Does the target user exist? There's no sense in displaying a blank page if not.
    target_userid = profile.resolve(None, None, form.name)
    if not target_userid:
        raise WeasylError("userRecordMissing")

    submissions = moderation.submissionsbyuser(target_userid) if 's' in form.features else []
    characters = moderation.charactersbyuser(target_userid) if 'c' in form.features else []
    journals = moderation.journalsbyuser(target_userid) if 'j' in form.features else []

    return Response(define.webpage(request.userid, "modcontrol/contentbyuser.html", [
        form.name,
        sorted(submissions + characters + journals, key=lambda item: item['unixtime'], reverse=True),
    ], title=form.name + "'s Content"))
Exemplo n.º 5
0
    def GET(self):
        form = web.input(name='', features=[])

        submissions = moderation.submissionsbyuser(
            self.user_id, form) if 's' in form.features else []
        characters = moderation.charactersbyuser(
            self.user_id, form) if 'c' in form.features else []
        journals = moderation.journalsbyuser(
            self.user_id, form) if 'j' in form.features else []

        return define.webpage(self.user_id, "modcontrol/contentbyuser.html", [
            form.name,
            sorted(submissions + characters + journals,
                   key=lambda item: item['unixtime'],
                   reverse=True),
        ])