app/soc/templates/soc/base.html
author Pawel Solyga <Pawel.Solyga@gmail.com>
Sat, 13 Sep 2008 22:00:51 +0000
changeset 141 e120c24b89e2
parent 118 d2e61a490969
child 170 1fadf6e0348d
permissions -rw-r--r--
Added Melange front page edit view where you can change title, content, feed url. Created SiteSettings and Document models and some logic for them. Added isFeedURLValid function in soc/logic/feed.py. Created some functions for handling datastore updates of different kinds of Models (soc/logic/model.py). Fixed some typos and too long lines of code. Patch by: Pawel Solyga Review by: to-be-reviewed

{% comment %}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
{% endcomment %}
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
	{% block stylesheet %}
  <link rel="stylesheet" href="/soc/content/css/soc.css" type="text/css"/>
	{% endblock %}
  <title>{% block page_title %}Google Open Source Programs{% endblock %}</title>
	{% block scripts %}{% endblock %}

 </head>

 <body>

  <div id="login">
	{% block login_links %}
	{% if id %}
	<b>{{ id.email }} ({{ id.nickname }})</b> | 
	{% endif %}
	{% if is_debug %}
	<a class="novisit" target="_blank" href="/_ah/admin">Admin</a> | 
	{% endif %}
	<a class="novisit" href="http://code.google.com/p/soc/issues/list">Report bugs</a> | 
	{% if id %}
	<a class="novisit" href="{{sign_out}}">Sign out</a>
	{% else %}
	<a class="novisit" href="{{sign_in}}">Sign in</a>
	{% endif %}
	{% endblock %}
  </div>

  <div id="header">
   <div id="logo">
	{% block logo %}
<a href="/"><img src="/soc/content/images/gospo-logo.gif" alt="Google Open Source Programs"/></a>
   <span title=" TODO: logo updated in site sponsor interface " class="popup">
<small>*</small>
   </span>
	{% endblock %}
   </div>

   <div id="title">
	{% block header_title %}Google Open Source Programs{% endblock %}
   </div>
	<div id="breadcrumbs">
	{% block breadcrumbs %}{% endblock %}
	</div>
  </div>

  <div id="side" dir="ltr">
   <div id="menu">
{% block sidebar_menu %}	
    <ul>
     <li>
<a class="selected" href="/">
    {% block sidebar_menu_title %}
    Google Open Source Programs
    {% endblock %}
    </a>
      <ul>
       <li>
<a href="/user/profile">User (Sign In)</a>
   <span title=" No Profile or Roles sidebar menu items until user signs in " class="popup">
<small>*</small>
   </span>

       </li>
      </ul>
{% if is_admin %}
	  <ul>
	      <li>Developer
                    <ul>
                        <li>
              <a href="/site/home/edit">Site Settings</a>
                       </li>
                       <li>
            <a href="/site/user/lookup">Look Up User</a>
                        </li>
                    </ul>	          
	      </li>
	  </ul>
{% endif %}
      <ul>
       <li>
<a href="/program/gsoc2009/home">Google Summer of Code</a>
        <ul>
         <li>
<a href="/program/gsoc2009/community">Community</a>
         </li>
         <li>
<a href="/program/gsoc2009/docs/faqs">Program FAQs</a>
         </li>
         <li>
<a href="/program/gsoc2009/docs/tos">Terms of Service</a>
         </li>
        </ul>
       </li>
       <li>
<a href="/program/ghop2008/home">Google Highly Open Participation</a>
        <ul>
         <li>
<a href="/program/ghop2008/community">Community</a>
         </li>
         <li>
<a href="/program/ghop2008/docs/faqs">Program FAQs</a>
         </li>
         <li>
<a href="/program/ghop2008/docs/rules">Contest Rules</a>
         </li>
        </ul>
       </li>
      </ul>
     </li>
    </ul>
{% endblock %}
   </div>

   <div id="search">
	{% block sidebar_search_field %}
    <form id="searchbox_015986126177484454297:pfmwlvdl42y" action="http://www.google.com/cse">
     <input type="hidden" name="cx" value="015986126177484454297:pfmwlvdl42y" />
     <input type="hidden" name="cof" value="FORID:0" />
     <div class="header">
Search Google Open Source:
     </div>
     <input name="q" type="text" size="20" />
     <input type="submit" name="sa" value="Search" />
     <br/>
    </form>
    <script type="text/javascript" src="http://google.com/coop/cse/brand?form=searchbox_015986126177484454297:pfmwlvdl42y">
    </script></form>
	{% endblock %}
   </div>

   <div id="badge">
	{% block badge %}
<a href="http://code.google.com/p/soc/" target="_blank">Powered by Melange</a>
   <span title=" TODO: need a Melange logo " class="popup">
<small>*</small>
   </span>
	{% endblock %}
   </div>
  </div>

  <div id="body">
	
   <div style="line-height: 140%;">
	{% block body %}
<p class="todo">
This is generic HTML that can be configured via the site administration
interface.  It is unclear if the site admin can be trusted and allowed to enter
any arbitrary HTML (more flexible and powerful) or if only a whitelist of "safe"
HTML tags should be permitted (to prevent XSS, etc.).
(<a href="http://www.feedparser.org/"><code>feedparser</code></a> is useful for
this and is written in Python, should whitelisting be necessary.)
</p>
<p>
Welcome to Google Open Source Programs, the home of
<a href="/program/gsoc2009/home">Google Summer of Code</a>
and the
<a href="/program/ghop2008/home">Google Highly Open Participation</a> contest.
</p>
<p class="todo">
The site administration interface will provide a mechanism to select a feed to
be displayed here.
</p>
	{% endblock %}
   </div>

	
   <div id="footer" dir="ltr">
    <div class="text">
	{% block footer %}
&copy;2008 Google -
<a href="http://www.google.com/">Google Home</a> -
<a href="http://www.google.com/privacy.html">Privacy Policy</a>
	{% endblock %}
    </div>
   </div>
  </div>

{% block google_analytics %}
  <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
  </script>

  <script type="text/javascript">
_uacct="UA-4291635-1"; // code.google.com site-wide tracking
_uanchor=1;
_uff=0;
urchinTracker();
  </script>
{% endblock %}
 </body>
</html>