]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Redesigned directory pages (WIP)
authorTony Arcieri <tony.arcieri@gmail.com>
Thu, 14 Mar 2013 17:04:18 +0000 (10:04 -0700)
committerBrian Warner <warner@lothar.com>
Tue, 2 Sep 2014 20:55:12 +0000 (13:55 -0700)
This is an initial conversion of the directory pages from the old style
to the new style which is based on Twitter Bootstrap.

Still some remaining work to be done. You can see a screenshot here:

http://i.imgur.com/MPEngGx.png

src/allmydata/web/directory.py
src/allmydata/web/directory.xhtml

index 21f6d429c23f7df5593709b4bcd301283b423d42..ec170e8b2b1abd641682a37079ee806e114b0b41 100644 (file)
@@ -686,14 +686,14 @@ class DirectoryAsHTML(rend.Page):
                 T.input(type='hidden', name='t', value='unlink'),
                 T.input(type='hidden', name='name', value=name),
                 T.input(type='hidden', name='when_done', value="."),
-                T.input(type='submit', value='unlink', name="unlink"),
+                T.input(type='submit', _class='btn', value='unlink', name="unlink"),
                 ]
 
             rename = T.form(action=here, method="get")[
                 T.input(type='hidden', name='t', value='rename-form'),
                 T.input(type='hidden', name='name', value=name),
                 T.input(type='hidden', name='when_done', value="."),
-                T.input(type='submit', value='rename/relink', name="rename"),
+                T.input(type='submit', _class='btn', value='rename/relink', name="rename"),
                 ]
 
         ctx.fillSlots("unlink", unlink)
index 540da00d9f801e3bd52509e9654871bb3770b2c6..ee94d581456051a4f780323489233bbb4f731132 100644 (file)
@@ -1,50 +1,85 @@
-<html xmlns:n="http://nevow.com/ns/nevow/0.1"><head>
-  <title n:render="title"></title>
-  <link href="/tahoe.css" rel="stylesheet" type="text/css"/>
-  <link href="/icon.png" rel="shortcut icon" />
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-</head><body class="tahoe-directory-page">
-
-<h1 n:render="header"></h1>
-
-<div class="toolbar">
-  <div class="toolbar-item" n:render="welcome" />
-  <div class="toolbar-item"><a href=".">Refresh</a></div>
-
-  <div class="toolbar-item"><a href="?t=info">More info on this directory</a></div>
-  <div class="toolbar-item" n:render="show_readonly" />
-</div>
-
-<div n:render="try_children">
-  <table class="tahoe-directory" n:render="sequence" n:data="children">
-    <tr n:pattern="header">
-      <th>Type</th>
-      <th>Filename</th>
-      <th>Size</th>
-      <th>Times</th>
-      <th></th>
-      <th></th>
-      <th></th>
-    </tr>
-    <tr n:pattern="item" n:render="row">
-      <td><n:slot name="type"/></td>
-      <td><n:slot name="filename"/></td>
-      <td align="right"><n:slot name="size"/></td>
-      <td><n:slot name="times"/></td>
-      <td><n:slot name="unlink"/></td>
-      <td><n:slot name="rename"/></td>
-      <td><n:slot name="info"/></td>
-    </tr>
-
-    <tr n:pattern="empty"><td colspan="9" class="empty-marker">This directory is empty.</td></tr>
-
-  </table>
-</div>
-
-<div class="tahoe-directory-footer">
-  <div n:render="forms"/>
-
-  <div class="results" n:render="results"/>
-</div>
-
-</body></html>
+<!DOCTYPE html>
+<html lang="en" xmlns:n="http://nevow.com/ns/nevow/0.1">
+  <head>
+    <meta charset="utf-8"/>
+    <title n:render="title"></title>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+    <meta name="description" content="Tahoe-LAFS is a free and open cloud storage engine"/>
+    <meta name="author" content="Tahoe-LAFS"/>
+
+    <!-- Le styles -->
+    <link href="/css/bootstrap.css" rel="stylesheet"/>
+    <link href="/css/bootstrap-responsive.css" rel="stylesheet"/>
+    <link href="/css/new-tahoe.css" rel="stylesheet"/>
+
+    <!-- Le fav and touch icons -->
+    <link rel="shortcut icon" href="/icon.png" />
+  </head>
+
+  <body>
+    <div class="navbar navbar-fixed-top">
+      <div class="navbar-inner">
+        <div class="container-fluid">
+          <a class="brand" href="/"><img src="/img/logo.png" alt="Tahoe-LAFS"/></a>
+        </div>
+      </div>
+    </div>
+
+    <div class="container-fluid">
+      <div class="row-fluid">
+        <div class="span3">
+          <div class="well sidebar-nav">
+            <ul class="nav nav-list">
+              <li class="toolbar-item" n:render="welcome" />
+              <li class="toolbar-item"><a href=".">Refresh</a></li>
+              <li class="toolbar-item"><a href="?t=info">More info on this directory</a></li>
+              <li class="toolbar-item" n:render="show_readonly" />
+            </ul>
+          </div>
+        </div>
+        <div class="span9">
+          <h1 n:render="header"></h1>
+
+          <div n:render="try_children">
+            <table class="table table-striped tahoe-directory" n:render="sequence" n:data="children">
+              <tr n:pattern="header">
+                <th>Type</th>
+                <th>Filename</th>
+                <th>Size</th>
+                <th>Times</th>
+                <th></th>
+                <th></th>
+                <th></th>
+              </tr>
+              <tr n:pattern="item" n:render="row">
+                <td><n:slot name="type"/></td>
+                <td><n:slot name="filename"/></td>
+                <td align="right"><n:slot name="size"/></td>
+                <td><n:slot name="times"/></td>
+                <td><n:slot name="unlink"/></td>
+                <td><n:slot name="rename"/></td>
+                <td><n:slot name="info"/></td>
+              </tr>
+
+              <tr n:pattern="empty"><td colspan="9" class="empty-marker">This directory is empty.</td></tr>
+
+            </table>
+          </div>
+
+          <div class="tahoe-directory-footer">
+            <div n:render="forms"/>
+
+            <div class="results" n:render="results"/>
+          </div>
+        </div><!--/span-->
+      </div><!--/row-->
+
+      <hr/>
+
+      <footer>
+        <p>&#169; <a href="http://tahoe-lafs.org/">Tahoe-LAFS 2013</a></p>
+      </footer>
+
+    </div><!--/.fluid-container-->
+  </body>
+</html>
\ No newline at end of file