예제 #1
0
    def history(self, req, form):
        """Display upload history of the current user"""
        argd = wash_urlargd(form, {})
        _ = gettext_set_language(argd['ln'])

        not_authorized = user_authorization(req, argd['ln'])
        if not_authorized:
            return not_authorized
        uploaded_meta_files = get_user_metadata_uploads(req)
        uploaded_doc_files = get_user_document_uploads(req)

        uid = getUid(req)
        body = batchuploader_templates.tmpl_display_menu(argd['ln'],
                                                         ref="history")
        body += batchuploader_templates.tmpl_upload_history(
            argd['ln'], uploaded_meta_files, uploaded_doc_files)
        title = _("Upload history")
        return page(title=title,
                    body=body,
                    metaheaderadd=batchuploader_templates.tmpl_styles(),
                    uid=uid,
                    lastupdated=__lastupdated__,
                    req=req,
                    language=argd['ln'],
                    navmenuid="batchuploader")
예제 #2
0
    def history(self, req, form):
        """Display upload history of the current user"""
        argd = wash_urlargd(form, {})
        _ = gettext_set_language(argd["ln"])

        not_authorized = user_authorization(req, argd["ln"])
        if not_authorized:
            return not_authorized
        uploaded_meta_files = get_user_metadata_uploads(req)
        uploaded_doc_files = get_user_document_uploads(req)

        uid = getUid(req)
        body = batchuploader_templates.tmpl_display_menu(argd["ln"], ref="history")
        body += batchuploader_templates.tmpl_upload_history(argd["ln"], uploaded_meta_files, uploaded_doc_files)
        title = _("Upload history")
        return page(
            title=title,
            body=body,
            metaheaderadd=batchuploader_templates.tmpl_styles(),
            uid=uid,
            lastupdated=__lastupdated__,
            req=req,
            language=argd["ln"],
            navmenuid="batchuploader",
        )