changeset 19447:182942b38d24

hgweb: make stripes in directory view with CSS
author Alexander Plavin <me@aplavin.ru>
date Sat, 13 Jul 2013 17:44:46 +0400
parents 25dae11bb044
children fa0e1ca9fbc0
files mercurial/templates/paper/manifest.tmpl mercurial/templates/paper/map tests/test-hgweb-descend-empties.t tests/test-hgweb-empty.t tests/test-hgweb.t
diffstat 5 files changed, 19 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templates/paper/manifest.tmpl	Sat Jul 13 17:43:19 2013 +0400
+++ b/mercurial/templates/paper/manifest.tmpl	Sat Jul 13 17:44:46 2013 +0400
@@ -45,13 +45,15 @@
   <th class="size">size</th>
   <th class="permissions">permissions</th>
 </tr>
-<tr class="fileline parity{upparity}">
+<tbody class="stripes2">
+<tr class="fileline">
   <td class="name"><a href="{url|urlescape}file/{node|short}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
   <td class="size"></td>
   <td class="permissions">drwxr-xr-x</td>
 </tr>
 {dentries%direntry}
 {fentries%fileentry}
+</tbody>
 </table>
 </div>
 </div>
--- a/mercurial/templates/paper/map	Sat Jul 13 17:43:19 2013 +0400
+++ b/mercurial/templates/paper/map	Sat Jul 13 17:44:46 2013 +0400
@@ -42,7 +42,7 @@
 filenav = '{before%filenaventry}{after%filenaventry}'
 
 direntry = '
-  <tr class="fileline parity{parity}">
+  <tr class="fileline">
     <td class="name">
       <a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">
         <img src="{staticurl|urlescape}coal-folder.png" alt="dir."/> {basename|escape}/
@@ -56,7 +56,7 @@
   </tr>'
 
 fileentry = '
-  <tr class="fileline parity{parity}">
+  <tr class="fileline">
     <td class="filename">
       <a href="{url|urlescape}file/{node|short}/{file|urlescape}{sessionvars%urlparameter}">
         <img src="{staticurl|urlescape}coal-file.png" alt="file"/> {basename|escape}
--- a/tests/test-hgweb-descend-empties.t	Sat Jul 13 17:43:19 2013 +0400
+++ b/tests/test-hgweb-descend-empties.t	Sat Jul 13 17:44:46 2013 +0400
@@ -86,13 +86,14 @@
     <th class="size">size</th>
     <th class="permissions">permissions</th>
   </tr>
-  <tr class="fileline parity0">
+  <tbody class="stripes2">
+  <tr class="fileline">
     <td class="name"><a href="/file/9087c84a0f5d/">[up]</a></td>
     <td class="size"></td>
     <td class="permissions">drwxr-xr-x</td>
   </tr>
   
-  <tr class="fileline parity1">
+  <tr class="fileline">
   <td class="name">
   <a href="/file/9087c84a0f5d/a1">
   <img src="/static/coal-folder.png" alt="dir."/> a1/
@@ -104,7 +105,7 @@
   <td class="size"></td>
   <td class="permissions">drwxr-xr-x</td>
   </tr>
-  <tr class="fileline parity0">
+  <tr class="fileline">
   <td class="name">
   <a href="/file/9087c84a0f5d/b1">
   <img src="/static/coal-folder.png" alt="dir."/> b1/
@@ -116,7 +117,7 @@
   <td class="size"></td>
   <td class="permissions">drwxr-xr-x</td>
   </tr>
-  <tr class="fileline parity1">
+  <tr class="fileline">
   <td class="name">
   <a href="/file/9087c84a0f5d/d1">
   <img src="/static/coal-folder.png" alt="dir."/> d1/
@@ -129,6 +130,7 @@
   <td class="permissions">drwxr-xr-x</td>
   </tr>
   
+  </tbody>
   </table>
   </div>
   </div>
--- a/tests/test-hgweb-empty.t	Sat Jul 13 17:43:19 2013 +0400
+++ b/tests/test-hgweb-empty.t	Sat Jul 13 17:44:46 2013 +0400
@@ -391,13 +391,15 @@
     <th class="size">size</th>
     <th class="permissions">permissions</th>
   </tr>
-  <tr class="fileline parity0">
+  <tbody class="stripes2">
+  <tr class="fileline">
     <td class="name"><a href="/file/000000000000/">[up]</a></td>
     <td class="size"></td>
     <td class="permissions">drwxr-xr-x</td>
   </tr>
   
   
+  </tbody>
   </table>
   </div>
   </div>
--- a/tests/test-hgweb.t	Sat Jul 13 17:43:19 2013 +0400
+++ b/tests/test-hgweb.t	Sat Jul 13 17:44:46 2013 +0400
@@ -259,13 +259,14 @@
     <th class="size">size</th>
     <th class="permissions">permissions</th>
   </tr>
-  <tr class="fileline parity0">
+  <tbody class="stripes2">
+  <tr class="fileline">
     <td class="name"><a href="/file/2ef0ac749a14/">[up]</a></td>
     <td class="size"></td>
     <td class="permissions">drwxr-xr-x</td>
   </tr>
   
-  <tr class="fileline parity1">
+  <tr class="fileline">
   <td class="name">
   <a href="/file/2ef0ac749a14/da">
   <img src="/static/coal-folder.png" alt="dir."/> da/
@@ -278,7 +279,7 @@
   <td class="permissions">drwxr-xr-x</td>
   </tr>
   
-  <tr class="fileline parity0">
+  <tr class="fileline">
   <td class="filename">
   <a href="/file/2ef0ac749a14/foo">
   <img src="/static/coal-file.png" alt="file"/> foo
@@ -287,6 +288,7 @@
   <td class="size">4</td>
   <td class="permissions">-rw-r--r--</td>
   </tr>
+  </tbody>
   </table>
   </div>
   </div>