Fossil SCM
Make the /ticket page show as /tktsrch if ticket search is enabled, or as /reportlist if ticket search is disabled.
Commit
b9daba58a962e4fda6642fb96b7c68621d9ccb1b
Parent
5ab34b0c0f336f9…
1 file changed
+15
-6
+15
-6
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -1407,19 +1407,28 @@ | ||
| 1407 | 1407 | if( (ok & T_NEW)!=0 && g.perm.NewTkt ){ |
| 1408 | 1408 | style_submenu_element("New","New","%R/tktnew"); |
| 1409 | 1409 | } |
| 1410 | 1410 | } |
| 1411 | 1411 | |
| 1412 | - | |
| 1412 | +/* | |
| 1413 | +** WEBPAGE: ticket | |
| 1414 | +** | |
| 1415 | +** This is intended to be the primary "Ticket" page. Render as | |
| 1416 | +** either ticket-search (if search is enabled) or as the | |
| 1417 | +** /reportlist page (if ticket search is disabled). | |
| 1418 | +*/ | |
| 1419 | +void tkt_home_page(void){ | |
| 1420 | + login_check_credentials(); | |
| 1421 | + if( search_restrict(SRCH_TKT)!=0 ){ | |
| 1422 | + tkt_srchpage(); | |
| 1423 | + }else{ | |
| 1424 | + view_list(); | |
| 1425 | + } | |
| 1426 | +} | |
| 1413 | 1427 | |
| 1414 | 1428 | /* |
| 1415 | -** Note: The /ticket webpage is intended to be the page that the | |
| 1416 | -** main menu links to. We might move that page around in the future. | |
| 1417 | -** Use /tktsrch if you really want a ticket search. | |
| 1418 | -** | |
| 1419 | 1429 | ** WEBPAGE: tktsrch |
| 1420 | -** WEBPAGE: ticket | |
| 1421 | 1430 | ** Usage: /tktsrch?s=PATTERN |
| 1422 | 1431 | ** |
| 1423 | 1432 | ** Full-text search of all current tickets |
| 1424 | 1433 | */ |
| 1425 | 1434 | void tkt_srchpage(void){ |
| 1426 | 1435 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -1407,19 +1407,28 @@ | |
| 1407 | if( (ok & T_NEW)!=0 && g.perm.NewTkt ){ |
| 1408 | style_submenu_element("New","New","%R/tktnew"); |
| 1409 | } |
| 1410 | } |
| 1411 | |
| 1412 | |
| 1413 | |
| 1414 | /* |
| 1415 | ** Note: The /ticket webpage is intended to be the page that the |
| 1416 | ** main menu links to. We might move that page around in the future. |
| 1417 | ** Use /tktsrch if you really want a ticket search. |
| 1418 | ** |
| 1419 | ** WEBPAGE: tktsrch |
| 1420 | ** WEBPAGE: ticket |
| 1421 | ** Usage: /tktsrch?s=PATTERN |
| 1422 | ** |
| 1423 | ** Full-text search of all current tickets |
| 1424 | */ |
| 1425 | void tkt_srchpage(void){ |
| 1426 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -1407,19 +1407,28 @@ | |
| 1407 | if( (ok & T_NEW)!=0 && g.perm.NewTkt ){ |
| 1408 | style_submenu_element("New","New","%R/tktnew"); |
| 1409 | } |
| 1410 | } |
| 1411 | |
| 1412 | /* |
| 1413 | ** WEBPAGE: ticket |
| 1414 | ** |
| 1415 | ** This is intended to be the primary "Ticket" page. Render as |
| 1416 | ** either ticket-search (if search is enabled) or as the |
| 1417 | ** /reportlist page (if ticket search is disabled). |
| 1418 | */ |
| 1419 | void tkt_home_page(void){ |
| 1420 | login_check_credentials(); |
| 1421 | if( search_restrict(SRCH_TKT)!=0 ){ |
| 1422 | tkt_srchpage(); |
| 1423 | }else{ |
| 1424 | view_list(); |
| 1425 | } |
| 1426 | } |
| 1427 | |
| 1428 | /* |
| 1429 | ** WEBPAGE: tktsrch |
| 1430 | ** Usage: /tktsrch?s=PATTERN |
| 1431 | ** |
| 1432 | ** Full-text search of all current tickets |
| 1433 | */ |
| 1434 | void tkt_srchpage(void){ |
| 1435 |