[tor-commits] [community/staging] Add fields to support listing successfully completed projects

hiro at torproject.org hiro at torproject.org
Sun Mar 21 19:17:31 UTC 2021


commit 0694e2b1cd353a51a02a346910c61b626da8334e
Author: Pili Guerra <pili at piliguerra.com>
Date:   Thu Jan 28 17:25:27 2021 +0100

    Add fields to support listing successfully completed projects
---
 models/project.ini  |  8 ++++++--
 templates/gsoc.html | 21 ++++++++++++---------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/models/project.ini b/models/project.ini
index 6d5f780..0590259 100644
--- a/models/project.ini
+++ b/models/project.ini
@@ -6,14 +6,18 @@ label = {{ this.title }}
 label = Title
 type = string
 
-[fields.link]
-label = Link
+[fields.url]
+label = url
 type = url
 
 [fields.active]
 label = Active
 type = boolean
 
+[fields.completed]
+label = Completed
+type = boolean
+
 [fields.subtitle]
 label = Subtitle
 type = markdown
diff --git a/templates/gsoc.html b/templates/gsoc.html
index 15f388d..115f666 100644
--- a/templates/gsoc.html
+++ b/templates/gsoc.html
@@ -7,18 +7,21 @@
   <div class="col-12">
     {% from "macros/projects.html" import render_active %}
     {% for child in this.children.filter(F.active == True).all() %}
-      <div class="row">
-        {{ render_active(child, this.alt) }}
-      </div>
-    {% endfor %}
-  </div>
-  <div class="row">
-    <ul>
-    {% for child in this.children.filter(F.active == False).all() %}
-      <li>{{ item.title }}</li>
+    <div class="row">
+      {{ render_active(child, this.alt) }}
+    </div>
     {% endfor %}
   </div>
   <div class="row py-5 text-center mx-auto">
     <p class="text-center">{{ _('None of these ideas seem appealing? You may also want to propose your own project idea — which often results in the best projects.') }} <a href="mailto:gso at torproject.org">{{ _('We invite you to contact us to discuss your own project idea.') }}</a></p>
   </div>
+  <div class="row">
+    <h2>Past Projects</h2>
+    <p class="text-center">{{ _('Here are some successful projects which have been implemented in the past by Google Summer of Code and Outreachy participants') }}</p>
+    <ul>
+      {% for child in this.children.filter(F.active == False).filter(F.completed == True).all() %}
+      <li><a href={{ child.url }}>{{ child.title }}</a></li>
+      {% endfor %}
+    </ul>
+  </div>
 </div>





More information about the tor-commits mailing list