Added map of accepted student proposals to mentors to the org home page.
authorLennard de Rijk <ljvderijk@gmail.com>
Tue, 21 Apr 2009 16:24:32 +0000
changeset 2271 6519029b444f
parent 2270 543f11d7b0e4
child 2272 26491ee91e33
Added map of accepted student proposals to mentors to the org home page. Patch by: Madhusudan C.S Reviewed by: Lennard de Rijk
app/soc/content/css/soc-090418.css
app/soc/templates/soc/organization/home.html
app/soc/templates/soc/presence/home.html
--- a/app/soc/content/css/soc-090418.css	Tue Apr 21 16:24:13 2009 +0000
+++ b/app/soc/content/css/soc-090418.css	Tue Apr 21 16:24:32 2009 +0000
@@ -334,6 +334,31 @@
   width: 320px;
 }
 
+#org_home_extras {
+  position: relative;
+  margin:2em 0em 2em;
+  min-height:500px;
+}
+
+#extras_left {
+  position: absolute;
+  width: 55%;
+  left: 0px;
+} 
+
+#extras_right {
+  position: absolute;
+  width: 43%;
+  right: 0px;
+  float: right;
+} 
+
+/* Organization home gmap */
+#org_home_map {
+  height: 500px;
+  width: 500px;
+}
+
 /* SIDEBAR MENU */
 #side {
   width: 200px;
--- a/app/soc/templates/soc/organization/home.html	Tue Apr 21 16:24:13 2009 +0000
+++ b/app/soc/templates/soc/organization/home.html	Tue Apr 21 16:24:32 2009 +0000
@@ -13,11 +13,44 @@
 limitations under the License.
 {% endcomment %}
 
-{% block body %}
-  {{ block.super }}
+{% block scripts %}
+{{ block.super }}
+{% if gmaps_api_key %}
+	<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={{ gmaps_api_key }}" type="text/javascript"></script>
+	<script type="text/javascript" src="/soc/content/js/map-090420.js"></script>
+{% endif %}
+{% endblock %}
+
+{% block body_tag %}
+  {% if gmaps_api_key %}
+    <body onLoad="org_home_gmap.map_load({{ org_map_data }})" onunload="GUnload()">
+  {% else %}
+    {{ block.super }}
+  {% endif %}
+{% endblock %}
+
+{% block instructions %}
+{{ block.super }}
+{% if not gmaps_api_key %}
+<br /><span class="error">Google Maps API key not present.
+Please insert your key in <a href="/site/edit">Site Settings</a>, Google Maps field.
+</span>
+{% endif %}
+{% endblock %}
+
+{% block home_extras %}
+<div id="org_home_extras">
+ <div id="extras_left">
   {% for list_number in list.lists %}
   <p>
     {% include list.nextList %}
   </p>
   {% endfor %}
+ </div>
+ <div id="extras_right"> 
+  {% if gmaps_api_key %}
+    <div id="org_home_map"></div>
+  {% endif %}
+ </div>
+</div>
 {% endblock %}
--- a/app/soc/templates/soc/presence/home.html	Tue Apr 21 16:24:13 2009 +0000
+++ b/app/soc/templates/soc/presence/home.html	Tue Apr 21 16:24:32 2009 +0000
@@ -55,6 +55,7 @@
 This is the default home page, it can be edited via <a href="/{{ entity_type_url|lower }}/edit/{{ entity.key.id_or_name }}">Edit {{ entity_type }} Settings</a>.<br />
 {% endblock %}
  {% endif %}
+ {% block home_extras %}<!--To be used in inherited templates-->{% endblock %}
  {% if entity.feed_url %}
     <div id="blog"></div>
  {% endif %}