add basic templates

This commit is contained in:
Sanj 2011-10-12 18:00:18 +05:30
parent a0903bfa86
commit 94008a4bf6
2 changed files with 149 additions and 0 deletions

View File

@ -0,0 +1,60 @@
{% extends "layout.html" %}
{% block title %}Dashboard{% endblock %}
{% block stylesheets %}
{{ block.super }}
<style type="text/css">
#inner {
margin: 4em 25%;
}
div.module div {
border: 1px solid #ddd;
border-top-color: #636363;
margin-top: -1px;
}
div.module p {
padding-left: 1em;
padding-right: 1em;
}
code, pre {
background: #ffe;
}
pre {
padding: 1em;
margin: 0;
}
</style>
{% endblock %}
{% block content %}
<div class="module">
<h2>Installation Successful!</h2>
<div>
<p>
See <a href="http://docs.rapidsms.org/Installation">the RapidSMS wiki</a>
to learn how to install community apps or create your own.
</p>
<p>
To replace this message with a different view, add a pattern in app's
<code>urls</code> module with the pattern: <code>r'^$</code>.
</p>
<p>
For example:
</p>
<pre>from django.conf.urls.defaults import *
from myproject.myapp import views
urlpatterns = patterns('',
url(r'^$', views.dashboard)
)</pre>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,89 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
{% load region_tags %}
{% load tabs_tags %}
{% load i18n %}
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>{% block title %}RapidSMS{% endblock %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
{% block stylesheets %}
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}rapidsms/stylesheets/layout.css" />
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}rapidsms/stylesheets/splits.css" />
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}rapidsms/stylesheets/modules.css" />
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}rapidsms/stylesheets/tables.css" />
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}rapidsms/stylesheets/forms.css" />
<link type="text/css" rel="stylesheet" href="{{ MEDIA_URL }}rapidsms/stylesheets/icons.css" />
{% endblock %}
{% block javascripts %}
<script type="text/javascript" src="{{ MEDIA_URL }}rapidsms/javascripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="{{ MEDIA_URL }}rapidsms/javascripts/collapse.js"></script>
{% endblock %}
</head>
<body>
<div id="wrapper">
{% region "top" %}
{% block header %}
<div id="header">
<div id="branding">
<h1>
<a title="{% trans "Return to the Dashboard" %}" href="{% url rapidsms-dashboard %}">
<span>RapidSMS</span>
</a>
</h1>
</div>
{% block auth %}
<div id="auth">{% if user.is_authenticated %}
<a href="{% url rapidsms-logout %}">{% trans "Log out" %} {{ user.username }}</a>{% else %}
<a href="{% url rapidsms-login %}">{% trans "Log in" %}</a>{% endif %}
</div>
{% endblock %}
{% get_tabs as tabs %}
<ul id="tabs">{% for tab in tabs %}
<li class="app-{{ tab.name }}{% if tab.is_active %} active{% endif %}">
<a href="{{ tab.url }}"><span>{{ tab.caption }}</span></a>
</li>{% endfor %}
</ul>
{% block page_tabs %}
{% endblock %}
</div>
{% endblock %}
{% block breadcrumbs %}{% if breadcrumbs %}
<div id="breadcrumbs">{% for caption, url in breadcrumbs %}
<a href="{{ url }}">{{ caption }}</a>{% if not forloop.last %}
<span>&raquo;</span>{% endif %}{% endfor %}
</div>{% endif %}
{% endblock %}
<div id="inner">
{% block content %}{% endblock %}
</div>
{% block footer %}
<div id="footer">
<p class="rights">
Copyright &copy; 2008 &#8211; 2010
<a href="http://unicef.org">UNICEF</a> et al.<br />
<a href="http://github.com/rapidsms/rapidsms">RapidSMS</a> is available under
<a href="http://github.com/rapidsms/rapidsms/raw/master/LICENSE">the BSD license</a>.
</p>
{% region "footer" %}
</div>
{% endblock %}
{% region "bottom" %}
</div>
</body>
</html>