Skip to content

Commit

Permalink
refactor: Remove Google from document history search (#7093)
Browse files Browse the repository at this point in the history
* refactor: Remove Google from document history search

"Search lists" dropdown menu devolves into a single button
(two buttons for ADs).

* refactor: Remove unused ARO search

---------

Co-authored-by: Robert Sparks <[email protected]>
  • Loading branch information
pselkirk and rjsparks authored Feb 28, 2024
1 parent 01a0719 commit 08e0c83
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 50 deletions.
11 changes: 1 addition & 10 deletions ietf/doc/views_doc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright The IETF Trust 2009-2023, All Rights Reserved
# Copyright The IETF Trust 2009-2024, All Rights Reserved
# -*- coding: utf-8 -*-
#
# Parts Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
Expand Down Expand Up @@ -40,7 +40,6 @@
import os
import re

from urllib.parse import quote
from pathlib import Path

from django.http import HttpResponse, Http404
Expand Down Expand Up @@ -480,13 +479,6 @@ def document_main(request, name, rev=None, document_html=False):
can_submit_unsolicited_review_for_teams = Group.objects.filter(
reviewteamsettings__isnull=False, role__person__user=request.user, role__name='secr')

# mailing list search archive
search_archive = "www.ietf.org/mail-archive/web/"
if doc.stream_id == "ietf" and group.type_id == "wg" and group.list_archive:
search_archive = group.list_archive

search_archive = quote(search_archive, safe="~")

# conflict reviews
conflict_reviews = [r.source.name for r in interesting_relations_that.filter(relationship="conflrev")]

Expand Down Expand Up @@ -705,7 +697,6 @@ def document_main(request, name, rev=None, document_html=False):
iana_experts_comment=iana_experts_comment,
started_iesg_process=started_iesg_process,
shepherd_writeup=shepherd_writeup,
search_archive=search_archive,
actions=actions,
presentations=presentations,
review_assignments=review_assignments,
Expand Down
49 changes: 9 additions & 40 deletions ietf/templates/doc/document_draft.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "base.html" %}
{# Copyright The IETF Trust 2016-2023, All Rights Reserved #}
{# Copyright The IETF Trust 2016-2024, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load ietf_filters %}
Expand Down Expand Up @@ -658,45 +658,14 @@
</i>
Nits
</a>
<div class="dropdown inline">
<button class="btn btn-primary btn-sm dropdown-toggle"
type="button"
id="ddSearchMenu"
data-bs-toggle="dropdown"
aria-expanded="true">
<i class="bi bi-search">
</i>
Search lists
</button>
<ul class="dropdown-menu" role="menu">
<li role="presentation">
<a class="dropdown-item"
href="https://mailarchive.ietf.org/arch/search/?q=%22{{ doc.name }}%22"
rel="nofollow"
target="_blank">
IETF Mail Archive
</a>
</li>
<li role="presentation">
<a class="dropdown-item"
href="https://www.google.com/search?as_q={{ doc.name }}&amp;as_sitesearch={{ search_archive }}"
rel="nofollow"
target="_blank">
Google
</a>
</li>
{% if user|has_role:"Area Director" %}
<li role="presentation">
<a class="dropdown-item"
href="https://www.iesg.org/bin/c5i?mid=6&amp;rid=77&amp;target={{ doc.name }}"
rel="nofollow"
target="_blank">
ARO
</a>
</li>
{% endif %}
</ul>
</div>
<a class="btn btn-primary btn-sm"
href="https://mailarchive.ietf.org/arch/search/?q=%22{{ doc.name }}%22"
rel="nofollow"
target="_blank">
<i class="bi bi-search">
</i>
Search email archive
</a>
{% if user.is_authenticated %}
<a class="btn btn-primary btn-sm track-untrack-doc {% if not doc.tracked_in_personal_community_list %}d-none{% endif %}"
href="{% url "ietf.community.views.untrack_document" email_or_name=user.username name=doc.name %}"
Expand Down

0 comments on commit 08e0c83

Please sign in to comment.