Fossil SCM
More improvements to the title of the /ckout page. Add a link to the /ckout page from the /sitemap, when the /ckout page is valid.
Commit
3f6a7e511390ad75eb39310494b1bffe12f792bfdea49af512b163f73a78bc7c
Parent
e850ce1cb2a47f4…
2 files changed
+2
-2
+3
-39
+2
-2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -640,13 +640,13 @@ | ||
| 640 | 640 | if( strncmp(zCwd, zHome, nHome)==0 && zCwd[nHome]=='/' ){ |
| 641 | 641 | zCwd = mprintf("~%s", zCwd+nHome); |
| 642 | 642 | } |
| 643 | 643 | } |
| 644 | 644 | if( zHostname ){ |
| 645 | - style_header("%h on %h", zCwd, zHostname); | |
| 645 | + style_header("Checkout Status: %h on %h", zCwd, zHostname); | |
| 646 | 646 | }else{ |
| 647 | - style_header("%h", zCwd); | |
| 647 | + style_header("Checkout Status: %h", zCwd); | |
| 648 | 648 | } |
| 649 | 649 | render_checkin_context(vid, 0, 0, 0); |
| 650 | 650 | db_prepare(&q, |
| 651 | 651 | /* 0 1 2 3 4 5 6 */ |
| 652 | 652 | "SELECT pathname, deleted, chnged , rid==0, rid, islink, uuid" |
| 653 | 653 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -640,13 +640,13 @@ | |
| 640 | if( strncmp(zCwd, zHome, nHome)==0 && zCwd[nHome]=='/' ){ |
| 641 | zCwd = mprintf("~%s", zCwd+nHome); |
| 642 | } |
| 643 | } |
| 644 | if( zHostname ){ |
| 645 | style_header("%h on %h", zCwd, zHostname); |
| 646 | }else{ |
| 647 | style_header("%h", zCwd); |
| 648 | } |
| 649 | render_checkin_context(vid, 0, 0, 0); |
| 650 | db_prepare(&q, |
| 651 | /* 0 1 2 3 4 5 6 */ |
| 652 | "SELECT pathname, deleted, chnged , rid==0, rid, islink, uuid" |
| 653 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -640,13 +640,13 @@ | |
| 640 | if( strncmp(zCwd, zHome, nHome)==0 && zCwd[nHome]=='/' ){ |
| 641 | zCwd = mprintf("~%s", zCwd+nHome); |
| 642 | } |
| 643 | } |
| 644 | if( zHostname ){ |
| 645 | style_header("Checkout Status: %h on %h", zCwd, zHostname); |
| 646 | }else{ |
| 647 | style_header("Checkout Status: %h", zCwd); |
| 648 | } |
| 649 | render_checkin_context(vid, 0, 0, 0); |
| 650 | db_prepare(&q, |
| 651 | /* 0 1 2 3 4 5 6 */ |
| 652 | "SELECT pathname, deleted, chnged , rid==0, rid, islink, uuid" |
| 653 |
+3
-39
| --- src/sitemap.c | ||
| +++ src/sitemap.c | ||
| @@ -56,22 +56,10 @@ | ||
| 56 | 56 | int i; |
| 57 | 57 | int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */ |
| 58 | 58 | int e = atoi(PD("e","0")); |
| 59 | 59 | const char *zExtra; |
| 60 | 60 | |
| 61 | -#if 0 /* Removed 2021-01-26 */ | |
| 62 | - const struct { | |
| 63 | - const char *zTitle; | |
| 64 | - const char *zProperty; | |
| 65 | - } aExtra[] = { | |
| 66 | - { "Documentation", "sitemap-docidx" }, | |
| 67 | - { "Download", "sitemap-download" }, | |
| 68 | - { "License", "sitemap-license" }, | |
| 69 | - { "Contact", "sitemap-contact" }, | |
| 70 | - }; | |
| 71 | -#endif | |
| 72 | - | |
| 73 | 61 | login_check_credentials(); |
| 74 | 62 | if( P("popup")!=0 ){ |
| 75 | 63 | /* The "popup" query parameter |
| 76 | 64 | ** then disable anti-robot defenses */ |
| 77 | 65 | isPopup = 1; |
| @@ -87,26 +75,10 @@ | ||
| 87 | 75 | @ <ul id="sitemap" class="columns" style="column-width:20em"> |
| 88 | 76 | if( (e&1)==0 ){ |
| 89 | 77 | @ <li>%z(href("%R/home"))Home Page</a> |
| 90 | 78 | } |
| 91 | 79 | |
| 92 | -#if 0 /* Removed 2021-01-26 */ | |
| 93 | - for(i=0; i<sizeof(aExtra)/sizeof(aExtra[0]); i++){ | |
| 94 | - char *z = db_get(aExtra[i].zProperty,0); | |
| 95 | - if( z==0 || z[0]==0 ) continue; | |
| 96 | - if( !inSublist ){ | |
| 97 | - @ <ul> | |
| 98 | - inSublist = 1; | |
| 99 | - } | |
| 100 | - if( z[0]=='/' ){ | |
| 101 | - @ <li>%z(href("%R%s",z))%s(aExtra[i].zTitle)</a></li> | |
| 102 | - }else{ | |
| 103 | - @ <li>%z(href("%s",z))%s(aExtra[i].zTitle)</a></li> | |
| 104 | - } | |
| 105 | - } | |
| 106 | -#endif | |
| 107 | - | |
| 108 | 80 | zExtra = db_get("sitemap-extra",0); |
| 109 | 81 | if( zExtra && (e&2)==0 ){ |
| 110 | 82 | int rc; |
| 111 | 83 | char **azExtra = 0; |
| 112 | 84 | int *anExtra; |
| @@ -139,26 +111,18 @@ | ||
| 139 | 111 | } |
| 140 | 112 | Th_Free(g.interp, azExtra); |
| 141 | 113 | } |
| 142 | 114 | if( (e&1)!=0 ) goto end_of_sitemap; |
| 143 | 115 | |
| 144 | -#if 0 /* Removed on 2021-02-11. Make a sitemap-extra entry if you */ | |
| 145 | - /* really want this */ | |
| 146 | - if( srchFlags & SRCH_DOC ){ | |
| 147 | - if( !inSublist ){ | |
| 148 | - @ <ul> | |
| 149 | - inSublist = 1; | |
| 150 | - } | |
| 151 | - @ <li>%z(href("%R/docsrch"))Documentation Search</a></li> | |
| 152 | - } | |
| 153 | -#endif | |
| 154 | - | |
| 155 | 116 | if( inSublist ){ |
| 156 | 117 | @ </ul> |
| 157 | 118 | inSublist = 0; |
| 158 | 119 | } |
| 159 | 120 | @ </li> |
| 121 | + if( db_open_local(0) && cgi_is_loopback(g.zIpAddr) ){ | |
| 122 | + @ <li>%z(href("%R/ckout"))Checkout Status</a></li> | |
| 123 | + } | |
| 160 | 124 | if( g.perm.Read ){ |
| 161 | 125 | const char *zEditGlob = db_get("fileedit-glob",""); |
| 162 | 126 | @ <li>%z(href("%R/tree"))File Browser</a> |
| 163 | 127 | @ <ul> |
| 164 | 128 | @ <li>%z(href("%R/tree?type=tree&ci=trunk"))Tree-view, |
| 165 | 129 |
| --- src/sitemap.c | |
| +++ src/sitemap.c | |
| @@ -56,22 +56,10 @@ | |
| 56 | int i; |
| 57 | int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */ |
| 58 | int e = atoi(PD("e","0")); |
| 59 | const char *zExtra; |
| 60 | |
| 61 | #if 0 /* Removed 2021-01-26 */ |
| 62 | const struct { |
| 63 | const char *zTitle; |
| 64 | const char *zProperty; |
| 65 | } aExtra[] = { |
| 66 | { "Documentation", "sitemap-docidx" }, |
| 67 | { "Download", "sitemap-download" }, |
| 68 | { "License", "sitemap-license" }, |
| 69 | { "Contact", "sitemap-contact" }, |
| 70 | }; |
| 71 | #endif |
| 72 | |
| 73 | login_check_credentials(); |
| 74 | if( P("popup")!=0 ){ |
| 75 | /* The "popup" query parameter |
| 76 | ** then disable anti-robot defenses */ |
| 77 | isPopup = 1; |
| @@ -87,26 +75,10 @@ | |
| 87 | @ <ul id="sitemap" class="columns" style="column-width:20em"> |
| 88 | if( (e&1)==0 ){ |
| 89 | @ <li>%z(href("%R/home"))Home Page</a> |
| 90 | } |
| 91 | |
| 92 | #if 0 /* Removed 2021-01-26 */ |
| 93 | for(i=0; i<sizeof(aExtra)/sizeof(aExtra[0]); i++){ |
| 94 | char *z = db_get(aExtra[i].zProperty,0); |
| 95 | if( z==0 || z[0]==0 ) continue; |
| 96 | if( !inSublist ){ |
| 97 | @ <ul> |
| 98 | inSublist = 1; |
| 99 | } |
| 100 | if( z[0]=='/' ){ |
| 101 | @ <li>%z(href("%R%s",z))%s(aExtra[i].zTitle)</a></li> |
| 102 | }else{ |
| 103 | @ <li>%z(href("%s",z))%s(aExtra[i].zTitle)</a></li> |
| 104 | } |
| 105 | } |
| 106 | #endif |
| 107 | |
| 108 | zExtra = db_get("sitemap-extra",0); |
| 109 | if( zExtra && (e&2)==0 ){ |
| 110 | int rc; |
| 111 | char **azExtra = 0; |
| 112 | int *anExtra; |
| @@ -139,26 +111,18 @@ | |
| 139 | } |
| 140 | Th_Free(g.interp, azExtra); |
| 141 | } |
| 142 | if( (e&1)!=0 ) goto end_of_sitemap; |
| 143 | |
| 144 | #if 0 /* Removed on 2021-02-11. Make a sitemap-extra entry if you */ |
| 145 | /* really want this */ |
| 146 | if( srchFlags & SRCH_DOC ){ |
| 147 | if( !inSublist ){ |
| 148 | @ <ul> |
| 149 | inSublist = 1; |
| 150 | } |
| 151 | @ <li>%z(href("%R/docsrch"))Documentation Search</a></li> |
| 152 | } |
| 153 | #endif |
| 154 | |
| 155 | if( inSublist ){ |
| 156 | @ </ul> |
| 157 | inSublist = 0; |
| 158 | } |
| 159 | @ </li> |
| 160 | if( g.perm.Read ){ |
| 161 | const char *zEditGlob = db_get("fileedit-glob",""); |
| 162 | @ <li>%z(href("%R/tree"))File Browser</a> |
| 163 | @ <ul> |
| 164 | @ <li>%z(href("%R/tree?type=tree&ci=trunk"))Tree-view, |
| 165 |
| --- src/sitemap.c | |
| +++ src/sitemap.c | |
| @@ -56,22 +56,10 @@ | |
| 56 | int i; |
| 57 | int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */ |
| 58 | int e = atoi(PD("e","0")); |
| 59 | const char *zExtra; |
| 60 | |
| 61 | login_check_credentials(); |
| 62 | if( P("popup")!=0 ){ |
| 63 | /* The "popup" query parameter |
| 64 | ** then disable anti-robot defenses */ |
| 65 | isPopup = 1; |
| @@ -87,26 +75,10 @@ | |
| 75 | @ <ul id="sitemap" class="columns" style="column-width:20em"> |
| 76 | if( (e&1)==0 ){ |
| 77 | @ <li>%z(href("%R/home"))Home Page</a> |
| 78 | } |
| 79 | |
| 80 | zExtra = db_get("sitemap-extra",0); |
| 81 | if( zExtra && (e&2)==0 ){ |
| 82 | int rc; |
| 83 | char **azExtra = 0; |
| 84 | int *anExtra; |
| @@ -139,26 +111,18 @@ | |
| 111 | } |
| 112 | Th_Free(g.interp, azExtra); |
| 113 | } |
| 114 | if( (e&1)!=0 ) goto end_of_sitemap; |
| 115 | |
| 116 | if( inSublist ){ |
| 117 | @ </ul> |
| 118 | inSublist = 0; |
| 119 | } |
| 120 | @ </li> |
| 121 | if( db_open_local(0) && cgi_is_loopback(g.zIpAddr) ){ |
| 122 | @ <li>%z(href("%R/ckout"))Checkout Status</a></li> |
| 123 | } |
| 124 | if( g.perm.Read ){ |
| 125 | const char *zEditGlob = db_get("fileedit-glob",""); |
| 126 | @ <li>%z(href("%R/tree"))File Browser</a> |
| 127 | @ <ul> |
| 128 | @ <li>%z(href("%R/tree?type=tree&ci=trunk"))Tree-view, |
| 129 |