Fossil SCM

On the /artifact page, only show the "Line Numbers" checkbox if the artifact is displayed as text/plain.

drh 2019-04-18 12:06 trunk
Commit 40c40f7fe6136d52ad09188f9391b19351d3926d26d5e9cebc0bfa89617ff666
1 file changed +3 -3
+3 -3
--- src/info.c
+++ src/info.c
@@ -2251,13 +2251,10 @@
22512251
style_submenu_element("Parsed", "%R/info/%s", zUuid);
22522252
}
22532253
if( descOnly ){
22542254
style_submenu_element("Content", "%R/artifact/%s", zUuid);
22552255
}else{
2256
- if( zLn==0 || atoi(zLn)==0 ){
2257
- style_submenu_checkbox("ln", "Line Numbers", 0, 0);
2258
- }
22592256
@ <hr />
22602257
content_get(rid, &content);
22612258
if( renderAsWiki ){
22622259
wiki_render_by_mimetype(&content, zMime);
22632260
}else if( renderAsHtml ){
@@ -2272,10 +2269,13 @@
22722269
@ }
22732270
@ );
22742271
@ </script>
22752272
}else{
22762273
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
+ }
22772277
blob_to_utf8_no_bom(&content, 0);
22782278
zMime = mimetype_from_content(&content);
22792279
@ <blockquote>
22802280
if( zMime==0 ){
22812281
const char *z;
22822282
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button