summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2008-04-28 18:08:54 -0700
committereliott <eliott@cactuswax.net>2008-04-28 18:08:54 -0700
commit889d15406cb989d35b39560751f1d8373a11a5c0 (patch)
treeb104a27cca8a691b5dbbdf56599dfbee6cebec49
parent7e62d7f4ba9def136962e0d1cae57b2d49b19b54 (diff)
removed flag out of date from backend.
Flagging a package out of date is not needed in the backend. Backend only needs to unflag.
-rw-r--r--packages/views.py38
-rw-r--r--templates/packages/details.html7
-rw-r--r--templates/packages/flag.html26
-rw-r--r--templates/packages/flaghelp.html14
-rw-r--r--templates/packages/outofdate.txt13
-rw-r--r--urls.py2
6 files changed, 2 insertions, 98 deletions
diff --git a/packages/views.py b/packages/views.py
index 87d61f93..2ac34745 100644
--- a/packages/views.py
+++ b/packages/views.py
@@ -135,44 +135,6 @@ def files(request, pkgid):
files = PackageFile.objects.filter(pkg=pkgid)
return render_response(request, 'packages/files.html', {'pkg':pkg,'files':files})
-def flaghelp(request):
- return render_response(request, 'packages/flaghelp.html')
-
-def flag(request, pkgid):
- pkg = get_object_or_404(Package, id=pkgid)
- context = {'pkg': pkg}
- if request.POST.has_key('confirmemail'):
- email = request.POST['confirmemail']
- if request.POST.has_key('usermessage'):
- message = request.POST['usermessage']
- else:
- message = None
- # validate
- errors = {}
- validate(errors, 'Email Address', email, validators.isValidEmail, False, request)
- if errors:
- context['errors'] = errors
- return render_response(request, 'packages/flag.html', context)
-
- context['confirmemail'] = email
- pkg.needupdate = 1
- pkg.save()
- if pkg.maintainer_id > 0:
- # send notification email to the maintainer
- t = loader.get_template('packages/outofdate.txt')
- c = Context({
- 'email': request.POST['confirmemail'],
- 'message': message,
- 'pkgname': pkg.pkgname,
- 'weburl': 'http://www.archlinux.org/packages/' + str(pkg.id) + '/'
- })
- send_mail('arch: Package [%s] marked out-of-date' % pkg.pkgname,
- t.render(c),
- 'Arch Website Notification <nobody@archlinux.org>',
- [pkg.maintainer.email],
- fail_silently=True)
- return render_response(request, 'packages/flag.html', context)
-
def unflag(request, pkgid):
pkg = get_object_or_404(Package, id=pkgid)
pkg.needupdate = 0
diff --git a/templates/packages/details.html b/templates/packages/details.html
index 66315583..c3b214e0 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -9,15 +9,12 @@
<ul class="small">
<li><a href="http://repos.archlinux.org/viewvc.cgi/{{ pkg.pkgname }}/repos/{{ pkg.repo.name|lower }}-{{ pkg.arch.name|lower }}/">View SVN Entries</a></li>
<!-- <li><a href="/packages/files/{{ pkg.id }}/">View File List</a></li> -->
- <li>
{% if pkg.needupdate %}
+ <li>
<span style="font-size:x-small"><em>This package has been flagged out-of-date</em></span>
<br />&nbsp; &nbsp; <a href="/packages/unflag/{{ pkg.id }}/">Click here to unflag</a>
- {% else %}
- <a href="/packages/flag/{{ pkg.id }}/" onclick="return !window.open('/packages/flag/{{ pkg.id }}/','FlagHelp','height=250,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');">Flag Package Out-of-Date</a>
- <a href="/packages/flaghelp" onclick="return !window.open('/packages/flaghelp','FlagHelp','height=250,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');"><span style="font-size:x-small">(?)</span></a>
- {% endif %}
</li>
+ {% endif %}
<li>&nbsp;</li>
<li>
<form name="devaction" method="post" action="/packages/update/">
diff --git a/templates/packages/flag.html b/templates/packages/flag.html
deleted file mode 100644
index 215b6fa8..00000000
--- a/templates/packages/flag.html
+++ /dev/null
@@ -1,26 +0,0 @@
-{% load validation %}
-<html>
-<head><title>Flagging Packages</title></head>
-<body>
-{% if errors %}
- {% print_errors errors %}
-{% endif %}
-<span style="font-family: verdana, arial, helvetica">
-{% if confirmemail %}
- Thank you. Maintainers have been notified.
-{% else %}
-<form method="post" action=".">
- Please confirm your flag request.<br />
- <br />
- Email Address: (required) <br />
- <input type="text" name="confirmemail" size="40" maxlength="128" /><br />
- <br />
- Message to dev: (optional)<br />
- <textarea name="usermessage" rows="3" cols="40"></textarea><br />
- <input type="submit" value=" Confirm " />
-</form>
-{% endif %}
-</span>
-</body>
-</html>
-
diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html
deleted file mode 100644
index 09f7530b..00000000
--- a/templates/packages/flaghelp.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<html>
-<head><title>Flagging Packages</title></head>
-<body>
-<span style="font-family: verdana, arial, helvetica">
-If you notice that one of Arch's packages is out of date (ie, there is a newer
-<b>stable</b> release available), then please notify us by using the <b>Flag</b>
-button in the <i>Package Details</i> screen. This will notify the maintainer
-responsible for that package so they can update it.
-<br><br>
-<b>Note:</b> Please do <i>not</i> use this facility if the package is broken!
-Use the <a target="_blank" href='http://bugs.archlinux.org'>bugtracker</a> instead.
-</span>
-</body>
-</html>
diff --git a/templates/packages/outofdate.txt b/templates/packages/outofdate.txt
deleted file mode 100644
index 7b863608..00000000
--- a/templates/packages/outofdate.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-
-* Note: this is an automated message
-
-{{ email }} wants to notify you that the following package may be out
-of date:
-
- {{ pkgname }} ({{ weburl }})
-{% if message %}
-The user provided the following additional text:
-
-{{ message }}
-{% endif %}
-
diff --git a/urls.py b/urls.py
index c08a8775..dbd59b48 100644
--- a/urls.py
+++ b/urls.py
@@ -5,8 +5,6 @@ from django.views.decorators.cache import cache_page
urlpatterns = patterns('',
# Dynamic Stuff
- (r'^packages/flag/(\d+)/$', 'archweb_dev.packages.views.flag'),
- (r'^packages/flaghelp/$', 'archweb_dev.packages.views.flaghelp'),
(r'^packages/unflag/(\d+)/$', 'archweb_dev.packages.views.unflag'),
(r'^packages/files/(\d+)/$', 'archweb_dev.packages.views.files'),
(r'^packages/search/$', 'archweb_dev.packages.views.search'),