Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Use "Reports" for the /reportlist element, as per [1a1c0ebe3cf9]. Also be more pedantic when composing user-visible labels for the parameter-induced hyperlinks. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | rptview-submenu-paralink |
Files: | files | file ages | folders |
SHA3-256: |
8861a68e2c3a232a3a80df6a274706a6 |
User & Date: | george 2021-04-09 02:58:23 |
Context
2021-04-09
| ||
04:21 | Remove useless 'nMaxDigit' parameter from the signature of the style_submenu_parametric(). Also edit a corresponding comment. ... (check-in: d1651e7e user: george tags: rptview-submenu-paralink) | |
02:58 | Use "Reports" for the /reportlist element, as per [1a1c0ebe3cf9]. Also be more pedantic when composing user-visible labels for the parameter-induced hyperlinks. ... (check-in: 8861a68e user: george tags: rptview-submenu-paralink) | |
2021-03-26
| ||
17:59 | Merge-in changes from trunk (~ version 2.15) ... (check-in: 29067107 user: george tags: rptview-submenu-paralink) | |
Changes
Changes to src/report.c.
︙ | ︙ | |||
1035 1036 1037 1038 1039 1040 1041 | count = 0; if( !tabs ){ struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; const char *zQS = PD("QUERY_STRING",""); db_multi_exec("PRAGMA empty_result_callbacks=ON"); style_set_current_feature("report"); | < < < < < < < | | | 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 | count = 0; if( !tabs ){ struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; const char *zQS = PD("QUERY_STRING",""); db_multi_exec("PRAGMA empty_result_callbacks=ON"); style_set_current_feature("report"); if( zQS[0] ){ style_submenu_element("Raw","%R/%s?tablist=1&%s",g.zPath,zQS); style_submenu_element("Reports","%R/reportlist?%s",zQS); } else { style_submenu_element("Raw","%R/%s?tablist=1",g.zPath); style_submenu_element("Reports","%R/reportlist"); } style_submenu_parametric("rptview_",5); style_submenu_parametric("rv",5); if( g.perm.Admin || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){ style_submenu_element("Edit", "rptedit?rn=%d", rn); |
︙ | ︙ |
Changes to src/style.c.
︙ | ︙ | |||
344 345 346 347 348 349 350 | ** unless a value starts with a lowercase letter. ** Malformed values are silently ignored. */ void style_submenu_parametric( const char *zPrefix, /* common prefix of the query parameters names */ const int nMaxDigit /* maximal digit on the end of param names */ ){ | < | | > | | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 | ** unless a value starts with a lowercase letter. ** Malformed values are silently ignored. */ void style_submenu_parametric( const char *zPrefix, /* common prefix of the query parameters names */ const int nMaxDigit /* maximal digit on the end of param names */ ){ static const char *suffix = "smpl"; /* common suffix for param names */ static const short sfxlen = 4; /* length of the above suffix */ const char *zQS; /* QUERY_STRING */ char zN[32]; /* buffer for parameter names to probe */ short i,l; /* zPrefix must be tidy and short; also filter out ENV/CGI variables */ assert( zPrefix != 0 && fossil_islower(zPrefix[0]) ); l = strnlen( zPrefix, sizeof(zN) ); assert( l+sfxlen+2 <= sizeof(zN) ); assert( fossil_no_strange_characters(zPrefix) ); |
︙ | ︙ | |||
376 377 378 379 380 381 382 | for( z = zV; z[0] && z[0] != '/' ;){ if( fossil_isalnum(z[0]) || z[0]=='_' || z[0]=='-' ) z++; else break; } if( z[0] != 0 && z[0] != '/' ) continue; assert( nSubmenu < count(aSubmenu) ); | | > > > > | > > > > > > | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 | for( z = zV; z[0] && z[0] != '/' ;){ if( fossil_isalnum(z[0]) || z[0]=='_' || z[0]=='-' ) z++; else break; } if( z[0] != 0 && z[0] != '/' ) continue; assert( nSubmenu < count(aSubmenu) ); if(fossil_islower(zV[0]) && z[0]=='/'){ aSubmenu[nSubmenu].zLabel = mprintf( "%s",zV); /* memory leak? */ }else{ /* prepend a label with an unobtrusive symbol that "sorts-last"; ** this clearly distincts it from the built-in elements */ static const char *mark = "✧"; char *z = mprintf("%s%s",mark,zV); aSubmenu[nSubmenu].zLabel = z; /* also prettify the first segment */ z += strlen(mark); z[0] = fossil_toupper(z[0]); for(; z[0]!=0 && z[0]!='/'; z++ ){ if( z[0]=='_' ) z[0] = ' '; } } if( zQS[0] ){ aSubmenu[nSubmenu].zLink = mprintf("%R/%s?%s",zV,zQS); }else{ aSubmenu[nSubmenu].zLink = mprintf("%R/%s",zV); } nSubmenu++; |
︙ | ︙ |