Patchwork [03,of,11] hgweb: make stripes in directory view with CSS

login
register
mail settings
Submitter Alexander Plavin
Date July 17, 2013, 7:26 p.m.
Message ID <e8e9e2ad39c3100236ef.1374089176@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/1917/
State Accepted
Commit 182942b38d246a519669ab78e1a93bba2cdaf4c6
Delegated to: Kevin Bullock
Headers show

Comments

Alexander Plavin - July 17, 2013, 7:26 p.m.
# HG changeset patch
# User Alexander Plavin <me@aplavin.ru>
# Date 1373723086 -14400
#      Sat Jul 13 17:44:46 2013 +0400
# Node ID e8e9e2ad39c3100236efdaf765fee26dc2c384d3
# Parent  489bd47bf6d5ff7e944c0beb6b46f19a8feadd8b
hgweb: make stripes in directory view with CSS

Patch

diff -r 489bd47bf6d5 -r e8e9e2ad39c3 mercurial/templates/paper/manifest.tmpl
--- 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>
diff -r 489bd47bf6d5 -r e8e9e2ad39c3 mercurial/templates/paper/map
--- 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}
diff -r 489bd47bf6d5 -r e8e9e2ad39c3 tests/test-hgweb-descend-empties.t
--- 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>
diff -r 489bd47bf6d5 -r e8e9e2ad39c3 tests/test-hgweb-empty.t
--- 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>
diff -r 489bd47bf6d5 -r e8e9e2ad39c3 tests/test-hgweb.t
--- 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>