From f3185cbe0f85adf7bd257ac409436b9b58188285 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 27 Mar 2013 09:48:01 -0400 Subject: commands/reporead: handle null values --- devel/management/commands/reporead.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index fd8e3979..cf98f004 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -107,6 +107,8 @@ def populate(self, values): setattr(self, k, long(v[0])) elif k in ('desc', 'pgpsig'): # do NOT prune these values at all + if v[0] == None: + v[0] = 'missing' setattr(self, k, v[0]) elif k == 'version': match = self.version_re.match(v[0]) @@ -212,7 +214,10 @@ def populate_pkg(dbpkg, repopkg, force=False, timestamp=None): dbpkg.pkgver = repopkg.ver dbpkg.pkgrel = repopkg.rel dbpkg.epoch = repopkg.epoch - dbpkg.pkgdesc = repopkg.desc + try: + dbpkg.pkgdesc = repopkg.desc + except AttributeError: + dbpkg.pkgdesc = "missing" dbpkg.url = repopkg.url dbpkg.filename = repopkg.filename dbpkg.compressed_size = repopkg.csize -- cgit v1.2.3-54-g00ecf From 1c5cb2aa39a596b94711584d8b300cc20a667634 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 27 Mar 2013 09:48:54 -0400 Subject: better comments in local_settings.py.example --- local_settings.py.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local_settings.py.example b/local_settings.py.example index b8407d3e..30ec3d67 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -41,10 +41,10 @@ CACHE_MIDDLEWARE_SECONDS = 300 ## locally, you will want to use False. SESSION_COOKIE_SECURE = False -## location for saving dev pictures +## location for saving dev pictures (the 'devs' folder should be inside of this) MEDIA_ROOT = '/srv/example.com/img/' -## web url for serving image files +## web url for serving image files (the 'devs' folder should be inside of this) MEDIA_URL = '/media/img/' ## Make this unique, and don't share it with anybody. -- cgit v1.2.3-54-g00ecf From 09c2e79eeb23a71d6dbedcaf8d78413accc452d9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 27 Mar 2013 09:49:23 -0400 Subject: Allow '~' in repo names --- packages/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/urls.py b/packages/urls.py index 6eddc5fe..1fd54a7e 100644 --- a/packages/urls.py +++ b/packages/urls.py @@ -31,10 +31,10 @@ (r'^(?P[^ /]+)/$', 'details'), - (r'^(?P[A-z0-9\-]+)/(?P[^ /]+)/$', + (r'^(?P[A-z0-9~\-]+)/(?P[^ /]+)/$', 'details'), # canonical package url. subviews defined above - (r'^(?P[A-z0-9\-]+)/(?P[A-z0-9]+)/(?P[^ /]+)/', + (r'^(?P[A-z0-9~\-]+)/(?P[A-z0-9]+)/(?P[^ /]+)/', include(package_patterns)), ) -- cgit v1.2.3-54-g00ecf From db0519771d3a3a977439f905c281274630e0f607 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 27 Mar 2013 09:50:22 -0400 Subject: Add a copyright header to sitestatic/archweb.js --- sitestatic/archweb.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 248be7a6..f5a682d6 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -1,3 +1,23 @@ +/* archweb.js + * Homepage: https://projects.archlinux.org/archweb.git/ + * Copyright: 2007-2011 The Archweb Team + * License: GPLv2 + * + * This file is part of Archweb. + * + * Archweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Archweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Archweb. If not, see . + */ + /* tablesorter custom parsers for various pages: * devel/index.html, mirrors/status.html, todolists/view.html */ if (typeof $.tablesorter !== 'undefined') { -- cgit v1.2.3-54-g00ecf From b4cf5bbafdda1b8f8fb4f51e6c961ffbbfe992d1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 27 Mar 2013 10:10:08 -0400 Subject: Pull references to Arch Linux in code into BRANDING_ variables in settings This does not include templates --- devel/views.py | 5 +++-- feeds.py | 9 +++++---- packages/management/commands/signoff_report.py | 3 ++- packages/views/flag.py | 2 +- public/views.py | 6 +++--- settings.py | 5 +++++ 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/devel/views.py b/devel/views.py index d2ce65db..7be3dc17 100644 --- a/devel/views.py +++ b/devel/views.py @@ -6,6 +6,7 @@ import time from django import forms +from django.conf import settings from django.http import HttpResponseRedirect from django.contrib.auth.decorators import \ login_required, permission_required, user_passes_test @@ -319,9 +320,9 @@ def save(self, commit=True): 'password': password, }) - send_mail("Your new archweb account", + send_mail("Your new "+settings.BRANDING_APPNAME+" account", template.render(ctx), - 'Arch Website Notification ', + settings.BRANDING_EMAIL, [user.email], fail_silently=False) diff --git a/feeds.py b/feeds.py index ee856f62..9a5e2777 100644 --- a/feeds.py +++ b/feeds.py @@ -1,6 +1,7 @@ import hashlib import pytz +from django.conf import settings from django.contrib.sites.models import Site from django.contrib.syndication.views import Feed from django.db.models import Q @@ -68,7 +69,7 @@ def get_object(self, request, arch='', repo=''): return obj def title(self, obj): - s = 'Arch Linux: Recent package updates' + s = settings.BRANDING_DISTRONAME+': Recent package updates' if 'repo' in obj: s += ' (%s [%s])' % (obj['arch'].name, obj['repo'].name.lower()) elif 'arch' in obj: @@ -76,7 +77,7 @@ def title(self, obj): return s def description(self, obj): - s = 'Recently updated packages in the Arch Linux package repositories' + s = 'Recently updated packages in the '+settings.BRANDING_DISTRONAME+' package repositories' if 'arch' in obj: s += ' for the \'%s\' architecture' % obj['arch'].name.lower() if not obj['arch'].agnostic: @@ -117,9 +118,9 @@ def news_last_modified(request, *args, **kwargs): class NewsFeed(Feed): feed_type = GuidNotPermalinkFeed - title = 'Arch Linux: Recent news updates' + title = settings.BRANDING_DISTRONAME+': Recent news updates' link = '/news/' - description = 'The latest and greatest news from the Arch Linux distribution.' + description = 'The latest and greatest news from the '+settings.BRANDING_DISTRONAME+' distribution.' subtitle = description title_template = 'feeds/news_title.html' description_template = 'feeds/news_description.html' diff --git a/packages/management/commands/signoff_report.py b/packages/management/commands/signoff_report.py index ddf930db..498bb533 100644 --- a/packages/management/commands/signoff_report.py +++ b/packages/management/commands/signoff_report.py @@ -8,6 +8,7 @@ Usage: ./manage.py signoff_report """ +from django.conf import settings from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.core.management.base import BaseCommand, CommandError @@ -120,7 +121,7 @@ def generate_report(email, repo_name): 'old_days': old_days, 'leaders': leaders, }) - from_addr = 'Arch Website Notification ' + from_addr = settings.BRANDING_EMAIL send_mail(subject, t.render(c), from_addr, [email]) # vim: set ts=4 sw=4 et: diff --git a/packages/views/flag.py b/packages/views/flag.py index 0d2f9009..760bdd94 100644 --- a/packages/views/flag.py +++ b/packages/views/flag.py @@ -98,7 +98,7 @@ def perform_updates(): }) send_mail(subject, tmpl.render(ctx), - 'Arch Website Notification ', + settings.BRANDING_EMAIL, toemail, fail_silently=True) diff --git a/public/views.py b/public/views.py index 3ea8f841..c2c42f5a 100644 --- a/public/views.py +++ b/public/views.py @@ -26,15 +26,15 @@ def index(request): USER_LISTS = { 'devs': { 'user_type': 'Developers', - 'description': "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.", + 'description': "This is a list of the current "+settings.BRANDING_DISTRONAME+" Developers. They maintain the [core] and [extra] package repositories in addition to doing any other developer duties.", }, 'tus': { 'user_type': 'Trusted Users', - 'description': "Here are all your friendly Arch Linux Trusted Users who are in charge of the [community] repository.", + 'description': "Here are all your friendly "+settings.BRANDING_DISTRONAME+" Trusted Users who are in charge of the [community] repository.", }, 'fellows': { 'user_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!", + 'description': "Below you can find a list of ex-developers (aka project fellows). These folks helped make "+settings.BRANDING_SHORTNAME+" what it is today. Thanks!", }, } diff --git a/settings.py b/settings.py index 52339c53..998eefbd 100644 --- a/settings.py +++ b/settings.py @@ -156,3 +156,8 @@ INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ] # vim: set ts=4 sw=4 et: + +BRANDING_APPNAME = 'archweb' +BRANDING_DISTRONAME = 'Arch Linux' +BRANDING_SHORTNAME = 'Arch' +BRANDING_EMAIL = 'Arch Website Notification ' -- cgit v1.2.3-54-g00ecf From 63caf646fa72121852eeb4944b6b9ce606665ba0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 27 Mar 2013 10:27:16 -0400 Subject: find templates -type f -exec sed -i 's/\({% block title %}\)Arch Linux/\1{{ BRANDING_DISTRONAME }}/' {} + --- templates/404.html | 2 +- templates/base.html | 2 +- templates/devel/clock.html | 2 +- templates/devel/index.html | 2 +- templates/devel/packages.html | 2 +- templates/devel/profile.html | 2 +- templates/general_form.html | 2 +- templates/mirrors/mirror_details.html | 2 +- templates/mirrors/mirrorlist_generate.html | 2 +- templates/mirrors/mirrors.html | 2 +- templates/mirrors/status.html | 2 +- templates/news/add.html | 2 +- templates/news/delete.html | 2 +- templates/news/list.html | 2 +- templates/news/view.html | 2 +- templates/packages/details.html | 2 +- templates/packages/differences.html | 2 +- templates/packages/files.html | 2 +- templates/packages/flag.html | 2 +- templates/packages/flag_confirmed.html | 2 +- templates/packages/flagged.html | 2 +- templates/packages/groups.html | 2 +- templates/packages/packages_list.html | 2 +- templates/packages/search.html | 2 +- templates/packages/signoff_options.html | 2 +- templates/packages/signoffs.html | 2 +- templates/packages/stale_relations.html | 2 +- templates/public/about.html | 2 +- templates/public/art.html | 2 +- templates/public/blank.html | 2 +- templates/public/donate.html | 2 +- templates/public/download.html | 2 +- templates/public/feeds.html | 2 +- templates/public/keys.html | 2 +- templates/public/svn.html | 2 +- templates/public/userlist.html | 2 +- templates/registration/login.html | 2 +- templates/registration/logout.html | 2 +- templates/releng/add.html | 2 +- templates/releng/results.html | 2 +- templates/releng/thanks.html | 2 +- templates/todolists/list.html | 2 +- templates/todolists/public_list.html | 2 +- templates/todolists/todolist_confirm_delete.html | 2 +- templates/todolists/view.html | 2 +- templates/visualize/index.html | 2 +- 46 files changed, 46 insertions(+), 46 deletions(-) diff --git a/templates/404.html b/templates/404.html index 33271c66..7a667bac 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Page Not Found{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Page Not Found{% endblock %} {% block content %}
diff --git a/templates/base.html b/templates/base.html index b8a5be46..fd146460 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,7 +1,7 @@ {% load url from future %}{% load static from staticfiles %} - {% block title %}Arch Linux{% endblock %} + {% block title %}{{ BRANDING_DISTRONAME }}{% endblock %} diff --git a/templates/devel/clock.html b/templates/devel/clock.html index 61e67c32..409ba24c 100644 --- a/templates/devel/clock.html +++ b/templates/devel/clock.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load tz %} -{% block title %}Arch Linux - Developer World Clocks{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Developer World Clocks{% endblock %} {% block content %}
diff --git a/templates/devel/index.html b/templates/devel/index.html index a0ccb91f..a7ffe0e2 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -3,7 +3,7 @@ {% load cache %} {% load package_extras %} -{% block title %}Arch Linux - Developer Dashboard{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Developer Dashboard{% endblock %} {% block content %}
diff --git a/templates/devel/packages.html b/templates/devel/packages.html index 6b9df214..77146891 100644 --- a/templates/devel/packages.html +++ b/templates/devel/packages.html @@ -3,7 +3,7 @@ {% load attributes %} {% load package_extras %} -{% block title %}Arch Linux - {{ title }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ title }}{% endblock %} {% block content %}
diff --git a/templates/devel/profile.html b/templates/devel/profile.html index b6580ab8..54a3771c 100644 --- a/templates/devel/profile.html +++ b/templates/devel/profile.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Edit Profile{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Edit Profile{% endblock %} {% block content %}
diff --git a/templates/general_form.html b/templates/general_form.html index 1fa33513..c6d6cb1c 100644 --- a/templates/general_form.html +++ b/templates/general_form.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - {{title}}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{title}}{% endblock %} {% block content %}
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index edeab5dc..76ab3d5b 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load mirror_status %} -{% block title %}Arch Linux - {{ mirror.name }} - Mirror Details{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ mirror.name }} - Mirror Details{% endblock %} {% block content %} diff --git a/templates/mirrors/mirrorlist_generate.html b/templates/mirrors/mirrorlist_generate.html index e6f5e28c..b5fcd329 100644 --- a/templates/mirrors/mirrorlist_generate.html +++ b/templates/mirrors/mirrorlist_generate.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Pacman Mirrorlist Generator{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Pacman Mirrorlist Generator{% endblock %} {% block content %}
diff --git a/templates/mirrors/mirrors.html b/templates/mirrors/mirrors.html index 77c9ec33..aea458d8 100644 --- a/templates/mirrors/mirrors.html +++ b/templates/mirrors/mirrors.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Mirror Overview{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Mirror Overview{% endblock %} {% block content %}
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index 8ee1d46e..a32e6e37 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load mirror_status %} -{% block title %}Arch Linux - Mirror Status{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Mirror Status{% endblock %} {% block content %}
diff --git a/templates/news/add.html b/templates/news/add.html index 51094659..a09366dc 100644 --- a/templates/news/add.html +++ b/templates/news/add.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - News: {% if form.instance.id %}Edit{% else %}Add{% endif %} Article{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - News: {% if form.instance.id %}Edit{% else %}Add{% endif %} Article{% endblock %} {% block content %}
diff --git a/templates/news/delete.html b/templates/news/delete.html index 191c6929..d8f71bd5 100644 --- a/templates/news/delete.html +++ b/templates/news/delete.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Delete News{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Delete News{% endblock %} {% block content %}
diff --git a/templates/news/list.html b/templates/news/list.html index a72a2dda..98cf9a73 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - News{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - News{% endblock %} {% block content %}
diff --git a/templates/news/view.html b/templates/news/view.html index 7788dece..47830867 100644 --- a/templates/news/view.html +++ b/templates/news/view.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load markup %} -{% block title %}Arch Linux - News: {{ news.title }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - News: {{ news.title }}{% endblock %} {% block content %}
diff --git a/templates/packages/details.html b/templates/packages/details.html index 4ab55ef2..e4ae0781 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -3,7 +3,7 @@ {% load package_extras %} {% load pgp %} -{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}){% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% load package_extras %} diff --git a/templates/packages/differences.html b/templates/packages/differences.html index 01e1f857..4463f63d 100644 --- a/templates/packages/differences.html +++ b/templates/packages/differences.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Package Differences Reports{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Differences Reports{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/files.html b/templates/packages/files.html index ba3fba25..652dc133 100644 --- a/templates/packages/files.html +++ b/templates/packages/files.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}) - File List{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}) - File List{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/flag.html b/templates/packages/flag.html index d1226295..bfca2a65 100644 --- a/templates/packages/flag.html +++ b/templates/packages/flag.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Flag Package - {{ package.pkgname }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Flag Package - {{ package.pkgname }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} {% block head %}{% endblock %} {% block navbarclass %}anb-packages{% endblock %} diff --git a/templates/packages/flag_confirmed.html b/templates/packages/flag_confirmed.html index 6274adbb..a4c4db2a 100644 --- a/templates/packages/flag_confirmed.html +++ b/templates/packages/flag_confirmed.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Package Flagged - {{ package.pkgname }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Flagged - {{ package.pkgname }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} {% block head %}{% endblock %} {% block navbarclass %}anb-packages{% endblock %} diff --git a/templates/packages/flagged.html b/templates/packages/flagged.html index bbe0fad5..4b12ca8f 100644 --- a/templates/packages/flagged.html +++ b/templates/packages/flagged.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Flag Package - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Flag Package - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}){% endblock %} {% block head %}{% endblock %} {% block navbarclass %}anb-packages{% endblock %} diff --git a/templates/packages/groups.html b/templates/packages/groups.html index 2786244d..7212c128 100644 --- a/templates/packages/groups.html +++ b/templates/packages/groups.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Package Groups{% if arch %} - {{ arch }}{% endif %}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Groups{% if arch %} - {{ arch }}{% endif %}{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/packages_list.html b/templates/packages/packages_list.html index ee2d2087..a7907f25 100644 --- a/templates/packages/packages_list.html +++ b/templates/packages/packages_list.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load package_extras %} -{% block title %}Arch Linux - {{ name }} ({{ arch.name }}) - {{ list_title }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ name }} ({{ arch.name }}) - {{ list_title }}{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/search.html b/templates/packages/search.html index ebd4e6c4..71a57072 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -2,7 +2,7 @@ {% load package_extras %} {% load admin_static %} -{% block title %}Arch Linux - Package Database{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Database{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block head %} diff --git a/templates/packages/signoff_options.html b/templates/packages/signoff_options.html index ee9b8b47..40b7cac7 100644 --- a/templates/packages/signoff_options.html +++ b/templates/packages/signoff_options.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Package Signoff Options - {{ package.pkgbase }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Signoff Options - {{ package.pkgbase }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} {% block head %}{% endblock %} {% block navbarclass %}anb-packages{% endblock %} diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html index b20483c0..06298249 100644 --- a/templates/packages/signoffs.html +++ b/templates/packages/signoffs.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load package_extras %} -{% block title %}Arch Linux - Package Signoffs{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Signoffs{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/stale_relations.html b/templates/packages/stale_relations.html index df469e78..326f7a2b 100644 --- a/templates/packages/stale_relations.html +++ b/templates/packages/stale_relations.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Stale Package Relations{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Stale Package Relations{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/public/about.html b/templates/public/about.html index bf38e8a1..f5751d42 100644 --- a/templates/public/about.html +++ b/templates/public/about.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - About{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - About{% endblock %} {% block content %}

About Arch Linux

diff --git a/templates/public/art.html b/templates/public/art.html index 96312971..1ced35e7 100644 --- a/templates/public/art.html +++ b/templates/public/art.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Artwork{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Artwork{% endblock %} {% block content %}
diff --git a/templates/public/blank.html b/templates/public/blank.html index 2a8c83f4..3bf2cb2b 100644 --- a/templates/public/blank.html +++ b/templates/public/blank.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Sample Page Title{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Sample Page Title{% endblock %} {% block content %}
diff --git a/templates/public/donate.html b/templates/public/donate.html index 3b3ee108..0c20e289 100644 --- a/templates/public/donate.html +++ b/templates/public/donate.html @@ -2,7 +2,7 @@ {% load cache %} {% load static from staticfiles %} -{% block title %}Arch Linux - Donate{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Donate{% endblock %} {% block content %} {% cache 600 donations secure %} diff --git a/templates/public/download.html b/templates/public/download.html index f57e565a..614a4100 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -3,7 +3,7 @@ {% load url from future %} {% load static from staticfiles %} -{% block title %}Arch Linux - Downloads{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Downloads{% endblock %} {% block navbarclass %}anb-download{% endblock %} {% block content %} diff --git a/templates/public/feeds.html b/templates/public/feeds.html index 0f80e1c2..9f62c4b7 100644 --- a/templates/public/feeds.html +++ b/templates/public/feeds.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - RSS Feeds{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - RSS Feeds{% endblock %} {% block content %}
diff --git a/templates/public/keys.html b/templates/public/keys.html index 05524c48..1a21827a 100644 --- a/templates/public/keys.html +++ b/templates/public/keys.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load pgp %} -{% block title %}Arch Linux - Master Signing Keys{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Master Signing Keys{% endblock %} {% block content %}
diff --git a/templates/public/svn.html b/templates/public/svn.html index 0d067098..38e20ec9 100644 --- a/templates/public/svn.html +++ b/templates/public/svn.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - SVN{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - SVN{% endblock %} {% block content %}

SVN Repositories

diff --git a/templates/public/userlist.html b/templates/public/userlist.html index 0077f611..66c63400 100644 --- a/templates/public/userlist.html +++ b/templates/public/userlist.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load cache %} -{% block title %}Arch Linux - {{ user_type }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ user_type }}{% endblock %} {% block content %} {% cache 600 dev-tu-profiles user_type %} diff --git a/templates/registration/login.html b/templates/registration/login.html index ad1ac1ea..783070be 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Developer Login{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Developer Login{% endblock %} {% block content %}
diff --git a/templates/registration/logout.html b/templates/registration/logout.html index 50b3574b..71daa2e8 100644 --- a/templates/registration/logout.html +++ b/templates/registration/logout.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Logout successful{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Logout successful{% endblock %} {% block content %}
diff --git a/templates/releng/add.html b/templates/releng/add.html index ed02984e..29587cb9 100644 --- a/templates/releng/add.html +++ b/templates/releng/add.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load url from future %} -{% block title %}Arch Linux - Test Result Entry{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Test Result Entry{% endblock %} {% block content %}
diff --git a/templates/releng/results.html b/templates/releng/results.html index c19b42a6..82073ffe 100644 --- a/templates/releng/results.html +++ b/templates/releng/results.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load url from future %} -{% block title %}Arch Linux - Release Engineering Testbuild Results{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Release Engineering Testbuild Results{% endblock %} {% block content %}
diff --git a/templates/releng/thanks.html b/templates/releng/thanks.html index 66d65a5c..1ad7260d 100644 --- a/templates/releng/thanks.html +++ b/templates/releng/thanks.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load url from future %} -{% block title %}Arch Linux - Feedback - Thanks!{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Feedback - Thanks!{% endblock %} {% block content %}
diff --git a/templates/todolists/list.html b/templates/todolists/list.html index 88df4c81..36e0eac7 100644 --- a/templates/todolists/list.html +++ b/templates/todolists/list.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Todo Lists{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Todo Lists{% endblock %} {% block content %}
diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html index c3142da3..09251a17 100644 --- a/templates/todolists/public_list.html +++ b/templates/todolists/public_list.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load package_extras %} -{% block title %}Arch Linux - Todo Lists{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Todo Lists{% endblock %} {% block content %}
diff --git a/templates/todolists/todolist_confirm_delete.html b/templates/todolists/todolist_confirm_delete.html index 5545462f..6d7ec0ab 100644 --- a/templates/todolists/todolist_confirm_delete.html +++ b/templates/todolists/todolist_confirm_delete.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Delete Todo List: {{object.name}}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Delete Todo List: {{object.name}}{% endblock %} {% block content %}
diff --git a/templates/todolists/view.html b/templates/todolists/view.html index 02bbfd4f..e53ead82 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load package_extras %} -{% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Todo: {{ list.name }}{% endblock %} {% block content %}
diff --git a/templates/visualize/index.html b/templates/visualize/index.html index 95cf6c1c..617bf8d1 100644 --- a/templates/visualize/index.html +++ b/templates/visualize/index.html @@ -2,7 +2,7 @@ {% load static from staticfiles %} {% load url from future %} -{% block title %}Arch Linux - Visualizations{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Visualizations{% endblock %} {% block content %}
-- cgit v1.2.3-54-g00ecf From 3c115c85cf8cea1d7083c2643043d556a4992131 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 27 Mar 2013 14:54:10 -0400 Subject: Add a context processor so BRANDING_* works in templaces --- main/context_processors.py | 9 +++++++++ settings.py | 11 ++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/main/context_processors.py b/main/context_processors.py index a60d4e63..850bb499 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -1,4 +1,13 @@ def secure(request): return {'secure': request.is_secure()} +def branding(request): + from django.conf import settings + return { + 'BRANDING_APPNAME': settings.BRANDING_APPNAME, + 'BRANDING_DISTRONAME': settings.BRANDING_DISTRONAME, + 'BRANDING_SHORTNAME': settings.BRANDING_SHORTNAME, + 'BRANDING_EMAIL': settings.BRANDING_EMAIL, + } + # vim: set ts=4 sw=4 et: diff --git a/settings.py b/settings.py index 998eefbd..c979d03f 100644 --- a/settings.py +++ b/settings.py @@ -54,6 +54,7 @@ 'django.core.context_processors.static', 'django.contrib.messages.context_processors.messages', 'main.context_processors.secure', + 'main.context_processors.branding', ) TEMPLATE_DIRS = ( @@ -138,6 +139,11 @@ # community bit on the end, repo.svn_root is appended) SVN_BASE_URL = 'svn://svn.archlinux.org/' +BRANDING_APPNAME = 'archweb' +BRANDING_DISTRONAME = 'Arch Linux' +BRANDING_SHORTNAME = 'Arch' +BRANDING_EMAIL = 'Arch Website Notification ' + ## Import local settings from local_settings import * @@ -156,8 +162,3 @@ INSTALLED_APPS = list(INSTALLED_APPS) + [ 'debug_toolbar' ] # vim: set ts=4 sw=4 et: - -BRANDING_APPNAME = 'archweb' -BRANDING_DISTRONAME = 'Arch Linux' -BRANDING_SHORTNAME = 'Arch' -BRANDING_EMAIL = 'Arch Website Notification ' -- cgit v1.2.3-54-g00ecf From fcf5c3aaf087b2131bae34bdb7f1e08b292a0357 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 19 Apr 2013 18:06:13 -0400 Subject: replace a bunch more instances of "Arch" in templates manually --- templates/base.html | 10 +++++----- templates/mirrors/mirrorlist.txt | 2 +- templates/mirrors/mirrorlist_generate.html | 4 ++-- templates/mirrors/mirrorlist_status.txt | 2 +- templates/mirrors/status.html | 2 +- templates/packages/search.html | 2 +- templates/public/index.html | 13 +++++++------ templates/releng/add.html | 4 ++-- 8 files changed, 20 insertions(+), 19 deletions(-) diff --git a/templates/base.html b/templates/base.html index fd146460..3eb67c92 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,21 +10,21 @@ - + {% block head %}{% endblock %} diff --git a/templates/mirrors/mirrorlist.txt b/templates/mirrors/mirrorlist.txt index d3dd6e4e..bbe468fc 100644 --- a/templates/mirrors/mirrorlist.txt +++ b/templates/mirrors/mirrorlist.txt @@ -4,7 +4,7 @@ them, sacrifices have to be made. If editing this template, it is easiest to forget about where line breaks are happening until you are done getting the content right, and then go back later to fix it all up. {% endcomment %}{% autoescape off %}## -## Arch Linux repository mirrorlist +## {{ BRANDING_DISTRONAME }} repository mirrorlist ## Generated on {% now "Y-m-d" %} ##{% for mirror_url in mirror_urls %}{% ifchanged %} diff --git a/templates/mirrors/mirrorlist_generate.html b/templates/mirrors/mirrorlist_generate.html index b5fcd329..c68cad6c 100644 --- a/templates/mirrors/mirrorlist_generate.html +++ b/templates/mirrors/mirrorlist_generate.html @@ -7,8 +7,8 @@

Pacman Mirrorlist Generator

-

This page generates the most up-to-date mirrorlist possible for Arch - Linux. The data used here comes straight from the developers' internal +

This page generates the most up-to-date mirrorlist possible for {{ BRANDING_DISTRONAME }}. + The data used here comes straight from the developers' internal mirror database used to track mirror availability and tiering. There are two main options: get a mirrorlist with every available mirror, or get a mirrorlist tailored to your geography.

diff --git a/templates/mirrors/mirrorlist_status.txt b/templates/mirrors/mirrorlist_status.txt index 523794b2..61d0abb1 100644 --- a/templates/mirrors/mirrorlist_status.txt +++ b/templates/mirrors/mirrorlist_status.txt @@ -4,7 +4,7 @@ them, sacrifices have to be made. If editing this template, it is easiest to forget about where line breaks are happening until you are done getting the content right, and then go back later to fix it all up. {% endcomment %}{% autoescape off %}## -## Arch Linux repository mirrorlist +## {{ BRANDING_DISTRONAME }} repository mirrorlist ## Sorted by mirror score from mirror status page ## Generated on {% now "Y-m-d" %} ## diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index a32e6e37..fbd4d520 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -7,7 +7,7 @@ {% block content %}

Mirror Status

-

This page reports the status of all known, public, and active Arch Linux +

This page reports the status of all known, public, and active {{ BRANDING_DISTRONAME }} mirrors. All data on this page reflects the status of the mirrors within the last {{ cutoff|hours }}. All listed times are UTC. The check script runs on a regular basis and polls for the lastsync file in the root of diff --git a/templates/packages/search.html b/templates/packages/search.html index 71a57072..d4b423d1 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -120,7 +120,7 @@

Package Search

{% endif %}
-

You are browsing the Arch Linux package database. From here you can find +

You are browsing the {{ BRANDING_DISTRONAME }} package database. From here you can find detailed information about packages located in the official supported repositories. For unsupported packages, browse the Arch User Repository (AUR).

diff --git a/templates/public/index.html b/templates/public/index.html index de77b47f..86c0be05 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -4,8 +4,8 @@ {% load static from staticfiles %} {% block head %} - - + + {% endblock %} {% block content_left %} @@ -33,7 +33,7 @@

A simple, lightweight distribution

if you want to learn more about Arch.

Learn more...

+ title="Learn more about {{ BRANDING_DISTRONAME }}">Learn more...

@@ -42,7 +42,7 @@

- RSS Feed {% for news in news_updates %} @@ -95,7 +95,7 @@

Recent Updates (more)

- RSS Feed @@ -139,7 +139,8 @@

Community

Support

-

Existing Arch Users

+

Existing {{BRANDING_SHORTNAME}} Users

-

If you are an existing Arch user, there is no need to download a new ISO +

If you are an existing {{BRANDING_SHORTNAME}} user, there is no need to download a new ISO to update your existing system. You may be looking for an updated mirrorlist instead.

diff --git a/templates/public/index.html b/templates/public/index.html index 4b2bdfa3..de8a5fe8 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -133,7 +133,7 @@

Community

  • Planet Arch
  • International Communities
  • + title="{{DISTRO_SHORTNAME}} communities in your native language">International Communities

    Support

    -- cgit v1.2.3-54-g00ecf From ae9ee14ff153698dd90c6560437e42ff124a6d0b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 19 Apr 2013 21:46:51 -0400 Subject: Abstract ArchWiki URLs and references. Notable things: * Standardize on "ArchWiki", instead of also having "Arch Wiki", via BRANDING_WIKINAME * Link to the article "Install_Guide" instead of "Official_Arch_Linux_Install_Guide", it's a redirect anyway. * On the download page, it assumes the that the version is just appended to the URL for the wiki link. * For the wiki RSS link, It now uses "/${title}?feed=rss" instead of "?title=${title}&feed=rss". --- README.BRANDING | 8 -------- main/context_processors.py | 1 + main/templatetags/wiki.py | 9 +++++++++ settings.py | 2 ++ templates/base.html | 8 ++++---- templates/mirrors/mirrorlist_generate.html | 5 +++-- templates/public/art.html | 2 +- templates/public/download.html | 7 ++++--- templates/public/feeds.html | 10 +++++----- templates/public/index.html | 19 ++++++++++--------- templates/public/svn.html | 4 ++-- templates/releng/results.html | 3 ++- 12 files changed, 43 insertions(+), 35 deletions(-) create mode 100644 main/templatetags/wiki.py diff --git a/README.BRANDING b/README.BRANDING index d5c43aa8..1f9a1db0 100644 --- a/README.BRANDING +++ b/README.BRANDING @@ -4,7 +4,6 @@ templates/base.html * links to `bugs.archlinux.org` * links to the AUR * logged in navbar - * links to `wiki.achlinux.org/index.php/DeveloperWiki` * links to `mailman.archlinux.org` * links to `stats.archlinux.org/munin` * copyright statement is Arch-specific. @@ -12,11 +11,8 @@ templates/base.html templates/public/index.html * The text in the intro box describes Arch Linux. * sidebar - * Documentation - * links to `wiki.archlinux.org` * Community * links to `mailman.archlinux.org` - * links to `wiki.archlinux.org` * links to `planet.archlinux.org` ("Planet Arch") * Support * links to `schwag.archlinux.ca` @@ -24,15 +20,11 @@ templates/public/index.html * links to `www.freewear.org/?page=list_items&org=Archlinux` * Development * links to `projects.archlinux.org` ("Official Arch projects") - * links to `wiki.archlinux.org` - * More Resources - * links to `wiki.archlinux.org` * Below sidebar * Arch's donate button * Arch's sponsors templates/public/feeds - * links to Arch Wiki * links to AUR * links to `bugs.archlinux.org` diff --git a/main/context_processors.py b/main/context_processors.py index 850bb499..5ac31744 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -7,6 +7,7 @@ def branding(request): 'BRANDING_APPNAME': settings.BRANDING_APPNAME, 'BRANDING_DISTRONAME': settings.BRANDING_DISTRONAME, 'BRANDING_SHORTNAME': settings.BRANDING_SHORTNAME, + 'BRANDING_WIKINAME': settings.BRANDING_WIKINAME, 'BRANDING_EMAIL': settings.BRANDING_EMAIL, } diff --git a/main/templatetags/wiki.py b/main/templatetags/wiki.py new file mode 100644 index 00000000..b1b8dd55 --- /dev/null +++ b/main/templatetags/wiki.py @@ -0,0 +1,9 @@ +from django import template +register = template.Library() + +@register.simple_tag +def wiki_url(article=""): + if article == "": + return "https://wiki.archlinux.org/" + else: + return "https://wiki.archlinux.org/index.php/"+article.replace(' ', '_') diff --git a/settings.py b/settings.py index c979d03f..09f2df9c 100644 --- a/settings.py +++ b/settings.py @@ -142,8 +142,10 @@ BRANDING_APPNAME = 'archweb' BRANDING_DISTRONAME = 'Arch Linux' BRANDING_SHORTNAME = 'Arch' +BRANDING_WIKINAME = 'ArchWiki' BRANDING_EMAIL = 'Arch Website Notification ' + ## Import local settings from local_settings import * diff --git a/templates/base.html b/templates/base.html index 3eb67c92..2b3aed66 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,4 +1,4 @@ -{% load url from future %}{% load static from staticfiles %} +{% load url from future %}{% load static from staticfiles %}{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }}{% endblock %} @@ -21,7 +21,7 @@
  • Home
  • Packages
  • Forums
  • -
  • Wiki
  • +
  • Wiki
  • Bugs
  • AUR
  • Download
  • @@ -33,7 +33,7 @@ {% if user.is_authenticated %}
    • Dashboard
    • -
    • DevWiki
    • News
    • Signoffs
    • @@ -75,7 +75,7 @@ title="Contact Aaron Griffin">Aaron Griffin.

      The Arch Linux name and logo are recognized - trademarks. Some rights reserved.

      The registered trademark Linux® is used pursuant to a sublicense from LMI, diff --git a/templates/mirrors/mirrorlist_generate.html b/templates/mirrors/mirrorlist_generate.html index c68cad6c..2025eec2 100644 --- a/templates/mirrors/mirrorlist_generate.html +++ b/templates/mirrors/mirrorlist_generate.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load package_extras %} +{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }} - Pacman Mirrorlist Generator{% endblock %} {% block content %} @@ -28,8 +29,8 @@

      Mirrorlist with all available mirrors

      Customized by country mirrorlist

      The following form can generate a custom up-to-date - pacman mirrorlist based on geography and + pacman mirrorlist based on geography and desired protocol(s). Simply replace the contents of /etc/pacman.d/mirrorlist with your generated list. Additionally, the mirror status data can be incorporated into the generated diff --git a/templates/public/art.html b/templates/public/art.html index f013a040..89f1f81e 100644 --- a/templates/public/art.html +++ b/templates/public/art.html @@ -11,7 +11,7 @@

      {{ BRANDING_DISTRONAME }} Logos and Artwork

      Logos for Press Usage

      The following {{BRANDING_DISTRONAME}} logos are available for press and other use, subject to - the restrictions of our trademark policy.

      Two-color standard version
      diff --git a/templates/public/download.html b/templates/public/download.html index fdfe8e57..72d21736 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -2,6 +2,7 @@ {% load cache %} {% load url from future %} {% load static from staticfiles %} +{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }} - Downloads{% endblock %} {% block navbarclass %}anb-download{% endblock %} @@ -20,7 +21,7 @@

      Release Info

      can always be updated with `pacman -Syu`.

        -
      • Current Release: {{ version }}
      • +
      • Current Release: {{ version }}
      • Included Kernel: 3.0.3
      • Resources:
          @@ -37,7 +38,7 @@

          Release Info

          @@ -167,7 +168,7 @@

          Checksums

          {% endwith %}

          If you want to become an Official Arch Linux Mirror please follow the - instructions listed here.

          + instructions listed here.

          {% endblock %} diff --git a/templates/public/feeds.html b/templates/public/feeds.html index 764ebd90..f298de7f 100644 --- a/templates/public/feeds.html +++ b/templates/public/feeds.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "base.html" %}{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }} - RSS Feeds{% endblock %} {% block content %} @@ -15,10 +15,10 @@

          News and Activity Feeds

          Grab the news item feed to keep up-to-date with the latest news from the {{ BRANDING_DISTRONAME }} development staff.

          -

          The Arch Wiki: Recent changes feed - is also available to track document changes from the Arch Wiki.

          +

          The {{ BRANDING_WIKINAME }}: Recent changes feed + is also available to track document changes from the {{ BRANDING_WIKINAME }}.

          Package Feeds

          diff --git a/templates/public/index.html b/templates/public/index.html index de8a5fe8..7c22c251 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -2,6 +2,7 @@ {% load markup cache %} {% load url from future %} {% load static from staticfiles %} +{% load wiki %} {% block head %} @@ -28,8 +29,8 @@

          A simple, lightweight distribution

          check out our forums and mailing lists - to get your feet wet. Also glance through our wiki + to get your feet wet. Also glance through our wiki if you want to learn more about Arch.

          Recent Updates (Documentation

          @@ -128,11 +129,11 @@

          Community

          @@ -168,7 +169,7 @@

          Development

          title="Official Arch projects (git)">Projects in Git
        • SVN Repositories
        • -
        • Developer Wiki
        • Package Groups
        • @@ -187,7 +188,7 @@

          More Resources

        • Signing Master Keys New
        • -
        • Press Coverage
        • Logos & Artwork
        • News Archives
        • diff --git a/templates/public/svn.html b/templates/public/svn.html index 38e20ec9..88c6df93 100644 --- a/templates/public/svn.html +++ b/templates/public/svn.html @@ -5,7 +5,7 @@

          SVN Repositories

          The PKGBUILD files can be fetched via the ABS utility. To learn more - about ABS, see the ABS wiki page. + about ABS, see the ABS wiki page.

          The SVN repositories have been cloned into git repositories and can be viewed via the cgit interface. @@ -31,7 +31,7 @@

          SVN Repositories

          svn update <your-package-name>

          - Visit the wiki + Visit the wiki for more tips on checking out and updating svn PKGBUILDs.

          diff --git a/templates/releng/results.html b/templates/releng/results.html index 82073ffe..df98d1ac 100644 --- a/templates/releng/results.html +++ b/templates/releng/results.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load url from future %} +{% load wiki %} {% block title %}{{ BRANDING_DISTRONAME }} - Release Engineering Testbuild Results{% endblock %} @@ -18,7 +19,7 @@

          Release Engineering Testbuild Results

          the overview.

          For more information, see the documentation + href="{% wiki_url 'DeveloperWiki:releng_testimages_feedback' %}">documentation on the wiki.

          All ISOs referenced on this page are available from -- cgit v1.2.3-54-g00ecf From 55b52a92806e4e76b1db17178f323362e3ddfe09 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 20 Apr 2013 00:24:29 -0400 Subject: add MAILMAN_BASE_URL to abstract mailing list links --- main/context_processors.py | 1 + settings.py | 2 ++ templates/base.html | 2 +- templates/packages/flag.html | 2 +- templates/packages/flaghelp.html | 2 +- templates/public/download.html | 2 +- templates/public/index.html | 4 ++-- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/main/context_processors.py b/main/context_processors.py index 5ac31744..d6456a9d 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -9,6 +9,7 @@ def branding(request): 'BRANDING_SHORTNAME': settings.BRANDING_SHORTNAME, 'BRANDING_WIKINAME': settings.BRANDING_WIKINAME, 'BRANDING_EMAIL': settings.BRANDING_EMAIL, + 'MAILMAN_BASE_URL': settings.MAILMAN_BASE_URL, } # vim: set ts=4 sw=4 et: diff --git a/settings.py b/settings.py index 09f2df9c..ba9560f7 100644 --- a/settings.py +++ b/settings.py @@ -139,6 +139,8 @@ # community bit on the end, repo.svn_root is appended) SVN_BASE_URL = 'svn://svn.archlinux.org/' +MAILMAN_BASE_URL = 'https://mailman.archlinux.org/mailman' + BRANDING_APPNAME = 'archweb' BRANDING_DISTRONAME = 'Arch Linux' BRANDING_SHORTNAME = 'Arch' diff --git a/templates/base.html b/templates/base.html index 2b3aed66..bc4db84f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -39,7 +39,7 @@

        • Signoffs
        • Todos
        • Dev Clocks
        • -
        • Archives
        • Mirrors
        • Flag Package: {{ package.pkgname }} {{ package.full_version }} ({{ package.a

          The message box portion of the flag utility is optional, and meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the arch-general mailing list with your additional text.

          diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index 9080f611..e2d67e06 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -24,7 +24,7 @@

          Flagging Packages

          The message box portion of the flag utility is optional, and meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the arch-general mailing list with your additional text.

          diff --git a/templates/public/download.html b/templates/public/download.html index 72d21736..f473915a 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -27,7 +27,7 @@

          Release Info

        • diff --git a/templates/public/index.html b/templates/public/index.html index 7c22c251..aeeff175 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -27,7 +27,7 @@

          A simple, lightweight distribution

          Our strong community is diverse and helpful, and we pride ourselves on the range of skillsets and uses for Arch that stem from it. Please check out our forums - and mailing lists to get your feet wet. Also glance through our wiki @@ -127,7 +127,7 @@

          Documentation

          Community

            -
          • Mailing Lists
          • IRC Channels
          • -- cgit v1.2.3-54-g00ecf From 7ca9ecb2d430047243c0ff14a32d534965136844 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 20 Apr 2013 00:24:47 -0400 Subject: todolist/views.py: use settings.BRANDING_EMAIL --- todolists/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/todolists/views.py b/todolists/views.py index e5cc0823..379189ab 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -1,6 +1,7 @@ from django import forms from django.http import HttpResponse +from django.conf import settings from django.core.mail import send_mail from django.shortcuts import get_list_or_404, get_object_or_404, redirect from django.contrib.auth.decorators import login_required, permission_required @@ -174,7 +175,7 @@ def send_todolist_emails(todo_list, new_packages): template = loader.get_template('todolists/email_notification.txt') send_mail('Packages added to todo list \'%s\'' % todo_list.name, template.render(ctx), - 'Arch Website Notification ', + settings.BRANDING_EMAIL, [maint], fail_silently=True) -- cgit v1.2.3-54-g00ecf From f9fb5909bbcb5f5ff727a2d8f0081a4185138414 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 20 Apr 2013 13:42:30 -0400 Subject: remove /mailman from the MAILMAN_BASE_URL, use it every time --- settings.py | 2 +- templates/base.html | 2 +- templates/packages/flag.html | 2 +- templates/packages/flaghelp.html | 2 +- templates/public/download.html | 2 +- templates/public/index.html | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/settings.py b/settings.py index ba9560f7..bc15b0ab 100644 --- a/settings.py +++ b/settings.py @@ -139,7 +139,7 @@ # community bit on the end, repo.svn_root is appended) SVN_BASE_URL = 'svn://svn.archlinux.org/' -MAILMAN_BASE_URL = 'https://mailman.archlinux.org/mailman' +MAILMAN_BASE_URL = 'https://mailman.archlinux.org/' BRANDING_APPNAME = 'archweb' BRANDING_DISTRONAME = 'Arch Linux' diff --git a/templates/base.html b/templates/base.html index bc4db84f..e6553449 100644 --- a/templates/base.html +++ b/templates/base.html @@ -39,7 +39,7 @@
          • Signoffs
          • Todos
          • Dev Clocks
          • -
          • Archives
          • Mirrors
          • Flag Package: {{ package.pkgname }} {{ package.full_version }} ({{ package.a

            The message box portion of the flag utility is optional, and meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the arch-general mailing list with your additional text.

            diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index e2d67e06..01534d8f 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -24,7 +24,7 @@

            Flagging Packages

            The message box portion of the flag utility is optional, and meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the arch-general mailing list with your additional text.

            diff --git a/templates/public/download.html b/templates/public/download.html index f473915a..70b27b73 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -27,7 +27,7 @@

            Release Info

          • diff --git a/templates/public/index.html b/templates/public/index.html index aeeff175..8856fd95 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -27,7 +27,7 @@

            A simple, lightweight distribution

            Our strong community is diverse and helpful, and we pride ourselves on the range of skillsets and uses for Arch that stem from it. Please check out our forums - and mailing lists to get your feet wet. Also glance through our wiki @@ -127,7 +127,7 @@

            Documentation

            Community

              -
            • Mailing Lists
            • IRC Channels
            • -- cgit v1.2.3-54-g00ecf From 753784954794259c6a674a7b33e8b1e0105f55d1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 21 Apr 2013 01:01:35 -0400 Subject: add BUGTRACKER_URL --- main/context_processors.py | 1 + settings.py | 1 + templates/base.html | 2 +- templates/packages/flag.html | 2 +- templates/packages/flaghelp.html | 2 +- templates/public/feeds.html | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/main/context_processors.py b/main/context_processors.py index d6456a9d..2543a3de 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -10,6 +10,7 @@ def branding(request): 'BRANDING_WIKINAME': settings.BRANDING_WIKINAME, 'BRANDING_EMAIL': settings.BRANDING_EMAIL, 'MAILMAN_BASE_URL': settings.MAILMAN_BASE_URL, + 'BUGTRACKER_URL': settings.BUGTRACKER_URL, } # vim: set ts=4 sw=4 et: diff --git a/settings.py b/settings.py index bc15b0ab..8cde6342 100644 --- a/settings.py +++ b/settings.py @@ -140,6 +140,7 @@ SVN_BASE_URL = 'svn://svn.archlinux.org/' MAILMAN_BASE_URL = 'https://mailman.archlinux.org/' +BUGTRACKER_URL = 'https://bugs.archlinux.org/' BRANDING_APPNAME = 'archweb' BRANDING_DISTRONAME = 'Arch Linux' diff --git a/templates/base.html b/templates/base.html index e6553449..f555b83d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -22,7 +22,7 @@
            • Packages
            • Forums
            • Wiki
            • -
            • Bugs
            • +
            • Bugs
            • AUR
            • Download
            diff --git a/templates/packages/flag.html b/templates/packages/flag.html index 6cd5bedf..063e1d1e 100644 --- a/templates/packages/flag.html +++ b/templates/packages/flag.html @@ -29,7 +29,7 @@

            Flag Package: {{ package.pkgname }} {{ package.full_version }} ({{ package.a

            Note: Do not use this facility if the package is broken! The package will be unflagged and the report will be ignored! - Use the + Use the bugtracker to file a bug instead.

            Please confirm your flag request for {{package.pkgname}}:

            diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index 01534d8f..fddc1bda 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -29,7 +29,7 @@

            Flagging Packages

            with your additional text.

            Note: Please do not use this facility if the - package is broken! Use the bugtracker instead.

            diff --git a/templates/public/feeds.html b/templates/public/feeds.html index f298de7f..91cd9e71 100644 --- a/templates/public/feeds.html +++ b/templates/public/feeds.html @@ -61,7 +61,7 @@

            Package Feeds

            Development Feeds

            Subscribe to any of the following to track bug tickets and feature - requests from the Arch Linux Bugtracker:

            + requests from the {{BRANDING_DISTRONAME}} Bugtracker:

    -- cgit v1.2.3-54-g00ecf From 91c451821ce7000cbc268cec8427d208a6cedd7e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 21 Apr 2013 01:30:47 -0400 Subject: update README.BRANDING --- README.BRANDING | 95 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 38 deletions(-) diff --git a/README.BRANDING b/README.BRANDING index 1f9a1db0..00d2d1b0 100644 --- a/README.BRANDING +++ b/README.BRANDING @@ -1,52 +1,71 @@ -templates/base.html +It is now fairly easy to re-brand archweb. +Replacing logos is still a bit of work. +Here is a summary of the text files that need to be changed to +re-brand it. + +Files used to configure branding/url stuff +------------------------------------------ + + * `settings.py` + * `templates/templatetags/package_extras.py` + * `main/templatetags/wiki.py` + +Files with minor Arch stuff that's just easier to patch +------------------------------------------------------- + +`releng/views.py` + * link to `https://bugs.archlinux.org/index.php?project=6` + +`templates/packages/opensearch.xml` + * `` includes `archlinux` + +`templates/packages/flaghelp.html` + * link to "arch-general" mailing list + +`templates/packages/flag.html` + * link to "arch-general" mailing list + +`templates/packages/search.html` + * link to AUR + +`templates/public/feeds.html` + * links to AUR + * links to feeds on `bugs.archlinux.org` + +Files with a significant amount of Arch-specific content: +--------------------------------------------------------- + +`templates/base.html` * main navbar - * links to `bbs.archlinux.org` - * links to `bugs.archlinux.org` - * links to the AUR + * link to `bbs.archlinux.org` + * link to the AUR * logged in navbar - * links to `mailman.archlinux.org` - * links to `stats.archlinux.org/munin` + * link to "arch-dev" mailing list + * link to `stats.archlinux.org/munin` * copyright statement is Arch-specific. -templates/public/index.html +`templates/public/index.html` * The text in the intro box describes Arch Linux. * sidebar * Community - * links to `mailman.archlinux.org` - * links to `planet.archlinux.org` ("Planet Arch") + * link to `planet.archlinux.org` * Support - * links to `schwag.archlinux.ca` - * links to `www.zazzle.com/archlinux*` - * links to `www.freewear.org/?page=list_items&org=Archlinux` + * link to `schwag.archlinux.ca` + * link to `www.zazzle.com/archlinux*` + * link to `www.freewear.org/?page=list_items&org=Archlinux` * Development - * links to `projects.archlinux.org` ("Official Arch projects") + * link to `projects.archlinux.org` ("Official Arch projects") + * More Resources + * link to wiki article "Arch Linux Press Review" * Below sidebar * Arch's donate button * Arch's sponsors -templates/public/feeds - * links to AUR - * links to `bugs.archlinux.org` - -templates/public/art.html - * entire page is Arch-specific - -templates/public/donate.html - * entire page is Arch-specific - -templates/public/about.html - * entire page is Arch-specific - -templates/public/download.html - * entire page is Arch-specific - -templates/packages/flaghelp.html - * links to `mailman.archlinux.org` - * links to `bugs.archlinux.org` - -templates/packages/opensearch.xml - * `` includes `archlinux` +Files with totally Arch-specific content: +----------------------------------------- -templates/packages/flag.html - * links to `mailman.archlinux.org` - * links to `bugs.archlinux.org` + * `templates/public/about.html` + * `templates/public/art.html` + * `templates/public/donate.html` + * `templates/public/download.html` + * `templates/public/svn.html` -- cgit v1.2.3-54-g00ecf