Student Project public page now shows feed entries.
[Melange.git] / app / soc / templates / soc / student_project / public.html
blob6923e86c1ab72a699ee5409a9e8b9fb70eb2017b
1 {% extends "soc/base.html" %}
2 {% comment %}
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
7 http://www.apache.org/licenses/LICENSE-2.0
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 {% endcomment %}
15 {% load forms_helpers %}
17 {% block scripts %}
18 {{ block.super }}
19 {% if entity.feed_url %}
20 <script type="text/javascript" src="http://www.google.com/jsapi"></script>
21 <script type="text/javascript" src="/soc/content/js/blog-081117.js"></script>
22 <script type="text/javascript" >
23 google.load("feeds", "1");
25 function initialize() {
26 var blog = new BlogPreview(document.getElementById("blog"));
27 blog.show("{{ entity.feed_url }}", 3);
29 google.setOnLoadCallback(initialize);
30 </script>
31 {% endif %}
32 {% endblock %}
34 {% block header_title %}
35 {{ page_name }} {{ entity.title }} for {{ entity.scope.name }}
36 {% endblock %}
38 {% block body %}
39 <p>
40 <table>
41 {% readonly_field_as_table_row "Student Name" entity.student.name %}
42 {% readonly_field_as_table_row "Mentor Name" entity.mentor.name %}
43 {% readonly_field_as_table_row entity.fields.title.label entity.title %}
44 {% readonly_field_as_twoline_table_row entity.fields.abstract.label entity.abstract %}
45 {% readonly_url_field_as_table_row entity.fields.additional_info.label entity.additional_info %}
46 </table>
47 </p>
48 {% if entity.feed_url %}
49 <div id="blog"></div>
50 {% endif %}
51 {% endblock %}