Student Project public page now shows feed entries.
authorLennard de Rijk <ljvderijk@gmail.com>
Tue, 07 Apr 2009 21:57:50 +0000
changeset 2123 31a1e8e7eb18
parent 2122 b709f9d1566a
child 2124 ac484d0e4304
Student Project public page now shows feed entries. Patch by: Madhusudan C.S Reviewed by: Lennard de Rijk
app/soc/templates/soc/student_project/public.html
--- a/app/soc/templates/soc/student_project/public.html	Tue Apr 07 21:55:54 2009 +0000
+++ b/app/soc/templates/soc/student_project/public.html	Tue Apr 07 21:57:50 2009 +0000
@@ -14,6 +14,23 @@
 {% endcomment %}
 {% load forms_helpers %}
 
+{% block scripts %}
+{{ block.super }}
+{% if entity.feed_url %}
+  <script type="text/javascript" src="http://www.google.com/jsapi"></script>
+  <script type="text/javascript" src="/soc/content/js/blog-081117.js"></script>
+  <script type="text/javascript" >
+  google.load("feeds", "1");
+
+  function initialize() {
+    var blog = new BlogPreview(document.getElementById("blog"));
+    blog.show("{{ entity.feed_url }}", 3);
+  }
+  google.setOnLoadCallback(initialize);
+  </script>
+{% endif %}
+{% endblock %}
+
 {% block header_title %}
 {{ page_name }} {{ entity.title }} for {{ entity.scope.name }}
 {% endblock %}
@@ -28,5 +45,7 @@
   {% readonly_url_field_as_table_row entity.fields.additional_info.label entity.additional_info %}
  </table>
 </p>
-{% block manage %} {% endblock %}
+{% if entity.feed_url %}
+  <div id="blog"></div>
+{% endif %}
 {% endblock %}