From f5671f2578181ca1161cfaf3642ff4c7aad119c4 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 27 Oct 2020 10:49:47 +0100 Subject: [PATCH] Restructure coc templates This creates a base templatefor the coc pages that will include the coc itself and translations, the committee and the annual reports. This removes the include files with _ in the name in the coc section, which would previously both be directly accessible as pages and part of the sitemap. The pages/ directory in the templates should really only contain directly accessible pages. --- templates/base/cocpage.html | 24 +++++++++++++++++++ templates/pages/about/policies/coc.html | 12 ++-------- .../pages/about/policies/coc/_reportlist.html | 7 ------ .../about/policies/coc/_translations.html | 11 --------- templates/pages/about/policies/coc/ja.html | 7 +++--- .../about/policies/coc/reports/2018.html | 10 ++------ .../about/policies/coc/reports/2019.html | 10 ++------ .../pages/about/policies/coc_committee.html | 4 ++-- 8 files changed, 35 insertions(+), 50 deletions(-) create mode 100644 templates/base/cocpage.html delete mode 100644 templates/pages/about/policies/coc/_reportlist.html delete mode 100644 templates/pages/about/policies/coc/_translations.html diff --git a/templates/base/cocpage.html b/templates/base/cocpage.html new file mode 100644 index 00000000..cf311378 --- /dev/null +++ b/templates/base/cocpage.html @@ -0,0 +1,24 @@ +{%extends "base/page.html"%} +{%block contents%} +
+
+{%block cocmain%}{%endblock%} +
+
+

Translations

+ +

Committee

+ +

Annual Reports

+ +
+
+{%endblock%} diff --git a/templates/pages/about/policies/coc.html b/templates/pages/about/policies/coc.html index f6fa8e62..a6987300 100644 --- a/templates/pages/about/policies/coc.html +++ b/templates/pages/about/policies/coc.html @@ -1,10 +1,7 @@ -{%extends "base/page.html"%} +{%extends "base/cocpage.html"%} {%load pgfilters%} {%block title%}Code of Conduct{%endblock%} -{%block contents%} - -
-
+{%block cocmain%}

Code of Conduct

Last updated: August 18, 2020. {%git_changes_link%}

@@ -240,9 +237,4 @@

In all interactions with the community, use your professional judgment, and keep the discussion focused on moving our project and our community forward in a positive direction for all.

- - {% include "pages/about/policies/coc/_translations.html" %} -
-{%include "pages/about/policies/coc/_reportlist.html" %} -
{%endblock%} diff --git a/templates/pages/about/policies/coc/_reportlist.html b/templates/pages/about/policies/coc/_reportlist.html deleted file mode 100644 index 74bf5252..00000000 --- a/templates/pages/about/policies/coc/_reportlist.html +++ /dev/null @@ -1,7 +0,0 @@ -
-

Annual Reports

- -
diff --git a/templates/pages/about/policies/coc/_translations.html b/templates/pages/about/policies/coc/_translations.html deleted file mode 100644 index 885a7085..00000000 --- a/templates/pages/about/policies/coc/_translations.html +++ /dev/null @@ -1,11 +0,0 @@ -

Translations of the Code of Conduct

-

The Code of Conduct has been translated into multiple languages. Each - translation was verified independently by at least one additional party.

-

If there are any discrepancies in language between a translation and the - Code of Conduct written in English, the - English language Code of Conduct will take precedence.

- - diff --git a/templates/pages/about/policies/coc/ja.html b/templates/pages/about/policies/coc/ja.html index aaa271e4..ef305b17 100644 --- a/templates/pages/about/policies/coc/ja.html +++ b/templates/pages/about/policies/coc/ja.html @@ -1,7 +1,7 @@ -{%extends "base/page.html"%} +{%extends "base/cocpage.html"%} {%block title%}Code of Conduct - Japanese Translation{%endblock%} -{% block contents %} +{% block cocmain %}

行動規範

最終更新日 (Last updated): 2018年8月18日

@@ -113,5 +113,4 @@

コミュニティ内の連絡においては、専門的判断を発揮し、議論の焦点を本プロジェクトとコミュニティを全員にとって建設的な方向へ進める事に絞るものとします。

-{% include "pages/about/policies/coc/_translations.html" %} -{% endblock contents %} +{% endblock cocmain %} diff --git a/templates/pages/about/policies/coc/reports/2018.html b/templates/pages/about/policies/coc/reports/2018.html index 64306b0e..3718fef1 100644 --- a/templates/pages/about/policies/coc/reports/2018.html +++ b/templates/pages/about/policies/coc/reports/2018.html @@ -1,9 +1,6 @@ -{%extends "base/page.html"%} +{%extends "base/cocpage.html"%} {%block title%}2018 Annual Report | Code of Conduct Committee{%endblock%} -{%block contents%} - -
-
+{%block cocmain%}

Code of Conduct Committee: 2018 Annual Report

Delivered: April 9, 2019

@@ -35,7 +32,4 @@
  • Investigation ongoing as of December 31, 2018: 1
  • We would like to thank the Core Team and the community members who have supported the adoption of the Code of Conduct, and who continue to uphold the professional standards of the PostgreSQL Community.

    -
    -{%include "pages/about/policies/coc/_reportlist.html" %} -
    {%endblock%} diff --git a/templates/pages/about/policies/coc/reports/2019.html b/templates/pages/about/policies/coc/reports/2019.html index a0d836ed..6d0ee41e 100644 --- a/templates/pages/about/policies/coc/reports/2019.html +++ b/templates/pages/about/policies/coc/reports/2019.html @@ -1,9 +1,6 @@ -{%extends "base/page.html"%} +{%extends "base/cocpage.html"%} {%block title%}2019 Annual Report | Code of Conduct Committee{%endblock%} -{%block contents%} - -
    -
    +{%block cocmain%}

    Code of Conduct Committee: 2019 Annual Report

    Delivered: March 17, 2020

    @@ -53,7 +50,4 @@

    We would like to thank the Core Team and the community members who have supported the adoption of the Code of Conduct, and who continue to uphold the professional standards of the PostgreSQL Community.

    -
    -{%include "pages/about/policies/coc/_reportlist.html" %} -
    {%endblock%} diff --git a/templates/pages/about/policies/coc_committee.html b/templates/pages/about/policies/coc_committee.html index 68a9efbc..282c3f95 100644 --- a/templates/pages/about/policies/coc_committee.html +++ b/templates/pages/about/policies/coc_committee.html @@ -1,7 +1,7 @@ -{%extends "base/page.html"%} +{%extends "base/cocpage.html"%} {%load pgfilters%} {%block title%}Code of Conduct Committee{%endblock%} -{%block contents%} +{%block cocmain%}

    Code of Conduct Committee

    -- 2.39.5