Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | added dynamic behavior page, no special layout. Reusing the commandline help and simply listing all options |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | wolfgangFormat2CSS_2 |
| Files: | files | file ages | folders |
| SHA1: |
757a5e5b4e60d4f64f1b87b4f78a038d |
| User & Date: | wolfgang 2010-09-15 18:46:48.000 |
Context
|
2010-09-17
| ||
| 13:46 | merged 63dc0641ac check-in: ce06c5e086 user: wolfgang tags: wolfgangFormat2CSS_2 | |
|
2010-09-15
| ||
| 18:46 | added dynamic behavior page, no special layout. Reusing the commandline help and simply listing all options check-in: 757a5e5b4e user: wolfgang tags: wolfgangFormat2CSS_2 | |
|
2010-09-14
| ||
| 20:08 | switched captcha border from outline to border, because of problems with IE check-in: d50fe26c48 user: wolfgang tags: wolfgangFormat2CSS_2 | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 |
}else{
printf("%-20s\n", zName);
}
db_finalize(&q);
}
/*
** COMMAND: settings
** COMMAND: unset
** %fossil settings ?PROPERTY? ?VALUE? ?-global?
** %fossil unset PROPERTY ?-global?
**
** The "settings" command with no arguments lists all properties and their
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 |
}else{
printf("%-20s\n", zName);
}
db_finalize(&q);
}
/*
** define all settings, which can be controlled via the set/unset
** command. var is the name of the internal configuration name for db_(un)set.
** If var is 0, the settings name is used.
** width is the length for the edit field on the behavior page, 0
** is used for on/off checkboxes.
** The behaviour page doesn't use a special layout. It lists all
** set-commands and displays the 'set'-help as info.
*/
#if INTERFACE
struct stControlSettings {
char const * name;
char const * var;
int width;
char const * def;
};
#endif /* INTERFACE */
struct stControlSettings const ctrlSettings[] = {
{ "auto-captcha", "autocaptcha", 0, "0" },
{ "auto-shun", 0, 0, "1" },
{ "autosync", 0, 0, "0" },
{ "binary-glob", 0, 0, "1" },
{ "clearsign", 0, 0, "0" },
{ "diff-command", 0, 16, "diff" },
{ "dont-push", 0, 0, "0" },
{ "editor", 0, 16, "" },
{ "gdiff-command", 0, 16, "gdiff" },
{ "ignore-glob", 0, 40, "" },
{ "http-port", 0, 16, "8080" },
{ "localauth", 0, 0, "0" },
{ "mtime-changes", 0, 0, "0" },
{ "pgp-command", 0, 32, "gpg --clearsign -o " },
{ "proxy", 0, 32, "off" },
{ "ssh-command", 0, 32, "" },
{ "web-browser", 0, 32, "" },
{ 0,0,0,0 }
};
/*
** COMMAND: settings
** COMMAND: unset
** %fossil settings ?PROPERTY? ?VALUE? ?-global?
** %fossil unset PROPERTY ?-global?
**
** The "settings" command with no arguments lists all properties and their
|
| ︙ | ︙ | |||
1565 1566 1567 1568 1569 1570 1571 |
**
** web-browser A shell command used to launch your preferred
** web browser when given a URL as an argument.
** Defaults to "start" on windows, "open" on Mac,
** and "firefox" on Unix.
*/
void setting_cmd(void){
| < < < < < < < < < < < < < < < < < < < | | | | | | | | | 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 |
**
** web-browser A shell command used to launch your preferred
** web browser when given a URL as an argument.
** Defaults to "start" on windows, "open" on Mac,
** and "firefox" on Unix.
*/
void setting_cmd(void){
int i;
int globalFlag = find_option("global","g",0)!=0;
int unsetFlag = g.argv[1][0]=='u';
db_open_config(1);
db_find_and_open_repository(0);
if( !g.repositoryOpen ){
globalFlag = 1;
}
if( unsetFlag && g.argc!=3 ){
usage("PROPERTY ?-global?");
}
if( g.argc==2 ){
for(i=0; ctrlSettings[i].name; i++){
print_setting(ctrlSettings[i].name);
}
}else if( g.argc==3 || g.argc==4 ){
const char *zName = g.argv[2];
int n = strlen(zName);
for(i=0; ctrlSettings[i].name; i++){
if( strncmp(ctrlSettings[i].name, zName, n)==0 ) break;
}
if( !ctrlSettings[i].name ){
fossil_fatal("no such setting: %s", zName);
}
if( unsetFlag ){
db_unset(ctrlSettings[i].name, globalFlag);
}else if( g.argc==4 ){
db_set(ctrlSettings[i].name, g.argv[3], globalFlag);
}else{
print_setting(ctrlSettings[i].name);
}
}else{
usage("?PROPERTY? ?VALUE?");
}
}
|
Changes to src/setup.c.
| ︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ** ** Implementation of the Setup page */ #include <assert.h> #include "config.h" #include "setup.h" /* ** Output a single entry for a menu generated using an HTML table. ** If zLink is not NULL or an empty string, then it is the page that ** the menu entry will hyperlink to. If zLink is NULL or "", then ** the menu entry has no hyperlink - it is disabled. */ | > > > > > > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | ** ** Implementation of the Setup page */ #include <assert.h> #include "config.h" #include "setup.h" /* ** The table of web pages supported by this application is generated ** automatically by the "mkindex" program and written into a file ** named "page_index.h". We include that file here to get access ** to the table. */ #include "page_index.h" /* ** Output a single entry for a menu generated using an HTML table. ** If zLink is not NULL or an empty string, then it is the page that ** the menu entry will hyperlink to. If zLink is NULL or "", then ** the menu entry has no hyperlink - it is disabled. */ |
| ︙ | ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
@ <table border="0" cellspacing="20">
setup_menu_entry("Users", "setup_ulist",
"Grant privileges to individual users.");
setup_menu_entry("Access", "setup_access",
"Control access settings.");
setup_menu_entry("Configuration", "setup_config",
"Configure the WWW components of the repository");
setup_menu_entry("Timeline", "setup_timeline",
"Timeline display preferences");
setup_menu_entry("Tickets", "tktsetup",
"Configure the trouble-ticketing system for this repository");
setup_menu_entry("Skins", "setup_skin",
"Select from a menu of prepackaged \"skins\" for the web interface");
setup_menu_entry("CSS", "setup_editcss",
| > > | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
@ <table border="0" cellspacing="20">
setup_menu_entry("Users", "setup_ulist",
"Grant privileges to individual users.");
setup_menu_entry("Access", "setup_access",
"Control access settings.");
setup_menu_entry("Configuration", "setup_config",
"Configure the WWW components of the repository");
setup_menu_entry("Behavior", "setup_behavior",
"Configure the version control part of the repository");
setup_menu_entry("Timeline", "setup_timeline",
"Timeline display preferences");
setup_menu_entry("Tickets", "tktsetup",
"Configure the trouble-ticketing system for this repository");
setup_menu_entry("Skins", "setup_skin",
"Select from a menu of prepackaged \"skins\" for the web interface");
setup_menu_entry("CSS", "setup_editcss",
|
| ︙ | ︙ | |||
839 840 841 842 843 844 845 846 847 848 849 850 851 852 |
"timeline-max-comment", "tmc", "0");
@ <p>The maximum length of a comment to be displayed in a timeline.
@ "0" there is no length limit.</p>
@ <hr />
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
@ </div></form>
db_end_transaction(0);
style_footer();
}
/*
** WEBPAGE: setup_config
*/
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
"timeline-max-comment", "tmc", "0");
@ <p>The maximum length of a comment to be displayed in a timeline.
@ "0" there is no length limit.</p>
@ <hr />
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
@ </div></form>
db_end_transaction(0);
style_footer();
}
/*
** WEBPAGE: setup_behavior
*/
void setup_behavior(void){
int i;
struct stControlSettings const * azSet;
login_check_credentials();
if( !g.okSetup ){
login_needed();
}
style_header("SCM Behavior");
db_begin_transaction();
@ <form action="%s(g.zBaseURL)/setup_behavior" method="post"><div>
login_insert_csrf_secret();
for (azSet=ctrlSettings;azSet->name;azSet++) {
if (azSet->width==0) {
/* found boolean attribute */
onoff_attribute(azSet->name, azSet->name, azSet->var?azSet->var:azSet->name, (azSet->def[0]=='1')?1:0);
@ <hr />
}
}
for (azSet=ctrlSettings;azSet->name;azSet++) {
if (azSet->width!=0) {
entry_attribute(azSet->name, azSet->width, azSet->name, azSet->var?azSet->var:azSet->name, (char*)azSet->def);
@ <hr />
}
}
@ <p><input type="submit" name="submit" value="Apply Changes" /></p>
@ <hr />
@ These settings work in the same way, as the <kbd>set</kbd> commandline:<br>
@ <pre>%s(zHelp_setting_cmd)</pre>
@ </div></form>
db_end_transaction(0);
style_footer();
}
/*
** WEBPAGE: setup_config
*/
|
| ︙ | ︙ |