Fossil SCM
The main menu for web display is not determined by the "mainmenu" setting, for the built-in skins. Customized skins that ignore the mainmenu setting continue to operate as before. Added the "string match" TH1 command to help.
Commit
923841b709092decda0308e39a34e9e1257be43857184785ccae136d0ea57067
Parent
aa5beb8c297faf1…
17 files changed
+8
-34
+4
-25
+7
-36
+7
-36
+14
-69
+7
-37
+5
-33
+5
-32
+6
-28
+5
-27
+4
-23
+5
-27
+6
-38
+1
+28
+24
+24
~
skins/ardoise/header.txt
~
skins/black_and_white/header.txt
~
skins/blitz/header.txt
~
skins/blitz_no_logo/header.txt
~
skins/bootstrap/header.txt
~
skins/default/header.txt
~
skins/eagle/header.txt
~
skins/enhanced1/header.txt
~
skins/khaki/header.txt
~
skins/original/header.txt
~
skins/plain_gray/header.txt
~
skins/rounded1/header.txt
~
skins/xekri/header.txt
~
src/configure.c
~
src/setup.c
~
src/style.c
~
src/th_lang.c
+8
-34
| --- skins/ardoise/header.txt | ||
| +++ skins/ardoise/header.txt | ||
| @@ -21,50 +21,24 @@ | ||
| 21 | 21 | |
| 22 | 22 | <!-- Main Menu --> |
| 23 | 23 | <div class="mainmenu"> |
| 24 | 24 | <ul> |
| 25 | 25 | <th1> |
| 26 | -proc menulink {url name} { | |
| 27 | - upvar current_page current | |
| 28 | - upvar home home | |
| 29 | - if {[string range $url 0 [string length $current]] eq "/$current"} { | |
| 26 | +html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a></li>\n" | |
| 27 | +builtin_request_js hbmenu.js | |
| 28 | +set once 1 | |
| 29 | +foreach {name url expr class} $mainmenu { | |
| 30 | + if {![capexpr $expr]} continue | |
| 31 | + if {$once && [string match /$current_page* $url]} { | |
| 30 | 32 | html "<li class='active'>" |
| 33 | + set once 0 | |
| 31 | 34 | } else { |
| 32 | 35 | html "<li>" |
| 33 | 36 | } |
| 34 | 37 | html "<a href='$home$url'>$name</a></li>\n" |
| 35 | 38 | } |
| 36 | -html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a></li>" | |
| 37 | -builtin_request_js hbmenu.js | |
| 38 | -menulink $index_page Home | |
| 39 | -if {[anycap jor]} { | |
| 40 | - menulink /timeline Timeline | |
| 41 | -} | |
| 42 | -if {[hascap oh]} { | |
| 43 | - menulink /dir?ci=tip Files | |
| 44 | -} | |
| 45 | -# if {[hascap o]} { | |
| 46 | -# menulink /brlist Branches | |
| 47 | -# menulink /taglist Tags | |
| 48 | -# } | |
| 49 | -# if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 50 | -# menulink /forum Forum | |
| 51 | -# } | |
| 52 | -# if {[hascap r]} { | |
| 53 | -# menulink /ticket Tickets | |
| 54 | -# } | |
| 55 | -# if {[hascap j]} { | |
| 56 | -# menulink /wiki Wiki | |
| 57 | -# } | |
| 58 | -# if {[hascap o]} { | |
| 59 | -# menulink /help Help | |
| 60 | -# } | |
| 61 | -if {[hascap s]} { | |
| 62 | - menulink /setup Admin | |
| 63 | -} | |
| 64 | - </th1> | |
| 65 | - </ul> | |
| 39 | +</th1></ul> | |
| 66 | 40 | </div> <!-- end div mainmenu --> |
| 67 | 41 | <div id="hbdrop"></div> |
| 68 | 42 | </div> <!-- end div container --> |
| 69 | 43 | </div> <!-- end div header --> |
| 70 | 44 | <div class="middle max-full-width"> |
| 71 | 45 |
| --- skins/ardoise/header.txt | |
| +++ skins/ardoise/header.txt | |
| @@ -21,50 +21,24 @@ | |
| 21 | |
| 22 | <!-- Main Menu --> |
| 23 | <div class="mainmenu"> |
| 24 | <ul> |
| 25 | <th1> |
| 26 | proc menulink {url name} { |
| 27 | upvar current_page current |
| 28 | upvar home home |
| 29 | if {[string range $url 0 [string length $current]] eq "/$current"} { |
| 30 | html "<li class='active'>" |
| 31 | } else { |
| 32 | html "<li>" |
| 33 | } |
| 34 | html "<a href='$home$url'>$name</a></li>\n" |
| 35 | } |
| 36 | html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a></li>" |
| 37 | builtin_request_js hbmenu.js |
| 38 | menulink $index_page Home |
| 39 | if {[anycap jor]} { |
| 40 | menulink /timeline Timeline |
| 41 | } |
| 42 | if {[hascap oh]} { |
| 43 | menulink /dir?ci=tip Files |
| 44 | } |
| 45 | # if {[hascap o]} { |
| 46 | # menulink /brlist Branches |
| 47 | # menulink /taglist Tags |
| 48 | # } |
| 49 | # if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 50 | # menulink /forum Forum |
| 51 | # } |
| 52 | # if {[hascap r]} { |
| 53 | # menulink /ticket Tickets |
| 54 | # } |
| 55 | # if {[hascap j]} { |
| 56 | # menulink /wiki Wiki |
| 57 | # } |
| 58 | # if {[hascap o]} { |
| 59 | # menulink /help Help |
| 60 | # } |
| 61 | if {[hascap s]} { |
| 62 | menulink /setup Admin |
| 63 | } |
| 64 | </th1> |
| 65 | </ul> |
| 66 | </div> <!-- end div mainmenu --> |
| 67 | <div id="hbdrop"></div> |
| 68 | </div> <!-- end div container --> |
| 69 | </div> <!-- end div header --> |
| 70 | <div class="middle max-full-width"> |
| 71 |
| --- skins/ardoise/header.txt | |
| +++ skins/ardoise/header.txt | |
| @@ -21,50 +21,24 @@ | |
| 21 | |
| 22 | <!-- Main Menu --> |
| 23 | <div class="mainmenu"> |
| 24 | <ul> |
| 25 | <th1> |
| 26 | html "<li><a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a></li>\n" |
| 27 | builtin_request_js hbmenu.js |
| 28 | set once 1 |
| 29 | foreach {name url expr class} $mainmenu { |
| 30 | if {![capexpr $expr]} continue |
| 31 | if {$once && [string match /$current_page* $url]} { |
| 32 | html "<li class='active'>" |
| 33 | set once 0 |
| 34 | } else { |
| 35 | html "<li>" |
| 36 | } |
| 37 | html "<a href='$home$url'>$name</a></li>\n" |
| 38 | } |
| 39 | </th1></ul> |
| 40 | </div> <!-- end div mainmenu --> |
| 41 | <div id="hbdrop"></div> |
| 42 | </div> <!-- end div container --> |
| 43 | </div> <!-- end div header --> |
| 44 | <div class="middle max-full-width"> |
| 45 |
+4
-25
| --- skins/black_and_white/header.txt | ||
| +++ skins/black_and_white/header.txt | ||
| @@ -12,36 +12,15 @@ | ||
| 12 | 12 | } |
| 13 | 13 | </th1></div> |
| 14 | 14 | </div> |
| 15 | 15 | <div class="mainmenu"> |
| 16 | 16 | <th1> |
| 17 | -html "<a href='$home$index_page'>Home</a>\n" | |
| 18 | -if {[anycap jor]} { | |
| 19 | - html "<a href='$home/timeline'>Timeline</a>\n" | |
| 20 | -} | |
| 21 | -if {[anoncap oh]} { | |
| 22 | - html "<a href='$home/tree?ci=tip'>Files</a>\n" | |
| 23 | -} | |
| 24 | -if {[anoncap o]} { | |
| 25 | - html "<a href='$home/brlist'>Branches</a>\n" | |
| 26 | - html "<a href='$home/taglist'>Tags</a>\n" | |
| 27 | -} | |
| 28 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 29 | - html "<a href='$home/forum'>Forum</a>\n" | |
| 30 | -} | |
| 31 | -if {[anoncap r]} { | |
| 32 | - html "<a href='$home/ticket'>Tickets</a>\n" | |
| 33 | -} | |
| 34 | -if {[anoncap j]} { | |
| 35 | - html "<a href='$home/wiki'>Wiki</a>\n" | |
| 36 | -} | |
| 37 | -if {[hascap s]} { | |
| 38 | - html "<a href='$home/setup'>Admin</a>\n" | |
| 39 | -} elseif {[hascap a]} { | |
| 40 | - html "<a href='$home/setup_ulist'>Users</a>\n" | |
| 17 | +foreach {name url expr class} $mainmenu { | |
| 18 | + if {![capexpr $expr]} continue | |
| 19 | + html "<a href='$home$url'>$name</a><br/>\n" | |
| 41 | 20 | } |
| 42 | 21 | if {[info exists login]} { |
| 43 | 22 | html "<a href='$home/login'>Logout</a>\n" |
| 44 | 23 | } else { |
| 45 | 24 | html "<a href='$home/login'>Login</a>\n" |
| 46 | 25 | } |
| 47 | -</th1></ul></div> | |
| 26 | +</th1></div> | |
| 48 | 27 |
| --- skins/black_and_white/header.txt | |
| +++ skins/black_and_white/header.txt | |
| @@ -12,36 +12,15 @@ | |
| 12 | } |
| 13 | </th1></div> |
| 14 | </div> |
| 15 | <div class="mainmenu"> |
| 16 | <th1> |
| 17 | html "<a href='$home$index_page'>Home</a>\n" |
| 18 | if {[anycap jor]} { |
| 19 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 20 | } |
| 21 | if {[anoncap oh]} { |
| 22 | html "<a href='$home/tree?ci=tip'>Files</a>\n" |
| 23 | } |
| 24 | if {[anoncap o]} { |
| 25 | html "<a href='$home/brlist'>Branches</a>\n" |
| 26 | html "<a href='$home/taglist'>Tags</a>\n" |
| 27 | } |
| 28 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 29 | html "<a href='$home/forum'>Forum</a>\n" |
| 30 | } |
| 31 | if {[anoncap r]} { |
| 32 | html "<a href='$home/ticket'>Tickets</a>\n" |
| 33 | } |
| 34 | if {[anoncap j]} { |
| 35 | html "<a href='$home/wiki'>Wiki</a>\n" |
| 36 | } |
| 37 | if {[hascap s]} { |
| 38 | html "<a href='$home/setup'>Admin</a>\n" |
| 39 | } elseif {[hascap a]} { |
| 40 | html "<a href='$home/setup_ulist'>Users</a>\n" |
| 41 | } |
| 42 | if {[info exists login]} { |
| 43 | html "<a href='$home/login'>Logout</a>\n" |
| 44 | } else { |
| 45 | html "<a href='$home/login'>Login</a>\n" |
| 46 | } |
| 47 | </th1></ul></div> |
| 48 |
| --- skins/black_and_white/header.txt | |
| +++ skins/black_and_white/header.txt | |
| @@ -12,36 +12,15 @@ | |
| 12 | } |
| 13 | </th1></div> |
| 14 | </div> |
| 15 | <div class="mainmenu"> |
| 16 | <th1> |
| 17 | foreach {name url expr class} $mainmenu { |
| 18 | if {![capexpr $expr]} continue |
| 19 | html "<a href='$home$url'>$name</a><br/>\n" |
| 20 | } |
| 21 | if {[info exists login]} { |
| 22 | html "<a href='$home/login'>Logout</a>\n" |
| 23 | } else { |
| 24 | html "<a href='$home/login'>Login</a>\n" |
| 25 | } |
| 26 | </th1></div> |
| 27 |
+7
-36
| --- skins/blitz/header.txt | ||
| +++ skins/blitz/header.txt | ||
| @@ -23,52 +23,23 @@ | ||
| 23 | 23 | </th1> |
| 24 | 24 | </div> |
| 25 | 25 | |
| 26 | 26 | <!-- Main Menu --> |
| 27 | 27 | <div class="mainmenu"> |
| 28 | - <ul> | |
| 29 | - <th1> | |
| 30 | -proc menulink {url name} { | |
| 31 | - upvar current_page current | |
| 32 | - upvar home home | |
| 33 | - if {[string range $url 0 [string length $current]] eq "/$current"} { | |
| 28 | + <ul><th1> | |
| 29 | +set once 1 | |
| 30 | +foreach {name url expr class} $mainmenu { | |
| 31 | + if {![capexpr $expr]} continue | |
| 32 | + if {$once && [string match /$current_page* $url]} { | |
| 34 | 33 | html "<li class='active'>" |
| 34 | + set once 0 | |
| 35 | 35 | } else { |
| 36 | 36 | html "<li>" |
| 37 | 37 | } |
| 38 | 38 | html "<a href='$home$url'>$name</a></li>\n" |
| 39 | 39 | } |
| 40 | -menulink $index_page Home | |
| 41 | -if {[anycap jor]} { | |
| 42 | - menulink /timeline Timeline | |
| 43 | -} | |
| 44 | -if {[hascap oh]} { | |
| 45 | - menulink /dir?ci=tip Files | |
| 46 | -} | |
| 47 | -if {[hascap o]} { | |
| 48 | - menulink /brlist Branches | |
| 49 | - menulink /taglist Tags | |
| 50 | -} | |
| 51 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 52 | - menulink /forum Forum | |
| 53 | -} | |
| 54 | -if {[hascap r]} { | |
| 55 | - menulink /ticket Tickets | |
| 56 | -} | |
| 57 | -if {[hascap j]} { | |
| 58 | - menulink /wiki Wiki | |
| 59 | -} | |
| 60 | -if {[hascap o]} { | |
| 61 | - menulink /help Help | |
| 62 | -} | |
| 63 | -if {[hascap s]} { | |
| 64 | - menulink /setup Admin | |
| 65 | -} elseif {[hascap a]} { | |
| 66 | - menulink /setup_ulist Users | |
| 67 | -} | |
| 68 | - </th1> | |
| 69 | - </ul> | |
| 40 | +</th1></ul> | |
| 70 | 41 | </div> <!-- end div mainmenu --> |
| 71 | 42 | </div> <!-- end div container --> |
| 72 | 43 | </div> <!-- end div header --> |
| 73 | 44 | <div class="middle max-full-width"> |
| 74 | 45 | <div class="container"> |
| 75 | 46 |
| --- skins/blitz/header.txt | |
| +++ skins/blitz/header.txt | |
| @@ -23,52 +23,23 @@ | |
| 23 | </th1> |
| 24 | </div> |
| 25 | |
| 26 | <!-- Main Menu --> |
| 27 | <div class="mainmenu"> |
| 28 | <ul> |
| 29 | <th1> |
| 30 | proc menulink {url name} { |
| 31 | upvar current_page current |
| 32 | upvar home home |
| 33 | if {[string range $url 0 [string length $current]] eq "/$current"} { |
| 34 | html "<li class='active'>" |
| 35 | } else { |
| 36 | html "<li>" |
| 37 | } |
| 38 | html "<a href='$home$url'>$name</a></li>\n" |
| 39 | } |
| 40 | menulink $index_page Home |
| 41 | if {[anycap jor]} { |
| 42 | menulink /timeline Timeline |
| 43 | } |
| 44 | if {[hascap oh]} { |
| 45 | menulink /dir?ci=tip Files |
| 46 | } |
| 47 | if {[hascap o]} { |
| 48 | menulink /brlist Branches |
| 49 | menulink /taglist Tags |
| 50 | } |
| 51 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 52 | menulink /forum Forum |
| 53 | } |
| 54 | if {[hascap r]} { |
| 55 | menulink /ticket Tickets |
| 56 | } |
| 57 | if {[hascap j]} { |
| 58 | menulink /wiki Wiki |
| 59 | } |
| 60 | if {[hascap o]} { |
| 61 | menulink /help Help |
| 62 | } |
| 63 | if {[hascap s]} { |
| 64 | menulink /setup Admin |
| 65 | } elseif {[hascap a]} { |
| 66 | menulink /setup_ulist Users |
| 67 | } |
| 68 | </th1> |
| 69 | </ul> |
| 70 | </div> <!-- end div mainmenu --> |
| 71 | </div> <!-- end div container --> |
| 72 | </div> <!-- end div header --> |
| 73 | <div class="middle max-full-width"> |
| 74 | <div class="container"> |
| 75 |
| --- skins/blitz/header.txt | |
| +++ skins/blitz/header.txt | |
| @@ -23,52 +23,23 @@ | |
| 23 | </th1> |
| 24 | </div> |
| 25 | |
| 26 | <!-- Main Menu --> |
| 27 | <div class="mainmenu"> |
| 28 | <ul><th1> |
| 29 | set once 1 |
| 30 | foreach {name url expr class} $mainmenu { |
| 31 | if {![capexpr $expr]} continue |
| 32 | if {$once && [string match /$current_page* $url]} { |
| 33 | html "<li class='active'>" |
| 34 | set once 0 |
| 35 | } else { |
| 36 | html "<li>" |
| 37 | } |
| 38 | html "<a href='$home$url'>$name</a></li>\n" |
| 39 | } |
| 40 | </th1></ul> |
| 41 | </div> <!-- end div mainmenu --> |
| 42 | </div> <!-- end div container --> |
| 43 | </div> <!-- end div header --> |
| 44 | <div class="middle max-full-width"> |
| 45 | <div class="container"> |
| 46 |
+7
-36
| --- skins/blitz_no_logo/header.txt | ||
| +++ skins/blitz_no_logo/header.txt | ||
| @@ -20,52 +20,23 @@ | ||
| 20 | 20 | <small> $<title></small></h1> |
| 21 | 21 | </div> |
| 22 | 22 | |
| 23 | 23 | <!-- Main Menu --> |
| 24 | 24 | <div class="mainmenu"> |
| 25 | - <ul> | |
| 26 | - <th1> | |
| 27 | -proc menulink {url name} { | |
| 28 | - upvar current_page current | |
| 29 | - upvar home home | |
| 30 | - if {[string range $url 0 [string length $current]] eq "/$current"} { | |
| 25 | + <ul><th1> | |
| 26 | +set once 1 | |
| 27 | +foreach {name url expr class} $mainmenu { | |
| 28 | + if {![capexpr $expr]} continue | |
| 29 | + if {$once && [string match /$current_page* $url]} { | |
| 31 | 30 | html "<li class='active'>" |
| 31 | + set once 0 | |
| 32 | 32 | } else { |
| 33 | 33 | html "<li>" |
| 34 | 34 | } |
| 35 | 35 | html "<a href='$home$url'>$name</a></li>\n" |
| 36 | 36 | } |
| 37 | -menulink $index_page Home | |
| 38 | -if {[anycap jor]} { | |
| 39 | - menulink /timeline Timeline | |
| 40 | -} | |
| 41 | -if {[hascap oh]} { | |
| 42 | - menulink /dir?ci=tip Files | |
| 43 | -} | |
| 44 | -if {[hascap o]} { | |
| 45 | - menulink /brlist Branches | |
| 46 | - menulink /taglist Tags | |
| 47 | -} | |
| 48 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 49 | - menulink /forum Forum | |
| 50 | -} | |
| 51 | -if {[hascap r]} { | |
| 52 | - menulink /ticket Tickets | |
| 53 | -} | |
| 54 | -if {[hascap j]} { | |
| 55 | - menulink /wiki Wiki | |
| 56 | -} | |
| 57 | -if {[hascap o]} { | |
| 58 | - menulink /help Help | |
| 59 | - } | |
| 60 | -if {[hascap s]} { | |
| 61 | - menulink /setup Admin | |
| 62 | -} elseif {[hascap a]} { | |
| 63 | - menulink /setup_ulist Users | |
| 64 | -} | |
| 65 | - </th1> | |
| 66 | - </ul> | |
| 37 | +</th1></ul> | |
| 67 | 38 | </div> <!-- end div mainmenu --> |
| 68 | 39 | </div> <!-- end div container --> |
| 69 | 40 | </div> <!-- end div header --> |
| 70 | 41 | <div class="middle max-full-width"> |
| 71 | 42 | <div class="container"> |
| 72 | 43 |
| --- skins/blitz_no_logo/header.txt | |
| +++ skins/blitz_no_logo/header.txt | |
| @@ -20,52 +20,23 @@ | |
| 20 | <small> $<title></small></h1> |
| 21 | </div> |
| 22 | |
| 23 | <!-- Main Menu --> |
| 24 | <div class="mainmenu"> |
| 25 | <ul> |
| 26 | <th1> |
| 27 | proc menulink {url name} { |
| 28 | upvar current_page current |
| 29 | upvar home home |
| 30 | if {[string range $url 0 [string length $current]] eq "/$current"} { |
| 31 | html "<li class='active'>" |
| 32 | } else { |
| 33 | html "<li>" |
| 34 | } |
| 35 | html "<a href='$home$url'>$name</a></li>\n" |
| 36 | } |
| 37 | menulink $index_page Home |
| 38 | if {[anycap jor]} { |
| 39 | menulink /timeline Timeline |
| 40 | } |
| 41 | if {[hascap oh]} { |
| 42 | menulink /dir?ci=tip Files |
| 43 | } |
| 44 | if {[hascap o]} { |
| 45 | menulink /brlist Branches |
| 46 | menulink /taglist Tags |
| 47 | } |
| 48 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 49 | menulink /forum Forum |
| 50 | } |
| 51 | if {[hascap r]} { |
| 52 | menulink /ticket Tickets |
| 53 | } |
| 54 | if {[hascap j]} { |
| 55 | menulink /wiki Wiki |
| 56 | } |
| 57 | if {[hascap o]} { |
| 58 | menulink /help Help |
| 59 | } |
| 60 | if {[hascap s]} { |
| 61 | menulink /setup Admin |
| 62 | } elseif {[hascap a]} { |
| 63 | menulink /setup_ulist Users |
| 64 | } |
| 65 | </th1> |
| 66 | </ul> |
| 67 | </div> <!-- end div mainmenu --> |
| 68 | </div> <!-- end div container --> |
| 69 | </div> <!-- end div header --> |
| 70 | <div class="middle max-full-width"> |
| 71 | <div class="container"> |
| 72 |
| --- skins/blitz_no_logo/header.txt | |
| +++ skins/blitz_no_logo/header.txt | |
| @@ -20,52 +20,23 @@ | |
| 20 | <small> $<title></small></h1> |
| 21 | </div> |
| 22 | |
| 23 | <!-- Main Menu --> |
| 24 | <div class="mainmenu"> |
| 25 | <ul><th1> |
| 26 | set once 1 |
| 27 | foreach {name url expr class} $mainmenu { |
| 28 | if {![capexpr $expr]} continue |
| 29 | if {$once && [string match /$current_page* $url]} { |
| 30 | html "<li class='active'>" |
| 31 | set once 0 |
| 32 | } else { |
| 33 | html "<li>" |
| 34 | } |
| 35 | html "<a href='$home$url'>$name</a></li>\n" |
| 36 | } |
| 37 | </th1></ul> |
| 38 | </div> <!-- end div mainmenu --> |
| 39 | </div> <!-- end div container --> |
| 40 | </div> <!-- end div header --> |
| 41 | <div class="middle max-full-width"> |
| 42 | <div class="container"> |
| 43 |
+14
-69
| --- skins/bootstrap/header.txt | ||
| +++ skins/bootstrap/header.txt | ||
| @@ -39,79 +39,24 @@ | ||
| 39 | 39 | html " · <a href='$home/login'>Login</a>" |
| 40 | 40 | } |
| 41 | 41 | </th1></p> |
| 42 | 42 | <ul class="nav navbar-nav"> |
| 43 | 43 | <th1> |
| 44 | - set is_index [expr [string compare [string range $current_page 0 4] "index"]==0] | |
| 45 | - set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0] | |
| 46 | - if {$is_index || $is_home} { | |
| 47 | - html "<li class='active'><a href='$home$index_page'>Home</a></li>\n" | |
| 48 | - } else { | |
| 49 | - html "<li><a href='$home$index_page'>Home</a></li>\n" | |
| 50 | - } | |
| 51 | - if {[hascap j]} { | |
| 52 | - if {[string compare [string range $current_page 0 3] "wiki"] == 0} { | |
| 53 | - html "<li class='active'><a href='$home/wiki'>Wiki</a></li>\n" | |
| 54 | - } else { | |
| 55 | - html "<li><a href='$home/wiki'>Wiki</a></li>\n" | |
| 56 | - } | |
| 57 | - } | |
| 58 | - if {[anycap jor]} { | |
| 59 | - if {[string compare $current_page "timeline"] == 0} { | |
| 60 | - html "<li class='active'><a href='$home/timeline'>Timeline</a></li>\n" | |
| 61 | - } else { | |
| 62 | - html "<li><a href='$home/timeline'>Timeline</a></li>\n" | |
| 63 | - } | |
| 64 | - } | |
| 65 | - if {[hascap oh]} { | |
| 66 | - if {[string compare [string range $current_page 0 2] "dir"] == 0} { | |
| 67 | - html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n" | |
| 68 | - } else { | |
| 69 | - html "<li><a href='$home/dir?ci=tip'>Files</a></li>\n" | |
| 70 | - } | |
| 71 | - } | |
| 72 | - if {[hascap o]} { | |
| 73 | - if {[string compare $current_page "brlist"] == 0} { | |
| 74 | - html "<li class='active'><a href='$home/brlist'>Branches</a></li>\n" | |
| 75 | - } else { | |
| 76 | - html "<li><a href='$home/brlist'>Branches</a></li>\n" | |
| 77 | - } | |
| 78 | - if {[string compare $current_page "taglist"] == 0} { | |
| 79 | - html "<li class='active'><a href='$home/taglist'>Tags</a></li>\n" | |
| 80 | - } else { | |
| 81 | - html "<li><a href='$home/taglist'>Tags</a></li>\n" | |
| 82 | - } | |
| 83 | - } | |
| 84 | - if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 85 | - if {[string compare $current_page "forum"] == 0} { | |
| 86 | - html "<li class='active'><a href='$home/forum'>Forum</a></li>\n" | |
| 87 | - } else { | |
| 88 | - html "<li><a href='$home/forum'>Forum</a></li>\n" | |
| 89 | - } | |
| 90 | - } | |
| 91 | - if {[hascap r]} { | |
| 92 | - if {[string compare $current_page "reportlist"] == 0} { | |
| 93 | - html "<li class='active'><a href='$home/reportlist'>Tickets</a></li>\n" | |
| 94 | - } else { | |
| 95 | - html "<li><a href='$home/reportlist'>Tickets</a></li>\n" | |
| 96 | - } | |
| 97 | - } | |
| 98 | - if {[hascap s]} { | |
| 99 | - if {[string compare [string range $current_page 0 4] "setup"] == 0} { | |
| 100 | - html "<li class='active'><a href='$home/setup'>Admin</a></li>\n" | |
| 101 | - } else { | |
| 102 | - html "<li><a href='$home/setup'>Admin</a></li>\n" | |
| 103 | - } | |
| 104 | - } elseif {[hascap a]} { | |
| 105 | - if {[string compare [string range $current_page 0 4] "setup"] == 0} { | |
| 106 | - html "<li class='active'><a href='$home/setup_ulist'>Users</a></li>\n" | |
| 107 | - } else { | |
| 108 | - html "<li><a href='$home/setup_ulist'>Users</a></li>\n" | |
| 109 | - } | |
| 110 | - } | |
| 111 | - </th1> | |
| 112 | - </ul> | |
| 44 | +set once 1 | |
| 45 | +set is_index [expr [string compare [string range $current_page 0 4] "index"]==0] | |
| 46 | +set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0] | |
| 47 | +foreach {name url expr class} $mainmenu { | |
| 48 | + if {![capexpr $expr]} continue | |
| 49 | + if {$once && [string match /$current_page* $url]} { | |
| 50 | + html "<li class='active'>" | |
| 51 | + set once 0 | |
| 52 | + } else { | |
| 53 | + html "<li>" | |
| 54 | + } | |
| 55 | + html "<a href='$home$url'>$name</a></li>\n" | |
| 56 | +} | |
| 57 | +</th1></ul> | |
| 113 | 58 | </div><!--/.nav-collapse --> |
| 114 | 59 | </div> |
| 115 | 60 | </div> |
| 116 | 61 | <div class="content"> |
| 117 | 62 | <th1> |
| 118 | 63 |
| --- skins/bootstrap/header.txt | |
| +++ skins/bootstrap/header.txt | |
| @@ -39,79 +39,24 @@ | |
| 39 | html " · <a href='$home/login'>Login</a>" |
| 40 | } |
| 41 | </th1></p> |
| 42 | <ul class="nav navbar-nav"> |
| 43 | <th1> |
| 44 | set is_index [expr [string compare [string range $current_page 0 4] "index"]==0] |
| 45 | set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0] |
| 46 | if {$is_index || $is_home} { |
| 47 | html "<li class='active'><a href='$home$index_page'>Home</a></li>\n" |
| 48 | } else { |
| 49 | html "<li><a href='$home$index_page'>Home</a></li>\n" |
| 50 | } |
| 51 | if {[hascap j]} { |
| 52 | if {[string compare [string range $current_page 0 3] "wiki"] == 0} { |
| 53 | html "<li class='active'><a href='$home/wiki'>Wiki</a></li>\n" |
| 54 | } else { |
| 55 | html "<li><a href='$home/wiki'>Wiki</a></li>\n" |
| 56 | } |
| 57 | } |
| 58 | if {[anycap jor]} { |
| 59 | if {[string compare $current_page "timeline"] == 0} { |
| 60 | html "<li class='active'><a href='$home/timeline'>Timeline</a></li>\n" |
| 61 | } else { |
| 62 | html "<li><a href='$home/timeline'>Timeline</a></li>\n" |
| 63 | } |
| 64 | } |
| 65 | if {[hascap oh]} { |
| 66 | if {[string compare [string range $current_page 0 2] "dir"] == 0} { |
| 67 | html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n" |
| 68 | } else { |
| 69 | html "<li><a href='$home/dir?ci=tip'>Files</a></li>\n" |
| 70 | } |
| 71 | } |
| 72 | if {[hascap o]} { |
| 73 | if {[string compare $current_page "brlist"] == 0} { |
| 74 | html "<li class='active'><a href='$home/brlist'>Branches</a></li>\n" |
| 75 | } else { |
| 76 | html "<li><a href='$home/brlist'>Branches</a></li>\n" |
| 77 | } |
| 78 | if {[string compare $current_page "taglist"] == 0} { |
| 79 | html "<li class='active'><a href='$home/taglist'>Tags</a></li>\n" |
| 80 | } else { |
| 81 | html "<li><a href='$home/taglist'>Tags</a></li>\n" |
| 82 | } |
| 83 | } |
| 84 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 85 | if {[string compare $current_page "forum"] == 0} { |
| 86 | html "<li class='active'><a href='$home/forum'>Forum</a></li>\n" |
| 87 | } else { |
| 88 | html "<li><a href='$home/forum'>Forum</a></li>\n" |
| 89 | } |
| 90 | } |
| 91 | if {[hascap r]} { |
| 92 | if {[string compare $current_page "reportlist"] == 0} { |
| 93 | html "<li class='active'><a href='$home/reportlist'>Tickets</a></li>\n" |
| 94 | } else { |
| 95 | html "<li><a href='$home/reportlist'>Tickets</a></li>\n" |
| 96 | } |
| 97 | } |
| 98 | if {[hascap s]} { |
| 99 | if {[string compare [string range $current_page 0 4] "setup"] == 0} { |
| 100 | html "<li class='active'><a href='$home/setup'>Admin</a></li>\n" |
| 101 | } else { |
| 102 | html "<li><a href='$home/setup'>Admin</a></li>\n" |
| 103 | } |
| 104 | } elseif {[hascap a]} { |
| 105 | if {[string compare [string range $current_page 0 4] "setup"] == 0} { |
| 106 | html "<li class='active'><a href='$home/setup_ulist'>Users</a></li>\n" |
| 107 | } else { |
| 108 | html "<li><a href='$home/setup_ulist'>Users</a></li>\n" |
| 109 | } |
| 110 | } |
| 111 | </th1> |
| 112 | </ul> |
| 113 | </div><!--/.nav-collapse --> |
| 114 | </div> |
| 115 | </div> |
| 116 | <div class="content"> |
| 117 | <th1> |
| 118 |
| --- skins/bootstrap/header.txt | |
| +++ skins/bootstrap/header.txt | |
| @@ -39,79 +39,24 @@ | |
| 39 | html " · <a href='$home/login'>Login</a>" |
| 40 | } |
| 41 | </th1></p> |
| 42 | <ul class="nav navbar-nav"> |
| 43 | <th1> |
| 44 | set once 1 |
| 45 | set is_index [expr [string compare [string range $current_page 0 4] "index"]==0] |
| 46 | set is_home [expr [string compare [string range $current_page 0 [expr [string length $index_page]-1] ] $index_page]==0] |
| 47 | foreach {name url expr class} $mainmenu { |
| 48 | if {![capexpr $expr]} continue |
| 49 | if {$once && [string match /$current_page* $url]} { |
| 50 | html "<li class='active'>" |
| 51 | set once 0 |
| 52 | } else { |
| 53 | html "<li>" |
| 54 | } |
| 55 | html "<a href='$home$url'>$name</a></li>\n" |
| 56 | } |
| 57 | </th1></ul> |
| 58 | </div><!--/.nav-collapse --> |
| 59 | </div> |
| 60 | </div> |
| 61 | <div class="content"> |
| 62 | <th1> |
| 63 |
+7
-37
| --- skins/default/header.txt | ||
| +++ skins/default/header.txt | ||
| @@ -8,47 +8,17 @@ | ||
| 8 | 8 | } |
| 9 | 9 | </th1></div> |
| 10 | 10 | </div> |
| 11 | 11 | <div class="mainmenu"> |
| 12 | 12 | <th1> |
| 13 | -proc menulink {url name cls} { | |
| 14 | - upvar current_page current | |
| 15 | - upvar home home | |
| 16 | - if {[string range $url 0 [string length $current]] eq "/$current"} { | |
| 17 | - html "<a href='$home$url' class='active $cls'>$name</a>\n" | |
| 18 | - } else { | |
| 19 | - html "<a href='$home$url' class='$cls'>$name</a>\n" | |
| 20 | - } | |
| 21 | -} | |
| 22 | 13 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 23 | 14 | builtin_request_js hbmenu.js |
| 24 | -menulink $index_page Home {} | |
| 25 | -if {[anycap jor]} { | |
| 26 | - menulink /timeline Timeline {} | |
| 27 | -} | |
| 28 | -if {[hascap oh]} { | |
| 29 | - if {![info exists current_checkin]} {set current_checkin tip} | |
| 30 | - menulink /dir?ci=$current_checkin Files desktoponly | |
| 31 | -} | |
| 32 | -if {[hascap o]} { | |
| 33 | - menulink /brlist Branches wideonly | |
| 34 | - menulink /taglist Tags wideonly | |
| 35 | -} | |
| 36 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 37 | - menulink /forum Forum desktoponly | |
| 38 | -} | |
| 39 | -if {[hascap C]} { | |
| 40 | - menulink /chat Chat wideonly | |
| 41 | -} | |
| 42 | -if {[hascap r]} { | |
| 43 | - menulink /ticket Tickets wideonly | |
| 44 | -} | |
| 45 | -if {[hascap j]} { | |
| 46 | - menulink /wiki Wiki wideonly | |
| 47 | -} | |
| 48 | -if {[hascap s]} { | |
| 49 | - menulink /setup Admin {} | |
| 50 | -} elseif {[hascap a]} { | |
| 51 | - menulink /setup_ulist Users {} | |
| 15 | +foreach {name url expr class} $mainmenu { | |
| 16 | + if {![capexpr $expr]} continue | |
| 17 | + if {[string range $url 0 [string length $current_page]] eq "/$current_page"} { | |
| 18 | + html "<a href='$home$url' class='active $class'>$name</a>\n" | |
| 19 | + } else { | |
| 20 | + html "<a href='$home$url' class='$class'>$name</a>\n" | |
| 21 | + } | |
| 52 | 22 | } |
| 53 | 23 | </th1></div> |
| 54 | 24 | <div id='hbdrop'></div> |
| 55 | 25 |
| --- skins/default/header.txt | |
| +++ skins/default/header.txt | |
| @@ -8,47 +8,17 @@ | |
| 8 | } |
| 9 | </th1></div> |
| 10 | </div> |
| 11 | <div class="mainmenu"> |
| 12 | <th1> |
| 13 | proc menulink {url name cls} { |
| 14 | upvar current_page current |
| 15 | upvar home home |
| 16 | if {[string range $url 0 [string length $current]] eq "/$current"} { |
| 17 | html "<a href='$home$url' class='active $cls'>$name</a>\n" |
| 18 | } else { |
| 19 | html "<a href='$home$url' class='$cls'>$name</a>\n" |
| 20 | } |
| 21 | } |
| 22 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 23 | builtin_request_js hbmenu.js |
| 24 | menulink $index_page Home {} |
| 25 | if {[anycap jor]} { |
| 26 | menulink /timeline Timeline {} |
| 27 | } |
| 28 | if {[hascap oh]} { |
| 29 | if {![info exists current_checkin]} {set current_checkin tip} |
| 30 | menulink /dir?ci=$current_checkin Files desktoponly |
| 31 | } |
| 32 | if {[hascap o]} { |
| 33 | menulink /brlist Branches wideonly |
| 34 | menulink /taglist Tags wideonly |
| 35 | } |
| 36 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 37 | menulink /forum Forum desktoponly |
| 38 | } |
| 39 | if {[hascap C]} { |
| 40 | menulink /chat Chat wideonly |
| 41 | } |
| 42 | if {[hascap r]} { |
| 43 | menulink /ticket Tickets wideonly |
| 44 | } |
| 45 | if {[hascap j]} { |
| 46 | menulink /wiki Wiki wideonly |
| 47 | } |
| 48 | if {[hascap s]} { |
| 49 | menulink /setup Admin {} |
| 50 | } elseif {[hascap a]} { |
| 51 | menulink /setup_ulist Users {} |
| 52 | } |
| 53 | </th1></div> |
| 54 | <div id='hbdrop'></div> |
| 55 |
| --- skins/default/header.txt | |
| +++ skins/default/header.txt | |
| @@ -8,47 +8,17 @@ | |
| 8 | } |
| 9 | </th1></div> |
| 10 | </div> |
| 11 | <div class="mainmenu"> |
| 12 | <th1> |
| 13 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 14 | builtin_request_js hbmenu.js |
| 15 | foreach {name url expr class} $mainmenu { |
| 16 | if {![capexpr $expr]} continue |
| 17 | if {[string range $url 0 [string length $current_page]] eq "/$current_page"} { |
| 18 | html "<a href='$home$url' class='active $class'>$name</a>\n" |
| 19 | } else { |
| 20 | html "<a href='$home$url' class='$class'>$name</a>\n" |
| 21 | } |
| 22 | } |
| 23 | </th1></div> |
| 24 | <div id='hbdrop'></div> |
| 25 |
+5
-33
| --- skins/eagle/header.txt | ||
| +++ skins/eagle/header.txt | ||
| @@ -89,44 +89,16 @@ | ||
| 89 | 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | updateClock(); |
| 93 | 93 | </script> |
| 94 | -<div class="mainmenu"> | |
| 95 | -<th1> | |
| 96 | -proc menulink {url name} { | |
| 97 | - upvar home home | |
| 94 | +<div class="mainmenu"><th1> | |
| 95 | +foreach {name url expr class} $mainmenu { | |
| 96 | + if {![capexpr $expr]} continue | |
| 98 | 97 | html "<a href='$home$url'>$name</a>\n" |
| 99 | 98 | } |
| 100 | -menulink $index_page Home | |
| 101 | -menulink /help Help | |
| 102 | -if {[anycap jor]} { | |
| 103 | - menulink /timeline Timeline | |
| 104 | -} | |
| 105 | -if {[anoncap oh]} { | |
| 106 | - menulink /dir?ci=tip Files | |
| 107 | -} | |
| 108 | -if {[anoncap o]} { | |
| 109 | - menulink /brlist Branches | |
| 110 | - menulink /taglist Tags | |
| 111 | -} | |
| 112 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 113 | - menulink /forum Forum | |
| 114 | -} | |
| 115 | -if {[anoncap r]} { | |
| 116 | - menulink /ticket Tickets | |
| 117 | -} | |
| 118 | -if {[anoncap j]} { | |
| 119 | - menulink /wiki Wiki | |
| 120 | -} | |
| 121 | -menulink /sitemap More... | |
| 122 | -if {[hascap s]} { | |
| 123 | - menulink /setup Admin | |
| 124 | -} elseif {[hascap a]} { | |
| 125 | - menulink /setup_ulist Users | |
| 126 | -} | |
| 127 | 99 | if {[info exists login]} { |
| 128 | - menulink /login Logout | |
| 100 | + html "<a href='$home/logout'>Logout</a>\n" | |
| 129 | 101 | } else { |
| 130 | - menulink /login Login | |
| 102 | + html "<a href='$home/login'>Login</a>\n" | |
| 131 | 103 | } |
| 132 | 104 | </th1></div> |
| 133 | 105 |
| --- skins/eagle/header.txt | |
| +++ skins/eagle/header.txt | |
| @@ -89,44 +89,16 @@ | |
| 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | } |
| 91 | } |
| 92 | updateClock(); |
| 93 | </script> |
| 94 | <div class="mainmenu"> |
| 95 | <th1> |
| 96 | proc menulink {url name} { |
| 97 | upvar home home |
| 98 | html "<a href='$home$url'>$name</a>\n" |
| 99 | } |
| 100 | menulink $index_page Home |
| 101 | menulink /help Help |
| 102 | if {[anycap jor]} { |
| 103 | menulink /timeline Timeline |
| 104 | } |
| 105 | if {[anoncap oh]} { |
| 106 | menulink /dir?ci=tip Files |
| 107 | } |
| 108 | if {[anoncap o]} { |
| 109 | menulink /brlist Branches |
| 110 | menulink /taglist Tags |
| 111 | } |
| 112 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 113 | menulink /forum Forum |
| 114 | } |
| 115 | if {[anoncap r]} { |
| 116 | menulink /ticket Tickets |
| 117 | } |
| 118 | if {[anoncap j]} { |
| 119 | menulink /wiki Wiki |
| 120 | } |
| 121 | menulink /sitemap More... |
| 122 | if {[hascap s]} { |
| 123 | menulink /setup Admin |
| 124 | } elseif {[hascap a]} { |
| 125 | menulink /setup_ulist Users |
| 126 | } |
| 127 | if {[info exists login]} { |
| 128 | menulink /login Logout |
| 129 | } else { |
| 130 | menulink /login Login |
| 131 | } |
| 132 | </th1></div> |
| 133 |
| --- skins/eagle/header.txt | |
| +++ skins/eagle/header.txt | |
| @@ -89,44 +89,16 @@ | |
| 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | } |
| 91 | } |
| 92 | updateClock(); |
| 93 | </script> |
| 94 | <div class="mainmenu"><th1> |
| 95 | foreach {name url expr class} $mainmenu { |
| 96 | if {![capexpr $expr]} continue |
| 97 | html "<a href='$home$url'>$name</a>\n" |
| 98 | } |
| 99 | if {[info exists login]} { |
| 100 | html "<a href='$home/logout'>Logout</a>\n" |
| 101 | } else { |
| 102 | html "<a href='$home/login'>Login</a>\n" |
| 103 | } |
| 104 | </th1></div> |
| 105 |
+5
-32
| --- skins/enhanced1/header.txt | ||
| +++ skins/enhanced1/header.txt | ||
| @@ -89,43 +89,16 @@ | ||
| 89 | 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | updateClock(); |
| 93 | 93 | </script> |
| 94 | -<div class="mainmenu"> | |
| 95 | -<th1> | |
| 96 | -proc menulink {url name} { | |
| 97 | - upvar home home | |
| 94 | +<div class="mainmenu"><th1> | |
| 95 | +foreach {name url expr class} $mainmenu { | |
| 96 | + if {![capexpr $expr]} continue | |
| 98 | 97 | html "<a href='$home$url'>$name</a>\n" |
| 99 | 98 | } |
| 100 | -menulink $index_page Home | |
| 101 | -menulink /help Help | |
| 102 | -if {[anycap jor]} { | |
| 103 | - menulink /timeline Timeline | |
| 104 | -} | |
| 105 | -if {[anoncap oh]} { | |
| 106 | - menulink /dir?ci=tip Files | |
| 107 | -} | |
| 108 | -if {[anoncap o]} { | |
| 109 | - menulink /brlist Branches | |
| 110 | - menulink /taglist Tags | |
| 111 | -} | |
| 112 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 113 | - menulink /forum Forum | |
| 114 | -} | |
| 115 | -if {[anoncap r]} { | |
| 116 | - menulink /ticket Tickets | |
| 117 | -} | |
| 118 | -if {[anoncap j]} { | |
| 119 | - menulink /wiki Wiki | |
| 120 | -} | |
| 121 | -if {[hascap s]} { | |
| 122 | - menulink /setup Admin | |
| 123 | -} elseif {[hascap a]} { | |
| 124 | - menulink /setup_ulist Users | |
| 125 | -} | |
| 126 | 99 | if {[info exists login]} { |
| 127 | - menulink /login Logout | |
| 100 | + html "<a href='$home/logout'>Logout</a>\n" | |
| 128 | 101 | } else { |
| 129 | - menulink /login Login | |
| 102 | + html "<a href='$home/login'>Login</a>\n" | |
| 130 | 103 | } |
| 131 | 104 | </th1></div> |
| 132 | 105 |
| --- skins/enhanced1/header.txt | |
| +++ skins/enhanced1/header.txt | |
| @@ -89,43 +89,16 @@ | |
| 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | } |
| 91 | } |
| 92 | updateClock(); |
| 93 | </script> |
| 94 | <div class="mainmenu"> |
| 95 | <th1> |
| 96 | proc menulink {url name} { |
| 97 | upvar home home |
| 98 | html "<a href='$home$url'>$name</a>\n" |
| 99 | } |
| 100 | menulink $index_page Home |
| 101 | menulink /help Help |
| 102 | if {[anycap jor]} { |
| 103 | menulink /timeline Timeline |
| 104 | } |
| 105 | if {[anoncap oh]} { |
| 106 | menulink /dir?ci=tip Files |
| 107 | } |
| 108 | if {[anoncap o]} { |
| 109 | menulink /brlist Branches |
| 110 | menulink /taglist Tags |
| 111 | } |
| 112 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 113 | menulink /forum Forum |
| 114 | } |
| 115 | if {[anoncap r]} { |
| 116 | menulink /ticket Tickets |
| 117 | } |
| 118 | if {[anoncap j]} { |
| 119 | menulink /wiki Wiki |
| 120 | } |
| 121 | if {[hascap s]} { |
| 122 | menulink /setup Admin |
| 123 | } elseif {[hascap a]} { |
| 124 | menulink /setup_ulist Users |
| 125 | } |
| 126 | if {[info exists login]} { |
| 127 | menulink /login Logout |
| 128 | } else { |
| 129 | menulink /login Login |
| 130 | } |
| 131 | </th1></div> |
| 132 |
| --- skins/enhanced1/header.txt | |
| +++ skins/enhanced1/header.txt | |
| @@ -89,43 +89,16 @@ | |
| 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | } |
| 91 | } |
| 92 | updateClock(); |
| 93 | </script> |
| 94 | <div class="mainmenu"><th1> |
| 95 | foreach {name url expr class} $mainmenu { |
| 96 | if {![capexpr $expr]} continue |
| 97 | html "<a href='$home$url'>$name</a>\n" |
| 98 | } |
| 99 | if {[info exists login]} { |
| 100 | html "<a href='$home/logout'>Logout</a>\n" |
| 101 | } else { |
| 102 | html "<a href='$home/login'>Login</a>\n" |
| 103 | } |
| 104 | </th1></div> |
| 105 |
+6
-28
| --- skins/khaki/header.txt | ||
| +++ skins/khaki/header.txt | ||
| @@ -8,38 +8,16 @@ | ||
| 8 | 8 | } else { |
| 9 | 9 | puts "Not logged in" |
| 10 | 10 | } |
| 11 | 11 | </th1></div> |
| 12 | 12 | </div> |
| 13 | -<div class="mainmenu"> | |
| 14 | -<th1> | |
| 15 | -html "<a href='$home$index_page'>Home</a>\n" | |
| 16 | -if {[anycap jor]} { | |
| 17 | - html "<a href='$home/timeline'>Timeline</a>\n" | |
| 18 | -} | |
| 19 | -if {[anoncap oh]} { | |
| 20 | - html "<a href='$home/tree?ci=tip'>Files</a>\n" | |
| 21 | -} | |
| 22 | -if {[anoncap o]} { | |
| 23 | - html "<a href='$home/brlist'>Branches</a>\n" | |
| 24 | - html "<a href='$home/taglist'>Tags</a>\n" | |
| 25 | -} | |
| 26 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 27 | - html "<a href='$home/forum'>Forum</a>\n" | |
| 28 | -} | |
| 29 | -if {[anoncap r]} { | |
| 30 | - html "<a href='$home/ticket'>Tickets</a>\n" | |
| 31 | -} | |
| 32 | -if {[anoncap j]} { | |
| 33 | - html "<a href='$home/wiki'>Wiki</a>\n" | |
| 34 | -} | |
| 35 | -if {[hascap s]} { | |
| 36 | - html "<a href='$home/setup'>Admin</a>\n" | |
| 37 | -} elseif {[hascap a]} { | |
| 38 | - html "<a href='$home/setup_ulist'>Users</a>\n" | |
| 13 | +<div class="mainmenu"><th1> | |
| 14 | +foreach {name url expr class} $mainmenu { | |
| 15 | + if {![capexpr $expr]} continue | |
| 16 | + html "<a href='$home$url'>$name</a>\n" | |
| 39 | 17 | } |
| 40 | 18 | if {[info exists login]} { |
| 41 | - html "<a href='$home/login'>Logout</a>\n" | |
| 19 | + html "<a href='/logout'>Logout</a>\n" | |
| 42 | 20 | } else { |
| 43 | - html "<a href='$home/login'>Login</a>\n" | |
| 21 | + html "<a href='/login'>Login</a>\n" | |
| 44 | 22 | } |
| 45 | 23 | </th1></div> |
| 46 | 24 |
| --- skins/khaki/header.txt | |
| +++ skins/khaki/header.txt | |
| @@ -8,38 +8,16 @@ | |
| 8 | } else { |
| 9 | puts "Not logged in" |
| 10 | } |
| 11 | </th1></div> |
| 12 | </div> |
| 13 | <div class="mainmenu"> |
| 14 | <th1> |
| 15 | html "<a href='$home$index_page'>Home</a>\n" |
| 16 | if {[anycap jor]} { |
| 17 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 18 | } |
| 19 | if {[anoncap oh]} { |
| 20 | html "<a href='$home/tree?ci=tip'>Files</a>\n" |
| 21 | } |
| 22 | if {[anoncap o]} { |
| 23 | html "<a href='$home/brlist'>Branches</a>\n" |
| 24 | html "<a href='$home/taglist'>Tags</a>\n" |
| 25 | } |
| 26 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 27 | html "<a href='$home/forum'>Forum</a>\n" |
| 28 | } |
| 29 | if {[anoncap r]} { |
| 30 | html "<a href='$home/ticket'>Tickets</a>\n" |
| 31 | } |
| 32 | if {[anoncap j]} { |
| 33 | html "<a href='$home/wiki'>Wiki</a>\n" |
| 34 | } |
| 35 | if {[hascap s]} { |
| 36 | html "<a href='$home/setup'>Admin</a>\n" |
| 37 | } elseif {[hascap a]} { |
| 38 | html "<a href='$home/setup_ulist'>Users</a>\n" |
| 39 | } |
| 40 | if {[info exists login]} { |
| 41 | html "<a href='$home/login'>Logout</a>\n" |
| 42 | } else { |
| 43 | html "<a href='$home/login'>Login</a>\n" |
| 44 | } |
| 45 | </th1></div> |
| 46 |
| --- skins/khaki/header.txt | |
| +++ skins/khaki/header.txt | |
| @@ -8,38 +8,16 @@ | |
| 8 | } else { |
| 9 | puts "Not logged in" |
| 10 | } |
| 11 | </th1></div> |
| 12 | </div> |
| 13 | <div class="mainmenu"><th1> |
| 14 | foreach {name url expr class} $mainmenu { |
| 15 | if {![capexpr $expr]} continue |
| 16 | html "<a href='$home$url'>$name</a>\n" |
| 17 | } |
| 18 | if {[info exists login]} { |
| 19 | html "<a href='/logout'>Logout</a>\n" |
| 20 | } else { |
| 21 | html "<a href='/login'>Login</a>\n" |
| 22 | } |
| 23 | </th1></div> |
| 24 |
+5
-27
| --- skins/original/header.txt | ||
| +++ skins/original/header.txt | ||
| @@ -9,38 +9,16 @@ | ||
| 9 | 9 | } else { |
| 10 | 10 | puts "Not logged in" |
| 11 | 11 | } |
| 12 | 12 | </th1></div> |
| 13 | 13 | </div> |
| 14 | -<div class="mainmenu"> | |
| 15 | -<th1> | |
| 16 | -html "<a href='$home$index_page'>Home</a>\n" | |
| 17 | -if {[anycap jor]} { | |
| 18 | - html "<a href='$home/timeline'>Timeline</a>\n" | |
| 19 | -} | |
| 20 | -if {[anoncap oh]} { | |
| 21 | - html "<a href='$home/tree?ci=tip'>Files</a>\n" | |
| 22 | -} | |
| 23 | -if {[anoncap o]} { | |
| 24 | - html "<a href='$home/brlist'>Branches</a>\n" | |
| 25 | - html "<a href='$home/taglist'>Tags</a>\n" | |
| 26 | -} | |
| 27 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 28 | - html "<a href='$home/forum'>Forum</a>\n" | |
| 29 | -} | |
| 30 | -if {[anoncap r]} { | |
| 31 | - html "<a href='$home/ticket'>Tickets</a>\n" | |
| 32 | -} | |
| 33 | -if {[anoncap j]} { | |
| 34 | - html "<a href='$home/wiki'>Wiki</a>\n" | |
| 35 | -} | |
| 36 | -if {[hascap s]} { | |
| 37 | - html "<a href='$home/setup'>Admin</a>\n" | |
| 38 | -} elseif {[hascap a]} { | |
| 39 | - html "<a href='$home/setup_ulist'>Users</a>\n" | |
| 14 | +<div class="mainmenu"><th1> | |
| 15 | +foreach {name url expr class} $mainmenu { | |
| 16 | + if {![capexpr $expr]} continue | |
| 17 | + html "<a href='$home$url'>$name</a>\n" | |
| 40 | 18 | } |
| 41 | 19 | if {[info exists login]} { |
| 42 | - html "<a href='$home/login'>Logout</a>\n" | |
| 20 | + html "<a href='$home/logout'>Logout</a>\n" | |
| 43 | 21 | } else { |
| 44 | 22 | html "<a href='$home/login'>Login</a>\n" |
| 45 | 23 | } |
| 46 | 24 | </th1></div> |
| 47 | 25 |
| --- skins/original/header.txt | |
| +++ skins/original/header.txt | |
| @@ -9,38 +9,16 @@ | |
| 9 | } else { |
| 10 | puts "Not logged in" |
| 11 | } |
| 12 | </th1></div> |
| 13 | </div> |
| 14 | <div class="mainmenu"> |
| 15 | <th1> |
| 16 | html "<a href='$home$index_page'>Home</a>\n" |
| 17 | if {[anycap jor]} { |
| 18 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 19 | } |
| 20 | if {[anoncap oh]} { |
| 21 | html "<a href='$home/tree?ci=tip'>Files</a>\n" |
| 22 | } |
| 23 | if {[anoncap o]} { |
| 24 | html "<a href='$home/brlist'>Branches</a>\n" |
| 25 | html "<a href='$home/taglist'>Tags</a>\n" |
| 26 | } |
| 27 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 28 | html "<a href='$home/forum'>Forum</a>\n" |
| 29 | } |
| 30 | if {[anoncap r]} { |
| 31 | html "<a href='$home/ticket'>Tickets</a>\n" |
| 32 | } |
| 33 | if {[anoncap j]} { |
| 34 | html "<a href='$home/wiki'>Wiki</a>\n" |
| 35 | } |
| 36 | if {[hascap s]} { |
| 37 | html "<a href='$home/setup'>Admin</a>\n" |
| 38 | } elseif {[hascap a]} { |
| 39 | html "<a href='$home/setup_ulist'>Users</a>\n" |
| 40 | } |
| 41 | if {[info exists login]} { |
| 42 | html "<a href='$home/login'>Logout</a>\n" |
| 43 | } else { |
| 44 | html "<a href='$home/login'>Login</a>\n" |
| 45 | } |
| 46 | </th1></div> |
| 47 |
| --- skins/original/header.txt | |
| +++ skins/original/header.txt | |
| @@ -9,38 +9,16 @@ | |
| 9 | } else { |
| 10 | puts "Not logged in" |
| 11 | } |
| 12 | </th1></div> |
| 13 | </div> |
| 14 | <div class="mainmenu"><th1> |
| 15 | foreach {name url expr class} $mainmenu { |
| 16 | if {![capexpr $expr]} continue |
| 17 | html "<a href='$home$url'>$name</a>\n" |
| 18 | } |
| 19 | if {[info exists login]} { |
| 20 | html "<a href='$home/logout'>Logout</a>\n" |
| 21 | } else { |
| 22 | html "<a href='$home/login'>Login</a>\n" |
| 23 | } |
| 24 | </th1></div> |
| 25 |
+4
-23
| --- skins/plain_gray/header.txt | ||
| +++ skins/plain_gray/header.txt | ||
| @@ -3,35 +3,16 @@ | ||
| 3 | 3 | </div> |
| 4 | 4 | <div class="mainmenu"> |
| 5 | 5 | <th1> |
| 6 | 6 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 7 | 7 | builtin_request_js hbmenu.js |
| 8 | -html "<a href='$home$index_page'>Home</a>\n" | |
| 9 | -if {[anycap jor]} { | |
| 10 | - html "<a href='$home/timeline'>Timeline</a>\n" | |
| 11 | -} | |
| 12 | -if {[anoncap oh]} { | |
| 13 | - html "<a href='$home/tree?ci=tip'>Files</a>\n" | |
| 14 | -} | |
| 15 | -#if {[anoncap o]} { | |
| 16 | -# html "<a href='$home/brlist'>Branches</a>\n" | |
| 17 | -# html "<a href='$home/taglist'>Tags</a>\n" | |
| 18 | -#} | |
| 19 | -#if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 20 | -# html "<a href='$home/forum'>Forum</a>\n" | |
| 21 | -#} | |
| 22 | -#if {[anoncap r]} { | |
| 23 | -# html "<a href='$home/ticket'>Tickets</a>\n" | |
| 24 | -#} | |
| 25 | -#if {[anoncap j]} { | |
| 26 | -# html "<a href='$home/wiki'>Wiki</a>\n" | |
| 27 | -#} | |
| 28 | -if {[hascap s]} { | |
| 29 | - html "<a href='$home/setup'>Admin</a>\n" | |
| 8 | +foreach {name url expr class} $mainmenu { | |
| 9 | + if {![capexpr $expr]} continue | |
| 10 | + html "<a href='$home$url'>$name</a>\n" | |
| 30 | 11 | } |
| 31 | 12 | if {[info exists login]} { |
| 32 | - html "<a href='$home/login'>Logout</a>\n" | |
| 13 | + html "<a href='$home/logout'>Logout</a>\n" | |
| 33 | 14 | } else { |
| 34 | 15 | html "<a href='$home/login'>Login</a>\n" |
| 35 | 16 | } |
| 36 | 17 | </th1></div> |
| 37 | 18 | <div id='hbdrop' class='hbdrop'></div> |
| 38 | 19 |
| --- skins/plain_gray/header.txt | |
| +++ skins/plain_gray/header.txt | |
| @@ -3,35 +3,16 @@ | |
| 3 | </div> |
| 4 | <div class="mainmenu"> |
| 5 | <th1> |
| 6 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 7 | builtin_request_js hbmenu.js |
| 8 | html "<a href='$home$index_page'>Home</a>\n" |
| 9 | if {[anycap jor]} { |
| 10 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 11 | } |
| 12 | if {[anoncap oh]} { |
| 13 | html "<a href='$home/tree?ci=tip'>Files</a>\n" |
| 14 | } |
| 15 | #if {[anoncap o]} { |
| 16 | # html "<a href='$home/brlist'>Branches</a>\n" |
| 17 | # html "<a href='$home/taglist'>Tags</a>\n" |
| 18 | #} |
| 19 | #if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 20 | # html "<a href='$home/forum'>Forum</a>\n" |
| 21 | #} |
| 22 | #if {[anoncap r]} { |
| 23 | # html "<a href='$home/ticket'>Tickets</a>\n" |
| 24 | #} |
| 25 | #if {[anoncap j]} { |
| 26 | # html "<a href='$home/wiki'>Wiki</a>\n" |
| 27 | #} |
| 28 | if {[hascap s]} { |
| 29 | html "<a href='$home/setup'>Admin</a>\n" |
| 30 | } |
| 31 | if {[info exists login]} { |
| 32 | html "<a href='$home/login'>Logout</a>\n" |
| 33 | } else { |
| 34 | html "<a href='$home/login'>Login</a>\n" |
| 35 | } |
| 36 | </th1></div> |
| 37 | <div id='hbdrop' class='hbdrop'></div> |
| 38 |
| --- skins/plain_gray/header.txt | |
| +++ skins/plain_gray/header.txt | |
| @@ -3,35 +3,16 @@ | |
| 3 | </div> |
| 4 | <div class="mainmenu"> |
| 5 | <th1> |
| 6 | html "<a id='hbbtn' href='$home/sitemap' aria-label='Site Map'>☰</a>" |
| 7 | builtin_request_js hbmenu.js |
| 8 | foreach {name url expr class} $mainmenu { |
| 9 | if {![capexpr $expr]} continue |
| 10 | html "<a href='$home$url'>$name</a>\n" |
| 11 | } |
| 12 | if {[info exists login]} { |
| 13 | html "<a href='$home/logout'>Logout</a>\n" |
| 14 | } else { |
| 15 | html "<a href='$home/login'>Login</a>\n" |
| 16 | } |
| 17 | </th1></div> |
| 18 | <div id='hbdrop' class='hbdrop'></div> |
| 19 |
+5
-27
| --- skins/rounded1/header.txt | ||
| +++ skins/rounded1/header.txt | ||
| @@ -10,38 +10,16 @@ | ||
| 10 | 10 | } else { |
| 11 | 11 | puts "Not logged in" |
| 12 | 12 | } |
| 13 | 13 | </th1></div> |
| 14 | 14 | </div> |
| 15 | -<div class="mainmenu"> | |
| 16 | -<th1> | |
| 17 | -html "<a href='$home$index_page'>Home</a>\n" | |
| 18 | -if {[anycap jor]} { | |
| 19 | - html "<a href='$home/timeline'>Timeline</a>\n" | |
| 20 | -} | |
| 21 | -if {[anoncap oh]} { | |
| 22 | - html "<a href='$home/tree?ci=tip'>Files</a>\n" | |
| 23 | -} | |
| 24 | -if {[anoncap o]} { | |
| 25 | - html "<a href='$home/brlist'>Branches</a>\n" | |
| 26 | - html "<a href='$home/taglist'>Tags</a>\n" | |
| 27 | -} | |
| 28 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 29 | - html "<a href='$home/forum'>Forum</a>\n" | |
| 30 | -} | |
| 31 | -if {[anoncap r]} { | |
| 32 | - html "<a href='$home/ticket'>Tickets</a>\n" | |
| 33 | -} | |
| 34 | -if {[anoncap j]} { | |
| 35 | - html "<a href='$home/wiki'>Wiki</a>\n" | |
| 36 | -} | |
| 37 | -if {[hascap s]} { | |
| 38 | - html "<a href='$home/setup'>Admin</a>\n" | |
| 39 | -} elseif {[hascap a]} { | |
| 40 | - html "<a href='$home/setup_ulist'>Users</a>\n" | |
| 15 | +<div class="mainmenu"><th1> | |
| 16 | +foreach {name url expr class} $mainmenu { | |
| 17 | + if {![capexpr $expr]} continue | |
| 18 | + html "<a href='$home$url'>$name</a>\n" | |
| 41 | 19 | } |
| 42 | 20 | if {[info exists login]} { |
| 43 | - html "<a href='$home/login'>Logout</a>\n" | |
| 21 | + html "<a href='$home/logout'>Logout</a>\n" | |
| 44 | 22 | } else { |
| 45 | 23 | html "<a href='$home/login'>Login</a>\n" |
| 46 | 24 | } |
| 47 | 25 | </th1></div> |
| 48 | 26 |
| --- skins/rounded1/header.txt | |
| +++ skins/rounded1/header.txt | |
| @@ -10,38 +10,16 @@ | |
| 10 | } else { |
| 11 | puts "Not logged in" |
| 12 | } |
| 13 | </th1></div> |
| 14 | </div> |
| 15 | <div class="mainmenu"> |
| 16 | <th1> |
| 17 | html "<a href='$home$index_page'>Home</a>\n" |
| 18 | if {[anycap jor]} { |
| 19 | html "<a href='$home/timeline'>Timeline</a>\n" |
| 20 | } |
| 21 | if {[anoncap oh]} { |
| 22 | html "<a href='$home/tree?ci=tip'>Files</a>\n" |
| 23 | } |
| 24 | if {[anoncap o]} { |
| 25 | html "<a href='$home/brlist'>Branches</a>\n" |
| 26 | html "<a href='$home/taglist'>Tags</a>\n" |
| 27 | } |
| 28 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 29 | html "<a href='$home/forum'>Forum</a>\n" |
| 30 | } |
| 31 | if {[anoncap r]} { |
| 32 | html "<a href='$home/ticket'>Tickets</a>\n" |
| 33 | } |
| 34 | if {[anoncap j]} { |
| 35 | html "<a href='$home/wiki'>Wiki</a>\n" |
| 36 | } |
| 37 | if {[hascap s]} { |
| 38 | html "<a href='$home/setup'>Admin</a>\n" |
| 39 | } elseif {[hascap a]} { |
| 40 | html "<a href='$home/setup_ulist'>Users</a>\n" |
| 41 | } |
| 42 | if {[info exists login]} { |
| 43 | html "<a href='$home/login'>Logout</a>\n" |
| 44 | } else { |
| 45 | html "<a href='$home/login'>Login</a>\n" |
| 46 | } |
| 47 | </th1></div> |
| 48 |
| --- skins/rounded1/header.txt | |
| +++ skins/rounded1/header.txt | |
| @@ -10,38 +10,16 @@ | |
| 10 | } else { |
| 11 | puts "Not logged in" |
| 12 | } |
| 13 | </th1></div> |
| 14 | </div> |
| 15 | <div class="mainmenu"><th1> |
| 16 | foreach {name url expr class} $mainmenu { |
| 17 | if {![capexpr $expr]} continue |
| 18 | html "<a href='$home$url'>$name</a>\n" |
| 19 | } |
| 20 | if {[info exists login]} { |
| 21 | html "<a href='$home/logout'>Logout</a>\n" |
| 22 | } else { |
| 23 | html "<a href='$home/login'>Login</a>\n" |
| 24 | } |
| 25 | </th1></div> |
| 26 |
+6
-38
| --- skins/xekri/header.txt | ||
| +++ skins/xekri/header.txt | ||
| @@ -89,48 +89,16 @@ | ||
| 89 | 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | updateClock(); |
| 93 | 93 | </script> |
| 94 | -<div class="mainmenu"> | |
| 95 | -<th1> | |
| 96 | -proc menulink {url name} { | |
| 97 | - upvar current_page current | |
| 98 | - upvar home home | |
| 99 | - if {[string range $url 0 [string length $current]] eq "/$current"} { | |
| 100 | - html "<a href='$home$url' class='active'>$name</a>\n" | |
| 101 | - } else { | |
| 102 | - html "<a href='$home$url'>$name</a>\n" | |
| 103 | - } | |
| 104 | -} | |
| 105 | -menulink $index_page Home | |
| 106 | -if {[anycap jor]} { | |
| 107 | - menulink /timeline Timeline | |
| 108 | -} | |
| 109 | -if {[anoncap oh]} { | |
| 110 | - menulink /dir?ci=tip Files | |
| 111 | -} | |
| 112 | -if {[anoncap o]} { | |
| 113 | - menulink /brlist Branches | |
| 114 | - menulink /taglist Tags | |
| 115 | -} | |
| 116 | -if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { | |
| 117 | - menulink /forum Forum | |
| 118 | -} | |
| 119 | -if {[anoncap r]} { | |
| 120 | - menulink /ticket Tickets | |
| 121 | -} | |
| 122 | -if {[anoncap j]} { | |
| 123 | - menulink /wiki Wiki | |
| 124 | -} | |
| 125 | - menulink /sitemap More... | |
| 126 | -if {[hascap s]} { | |
| 127 | - menulink /setup Admin | |
| 128 | -} elseif {[hascap a]} { | |
| 129 | - menulink /setup_ulist Users | |
| 94 | +<div class="mainmenu"><th1> | |
| 95 | +foreach {name url expr class} $mainmenu { | |
| 96 | + if {![capexpr $expr]} continue | |
| 97 | + html "<a href='$home$url'>$name</a>\n" | |
| 130 | 98 | } |
| 131 | 99 | if {[info exists login]} { |
| 132 | - menulink /login Logout | |
| 100 | + html "<a href='$home/logout'>Logout</a>\n" | |
| 133 | 101 | } else { |
| 134 | - menulink /login Login | |
| 102 | + html "<a href='$home/login'>Login</a>\n" | |
| 135 | 103 | } |
| 136 | 104 | </th1></div> |
| 137 | 105 |
| --- skins/xekri/header.txt | |
| +++ skins/xekri/header.txt | |
| @@ -89,48 +89,16 @@ | |
| 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | } |
| 91 | } |
| 92 | updateClock(); |
| 93 | </script> |
| 94 | <div class="mainmenu"> |
| 95 | <th1> |
| 96 | proc menulink {url name} { |
| 97 | upvar current_page current |
| 98 | upvar home home |
| 99 | if {[string range $url 0 [string length $current]] eq "/$current"} { |
| 100 | html "<a href='$home$url' class='active'>$name</a>\n" |
| 101 | } else { |
| 102 | html "<a href='$home$url'>$name</a>\n" |
| 103 | } |
| 104 | } |
| 105 | menulink $index_page Home |
| 106 | if {[anycap jor]} { |
| 107 | menulink /timeline Timeline |
| 108 | } |
| 109 | if {[anoncap oh]} { |
| 110 | menulink /dir?ci=tip Files |
| 111 | } |
| 112 | if {[anoncap o]} { |
| 113 | menulink /brlist Branches |
| 114 | menulink /taglist Tags |
| 115 | } |
| 116 | if {[anycap 23456] || [anoncap 2] || [anoncap 3]} { |
| 117 | menulink /forum Forum |
| 118 | } |
| 119 | if {[anoncap r]} { |
| 120 | menulink /ticket Tickets |
| 121 | } |
| 122 | if {[anoncap j]} { |
| 123 | menulink /wiki Wiki |
| 124 | } |
| 125 | menulink /sitemap More... |
| 126 | if {[hascap s]} { |
| 127 | menulink /setup Admin |
| 128 | } elseif {[hascap a]} { |
| 129 | menulink /setup_ulist Users |
| 130 | } |
| 131 | if {[info exists login]} { |
| 132 | menulink /login Logout |
| 133 | } else { |
| 134 | menulink /login Login |
| 135 | } |
| 136 | </th1></div> |
| 137 |
| --- skins/xekri/header.txt | |
| +++ skins/xekri/header.txt | |
| @@ -89,48 +89,16 @@ | |
| 89 | setTimeout(updateClock,(60-d.getUTCSeconds())*1000); |
| 90 | } |
| 91 | } |
| 92 | updateClock(); |
| 93 | </script> |
| 94 | <div class="mainmenu"><th1> |
| 95 | foreach {name url expr class} $mainmenu { |
| 96 | if {![capexpr $expr]} continue |
| 97 | html "<a href='$home$url'>$name</a>\n" |
| 98 | } |
| 99 | if {[info exists login]} { |
| 100 | html "<a href='$home/logout'>Logout</a>\n" |
| 101 | } else { |
| 102 | html "<a href='$home/login'>Login</a>\n" |
| 103 | } |
| 104 | </th1></div> |
| 105 |
+1
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -89,10 +89,11 @@ | ||
| 89 | 89 | const char *zName; /* Name of the configuration parameter */ |
| 90 | 90 | int groupMask; /* Which config groups is it part of */ |
| 91 | 91 | } aConfig[] = { |
| 92 | 92 | { "css", CONFIGSET_CSS }, |
| 93 | 93 | { "header", CONFIGSET_SKIN }, |
| 94 | + { "mainmenu", CONFIGSET_SKIN }, | |
| 94 | 95 | { "footer", CONFIGSET_SKIN }, |
| 95 | 96 | { "details", CONFIGSET_SKIN }, |
| 96 | 97 | { "js", CONFIGSET_SKIN }, |
| 97 | 98 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 98 | 99 | { "logo-image", CONFIGSET_SKIN }, |
| 99 | 100 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -89,10 +89,11 @@ | |
| 89 | const char *zName; /* Name of the configuration parameter */ |
| 90 | int groupMask; /* Which config groups is it part of */ |
| 91 | } aConfig[] = { |
| 92 | { "css", CONFIGSET_CSS }, |
| 93 | { "header", CONFIGSET_SKIN }, |
| 94 | { "footer", CONFIGSET_SKIN }, |
| 95 | { "details", CONFIGSET_SKIN }, |
| 96 | { "js", CONFIGSET_SKIN }, |
| 97 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 98 | { "logo-image", CONFIGSET_SKIN }, |
| 99 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -89,10 +89,11 @@ | |
| 89 | const char *zName; /* Name of the configuration parameter */ |
| 90 | int groupMask; /* Which config groups is it part of */ |
| 91 | } aConfig[] = { |
| 92 | { "css", CONFIGSET_CSS }, |
| 93 | { "header", CONFIGSET_SKIN }, |
| 94 | { "mainmenu", CONFIGSET_SKIN }, |
| 95 | { "footer", CONFIGSET_SKIN }, |
| 96 | { "details", CONFIGSET_SKIN }, |
| 97 | { "js", CONFIGSET_SKIN }, |
| 98 | { "logo-mimetype", CONFIGSET_SKIN }, |
| 99 | { "logo-image", CONFIGSET_SKIN }, |
| 100 |
+28
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -1016,10 +1016,38 @@ | ||
| 1016 | 1016 | @ <p>Note: To avoid a redirect loop or other problems, this entry must |
| 1017 | 1017 | @ begin with "/" and it must specify a valid page. For example, |
| 1018 | 1018 | @ "<b>/home</b>" will work but "<b>home</b>" will not, since it omits the |
| 1019 | 1019 | @ leading "/".</p> |
| 1020 | 1020 | @ <p>(Property: "index-page") |
| 1021 | + @ <hr> | |
| 1022 | + @ <p>The main menu for the web interface | |
| 1023 | + @ <p> | |
| 1024 | + @ | |
| 1025 | + @ <p>This setting should be a TCL list. Each set of four consecutive | |
| 1026 | + @ values defines a single main menu item: | |
| 1027 | + @ <ol> | |
| 1028 | + @ <li> The first term is text that appears on the menu. | |
| 1029 | + @ <li> The second term is a hyperlink to take when a user clicks on the | |
| 1030 | + @ entry. Hyperlinks that start with "/" are relative to the | |
| 1031 | + @ repository root. | |
| 1032 | + @ <li> The third term is an argument to the TH1 "capexpr" command. | |
| 1033 | + @ If capexpr evalutes to true, then the entry is shown. If not, | |
| 1034 | + @ the entry is omitted. "*" is always true. "{}" is never true. | |
| 1035 | + @ <li> The fouth term is a list of extra class names to apply to the new | |
| 1036 | + @ menu entry. Some skins will classes "desktoponly" and "wideonly" | |
| 1037 | + @ to only show the entries when the web browser screen is wide or | |
| 1038 | + @ very wide, respectively. | |
| 1039 | + @ </ol> | |
| 1040 | + @ | |
| 1041 | + @ <p>Some custom skins might not use this property. Whether the property | |
| 1042 | + @ is used or a choice made by the skin designer. Some skins add an extra | |
| 1043 | + @ choices (such as the hamburger button) to the menu that are not shown | |
| 1044 | + @ on this list. | |
| 1045 | + @ (Property: mainmenu) | |
| 1046 | + textarea_attribute("Main Menu", 12, 80, | |
| 1047 | + "mainmenu", "mmenu", style_default_mainmenu(), 0); | |
| 1048 | + @ | |
| 1021 | 1049 | @ <hr> |
| 1022 | 1050 | @ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page, |
| 1023 | 1051 | @ as sub-items of the "Home Page" entry, appearing before the |
| 1024 | 1052 | @ "Documentation Search" entry (if any). In skins that use the /sitemap |
| 1025 | 1053 | @ page to construct a hamburger menu dropdown, new entries added here |
| 1026 | 1054 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1016,10 +1016,38 @@ | |
| 1016 | @ <p>Note: To avoid a redirect loop or other problems, this entry must |
| 1017 | @ begin with "/" and it must specify a valid page. For example, |
| 1018 | @ "<b>/home</b>" will work but "<b>home</b>" will not, since it omits the |
| 1019 | @ leading "/".</p> |
| 1020 | @ <p>(Property: "index-page") |
| 1021 | @ <hr> |
| 1022 | @ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page, |
| 1023 | @ as sub-items of the "Home Page" entry, appearing before the |
| 1024 | @ "Documentation Search" entry (if any). In skins that use the /sitemap |
| 1025 | @ page to construct a hamburger menu dropdown, new entries added here |
| 1026 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -1016,10 +1016,38 @@ | |
| 1016 | @ <p>Note: To avoid a redirect loop or other problems, this entry must |
| 1017 | @ begin with "/" and it must specify a valid page. For example, |
| 1018 | @ "<b>/home</b>" will work but "<b>home</b>" will not, since it omits the |
| 1019 | @ leading "/".</p> |
| 1020 | @ <p>(Property: "index-page") |
| 1021 | @ <hr> |
| 1022 | @ <p>The main menu for the web interface |
| 1023 | @ <p> |
| 1024 | @ |
| 1025 | @ <p>This setting should be a TCL list. Each set of four consecutive |
| 1026 | @ values defines a single main menu item: |
| 1027 | @ <ol> |
| 1028 | @ <li> The first term is text that appears on the menu. |
| 1029 | @ <li> The second term is a hyperlink to take when a user clicks on the |
| 1030 | @ entry. Hyperlinks that start with "/" are relative to the |
| 1031 | @ repository root. |
| 1032 | @ <li> The third term is an argument to the TH1 "capexpr" command. |
| 1033 | @ If capexpr evalutes to true, then the entry is shown. If not, |
| 1034 | @ the entry is omitted. "*" is always true. "{}" is never true. |
| 1035 | @ <li> The fouth term is a list of extra class names to apply to the new |
| 1036 | @ menu entry. Some skins will classes "desktoponly" and "wideonly" |
| 1037 | @ to only show the entries when the web browser screen is wide or |
| 1038 | @ very wide, respectively. |
| 1039 | @ </ol> |
| 1040 | @ |
| 1041 | @ <p>Some custom skins might not use this property. Whether the property |
| 1042 | @ is used or a choice made by the skin designer. Some skins add an extra |
| 1043 | @ choices (such as the hamburger button) to the menu that are not shown |
| 1044 | @ on this list. |
| 1045 | @ (Property: mainmenu) |
| 1046 | textarea_attribute("Main Menu", 12, 80, |
| 1047 | "mainmenu", "mmenu", style_default_mainmenu(), 0); |
| 1048 | @ |
| 1049 | @ <hr> |
| 1050 | @ <p>Extra links to appear on the <a href="%R/sitemap">/sitemap</a> page, |
| 1051 | @ as sub-items of the "Home Page" entry, appearing before the |
| 1052 | @ "Documentation Search" entry (if any). In skins that use the /sitemap |
| 1053 | @ page to construct a hamburger menu dropdown, new entries added here |
| 1054 |
+24
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -595,10 +595,33 @@ | ||
| 595 | 595 | ** Returns the default page header. |
| 596 | 596 | */ |
| 597 | 597 | const char *get_default_header(){ |
| 598 | 598 | return zDfltHeader; |
| 599 | 599 | } |
| 600 | + | |
| 601 | +/* | |
| 602 | +** The default TCL list that defines the main menu. | |
| 603 | +*/ | |
| 604 | +static const char zDfltMainMenu[] = | |
| 605 | +@ Home /home * {} | |
| 606 | +@ Timeline /timeline {o r j} {} | |
| 607 | +@ Files /dir?ci=tip oh desktoponly | |
| 608 | +@ Branches /brlist o wideonly | |
| 609 | +@ Tags /taglist o wideonly | |
| 610 | +@ Forum /forum {@2 3 4 5 6} wideonly | |
| 611 | +@ Chat /chat C wideonly | |
| 612 | +@ Tickets /ticket r wideonly | |
| 613 | +@ Wiki /wiki j wideonly | |
| 614 | +@ Setup /setup s {} | |
| 615 | +; | |
| 616 | + | |
| 617 | +/* | |
| 618 | +** Return the default menu | |
| 619 | +*/ | |
| 620 | +const char *style_default_mainmenu(void){ | |
| 621 | + return zDfltMainMenu; | |
| 622 | +} | |
| 600 | 623 | |
| 601 | 624 | /* |
| 602 | 625 | ** Given a URL path, extract the first element as a "feature" name, |
| 603 | 626 | ** used as the <body class="FEATURE"> value by default, though |
| 604 | 627 | ** later-running code may override this, typically to group multiple |
| @@ -659,10 +682,11 @@ | ||
| 659 | 682 | Th_Store("csrf_token", g.zCsrfToken); |
| 660 | 683 | Th_Store("release_version", RELEASE_VERSION); |
| 661 | 684 | Th_Store("manifest_version", MANIFEST_VERSION); |
| 662 | 685 | Th_Store("manifest_date", MANIFEST_DATE); |
| 663 | 686 | Th_Store("compiler_name", COMPILER_NAME); |
| 687 | + Th_Store("mainmenu", db_get("mainmenu", style_default_mainmenu())); | |
| 664 | 688 | url_var("stylesheet", "css", "style.css"); |
| 665 | 689 | image_url_var("logo"); |
| 666 | 690 | image_url_var("background"); |
| 667 | 691 | if( !login_is_nobody() ){ |
| 668 | 692 | Th_Store("login", g.zLogin); |
| 669 | 693 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -595,10 +595,33 @@ | |
| 595 | ** Returns the default page header. |
| 596 | */ |
| 597 | const char *get_default_header(){ |
| 598 | return zDfltHeader; |
| 599 | } |
| 600 | |
| 601 | /* |
| 602 | ** Given a URL path, extract the first element as a "feature" name, |
| 603 | ** used as the <body class="FEATURE"> value by default, though |
| 604 | ** later-running code may override this, typically to group multiple |
| @@ -659,10 +682,11 @@ | |
| 659 | Th_Store("csrf_token", g.zCsrfToken); |
| 660 | Th_Store("release_version", RELEASE_VERSION); |
| 661 | Th_Store("manifest_version", MANIFEST_VERSION); |
| 662 | Th_Store("manifest_date", MANIFEST_DATE); |
| 663 | Th_Store("compiler_name", COMPILER_NAME); |
| 664 | url_var("stylesheet", "css", "style.css"); |
| 665 | image_url_var("logo"); |
| 666 | image_url_var("background"); |
| 667 | if( !login_is_nobody() ){ |
| 668 | Th_Store("login", g.zLogin); |
| 669 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -595,10 +595,33 @@ | |
| 595 | ** Returns the default page header. |
| 596 | */ |
| 597 | const char *get_default_header(){ |
| 598 | return zDfltHeader; |
| 599 | } |
| 600 | |
| 601 | /* |
| 602 | ** The default TCL list that defines the main menu. |
| 603 | */ |
| 604 | static const char zDfltMainMenu[] = |
| 605 | @ Home /home * {} |
| 606 | @ Timeline /timeline {o r j} {} |
| 607 | @ Files /dir?ci=tip oh desktoponly |
| 608 | @ Branches /brlist o wideonly |
| 609 | @ Tags /taglist o wideonly |
| 610 | @ Forum /forum {@2 3 4 5 6} wideonly |
| 611 | @ Chat /chat C wideonly |
| 612 | @ Tickets /ticket r wideonly |
| 613 | @ Wiki /wiki j wideonly |
| 614 | @ Setup /setup s {} |
| 615 | ; |
| 616 | |
| 617 | /* |
| 618 | ** Return the default menu |
| 619 | */ |
| 620 | const char *style_default_mainmenu(void){ |
| 621 | return zDfltMainMenu; |
| 622 | } |
| 623 | |
| 624 | /* |
| 625 | ** Given a URL path, extract the first element as a "feature" name, |
| 626 | ** used as the <body class="FEATURE"> value by default, though |
| 627 | ** later-running code may override this, typically to group multiple |
| @@ -659,10 +682,11 @@ | |
| 682 | Th_Store("csrf_token", g.zCsrfToken); |
| 683 | Th_Store("release_version", RELEASE_VERSION); |
| 684 | Th_Store("manifest_version", MANIFEST_VERSION); |
| 685 | Th_Store("manifest_date", MANIFEST_DATE); |
| 686 | Th_Store("compiler_name", COMPILER_NAME); |
| 687 | Th_Store("mainmenu", db_get("mainmenu", style_default_mainmenu())); |
| 688 | url_var("stylesheet", "css", "style.css"); |
| 689 | image_url_var("logo"); |
| 690 | image_url_var("background"); |
| 691 | if( !login_is_nobody() ){ |
| 692 | Th_Store("login", g.zLogin); |
| 693 |
+24
| --- src/th_lang.c | ||
| +++ src/th_lang.c | ||
| @@ -885,10 +885,33 @@ | ||
| 885 | 885 | return Th_SetResultInt(interp, argl[2]); |
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | /* |
| 889 | 889 | ** TH Syntax: |
| 890 | +** | |
| 891 | +** string match PATTERN STRING | |
| 892 | +** | |
| 893 | +*/ | |
| 894 | +static int string_match_command( | |
| 895 | + Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl | |
| 896 | +){ | |
| 897 | + extern char *fossil_strndup(const char*,int); | |
| 898 | + char *zPat, *zStr; | |
| 899 | + int rc; | |
| 900 | + if( argc!=4 ){ | |
| 901 | + return Th_WrongNumArgs(interp, "string match pattern string"); | |
| 902 | + } | |
| 903 | + zPat = fossil_strndup(argv[2],argl[2]); | |
| 904 | + zStr = fossil_strndup(argv[3],argl[3]); | |
| 905 | + rc = sqlite3_strglob(zPat,zStr); | |
| 906 | + fossil_free(zPat); | |
| 907 | + fossil_free(zStr); | |
| 908 | + return Th_SetResultInt(interp, !rc); | |
| 909 | +} | |
| 910 | + | |
| 911 | +/* | |
| 912 | +** TH Syntax: | |
| 890 | 913 | ** |
| 891 | 914 | ** string range STRING FIRST LAST |
| 892 | 915 | */ |
| 893 | 916 | static int string_range_command( |
| 894 | 917 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1155,10 +1178,11 @@ | ||
| 1155 | 1178 | { "first", string_first_command }, |
| 1156 | 1179 | { "index", string_index_command }, |
| 1157 | 1180 | { "is", string_is_command }, |
| 1158 | 1181 | { "last", string_last_command }, |
| 1159 | 1182 | { "length", string_length_command }, |
| 1183 | + { "match", string_match_command }, | |
| 1160 | 1184 | { "range", string_range_command }, |
| 1161 | 1185 | { "repeat", string_repeat_command }, |
| 1162 | 1186 | { "trim", string_trim_command }, |
| 1163 | 1187 | { "trimleft", string_trim_command }, |
| 1164 | 1188 | { "trimright", string_trim_command }, |
| 1165 | 1189 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -885,10 +885,33 @@ | |
| 885 | return Th_SetResultInt(interp, argl[2]); |
| 886 | } |
| 887 | |
| 888 | /* |
| 889 | ** TH Syntax: |
| 890 | ** |
| 891 | ** string range STRING FIRST LAST |
| 892 | */ |
| 893 | static int string_range_command( |
| 894 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1155,10 +1178,11 @@ | |
| 1155 | { "first", string_first_command }, |
| 1156 | { "index", string_index_command }, |
| 1157 | { "is", string_is_command }, |
| 1158 | { "last", string_last_command }, |
| 1159 | { "length", string_length_command }, |
| 1160 | { "range", string_range_command }, |
| 1161 | { "repeat", string_repeat_command }, |
| 1162 | { "trim", string_trim_command }, |
| 1163 | { "trimleft", string_trim_command }, |
| 1164 | { "trimright", string_trim_command }, |
| 1165 |
| --- src/th_lang.c | |
| +++ src/th_lang.c | |
| @@ -885,10 +885,33 @@ | |
| 885 | return Th_SetResultInt(interp, argl[2]); |
| 886 | } |
| 887 | |
| 888 | /* |
| 889 | ** TH Syntax: |
| 890 | ** |
| 891 | ** string match PATTERN STRING |
| 892 | ** |
| 893 | */ |
| 894 | static int string_match_command( |
| 895 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| 896 | ){ |
| 897 | extern char *fossil_strndup(const char*,int); |
| 898 | char *zPat, *zStr; |
| 899 | int rc; |
| 900 | if( argc!=4 ){ |
| 901 | return Th_WrongNumArgs(interp, "string match pattern string"); |
| 902 | } |
| 903 | zPat = fossil_strndup(argv[2],argl[2]); |
| 904 | zStr = fossil_strndup(argv[3],argl[3]); |
| 905 | rc = sqlite3_strglob(zPat,zStr); |
| 906 | fossil_free(zPat); |
| 907 | fossil_free(zStr); |
| 908 | return Th_SetResultInt(interp, !rc); |
| 909 | } |
| 910 | |
| 911 | /* |
| 912 | ** TH Syntax: |
| 913 | ** |
| 914 | ** string range STRING FIRST LAST |
| 915 | */ |
| 916 | static int string_range_command( |
| 917 | Th_Interp *interp, void *ctx, int argc, const char **argv, int *argl |
| @@ -1155,10 +1178,11 @@ | |
| 1178 | { "first", string_first_command }, |
| 1179 | { "index", string_index_command }, |
| 1180 | { "is", string_is_command }, |
| 1181 | { "last", string_last_command }, |
| 1182 | { "length", string_length_command }, |
| 1183 | { "match", string_match_command }, |
| 1184 | { "range", string_range_command }, |
| 1185 | { "repeat", string_repeat_command }, |
| 1186 | { "trim", string_trim_command }, |
| 1187 | { "trimleft", string_trim_command }, |
| 1188 | { "trimright", string_trim_command }, |
| 1189 |