diff --git a/extensions/amavis_quarantine/templatetags/amextras.py b/extensions/amavis_quarantine/templatetags/amextras.py index 05c77b8b3..0ddc10c6b 100644 --- a/extensions/amavis_quarantine/templatetags/amextras.py +++ b/extensions/amavis_quarantine/templatetags/amextras.py @@ -11,18 +11,6 @@ register = template.Library() @register.simple_tag def viewm_menu(user, mail_id, rcpt): - options_menu = [ - {"name" : "viewmode", - "label" : _("View as plain text"), - "url" : "?mode=plain&links=0"}, - {"name" : "viewmode", - "label" : _("View as HTML"), - "url" : "?mode=html&links=0"}, - {"name" : "viewmode", - "label" : _("Activate links"), - "url" : "?mode=html&links=1"} - ] - entries = [ {"name" : "back", "img" : "icon-arrow-left", @@ -45,10 +33,6 @@ def viewm_menu(user, mail_id, rcpt): "url" : reverse(amavis_quarantine.views.delete, args=[mail_id]) \ + ("?rcpt=%s" % rcpt if rcpt else ""), "label" : _("Delete")}, - {"name" : "options", - "label" : _("Options"), - "img" : "icon-cog", - "menu" : options_menu} ] return render_to_string('common/buttons_list.html', diff --git a/extensions/amavis_quarantine/views.py b/extensions/amavis_quarantine/views.py index cfd378cc9..061d0e9c6 100644 --- a/extensions/amavis_quarantine/views.py +++ b/extensions/amavis_quarantine/views.py @@ -134,9 +134,7 @@ def getmailcontent(request, mail_id): for qm in qmails: content += qm.mail_text msg = email.message_from_string(content) - links = request.GET.has_key("links") and request.GET["links"] or "0" - mode = request.GET.has_key("mode") and request.GET["mode"] or "plain" - mail = SQLemail(msg, mformat=mode, links=links) + mail = SQLemail(msg, mformat="plain", links="0") return _render(request, "common/viewmail.html", { "headers" : mail.render_headers(), "mailbody" : mail.body @@ -166,15 +164,10 @@ def viewmail(request, mail_id): msgrcpt = Msgrcpt.objects.get(mail=mail_id, rid__email=mb.full_address) msgrcpt.rs = 'V' msgrcpt.save() - args = [] - for kw in ["mode", "links"]: - if request.GET.has_key(kw): - args += ["%s=%s" % (kw, request.GET[kw])] content = Template(""" -""").render(Context({"url" : reverse(getmailcontent, args=[mail_id]) \ - + "?%s" % "&".join(args)})) +""").render(Context({"url" : reverse(getmailcontent, args=[mail_id])})) menu = viewm_menu(request.user, mail_id, rcpt) ctx = getctx("ok", menu=menu, listing=content) return HttpResponse(simplejson.dumps(ctx), mimetype="application/json")