diff options
-rw-r--r-- | public/views.py | 33 | ||||
-rw-r--r-- | templates/public/developer_list.html | 1 | ||||
-rw-r--r-- | templates/public/developers.html | 16 | ||||
-rw-r--r-- | templates/public/index.html | 1 | ||||
-rw-r--r-- | templates/public/userlist.html (renamed from templates/public/fellows.html) | 6 | ||||
-rw-r--r-- | urls.py | 5 |
6 files changed, 26 insertions, 36 deletions
diff --git a/public/views.py b/public/views.py index 7f703c4..5c05782 100644 --- a/public/views.py +++ b/public/views.py @@ -22,22 +22,25 @@ def projects(request): template_name="public/projects.html", template_object_name="project") -def developers(request): - devs = User.objects.filter(is_active=True).exclude(userprofile_user__roles="Trusted User").order_by('username') - tus = User.objects.filter(is_active=True, userprofile_user__roles="Trusted User").order_by('username') - return render_to_response('public/developers.html', - {'developers': devs, 'tus': tus}, - context_instance=RequestContext(request)) +def userlist(request, type='Developers'): + users = User.objects.order_by('username') + if type == 'Developers': + users = users.filter(is_active=True).exclude(userprofile_user__roles="Trusted User") + msg = "This is a list of the current Arch Linux Developers. They maintain the [core] and [extra] package repositories in addition to doing any other developer duties." + elif type == 'Trusted Users': + users = users.filter(is_active=True, userprofile_user__roles="Trusted User") + msg = "Here are all your friendly Arch Linux Trusted Users who are in charge of the [community] repository." + elif type == 'Fellows': + users = users.filter(is_active=False) + msg = "Below you can find a list of ex-developers (aka project fellows). These folks helped make Arch what it is today. Thanks!" -def fellows(request): - return list_detail.object_list(request, - User.objects.filter(is_active=False).order_by('username'), - template_name="public/fellows.html", - template_object_name="dev", - extra_context={"dev_type": "Fellows", - "description": "Below you can find a list of ex-developers" - " (aka Project Fellows). These folks helped make Arch what" - " it is today. Thanks!"}) + context = { + 'user_type': type, + 'description': msg, + 'users': users, + } + return render_to_response('public/userlist.html', context, + context_instance=RequestContext(request)) def donate(request): donor_count = Donor.objects.count() diff --git a/templates/public/developer_list.html b/templates/public/developer_list.html index 37a5953..9a63a6d 100644 --- a/templates/public/developer_list.html +++ b/templates/public/developer_list.html @@ -1,4 +1,3 @@ - <br /><br /> <div id="devlist"> {% for dev in dev_list %} <a href="#{{ dev.username }}">{{ dev.first_name }}{{ dev.last_name.0|capfirst}}</a> diff --git a/templates/public/developers.html b/templates/public/developers.html deleted file mode 100644 index f290587..0000000 --- a/templates/public/developers.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -<div class="box"> - <h2 class="title">Arch Linux Core Developers</h2> - {% with developers as dev_list %} - {% include 'public/developer_list.html' %} - {% endwith %} - <h2 class="title">Arch Linux Trusted Users</h2> - {% with tus as dev_list %} - {% include 'public/developer_list.html' %} - {% endwith %} -</div> -<br /><br /> -{% endblock %} - diff --git a/templates/public/index.html b/templates/public/index.html index 0ccbfb7..9351a72 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -111,6 +111,7 @@ <h3>Development:</h3> <ul class="links"> <li><a href="/developers/">Developers</a></li> + <li><a href="/trustedusers/">Trusted Users</a></li> <li><a href="/fellows/">Fellows</a></li> <li><a href="http://bugs.archlinux.org">Bug Tracker</a></li> <li><a href="/svn/">SVN</a></li> diff --git a/templates/public/fellows.html b/templates/public/userlist.html index 4bbda77..ce8cb14 100644 --- a/templates/public/fellows.html +++ b/templates/public/userlist.html @@ -2,9 +2,11 @@ {% block content %} <div class="box"> - <h2 class="title">Arch Linux {{dev_type}}</h2> - {{description}} + <h2 class="title">Arch Linux {{user_type}}</h2> + <p>{{description}}</p> + {% with users as dev_list %} {% include 'public/developer_list.html' %} + {% endwith %} </div> <br /><br /> {% endblock %} @@ -99,8 +99,9 @@ urlpatterns = patterns('', (r'^about/$', direct_to_template, {'template': 'public/about.html'}), (r'^art/$', direct_to_template, {'template': 'public/art.html'}), (r'^svn/$', direct_to_template, {'template': 'public/svn.html'}), - (r'^developers/$', 'archweb.public.views.developers'), - (r'^fellows/$', 'archweb.public.views.fellows'), + (r'^developers/$', 'archweb.public.views.userlist', { 'type':'Developers' }), + (r'^trustedusers/$', 'archweb.public.views.userlist', { 'type':'Trusted Users' }), + (r'^fellows/$', 'archweb.public.views.userlist', { 'type':'Fellows' }), (r'^donate/$', 'archweb.public.views.donate'), (r'^download/$', 'archweb.public.views.download'), (r'^irc/$', direct_to_template, {'template': 'public/irc.html'}), |