Fossil SCM
Setup webpag updates.
Commit
c4ec179bbc214f45b8cebc6555c5817bd757db4f
Parent
916b6e4b3b70191…
1 file changed
+52
-6
+52
-6
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -59,15 +59,18 @@ | ||
| 59 | 59 | login_needed(); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | style_header(); |
| 63 | 63 | |
| 64 | + @ <h2>Setup</h2> | |
| 64 | 65 | @ <dl id="setup"> |
| 65 | 66 | menu_entry("Users", "setup_ulist", |
| 66 | 67 | "Grant privileges to individual users."); |
| 67 | 68 | menu_entry("Access", "setup_access", |
| 68 | 69 | "Control access settings."); |
| 70 | + menu_entry("Configuration", "setup_config", | |
| 71 | + "Configure the WWW components of the repository"); | |
| 69 | 72 | @ </dl> |
| 70 | 73 | |
| 71 | 74 | style_footer(); |
| 72 | 75 | } |
| 73 | 76 | |
| @@ -88,15 +91,17 @@ | ||
| 88 | 91 | } |
| 89 | 92 | |
| 90 | 93 | style_submenu_element("Add", "Add User", "setup_uedit"); |
| 91 | 94 | style_header(); |
| 92 | 95 | @ <h2>List Of Users</h2> |
| 96 | + @ <hr> | |
| 97 | + @ <table align="left" hspace="10" border="1" cellpadding="10"><tr><td> | |
| 93 | 98 | @ <table cellspacing=0 cellpadding=0 border=0> |
| 94 | 99 | @ <tr> |
| 95 | - @ <th align="right"><nobr>User ID</nobr></th> | |
| 100 | + @ <th align="right">User ID</th> | |
| 96 | 101 | @ <th> Capabilities </th> |
| 97 | - @ <th><nobr>Contact Info</nobr></th> | |
| 102 | + @ <th>Contact Info</th> | |
| 98 | 103 | @ </tr> |
| 99 | 104 | db_prepare(&s, "SELECT uid, login, cap, info FROM user ORDER BY login"); |
| 100 | 105 | while( db_step(&s)==SQLITE_ROW ){ |
| 101 | 106 | @ <tr> |
| 102 | 107 | @ <td align="right"> |
| @@ -107,15 +112,15 @@ | ||
| 107 | 112 | if( g.okAdmin ){ |
| 108 | 113 | @ </a> |
| 109 | 114 | } |
| 110 | 115 | @ </td> |
| 111 | 116 | @ <td align="center">%s(db_column_text(&s,2))</td> |
| 112 | - @ <td align="center">%s(db_column_text(&s,3))</td> | |
| 117 | + @ <td align="left">%s(db_column_text(&s,3))</td> | |
| 113 | 118 | @ </tr> |
| 114 | 119 | } |
| 115 | - @ </table> | |
| 116 | - @ <p><hr> | |
| 120 | + @ </table></td></tr></table> | |
| 121 | + @ <p> | |
| 117 | 122 | @ <b>Notes:</b> |
| 118 | 123 | @ <ol> |
| 119 | 124 | @ <li><p>The permission flags are as follows:</p> |
| 120 | 125 | @ <table> |
| 121 | 126 | @ <tr><td>a</td><td width="10"></td> |
| @@ -447,11 +452,12 @@ | ||
| 447 | 452 | login_needed(); |
| 448 | 453 | } |
| 449 | 454 | |
| 450 | 455 | style_header(); |
| 451 | 456 | db_begin_transaction(); |
| 452 | - @ <form action="%s(g.zBaseURL)/setup_access" method="GET"> | |
| 457 | + @ <h2>Access Control Settings</h2> | |
| 458 | + @ <form action="%s(g.zBaseURL)/setup_access" method="POST"> | |
| 453 | 459 | |
| 454 | 460 | @ <hr> |
| 455 | 461 | onoff_attribute("Require password for local access", |
| 456 | 462 | "authenticate-localhost", "localauth", 1); |
| 457 | 463 | @ <p>When enabled, the password sign-in is required for |
| @@ -468,12 +474,52 @@ | ||
| 468 | 474 | @ to a year.</p> |
| 469 | 475 | |
| 470 | 476 | @ <hr> |
| 471 | 477 | onoff_attribute("Allow anonymous signup", "anon-signup", "asu", 0); |
| 472 | 478 | @ <p>Allow users to create their own accounts</p> |
| 479 | + | |
| 480 | + @ <hr> | |
| 481 | + @ <p><input type="submit" name="submit" value="Apply Changes"></p> | |
| 482 | + @ </form> | |
| 483 | + db_end_transaction(0); | |
| 484 | + style_footer(); | |
| 485 | +} | |
| 486 | + | |
| 487 | +/* | |
| 488 | +** WEBPAGE: setup_config | |
| 489 | +*/ | |
| 490 | +void setup_config(void){ | |
| 491 | + login_check_credentials(); | |
| 492 | + if( !g.okSetup ){ | |
| 493 | + login_needed(); | |
| 494 | + } | |
| 495 | + | |
| 496 | + style_header(); | |
| 497 | + db_begin_transaction(); | |
| 498 | + @ <h2>WWW Configuration</h2> | |
| 499 | + @ <form action="%s(g.zBaseURL)/setup_config" method="POST"> | |
| 500 | + | |
| 501 | + @ <hr> | |
| 502 | + entry_attribute("Home page", 60, "homepage", "hp", ""); | |
| 503 | + @ <p>The name of a wiki file that is the homepage for the website. | |
| 504 | + @ The home page is the page that is displayed by the "Home" link | |
| 505 | + @ at the top of this screen.</p> | |
| 506 | + | |
| 507 | + entry_attribute("Ticket subdirectory", 60, "ticket-subdir", "tsd", ""); | |
| 508 | + @ <p>A subdirectory in the file hierarchy that contains all trouble | |
| 509 | + @ tickets. Leave this blank to disable ticketing. Tickets text | |
| 510 | + @ files within this subdirectory containing a particular format | |
| 511 | + @ (documented separately) and with the ".tkt" suffix.</p> | |
| 512 | + | |
| 513 | + entry_attribute("Wiki subdirectory", 60, "wiki-subdir", "wsd", ""); | |
| 514 | + @ <p>A subdirectory in the file hierarchy that contains wiki pages. | |
| 515 | + @ Leave this blank to disable wiki. Wiki pages are | |
| 516 | + @ files within this subdirectory whose name is he wiki page title | |
| 517 | + @ and with the suffix ".wiki".</p> | |
| 518 | + | |
| 473 | 519 | |
| 474 | 520 | @ <hr> |
| 475 | 521 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 476 | 522 | @ </form> |
| 477 | 523 | db_end_transaction(0); |
| 478 | 524 | style_footer(); |
| 479 | 525 | } |
| 480 | 526 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -59,15 +59,18 @@ | |
| 59 | login_needed(); |
| 60 | } |
| 61 | |
| 62 | style_header(); |
| 63 | |
| 64 | @ <dl id="setup"> |
| 65 | menu_entry("Users", "setup_ulist", |
| 66 | "Grant privileges to individual users."); |
| 67 | menu_entry("Access", "setup_access", |
| 68 | "Control access settings."); |
| 69 | @ </dl> |
| 70 | |
| 71 | style_footer(); |
| 72 | } |
| 73 | |
| @@ -88,15 +91,17 @@ | |
| 88 | } |
| 89 | |
| 90 | style_submenu_element("Add", "Add User", "setup_uedit"); |
| 91 | style_header(); |
| 92 | @ <h2>List Of Users</h2> |
| 93 | @ <table cellspacing=0 cellpadding=0 border=0> |
| 94 | @ <tr> |
| 95 | @ <th align="right"><nobr>User ID</nobr></th> |
| 96 | @ <th> Capabilities </th> |
| 97 | @ <th><nobr>Contact Info</nobr></th> |
| 98 | @ </tr> |
| 99 | db_prepare(&s, "SELECT uid, login, cap, info FROM user ORDER BY login"); |
| 100 | while( db_step(&s)==SQLITE_ROW ){ |
| 101 | @ <tr> |
| 102 | @ <td align="right"> |
| @@ -107,15 +112,15 @@ | |
| 107 | if( g.okAdmin ){ |
| 108 | @ </a> |
| 109 | } |
| 110 | @ </td> |
| 111 | @ <td align="center">%s(db_column_text(&s,2))</td> |
| 112 | @ <td align="center">%s(db_column_text(&s,3))</td> |
| 113 | @ </tr> |
| 114 | } |
| 115 | @ </table> |
| 116 | @ <p><hr> |
| 117 | @ <b>Notes:</b> |
| 118 | @ <ol> |
| 119 | @ <li><p>The permission flags are as follows:</p> |
| 120 | @ <table> |
| 121 | @ <tr><td>a</td><td width="10"></td> |
| @@ -447,11 +452,12 @@ | |
| 447 | login_needed(); |
| 448 | } |
| 449 | |
| 450 | style_header(); |
| 451 | db_begin_transaction(); |
| 452 | @ <form action="%s(g.zBaseURL)/setup_access" method="GET"> |
| 453 | |
| 454 | @ <hr> |
| 455 | onoff_attribute("Require password for local access", |
| 456 | "authenticate-localhost", "localauth", 1); |
| 457 | @ <p>When enabled, the password sign-in is required for |
| @@ -468,12 +474,52 @@ | |
| 468 | @ to a year.</p> |
| 469 | |
| 470 | @ <hr> |
| 471 | onoff_attribute("Allow anonymous signup", "anon-signup", "asu", 0); |
| 472 | @ <p>Allow users to create their own accounts</p> |
| 473 | |
| 474 | @ <hr> |
| 475 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 476 | @ </form> |
| 477 | db_end_transaction(0); |
| 478 | style_footer(); |
| 479 | } |
| 480 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -59,15 +59,18 @@ | |
| 59 | login_needed(); |
| 60 | } |
| 61 | |
| 62 | style_header(); |
| 63 | |
| 64 | @ <h2>Setup</h2> |
| 65 | @ <dl id="setup"> |
| 66 | menu_entry("Users", "setup_ulist", |
| 67 | "Grant privileges to individual users."); |
| 68 | menu_entry("Access", "setup_access", |
| 69 | "Control access settings."); |
| 70 | menu_entry("Configuration", "setup_config", |
| 71 | "Configure the WWW components of the repository"); |
| 72 | @ </dl> |
| 73 | |
| 74 | style_footer(); |
| 75 | } |
| 76 | |
| @@ -88,15 +91,17 @@ | |
| 91 | } |
| 92 | |
| 93 | style_submenu_element("Add", "Add User", "setup_uedit"); |
| 94 | style_header(); |
| 95 | @ <h2>List Of Users</h2> |
| 96 | @ <hr> |
| 97 | @ <table align="left" hspace="10" border="1" cellpadding="10"><tr><td> |
| 98 | @ <table cellspacing=0 cellpadding=0 border=0> |
| 99 | @ <tr> |
| 100 | @ <th align="right">User ID</th> |
| 101 | @ <th> Capabilities </th> |
| 102 | @ <th>Contact Info</th> |
| 103 | @ </tr> |
| 104 | db_prepare(&s, "SELECT uid, login, cap, info FROM user ORDER BY login"); |
| 105 | while( db_step(&s)==SQLITE_ROW ){ |
| 106 | @ <tr> |
| 107 | @ <td align="right"> |
| @@ -107,15 +112,15 @@ | |
| 112 | if( g.okAdmin ){ |
| 113 | @ </a> |
| 114 | } |
| 115 | @ </td> |
| 116 | @ <td align="center">%s(db_column_text(&s,2))</td> |
| 117 | @ <td align="left">%s(db_column_text(&s,3))</td> |
| 118 | @ </tr> |
| 119 | } |
| 120 | @ </table></td></tr></table> |
| 121 | @ <p> |
| 122 | @ <b>Notes:</b> |
| 123 | @ <ol> |
| 124 | @ <li><p>The permission flags are as follows:</p> |
| 125 | @ <table> |
| 126 | @ <tr><td>a</td><td width="10"></td> |
| @@ -447,11 +452,12 @@ | |
| 452 | login_needed(); |
| 453 | } |
| 454 | |
| 455 | style_header(); |
| 456 | db_begin_transaction(); |
| 457 | @ <h2>Access Control Settings</h2> |
| 458 | @ <form action="%s(g.zBaseURL)/setup_access" method="POST"> |
| 459 | |
| 460 | @ <hr> |
| 461 | onoff_attribute("Require password for local access", |
| 462 | "authenticate-localhost", "localauth", 1); |
| 463 | @ <p>When enabled, the password sign-in is required for |
| @@ -468,12 +474,52 @@ | |
| 474 | @ to a year.</p> |
| 475 | |
| 476 | @ <hr> |
| 477 | onoff_attribute("Allow anonymous signup", "anon-signup", "asu", 0); |
| 478 | @ <p>Allow users to create their own accounts</p> |
| 479 | |
| 480 | @ <hr> |
| 481 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 482 | @ </form> |
| 483 | db_end_transaction(0); |
| 484 | style_footer(); |
| 485 | } |
| 486 | |
| 487 | /* |
| 488 | ** WEBPAGE: setup_config |
| 489 | */ |
| 490 | void setup_config(void){ |
| 491 | login_check_credentials(); |
| 492 | if( !g.okSetup ){ |
| 493 | login_needed(); |
| 494 | } |
| 495 | |
| 496 | style_header(); |
| 497 | db_begin_transaction(); |
| 498 | @ <h2>WWW Configuration</h2> |
| 499 | @ <form action="%s(g.zBaseURL)/setup_config" method="POST"> |
| 500 | |
| 501 | @ <hr> |
| 502 | entry_attribute("Home page", 60, "homepage", "hp", ""); |
| 503 | @ <p>The name of a wiki file that is the homepage for the website. |
| 504 | @ The home page is the page that is displayed by the "Home" link |
| 505 | @ at the top of this screen.</p> |
| 506 | |
| 507 | entry_attribute("Ticket subdirectory", 60, "ticket-subdir", "tsd", ""); |
| 508 | @ <p>A subdirectory in the file hierarchy that contains all trouble |
| 509 | @ tickets. Leave this blank to disable ticketing. Tickets text |
| 510 | @ files within this subdirectory containing a particular format |
| 511 | @ (documented separately) and with the ".tkt" suffix.</p> |
| 512 | |
| 513 | entry_attribute("Wiki subdirectory", 60, "wiki-subdir", "wsd", ""); |
| 514 | @ <p>A subdirectory in the file hierarchy that contains wiki pages. |
| 515 | @ Leave this blank to disable wiki. Wiki pages are |
| 516 | @ files within this subdirectory whose name is he wiki page title |
| 517 | @ and with the suffix ".wiki".</p> |
| 518 | |
| 519 | |
| 520 | @ <hr> |
| 521 | @ <p><input type="submit" name="submit" value="Apply Changes"></p> |
| 522 | @ </form> |
| 523 | db_end_transaction(0); |
| 524 | style_footer(); |
| 525 | } |
| 526 |