Fossil SCM
On the /artifact page, only show the "Line Numbers" checkbox if the artifact is displayed as text/plain.
Commit
40c40f7fe6136d52ad09188f9391b19351d3926d26d5e9cebc0bfa89617ff666
Parent
92406fa4454ffed…
1 file changed
+3
-3
+3
-3
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2251,13 +2251,10 @@ | ||
| 2251 | 2251 | style_submenu_element("Parsed", "%R/info/%s", zUuid); |
| 2252 | 2252 | } |
| 2253 | 2253 | if( descOnly ){ |
| 2254 | 2254 | style_submenu_element("Content", "%R/artifact/%s", zUuid); |
| 2255 | 2255 | }else{ |
| 2256 | - if( zLn==0 || atoi(zLn)==0 ){ | |
| 2257 | - style_submenu_checkbox("ln", "Line Numbers", 0, 0); | |
| 2258 | - } | |
| 2259 | 2256 | @ <hr /> |
| 2260 | 2257 | content_get(rid, &content); |
| 2261 | 2258 | if( renderAsWiki ){ |
| 2262 | 2259 | wiki_render_by_mimetype(&content, zMime); |
| 2263 | 2260 | }else if( renderAsHtml ){ |
| @@ -2272,10 +2269,13 @@ | ||
| 2272 | 2269 | @ } |
| 2273 | 2270 | @ ); |
| 2274 | 2271 | @ </script> |
| 2275 | 2272 | }else{ |
| 2276 | 2273 | style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 2274 | + if( zLn==0 || atoi(zLn)==0 ){ | |
| 2275 | + style_submenu_checkbox("ln", "Line Numbers", 0, 0); | |
| 2276 | + } | |
| 2277 | 2277 | blob_to_utf8_no_bom(&content, 0); |
| 2278 | 2278 | zMime = mimetype_from_content(&content); |
| 2279 | 2279 | @ <blockquote> |
| 2280 | 2280 | if( zMime==0 ){ |
| 2281 | 2281 | const char *z; |
| 2282 | 2282 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2251,13 +2251,10 @@ | |
| 2251 | style_submenu_element("Parsed", "%R/info/%s", zUuid); |
| 2252 | } |
| 2253 | if( descOnly ){ |
| 2254 | style_submenu_element("Content", "%R/artifact/%s", zUuid); |
| 2255 | }else{ |
| 2256 | if( zLn==0 || atoi(zLn)==0 ){ |
| 2257 | style_submenu_checkbox("ln", "Line Numbers", 0, 0); |
| 2258 | } |
| 2259 | @ <hr /> |
| 2260 | content_get(rid, &content); |
| 2261 | if( renderAsWiki ){ |
| 2262 | wiki_render_by_mimetype(&content, zMime); |
| 2263 | }else if( renderAsHtml ){ |
| @@ -2272,10 +2269,13 @@ | |
| 2272 | @ } |
| 2273 | @ ); |
| 2274 | @ </script> |
| 2275 | }else{ |
| 2276 | style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 2277 | blob_to_utf8_no_bom(&content, 0); |
| 2278 | zMime = mimetype_from_content(&content); |
| 2279 | @ <blockquote> |
| 2280 | if( zMime==0 ){ |
| 2281 | const char *z; |
| 2282 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2251,13 +2251,10 @@ | |
| 2251 | style_submenu_element("Parsed", "%R/info/%s", zUuid); |
| 2252 | } |
| 2253 | if( descOnly ){ |
| 2254 | style_submenu_element("Content", "%R/artifact/%s", zUuid); |
| 2255 | }else{ |
| 2256 | @ <hr /> |
| 2257 | content_get(rid, &content); |
| 2258 | if( renderAsWiki ){ |
| 2259 | wiki_render_by_mimetype(&content, zMime); |
| 2260 | }else if( renderAsHtml ){ |
| @@ -2272,10 +2269,13 @@ | |
| 2269 | @ } |
| 2270 | @ ); |
| 2271 | @ </script> |
| 2272 | }else{ |
| 2273 | style_submenu_element("Hex", "%s/hexdump?name=%s", g.zTop, zUuid); |
| 2274 | if( zLn==0 || atoi(zLn)==0 ){ |
| 2275 | style_submenu_checkbox("ln", "Line Numbers", 0, 0); |
| 2276 | } |
| 2277 | blob_to_utf8_no_bom(&content, 0); |
| 2278 | zMime = mimetype_from_content(&content); |
| 2279 | @ <blockquote> |
| 2280 | if( zMime==0 ){ |
| 2281 | const char *z; |
| 2282 |