Oh my god I have CSS display directives.
authorSteve Losh <steve@stevelosh.com>
Sat, 31 Jan 2009 01:53:41 +0000 (20:53 -0500)
committerSteve Losh <steve@stevelosh.com>
Sat, 31 Jan 2009 01:53:41 +0000 (20:53 -0500)
.be/bugs/4286c0f8-5703-4bc1-b256-414dc408f067/values [new file with mode: 0644]
.be/bugs/984472f6-98f5-48fc-b521-70a1e5f60614/values [new file with mode: 0644]
cfbe.py
static/style/cfbe.css
templates/base.html
templates/list.html

diff --git a/.be/bugs/4286c0f8-5703-4bc1-b256-414dc408f067/values b/.be/bugs/4286c0f8-5703-4bc1-b256-414dc408f067/values
new file mode 100644 (file)
index 0000000..bc901f9
--- /dev/null
@@ -0,0 +1,49 @@
+
+
+
+assigned=Steve Losh <steve@stevelosh.com>
+
+
+
+
+
+
+creator=Steve Losh <steve@stevelosh.com>
+
+
+
+
+
+
+severity=minor
+
+
+
+
+
+
+status=closed
+
+
+
+
+
+
+summary=Get the layout rhythm right.
+
+
+
+
+
+
+target=alpha
+
+
+
+
+
+
+time=Sat, 31 Jan 2009 00:14:34 +0000
+
+
+
diff --git a/.be/bugs/984472f6-98f5-48fc-b521-70a1e5f60614/values b/.be/bugs/984472f6-98f5-48fc-b521-70a1e5f60614/values
new file mode 100644 (file)
index 0000000..f7a4cae
--- /dev/null
@@ -0,0 +1,35 @@
+
+
+
+creator=Steve Losh <steve@stevelosh.com>
+
+
+
+
+
+
+severity=minor
+
+
+
+
+
+
+status=open
+
+
+
+
+
+
+summary=Implement the status filters.
+
+
+
+
+
+
+time=Sat, 31 Jan 2009 00:22:40 +0000
+
+
+
diff --git a/cfbe.py b/cfbe.py
index f8e132113b7054161311b045c405698b05aafeb6..1628fa6604b4376388b7c88f34ca6060825fbd9b 100755 (executable)
--- a/cfbe.py
+++ b/cfbe.py
@@ -4,7 +4,7 @@ import cherrypy
 from libbe import bugdir
 from jinja2 import Environment, FileSystemLoader
 
-bug_root = '/Users/sjl/Documents/stevelosh/.be'
+bug_root = '/Users/sjl/Documents/cherryflavoredbugseverywhere/.be'
 bd = bugdir.BugDir(root=bug_root)
 bd.load_all_bugs()
 
@@ -15,9 +15,17 @@ class WebInterface:
     """The web interface to CFBE."""
     
     @cherrypy.expose
-    def index(self):
+    def index(self, status='open'):
+        bd.load_all_bugs()
+        if status == 'open':
+            status = ['open', 'assigned', 'test', 'unconfirmed', 'wishlist']
+            label = 'Open'
+        elif status == 'closed':
+            status = ['closed', 'disabled', 'fixed', 'wontfix']
+            label = 'Closed'
         template = env.get_template('list.html')
-        return template.render(bugs=bd)
+        bugs = [bug for bug in bd if bug.status in status]
+        return template.render(bugs=bugs, bd=bd, label=label)
     
 
 config = '/Users/sjl/Documents/cherryflavoredbugseverywhere/cfbe.config'
index b1af55e137b517be1120ac11e70ff2e74d6d5e0b..bc5088b0d67ca41a7777aab25c1c5d15eaa9bf04 100644 (file)
@@ -1,13 +1,20 @@
-body { background-image: url(/static/images/stripe-rhythm.png); background-repeat: repeat;}
+/* @override http://localhost:8080/static/style/cfbe.css */
 
-div#header    { background-color: #d03; color: #fff; }
+body { background-image: url(/static/images/gradient-background.png); background-color: #bbbbbb; background-repeat: repeat-x;}
+
+div#header    { background-image: url(/static/images/gradient-header.png); background-repeat: repeat-x; background-color: #770005; color: #fff; }
 div#header h1 { font-size: 4em; line-height: 1.5em; margin-bottom: 0em; }
 div#logo      { text-align: right; color: #d03; padding-top: 1.5em; }
-div#logo h1   { margin-top: 0.65em; margin-bottom: 0.15em; }
+div#logo   h1 { margin-top: 0.65em; margin-bottom: 0.15em; }
+
+div.center-column { width: 50em; margin-left: 10em; }
+div#content-wrap { display: inline-block; vertical-align: top; }
+div#content-pane { background-color: #fbfbfb; padding: 1.5em 2em; }
+div#external-pane { background-image: url(/static/images/left-arrow.png); background-repeat: no-repeat; width: 21em; padding: 0em; display: inline-block; }
+div#external-pane-content { margin-left: 18px; background-color: #fbfbfb; padding: 1.5em 1em 1px; }
 
-div.center-column { width: 50em; margin-left: auto; margin-right: auto; }
-div#content-pane { background-color: #fbfbfb; padding: 1.5em; }
-div#footer { text-align: center; font-size: 0.9em; line-height: 1.666em; }
+div#footer { text-align: center; }
+div#footer p { font-size: 0.9em; line-height: 1.666em; }
 
 div#nav { margin-bottom: 1.5em; }
 span#filters { float: right; }
@@ -18,6 +25,7 @@ a:hover { color: #60b305; }
 
 
 table#bug-list { width: 100%; }
+table#bug-list th { text-align: left; }
 table tr td, table tr th { 
     padding: 0px 5px; 
     border: 0.084em solid black; 
index 9dda6cc4b7ccd175af3286acec0f97d6525b7dbc..4a1f8f7bfb60f9d4a46b8d1291baf0ec6ccc124e 100644 (file)
@@ -4,10 +4,20 @@
 <html>
     <head>
         <title>Cherry Flavored Bugs Everywhere!</title>
+        
         <link rel="stylesheet" type="text/css" media="screen" 
               href="/static/style/aal.css" />
         <link rel="stylesheet" type="text/css" media="screen"
               href="/static/style/cfbe.css" />
+        
+        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
+        <script type="text/javascript" src="/static/scripts/jquery.corners.min.js"></script>
+        <script type="text/javascript">
+            $(function() {
+                $('#content-pane').corners('bottom 8px');
+                $('#external-pane-content').corners('bottom 8px');
+            });
+        </script>
     </head>
     
     <body>
                 <h1>stevelosh</h1>
             </div>
         </div>
-        <div id="content-pane" class="center-column">
-            <div id="nav">
-                <span id="filters">
-                    Just show me:
-                    <a href="fixme">Open</a>
-                    <a href="fixme">Closed</a>
-                    <a href="fixme">Assigned to...</a>
-                    <a href="fixme">Scheduled for...</a>
-                </span>
-                <span id="create">
-                    <a href="fixme">Create a new bug</a>
-                </span>
+        <div id="content-wrap">
+            <div id="content-pane" class="center-column">
+                <div id="nav">
+                    <span id="filters">
+                        Just show me:
+                        <a href="/">Open</a>
+                        <a href="/?status=closed">Closed</a>
+                        <a href="fixme">Assigned to...</a>
+                        <a href="fixme">Scheduled for...</a>
+                    </span>
+                    <span id="create">
+                        <a href="fixme">Create a new bug</a>
+                    </span>
+                </div>
+                <h2>{% block page_title %}&nbsp;{% endblock %}</h2>
+                {% block content %}{% endblock %}
+            </div>
+            <div id="footer" class="center-column">
+                <p>
+                    Site by <a href="http://stevelosh.com">Steve</a>.
+                    Built with <a href="http://cherrypy.org">CherryPy</a>.
+                    Templates by <a href="http://jinja.pocoo.org/2/">Jinja2</a>.
+                    I've asked <a href="http://fecklessmind.com/2009/01/20/aardvark-css-framework/">aardvarks</a> for help.
+                </p>
             </div>
-            <h2>Open Bugs</h2>
-            {% block content %}{% endblock %}
         </div>
-        <div id="footer" class="center-column">
-            Site by <a href="http://stevelosh.com">Steve</a>.
-            Built with <a href="http://cherrypy.org">CherryPy</a>.
-            Templates by <a href="http://jinja.pocoo.org/2/">Jinja2</a>.
-            We asked <a href="http://fecklessmind.com/2009/01/20/aardvark-css-framework/">aardvarks</a> for help.
+        <div id="external-pane">
+            <div id="external-pane-content"><p>Test</p></div>
         </div>
     </body>
 </html>
index e6fbaefbfa3d457424369e510e47d11c0302a1d0..34e31696a5defd26f8d05ba5f7155a8e0fd5f78f 100644 (file)
@@ -1,5 +1,9 @@
 {% extends "base.html" %}
 
+{% block page_title %}
+    {{ label }} Bugs
+{% endblock %}
+
 {% block content %}
     <table id="bug-list">
         <tr>
             <th>Assigned To</th>
         </tr>
         {% for bug in bugs %}
-            <tr>
-                <td>{{ bugs.bug_shortname(bug) }}</td>
-                <td>{{ bug.summary }}</td>
-                <td>{{ bug.status }}</td>
-                <td>{{ bug.assigned }}</td>
-            </tr>
+        <tr>
+            <td>{{ bd.bug_shortname(bug) }}</td>
+            <td>{{ bug.summary }}</td>
+            <td>{{ bug.status }}</td>
+            <td>{{ bug.assigned }}</td>
+        </tr>
         {% endfor %}
     </table>
 {% endblock %}
\ No newline at end of file