From 47cbb8cf1b7677c3ddb2cda51278462b19cbfc59 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 3 Jun 2019 14:53:30 +0000 Subject: [PATCH] Moved some explicit URLs from code and templates to settings (related to www6 cleanup). - Legacy-Id: 16230 --- ietf/iesg/views.py | 6 ++++-- ietf/settings.py | 2 ++ ietf/templates/iesg/agenda_package.txt | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ietf/iesg/views.py b/ietf/iesg/views.py index 8fd17fdfa..b40ea2712 100644 --- a/ietf/iesg/views.py +++ b/ietf/iesg/views.py @@ -192,8 +192,8 @@ def agenda(request, date=None): data = agenda_data(date) if has_role(request.user, ["Area Director", "IAB Chair", "Secretariat"]): - data["sections"]["1.1"]["title"] = data["sections"]["1.1"]["title"].replace("Roll call", 'Roll Call') - data["sections"]["1.3"]["title"] = data["sections"]["1.3"]["title"].replace("minutes", 'Minutes') + data["sections"]["1.1"]["title"] = data["sections"]["1.1"]["title"].replace("Roll call", 'Roll Call' % settings.IESG_ROLL_CALL_URL ) + data["sections"]["1.3"]["title"] = data["sections"]["1.3"]["title"].replace("minutes", 'Minutes' % settings.IESG_MINUTES_URL) request.session['ballot_edit_return_point'] = request.path_info return render(request, "iesg/agenda.html", { @@ -283,7 +283,9 @@ def agenda_package(request, date=None): "date": data["date"], "sections": sorted(data["sections"].iteritems()), "roll_call": data["sections"]["1.1"]["text"], + "roll_call_url": settings.IESG_ROLL_CALL_URL "minutes": data["sections"]["1.3"]["text"], + "minutes_url": settings.IESG_MINUTES_URL "management_items": [(num, section) for num, section in data["sections"].iteritems() if "6" < num < "7"], }, content_type='text/plain') diff --git a/ietf/settings.py b/ietf/settings.py index 6b8f6cca5..ec36da0eb 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -603,7 +603,9 @@ AGENDA_PATH = '/a/www/www6s/proceedings/' IPR_DOCUMENT_PATH = '/a/www/ietf-ftp/ietf/IPR/' IESG_TASK_FILE = '/a/www/www6/iesg/internal/task.txt' IESG_ROLL_CALL_FILE = '/a/www/www6/iesg/internal/rollcall.txt' +IESG_ROLL_CALL_URL = 'https://www6.ietf.org/iesg/internal/rollcall.txt' IESG_MINUTES_FILE = '/a/www/www6/iesg/internal/minutes.txt' +IESG_MINUTES_URL = 'https://www6.ietf.org/iesg/internal/minutes.txt' IESG_WG_EVALUATION_DIR = "/a/www/www6/iesg/evaluation" # Move drafts to this directory when they expire INTERNET_DRAFT_ARCHIVE_DIR = '/a/www/www6s/draft-archive' diff --git a/ietf/templates/iesg/agenda_package.txt b/ietf/templates/iesg/agenda_package.txt index c0d97c846..d4d6c0bad 100644 --- a/ietf/templates/iesg/agenda_package.txt +++ b/ietf/templates/iesg/agenda_package.txt @@ -3,13 +3,13 @@ Contents: 1. Roll Call and Dial-In Instructions - https://www6.ietf.org/iesg/internal/rollcall.txt + {{ roll_call_url }} 2. Agenda https://datatracker.ietf.org/iesg/agenda/ 3. Management Item Details https://datatracker.ietf.org/iesg/agenda/#6 4. Previous minutes - https://www6.ietf.org/iesg/internal/minutes.txt + {{ minutes_url }} ------------------------------------------------------------------------ 1. ROLL CALL AND DIAL-IN INSTRUCTIONS