Paul Vriens : transl: Have a separate <div> for the navigation bar.

Alexandre Julliard julliard at winehq.org
Tue Aug 18 10:29:45 CDT 2009


Module: tools
Branch: master
Commit: dcfcf019f3ce57db8c1b055d60413f2b5df99273
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=dcfcf019f3ce57db8c1b055d60413f2b5df99273

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Fri Aug 14 13:24:52 2009 +0200

transl: Have a separate <div> for the navigation bar.

---

 transl/index.php    |    3 +++
 transl/lang.php     |    4 +++-
 transl/lib.php      |    8 ++++++--
 transl/resfile.php  |    2 ++
 transl/resource.php |    2 ++
 transl/style.css    |    8 ++++++++
 6 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/transl/index.php b/transl/index.php
index 369b7de..51d7f9c 100644
--- a/transl/index.php
+++ b/transl/index.php
@@ -27,6 +27,9 @@ while ($line = fgets($summary, 1024))
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
     <title>Wine translation statistics <?php echo $TITLE_APPENDIX ?></title>
 </head>
+<div class="navbar">
+<?php dump_menu_root(FALSE); ?>
+</div>
 <div class="main">
 <h1>Wine translation statistics <?php echo $TITLE_APPENDIX ?></h1>
 <div class="contents">
diff --git a/transl/lang.php b/transl/lang.php
index 5f0fd6f..29b0692 100644
--- a/transl/lang.php
+++ b/transl/lang.php
@@ -88,7 +88,9 @@ function dump_table($table)
     <title><?php echo get_lang_name($lang) ?> language - Wine translations</title>
 </head>
 
-<p><?php dump_menu_lang($lang, FALSE); ?> </p>
+<div class="navbar">
+<?php dump_menu_lang($lang, FALSE); ?>
+</div>
 <div class="main">
 <h1><?php echo "Language: ".get_lang_name($lang) ?></h1>
 
diff --git a/transl/lib.php b/transl/lib.php
index 9e5b1a7..5f0580e 100644
--- a/transl/lib.php
+++ b/transl/lib.php
@@ -245,9 +245,13 @@ function gen_resource_a($lang, $resfile, $type, $id, $compare=FALSE)
            "&amp;type=".urlencode($type)."&amp;id=".urlencode($id)."$extra\">";
 }
 
-function dump_menu_root()
+function dump_menu_root($link = TRUE)
 {
-    echo "<a href=\"index.php\">Wine translations</a>";
+    if ($link)
+        echo "<a href=\"index.php\">";
+    echo "Wine translations";
+    if ($link)
+        echo "</a>";
 }
 
 function dump_menu_lang($lang, $link = TRUE)
diff --git a/transl/resfile.php b/transl/resfile.php
index 29909ed..5e38dfc 100644
--- a/transl/resfile.php
+++ b/transl/resfile.php
@@ -15,7 +15,9 @@ $msgs = array();
     <title>Module <?php echo $resfile?> - Wine translations</title>
 </head>
 
+<div class="navbar">
 <?php dump_menu_resfile($lang, $resfile, FALSE); ?>
+</div>
 <div class="main">
 <h1>Module <?php echo $resfile?></h1>
 
diff --git a/transl/resource.php b/transl/resource.php
index d8f1e20..9197210 100644
--- a/transl/resource.php
+++ b/transl/resource.php
@@ -18,7 +18,9 @@ $compare = isset($_REQUEST['compare']);
     <title><?php echo get_resource_name($type, $id) ?> from <?php echo $resfile?> - Wine translation</title>
 </head>
 <body>
+<div class="navbar">
 <?php dump_menu_resource($lang, $resfile, $type, $id); ?>
+</div>
 <div class="main">
 <h1>Dump of <?php echo get_resource_name($type, $id) ?></h1>
 
diff --git a/transl/style.css b/transl/style.css
index b963c06..557de2c 100644
--- a/transl/style.css
+++ b/transl/style.css
@@ -31,6 +31,14 @@ h1 :link {
     color: #ffe0e0;
 }
 
+div.navbar {
+    background-color: #E2E2E2;
+    margin: 10px 0;
+    padding: 0;
+    text-align: left;
+    width: 100%;
+}
+
 div.main {
     margin: 10px 0 0 0;
     background-color: white;




More information about the wine-cvs mailing list