[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [community/master] We want to link to training resources in the training repo



commit 01dc04ef3917ef242f2a3a7626e7dc8d157fabba
Author: Pili Guerra <pili@xxxxxxxxxxxxxx>
Date:   Thu Oct 31 14:36:32 2019 +0100

    We want to link to training resources in the training repo
---
 databags/training-resources.json | 11 +++++++++++
 templates/resources.html         | 21 +++++++++++++--------
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/databags/training-resources.json b/databags/training-resources.json
new file mode 100644
index 0000000..b1fecd7
--- /dev/null
+++ b/databags/training-resources.json
@@ -0,0 +1,11 @@
+{
+    "all-about-tor" : 
+    {
+        "label" : "All About Tor",
+        "name" : "all-about-tor",
+        "filename" : "all-about-tor-full-pack",
+        "formats" : ["odp","md"],
+        "description" : "Full set of slides for Tor Trainings",
+        "date" : "2019"
+    }
+}
\ No newline at end of file
diff --git a/templates/resources.html b/templates/resources.html
index d40c313..1ee86d9 100644
--- a/templates/resources.html
+++ b/templates/resources.html
@@ -14,16 +14,21 @@
             </tr>
           </thead>
           <tbody>
-            {% from "macros/resources.html" import render_resource %}
-            {% for item in this.attachments %}
-              {{ render_resource(item) }}
-            {% endfor %}
+          {% for id, item in bag('training-resources').items() %}
+            <tr>
+              <td>{{ item.label}}</td>
+              <td>{{ item.description }}</td>
+              <td>
+                {% for format in item.formats %}
+                <a href="https://gitweb.torproject.org/community/training.git/plain/{{ item.date }}/{{ item.name }}/{{ item.filename }}.{{format}}">{{ format }}</a>
+                {% endfor %}
+              </td>
+              <td>{{ item.date }}</td>
+            </tr>
+          {% endfor %}
           </tbody>
         </table>
       </div>
     </div>
   </div>
-</div>
-
-
-
+</div>
\ No newline at end of file

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits