]> projects.mako.cc - rapidsms/commitdiff
cleaned up code and integrated some simple CSS master
authormako@atdot.cc <>
Tue, 2 Oct 2007 14:16:54 +0000 (10:16 -0400)
committermako@atdot.cc <>
Tue, 2 Oct 2007 14:16:54 +0000 (10:16 -0400)
rapidsms.py
static/style.css [new file with mode: 0644]
templates/layout.tmpl
templates/questionaires.tmpl

index 92a441b8a0162cfdb8d7a711ecf5db5521d0b5ba..58960b08e9d0d7324e9e2ae907b2d6d9e39b0536 100755 (executable)
@@ -154,17 +154,17 @@ class edit_questions:
         codes = list(int(q.code) for q in questionaire.questions)
         return(len(codes) + 1)
 
         codes = list(int(q.code) for q in questionaire.questions)
         return(len(codes) + 1)
 
-class test:
-    def GET(self):
-        render('test.tmpl')
-
-    def POST(self):
-        render('test_sent.tmpl')
-
-class raw_sms_in:
-    def POST(self):
-        #TODO magic to parse sms
-        pass
+#class test:
+#    def GET(self):
+#        render('test.tmpl', locals())
+#
+#    def POST(self):
+#        render('test_sent.tmpl', locals())
+#
+#class raw_sms_in:
+#    def POST(self):
+#        #TODO magic to parse sms
+#        pass
 
 
 web.webapi.internalerror = web.debugerror
 
 
 web.webapi.internalerror = web.debugerror
diff --git a/static/style.css b/static/style.css
new file mode 100644 (file)
index 0000000..9bbffe7
--- /dev/null
@@ -0,0 +1,44 @@
+h1, h2, h3 {
+    border-bottom: 3px #000080 solid;
+    width: 66%;
+}
+
+#errormsg {
+    width: 20em;
+    border: 2px red solid;
+}
+
+#errormsg h3 {
+    margin: 0;
+    padding: 0.3em 0 0.3em 0;
+    background: red;
+    color: white;
+    text-align: center;
+    border: 0 0 0 0;
+}
+
+table, td, th {
+    border: 1px #000080 solid;
+    border-collapse: collapse;
+    border-spacing: 0px;
+}
+
+td, th {
+    padding: 0.2em;
+    text-alignt: left;
+}
+
+th {
+    background: #000080;
+    color: white;
+    text-align: center;
+    font-weight: bold;
+}
+
+#footer {
+    clear: both;
+    margin-top: 7em;
+    text-align: center;
+    font-size: 70%;
+}
+
index cc48dbe51dc7d5c4f73854d2bebf109c250c34e4..4432b19ecb16b57cabf454b9ce592ab661349e58 100644 (file)
@@ -1,12 +1,21 @@
 <html>
 <head>
 <title>UNICEF Phone Application</title>
 <html>
 <head>
 <title>UNICEF Phone Application</title>
+<link rel="stylesheet" type="text/css" href="{{homepath}}/static/style.css" />
 </head>
 <body>
 <h1>UNICEF Phone Application</h1>
 <div id="content">
 {% block content %}
 {% endblock %}
 </head>
 <body>
 <h1>UNICEF Phone Application</h1>
 <div id="content">
 {% block content %}
 {% endblock %}
+
+<div id="footer">
+<strong>RapidSMS</strong> © 2007
+<a href="http://mako.cc">Benjamin Mako Hill</a> ::
+<a href="http://projects.mako.cc/source/rapidsms">Source Available</a> under
+<a href="http://www.affero.org/oagpl.html">AGPL</a>
+
+</div>
 </div>
 </body>
 </html>
 </div>
 </body>
 </html>
index ba8ae245ba7b070cbde1a91c2deb342099e913d7..907046dd8eb9307edb4f167028606a14ae07f936 100644 (file)
@@ -15,7 +15,7 @@
 <tr>
 <td>{{q.code}}</td>
 <td>{{q.description}}</td>
 <tr>
 <td>{{q.code}}</td>
 <td>{{q.description}}</td>
-<td>{{len(q.questions) or 0}}</td>
+<td>{{q.questions.count()}}</td>
 <td><a href="{{homepath}}/edit_questions/{{q.id}}">edit</a></td>
 </tr>
 {% endfor %}
 <td><a href="{{homepath}}/edit_questions/{{q.id}}">edit</a></td>
 </tr>
 {% endfor %}

Benjamin Mako Hill || Want to submit a patch?