Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Break out some of the obscure /timeline links on the /sitemap page into a separate /sitemap-timeline page. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
79f7808ba4b95322243f718c437c64b9 |
| User & Date: | drh 2020-12-02 15:29:39.147 |
| Original Comment: | Break out some of the obscure timelinen links on the /sitemap page into a separate /sitemap-timeline page. |
Context
|
2020-12-02
| ||
| 17:30 | Add Previous/Following Day/Week/Month links on timeline pages that use the ymd, yw, or ym query parameters. ... (check-in: 96cd802a76 user: drh tags: trunk) | |
| 15:29 | Break out some of the obscure /timeline links on the /sitemap page into a separate /sitemap-timeline page. ... (check-in: 79f7808ba4 user: drh tags: trunk) | |
| 14:14 | Improvements to /sitemap: Break out the "Test Pages" entry into a separate /sitemap-test page. Add the "Site Map" entry for popups. ... (check-in: 86737df9dc user: drh tags: trunk) | |
Changes
Changes to src/sitemap.c.
| ︙ | ︙ | |||
98 99 100 101 102 103 104 |
}
@ </ul>
}
if( g.perm.Read ){
@ <li>%z(href("%R/timeline"))Project Timeline</a>
@ <ul>
@ <li>%z(href("%R/reports"))Activity Reports</a></li>
| < | < < | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
}
@ </ul>
}
if( g.perm.Read ){
@ <li>%z(href("%R/timeline"))Project Timeline</a>
@ <ul>
@ <li>%z(href("%R/reports"))Activity Reports</a></li>
@ <li>%z(href("%R/sitemap-timeline"))Other timelines</a></li>
@ </ul>
@ </li>
}
if( g.perm.Read ){
@ <li>%z(href("%R/brlist"))Branches</a>
@ <ul>
@ <li>%z(href("%R/taglist"))Tags</a></li>
|
| ︙ | ︙ | |||
190 191 192 193 194 195 196 |
@ <ul>
@ <li>%z(href("%R/hash-collisions"))Collisions on hash prefixes</a></li>
if( g.perm.Admin ){
@ <li>%z(href("%R/urllist"))List of URLs used to access
@ this repository</a></li>
}
@ <li>%z(href("%R/bloblist"))List of Artifacts</a></li>
| < | 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
@ <ul>
@ <li>%z(href("%R/hash-collisions"))Collisions on hash prefixes</a></li>
if( g.perm.Admin ){
@ <li>%z(href("%R/urllist"))List of URLs used to access
@ this repository</a></li>
}
@ <li>%z(href("%R/bloblist"))List of Artifacts</a></li>
@ </ul>
@ </li>
}
@ <li>%z(href("%R/help"))Help</a>
@ <ul>
if( g.perm.Admin || g.perm.Write ||
g.perm.WrForum || g.perm.WrTForum ||
|
| ︙ | ︙ | |||
274 275 276 277 278 279 280 281 282 283 284 |
}
if( g.perm.Read && g.perm.Hyperlink ){
@ <li>%z(href("%R/timewarps"))Timeline of timewarps</a></li>
}
@ <li>%z(href("%R/cookies"))Content of display preference cookie</a></li>
@ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</a></li>
@ <li>%z(href("%R/test-piechart"))Pie-Chart generator test</a></li>
if( !isPopup ){
style_finish_page("sitemap");
}
}
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
}
if( g.perm.Read && g.perm.Hyperlink ){
@ <li>%z(href("%R/timewarps"))Timeline of timewarps</a></li>
}
@ <li>%z(href("%R/cookies"))Content of display preference cookie</a></li>
@ <li>%z(href("%R/test-captcha"))Random ASCII-art Captcha image</a></li>
@ <li>%z(href("%R/test-piechart"))Pie-Chart generator test</a></li>
if( !isPopup ){
style_finish_page("sitemap");
}
}
/*
** WEBPAGE: sitemap-timeline
**
** Generate a list of hyperlinks to various (obscure) variations on
** the /timeline page.
*/
void sitemap_timeline_page(void){
int isPopup = 0; /* This is an XMLHttpRequest() for /sitemap */
login_check_credentials();
if( P("popup")!=0 && cgi_csrf_safe(0) ){
/* If this is a POST from the same origin with the popup=1 parameter,
** then disable anti-robot defenses */
isPopup = 1;
g.perm.Hyperlink = 1;
g.javascriptHyperlink = 0;
}
if( !isPopup ){
style_header("Timeline Examples");
style_adunit_config(ADUNIT_RIGHT_OK);
}
@ <ul id="sitemap" class="columns" style="column-width:20em">
@ <li>%z(href("%R/timeline?ymd"))Current day</a></li>
@ <li>%z(href("%R/timeline?yw"))Current week</a></li>
@ <li>%z(href("%R/timeline?ym"))Current month</a></li>
@ <li>%z(href("%R/thisdayinhistory"))Today in history</a></li>
@ <li>%z(href("%R/timeline?a=1970-01-01&y=ci&n=10"))First 10
@ check-ins</a></li>
@ <li>%z(href("%R/timeline?namechng"))File name changes</a></li>
@ <li>%z(href("%R/timeline?forks"))Forks</a></li>
@ <li>%z(href("%R/timeline?cherrypicks"))Cherrypick merges</a></li>
@ <li>%z(href("%R/timewarps"))Timewarps</a></li>
@ <li>%z(href("%R/timeline?ubg"))Color-coded by user</a></li>
@ <li>%z(href("%R/timeline?deltabg"))Delta vs. baseline manifests</a></li>
@ </ul>
if( !isPopup ){
style_finish_page("sitemap");
}
}
|
Changes to src/style.c.
| ︙ | ︙ | |||
1202 1203 1204 1205 1206 1207 1208 |
if( showAll && blob_size(&g.httpHeader)>0 ){
@ <hr />
@ <pre>
@ %h(blob_str(&g.httpHeader))
@ </pre>
}
}
| > | < > > | 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 |
if( showAll && blob_size(&g.httpHeader)>0 ){
@ <hr />
@ <pre>
@ %h(blob_str(&g.httpHeader))
@ </pre>
}
}
if( zErr && zErr[0] ){
style_finish_page("error");
cgi_reply();
fossil_exit(1);
}else{
style_finish_page("test");
}
}
/*
** Generate a Not Yet Implemented error page.
*/
void webpage_not_yet_implemented(void){
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 |
blob_append_sql(&cond, " AND event.objid IN cpnodes ");
}
if( bisectLocal || zBisect!=0 ){
blob_append_sql(&cond, " AND event.objid IN (SELECT rid FROM bilog) ");
}
if( zYearMonth ){
zYearMonth = timeline_expand_datetime(zYearMonth);
blob_append_sql(&cond, " AND %Q=strftime('%%Y-%%m',event.mtime) ",
zYearMonth);
}
else if( zYearWeek ){
char *z;
zYearWeek = timeline_expand_datetime(zYearWeek);
z = db_text(0, "SELECT strftime('%%Y-%%W',%Q)", zYearWeek);
if( z && z[0] ){
zYearWeekStart = db_text(0, "SELECT date(%Q,'-6 days','weekday 1')",
| > > > > > > > | 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 |
blob_append_sql(&cond, " AND event.objid IN cpnodes ");
}
if( bisectLocal || zBisect!=0 ){
blob_append_sql(&cond, " AND event.objid IN (SELECT rid FROM bilog) ");
}
if( zYearMonth ){
zYearMonth = timeline_expand_datetime(zYearMonth);
if( strlen(zYearMonth)>7 ){
zYearMonth = mprintf("%.7s", zYearMonth);
}
if( db_int(0,"SELECT julianday('%q-01') IS NULL", zYearMonth) ){
zYearMonth = db_text(0, "SELECT strftime('%%Y-%%m','now');");
}
blob_append_sql(&cond, " AND %Q=strftime('%%Y-%%m',event.mtime) ",
zYearMonth);
nEntry = -1;
}
else if( zYearWeek ){
char *z;
zYearWeek = timeline_expand_datetime(zYearWeek);
z = db_text(0, "SELECT strftime('%%Y-%%W',%Q)", zYearWeek);
if( z && z[0] ){
zYearWeekStart = db_text(0, "SELECT date(%Q,'-6 days','weekday 1')",
|
| ︙ | ︙ | |||
2459 2460 2461 2462 2463 2464 2465 |
}
if( nEntry>0 ) blob_append_sql(&sql, " LIMIT %d", nEntry);
db_multi_exec("%s", blob_sql_text(&sql));
n = db_int(0, "SELECT count(*) FROM timeline WHERE etype!='div' /*scan*/");
zPlural = n==1 ? "" : "s";
if( zYearMonth ){
| | > | 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 |
}
if( nEntry>0 ) blob_append_sql(&sql, " LIMIT %d", nEntry);
db_multi_exec("%s", blob_sql_text(&sql));
n = db_int(0, "SELECT count(*) FROM timeline WHERE etype!='div' /*scan*/");
zPlural = n==1 ? "" : "s";
if( zYearMonth ){
blob_appendf(&desc, "%d %s%s for month beginning %h-01",
n, zEType, zPlural, zYearMonth);
}else if( zYearWeek ){
blob_appendf(&desc, "%d %s%s for week %h beginning on %h",
n, zEType, zPlural, zYearWeek, zYearWeekStart);
}else if( zDay ){
blob_appendf(&desc, "%d %s%s occurring on %h", n, zEType, zPlural, zDay);
}else if( zNDays ){
blob_appendf(&desc, "%d %s%s within the past %d day%s",
|
| ︙ | ︙ |