aboutsummaryrefslogtreecommitdiffstats
path: root/Bugs-Everywhere-Web/beweb/templates
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2006-04-11 09:23:30 -0400
committerAaron Bentley <abentley@panoramicfeedback.com>2006-04-11 09:23:30 -0400
commit162c3a3783555a11aed72a30369b6dff5e4e0cef (patch)
treef8d118d80f70ccfc7a6487d1127b84276397909c /Bugs-Everywhere-Web/beweb/templates
parent4d61b78146f12a93d4c3a0c3657439102ed8f63d (diff)
parent3747b40e76b3497da1ad081767e5d64a242deccf (diff)
downloadbugseverywhere-162c3a3783555a11aed72a30369b6dff5e4e0cef.tar.gz
Merge from home (TurboGears 0.9)
Diffstat (limited to 'Bugs-Everywhere-Web/beweb/templates')
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/__init__.py0
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/about.kid23
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/bugs.kid49
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/edit_bug.kid51
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/edit_comment.kid27
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/error.kid14
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/login.kid113
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/master.kid71
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/projects.kid32
-rw-r--r--Bugs-Everywhere-Web/beweb/templates/welcome.kid33
10 files changed, 413 insertions, 0 deletions
diff --git a/Bugs-Everywhere-Web/beweb/templates/__init__.py b/Bugs-Everywhere-Web/beweb/templates/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/__init__.py
diff --git a/Bugs-Everywhere-Web/beweb/templates/about.kid b/Bugs-Everywhere-Web/beweb/templates/about.kid
new file mode 100644
index 0000000..45d0093
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/about.kid
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>About Bugs Everywhere</title>
+</head>
+
+<body>
+<h1>About Bugs Everywhere</h1>
+<p>Bug Everywhere was designed by Aaron Bentley and implemented by Aaron
+ Bentley and Oleg Romanyshyn.
+</p>
+<p>
+ Development is sponsored by
+ <a href="http://panoramicfeedback.com/">Panoramic Feedback</a>.
+</p>
+<p>
+ Bugs Everywhere <a href="http://panoramicfeedback.com/opensource">web site</a>
+</p>
+<a href="/">Project List</a>
+</body>
+</html>
diff --git a/Bugs-Everywhere-Web/beweb/templates/bugs.kid b/Bugs-Everywhere-Web/beweb/templates/bugs.kid
new file mode 100644
index 0000000..b83a593
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/bugs.kid
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python
+from libbe.cmdutil import unique_name
+from beweb.controllers import bug_url, project_url, bug_list_url
+from beweb.config import people
+def row_class(bug, num):
+ if not bug.active is True:
+ return "closed"
+ elif num % 2 == 0:
+ return "even"
+ else:
+ return "odd"
+
+
+def match(bug, show_closed, search):
+ if not show_closed and not bug.active:
+ return False
+ elif search is None:
+ return True
+ else:
+ return search.lower() in bug.summary.lower()
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Bugs for $project_name</title>
+</head>
+
+<body>
+<h1>Bug list for ${project_name}</h1>
+<table>
+<tr><td>ID</td><td>Status</td><td>Severity</td><td>Assigned To</td><td>Comments</td><td>Summary</td></tr>
+<div py:for="num, bug in enumerate([b for b in bugs if match(b, show_closed, search)])" py:strip="True"><tr class="${row_class(bug, num)}"><td><a href="${bug_url(project_id, bug.uuid)}">${unique_name(bug, bugs[:])}</a></td><td>${bug.status}</td><td>${bug.severity}</td><td>${people.get(bug.assigned, bug.assigned)}</td><td>${len(list(bug.iter_comment_ids()))}</td><td>${bug.summary}</td></tr>
+</div>
+</table>
+<a href="${project_url()}">Project list</a>
+<a href="${bug_list_url(project_id, not show_closed, search)}">Toggle closed</a>
+<form action="${bug_list_url(project_id)}" method="post">
+<input type="submit" name="action" value="New bug"/>
+</form>
+<form action="${bug_list_url(project_id)}" method="get">
+<input type="hidden" name="show_closed" value="False" />
+<input name="search" />
+<input type="submit" name="action" value="Search" />
+</form>
+</body>
+</html>
diff --git a/Bugs-Everywhere-Web/beweb/templates/edit_bug.kid b/Bugs-Everywhere-Web/beweb/templates/edit_bug.kid
new file mode 100644
index 0000000..c31d660
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/edit_bug.kid
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python
+from libbe.bugdir import severity_levels, active_status, inactive_status, thread_comments
+from libbe.utility import time_to_str
+from beweb.controllers import bug_list_url, comment_url
+from beweb.config import people
+from beweb.formatting import comment_body_xhtml, select_among
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Edit bug</title>
+</head>
+
+<body>
+<h1>Edit bug</h1>
+<form method="post" action=".">
+<table>
+<tr><td>Status</td><td>Severity</td><td>Assigned To</td><td>Summary</td></tr>
+<tr><td>${select_among("status", active_status+inactive_status, bug.status)}</td><td>${select_among("severity", severity_levels, bug.severity)}</td>
+<td>${select_among("assigned", people.keys()+[None], bug.assigned, people)}</td><td><input name="summary" value="${bug.summary}" size="80" /></td></tr>
+</table>
+<div py:def="show_comment(comment, children)" class="comment">
+ <insetbox>
+ <table>
+ <tr><td>From</td><td>${comment.From}</td></tr>
+ <tr><td>Date</td><td>${time_to_str(comment.date)}</td></tr>
+ </table>
+ <div py:content="comment_body_xhtml(comment)" py:strip="True"></div>
+ <a href="${comment_url(project_id, bug.uuid, comment.uuid)}">Edit</a>
+ <a href="${comment_url(project_id, bug.uuid, comment.uuid,
+ action='Reply')}">Reply</a>
+ </insetbox>
+ <div style="margin-left:20px;">
+ <div py:for="child, grandchildren in children" py:strip="True">
+ ${show_comment(child, grandchildren)}
+ </div>
+ </div>
+</div>
+<div py:for="comment, children in thread_comments(bug.list_comments())"
+ py:strip="True">
+ ${show_comment(comment, children)}
+</div>
+<p><input type="submit" name="action" value="Update"/></p>
+<p><input type="submit" name="action" value="New comment"/></p>
+</form>
+<a href="${bug_list_url(project_id)}">Bug List</a>
+</body>
+</html>
diff --git a/Bugs-Everywhere-Web/beweb/templates/edit_comment.kid b/Bugs-Everywhere-Web/beweb/templates/edit_comment.kid
new file mode 100644
index 0000000..551db9d
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/edit_comment.kid
@@ -0,0 +1,27 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python
+from libbe.bugdir import severity_levels
+from libbe.utility import time_to_str
+from beweb.controllers import bug_list_url, bug_url
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Edit comment</title>
+</head>
+
+<body>
+<h1>Edit comment</h1>
+<form method="post">
+<table>
+ <tr><td>From</td><td>${comment.From}</td></tr>
+ <tr><td>Date</td><td>${time_to_str(comment.date)}</td></tr>
+</table>
+<insetbox><textarea rows="15" cols="80" py:content="comment.body" name="comment_body" style="border-style: none"/></insetbox>
+<p><input type="submit" name="action" value="Update"/></p>
+</form>
+<a href="${bug_url(project_id, comment.bug.uuid)}">Up to Bug</a>
+</body>
+</html>
diff --git a/Bugs-Everywhere-Web/beweb/templates/error.kid b/Bugs-Everywhere-Web/beweb/templates/error.kid
new file mode 100644
index 0000000..bc55615
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/error.kid
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>BE Error: ${heading}</title>
+</head>
+
+<body>
+<h1 py:content="heading">Error heading</h1>
+<div py:replace="body" >Error Body</div>
+<pre py:content="traceback" class="traceback">Traceback</pre>
+</body>
+</html>
diff --git a/Bugs-Everywhere-Web/beweb/templates/login.kid b/Bugs-Everywhere-Web/beweb/templates/login.kid
new file mode 100644
index 0000000..2c150db
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/login.kid
@@ -0,0 +1,113 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8"
+ http-equiv="content-type" py:replace="''"/>
+ <title>Login</title>
+ <style>
+ #loginBox
+ {
+ width: 30%;
+ margin: auto;
+ margin-top: 10%;
+ padding-left: 10%;
+ padding-right: 10%;
+ padding-top: 5%;
+ padding-bottom: 5%;
+ font-family: verdana;
+ font-size: 10px;
+ background-color: #eee;
+ border: 2px solid #ccc;
+ }
+
+ #loginBox h1
+ {
+ font-size: 42px;
+ font-family: "Trebuchet MS";
+ margin: 0;
+ color: #ddd;
+ }
+
+ #loginBox p
+ {
+ position: relative;
+ top: -1.5em;
+ padding-left: 4em;
+ font-size: 12px;
+ margin: 0;
+ color: #666;
+ }
+
+ #loginBox table
+ {
+ table-layout: fixed;
+ border-spacing: 0;
+ width: 100%;
+ }
+
+ #loginBox td.label
+ {
+ width: 33%;
+ text-align: right;
+ }
+
+ #loginBox td.field
+ {
+ width: 66%;
+ }
+
+ #loginBox td.field input
+ {
+ width: 100%;
+ }
+
+ #loginBox td.buttons
+ {
+ text-align: right;
+ }
+
+ </style>
+</head>
+
+<body>
+ <div id="loginBox">
+ <h1>Login</h1>
+ <p>${message}</p>
+ <form action="${previous_url}" method="POST">
+ <table>
+ <tr>
+ <td class="label">
+ <label for="user_name">User Name:</label>
+ </td>
+ <td class="field">
+ <input type="text" id="user_name" name="user_name"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="label">
+ <label for="password">Password:</label>
+ </td>
+ <td class="field">
+ <input type="password" id="password" name="password"/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="buttons">
+ <input type="submit" value="Login"/>
+ </td>
+ </tr>
+ </table>
+
+ <input py:if="forward_url" type="hidden" name="forward_url"
+ value="${forward_url}"/>
+
+ <input py:for="name,value in original_parameters.items()"
+ type="hidden" name="${name}" value="${value}"/>
+ </form>
+ </div>
+</body>
+</html>
diff --git a/Bugs-Everywhere-Web/beweb/templates/master.kid b/Bugs-Everywhere-Web/beweb/templates/master.kid
new file mode 100644
index 0000000..54f6bad
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/master.kid
@@ -0,0 +1,71 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python import sitetemplate ?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
+
+<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'" py:attrs="item.items()">
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title py:if="False">Your title goes here</title>
+ <link rel="stylesheet" type="text/css" href="/static/css/style.css"/>
+ <meta py:replace="item[:]"/>
+ <style>
+ #pageLogin
+ {
+ font-size: 10px;
+ font-family: verdana;
+ text-align: right;
+ }
+ </style>
+</head>
+
+<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
+<div id="header"><div style="float: left">b u g s e v r y w h e r e</div><ul class="navoption"><li><a href="/about/">About</a></li></ul>&#160;</div>
+ <div py:if="tg.config('identity.on',False) and not 'logging_in' in locals()"
+ id="pageLogin">
+ <span py:if="tg.identity.anonymous">
+ <a href="/login">Login</a>
+ </span>
+ <span py:if="not tg.identity.anonymous">
+ Welcome ${tg.identity.user.displayName}.
+ <a href="/logout">Logout</a>
+ </span>
+ </div>
+
+ <div py:if="tg_flash" class="flash" py:content="tg_flash"></div>
+
+ <div py:replace="item[:]"/>
+
+</body>
+<table py:match="item.tag=='{http://www.w3.org/1999/xhtml}insetbox'" cellspacing="0" cellpadding="0" border="0" class="insetbox">
+<tr height="19"><td background="/static/images/is-tl.png" width="19"/>
+ <td background="/static/images/is-t.png" />
+ <td background="/static/images/is-tr.png" width="11"></td>
+</tr>
+<tr>
+ <td background="/static/images/is-l.png"/>
+ <td py:content="item[:]"> Hello, this is some random text</td>
+ <td background="/static/images/is-r.png"/>
+</tr>
+<tr height="11">
+ <td background="/static/images/is-bl.png"/>
+ <td background="/static/images/is-b.png" />
+ <td background="/static/images/is-br.png"/>
+</tr>
+</table>
+<table py:match="item.tag=='{http://www.w3.org/1999/xhtml}dsbox'" cellspacing="0" cellpadding="0" border="0" class="dsbox">
+<tr height="11"><td background="/static/images/ds-tl.png" width="11"/>
+ <td background="/static/images/ds-t.png" />
+ <td background="/static/images/ds-tr.png" width="19"></td>
+</tr>
+<tr>
+ <td background="/static/images/ds-l.png"/>
+ <td py:content="item[:]"> Hello, this is some random text</td>
+ <td background="/static/images/ds2-r.png"/>
+</tr>
+<tr height="19">
+ <td background="/static/images/ds-bl.png"/>
+ <td background="/static/images/ds2-b.png" />
+ <td background="/static/images/ds-br.png"/>
+</tr>
+</table>
+
+</html>
diff --git a/Bugs-Everywhere-Web/beweb/templates/projects.kid b/Bugs-Everywhere-Web/beweb/templates/projects.kid
new file mode 100644
index 0000000..09bde77
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/projects.kid
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python
+from libbe.bugdir import severity_levels
+def select_among(name, options, default):
+ output = ['<select name="%s">' % name]
+ for option in options:
+ if option == default:
+ selected = ' selected="selected"'
+ else:
+ selected = ""
+ output.append("<option%s>%s</option>" % (selected, option))
+ output.append("</select>")
+ return XML("".join(output))
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+<?python
+project_triples = [(pn, pid, pl) for pid,(pn, pl) in projects.iteritems()]
+project_triples.sort()
+?>
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Project List</title>
+</head>
+
+<body>
+<h1>Project List</h1>
+<table>
+<tr py:for="project_name, project_id, project_loc in project_triples"><td><a href="/project/${project_id}/">${project_name}</a></td></tr>
+</table>
+</body>
+</html>
diff --git a/Bugs-Everywhere-Web/beweb/templates/welcome.kid b/Bugs-Everywhere-Web/beweb/templates/welcome.kid
new file mode 100644
index 0000000..0d3cf3e
--- /dev/null
+++ b/Bugs-Everywhere-Web/beweb/templates/welcome.kid
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+ py:extends="'master.kid'">
+
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Welcome to TurboGears</title>
+</head>
+
+<body>
+ <p>Congratulations, your TurboGears application is running as of <span py:replace="now">now</span>.</p>
+
+ <h2>Are you ready to Gear Up?</h2>
+
+ <p>Take the following steps to dive right in:</p>
+
+ <ol>
+ <li>Edit your project's model.py to create SQLObjects representing the data you're working with</li>
+ <li>Edit your dev.cfg file to point to the database you'll be using</li>
+ <li>Run "<code>tg-admin sql create</code>" to create the tables in the database</li>
+ <li>Edit controllers.py to add the functionality to your webapp</li>
+ <li>Change the master.kid template to have the headers and footers for your application.</li>
+ <li>Change welcome.kid (this template) or create a new one to display your data</li>
+ <li>Repeat steps 4-6 until done.</li>
+ <li><b>Profit!</b></li>
+ </ol>
+
+ <p>If you haven't already, you might check out some of the <a href="http://www.turbogears.org/docs/" >documentation</a>.</p>
+
+ <p>Thanks for using TurboGears! See you on the <a href="http://groups.google.com/group/turbogears" >mailing list</a> and the "turbogears" channel on irc.freenode.org!</p>
+
+</body>
+</html>