From b5458c29d3f4c835903465522dd595fdab2a56a9 Mon Sep 17 00:00:00 2001 From: Ole Laursen <olau@iola.dk> Date: Tue, 3 Feb 2015 16:18:42 +0000 Subject: [PATCH] Summary: Clean up some of the FACELIFT comments - Legacy-Id: 8959 --- ietf/doc/templatetags/ballot_icon.py | 22 +++++-------------- ietf/doc/templatetags/ietf_filters.py | 2 -- ietf/iesg/views.py | 4 +--- ietf/settings.py | 7 +++--- ietf/templates/doc/search/status_columns.html | 2 +- ietf/templates/iesg/agenda_documents.html | 3 +-- ietf/templates/nomcom/year_index.html | 3 +-- 7 files changed, 13 insertions(+), 30 deletions(-) diff --git a/ietf/doc/templatetags/ballot_icon.py b/ietf/doc/templatetags/ballot_icon.py index 142437685..3b893fc90 100644 --- a/ietf/doc/templatetags/ballot_icon.py +++ b/ietf/doc/templatetags/ballot_icon.py @@ -134,8 +134,7 @@ def ballotposition(doc, user): @register.filter -# FACELIFT: added flavor argument for styling -def state_age_colored(doc, flavor=""): +def state_age_colored(doc): if doc.type_id == 'draft': if not doc.get_state_slug() in ["active", "rfc"]: # Don't show anything for expired/withdrawn/replaced drafts @@ -178,26 +177,17 @@ def state_age_colored(doc, flavor=""): goal1 = 14 goal2 = 28 if days > goal2: - if flavor == "facelift": - class_name = "label label-danger" - else: - class_name = "ietf-small ietf-highlight-r" + class_name = "label label-danger" elif days > goal1: - if flavor == "facelift": - class_name = "label label-warning" - else: - class_name = "ietf-small ietf-highlight-y" + class_name = "label label-warning" else: class_name = "ietf-small" if days > goal1: title = ' title="Goal is <%d days"' % (goal1,) else: title = '' - # It's too bad that this function returns HTML; this makes it hard to - # style. For the facelift, I therefore needed to add a new "flavor" - # parameter, which is ugly. - return mark_safe('<span class="%s"%s>%sfor %d day%s%s</span>' % ( - class_name, title, '(' if flavor != "facelift" else "", days, - 's' if days != 1 else '', '(' if flavor != "facelift" else "" )) + return mark_safe('<span class="%s"%s>for %d day%s</span>' % ( + class_name, title, days, + 's' if days != 1 else '')) else: return "" diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index c0d16d258..ee4e2f0f8 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -557,8 +557,6 @@ class WordWrapNode(template.Node): def render(self, context): return wrap(str(self.nodelist.render(context)), int(self.len)) -# FACELIFT: The following filters are only used by the facelift UI: - @register.filter def pos_to_label(text): """Return a valid Bootstrap3 label type for a ballot position.""" diff --git a/ietf/iesg/views.py b/ietf/iesg/views.py index 4b87a99d5..0a78ae543 100644 --- a/ietf/iesg/views.py +++ b/ietf/iesg/views.py @@ -57,8 +57,6 @@ from ietf.iesg.agenda import agenda_data, agenda_sections, fill_in_agenda_docs, from ietf.iesg.models import TelechatDate from ietf.ietfauth.utils import has_role, role_required, user_is_person from ietf.person.models import Person - -# FACELIFT: from ietf.doc.views_search import fill_in_search_attributes def review_decisions(request, year=None): @@ -363,7 +361,7 @@ def agenda_documents(request): telechats = [] for date in dates: sections = agenda_sections() - # FACELIFT: augment the docs with the search attributes, since we're using + # augment the docs with the search attributes, since we're using # the search_result_row view to display them (which expects them) fill_in_search_attributes(docs_by_date[date]) fill_in_agenda_docs(date, sections, docs_by_date[date]) diff --git a/ietf/settings.py b/ietf/settings.py index eac3513ed..16cbe547a 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -201,6 +201,9 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'south', 'tastypie', + 'widget_tweaks', + 'typogrify', + 'bootstrap3', 'ietf.person', 'ietf.name', 'ietf.group', @@ -233,10 +236,6 @@ INSTALLED_APPS = ( 'ietf.secr.sreq', 'ietf.nomcom', 'ietf.dbtemplate', - # FACELIFT: apps for facelift UI - 'widget_tweaks', - 'typogrify', - 'bootstrap3', ) # Settings for django-bootstrap3 diff --git a/ietf/templates/doc/search/status_columns.html b/ietf/templates/doc/search/status_columns.html index 0406e6767..83975239a 100644 --- a/ietf/templates/doc/search/status_columns.html +++ b/ietf/templates/doc/search/status_columns.html @@ -12,7 +12,7 @@ {{ doc.friendly_state|safe }} {% endif %} - <wbr>{{ doc|state_age_colored:"facelift" }} + <wbr>{{ doc|state_age_colored }} {% if doc.telechat_date %} <br>IESG telechat: {{ doc.telechat_date }} diff --git a/ietf/templates/iesg/agenda_documents.html b/ietf/templates/iesg/agenda_documents.html index 1e5568936..b6f8c614c 100644 --- a/ietf/templates/iesg/agenda_documents.html +++ b/ietf/templates/iesg/agenda_documents.html @@ -56,8 +56,7 @@ </tr> </thead> <tbody> - {% comment %} FACELIFT: We use the same template as the search results now. {% endcomment %} - {% for doc in section.docs %} + {% for doc in section.docs %} {% include "doc/search/search_result_row.html" %} {% endfor %} </tbody> diff --git a/ietf/templates/nomcom/year_index.html b/ietf/templates/nomcom/year_index.html index 65d80bd40..15955ad41 100644 --- a/ietf/templates/nomcom/year_index.html +++ b/ietf/templates/nomcom/year_index.html @@ -3,6 +3,5 @@ {% block subtitle %} - Home {% endblock %} {% block nomcom_content %} - {# XXX FACELIFT: The content below comes from somewhere not in the svn repo? #} - {{ template|safe }} + {{ template|safe }} {% endblock %}