Ejemplo n.º 1
0
def note_(request):
    form = request.web_input()

    data = note.select_view(request.userid, int(form.noteid))

    return Response(define.webpage(request.userid, "note/message_view.html", [
        # Private message
        data,
        profile.select_myself(request.userid),
    ]))
Ejemplo n.º 2
0
    def GET(self):
        form = web.input()

        data = note.select_view(self.user_id, int(form.noteid))

        return define.webpage(self.user_id, "note/message_view.html", [
            # Private message
            data,
            profile.select_myself(self.user_id),
        ])
Ejemplo n.º 3
0
def note_(request):
    form = request.web_input()

    data = note.select_view(request.userid, int(form.noteid))

    return Response(
        define.webpage(
            request.userid,
            "note/message_view.html",
            [
                # Private message
                data,
                profile.select_myself(request.userid),
            ]))
Ejemplo n.º 4
0
def note_(request):
    if not define.is_vouched_for(request.userid):
        raise WeasylError("vouchRequired")

    form = request.web_input()

    data = note.select_view(request.userid, int(form.noteid))

    return Response(
        define.webpage(
            request.userid,
            "note/message_view.html",
            [
                # Private message
                data,
                profile.select_myself(request.userid),
            ]))
Ejemplo n.º 5
0
def modcontrol_copynotetostaffnotes_post_(request):
    form = request.web_input(noteid=None)

    notedata = note.select_view(request.userid, int(form.noteid))

    staff_note_title = u"Received note from {sender}, dated {date}, with subject: “{subj}”.".format(
        sender=notedata['sendername'],
        date=arrow.get(notedata['unixtime']).format('YYYY-MM-DD HH:mm:ss ZZ'),
        subj=notedata['title'],
    )

    moderation.note_about(
        userid=request.userid,
        target_user=notedata['senderid'],
        title=staff_note_title,
        message=notedata['content'],
    )
    raise HTTPSeeOther("/staffnotes/" + notedata['sendername'])
Ejemplo n.º 6
0
def modcontrol_copynotetostaffnotes_post_(request):
    form = request.web_input(noteid=None)

    notedata = note.select_view(request.userid, int(form.noteid))

    staff_note_title = u"Received note from {sender}, dated {date}, with subject: “{subj}”.".format(
        sender=notedata['sendername'],
        date=arrow.get(notedata['unixtime']).format('YYYY-MM-DD HH:mm:ss ZZ'),
        subj=notedata['title'],
    )

    moderation.note_about(
        userid=request.userid,
        target_user=notedata['senderid'],
        title=staff_note_title,
        message=notedata['content'],
    )
    raise HTTPSeeOther("/staffnotes/" + notedata['sendername'])