Fossil SCM

Break out the Wiki setup items into a separate submenu of the Admin section.

drh 2018-12-12 12:42 trunk
Commit bf09c3bbd90741e9ca8f76eb2f11fd3824930f94e57fd994978552ae17219d59
1 file changed +33 -7
+33 -7
--- src/setup.c
+++ src/setup.c
@@ -119,10 +119,12 @@
119119
setup_menu_entry("Login-Group", "setup_login_group",
120120
"Manage single sign-on between this repository and others"
121121
" on the same server");
122122
setup_menu_entry("Tickets", "tktsetup",
123123
"Configure the trouble-ticketing system for this repository");
124
+ setup_menu_entry("Wiki", "setup_wiki",
125
+ "Configure the wiki for this repository");
124126
}
125127
setup_menu_entry("Search","srchsetup",
126128
"Configure the built-in search engine");
127129
setup_menu_entry("URL Aliases", "waliassetup",
128130
"Configure URL aliases");
@@ -874,17 +876,10 @@
874876
@ the latest trunk check-in is downloaded. Change this tag to something
875877
@ else (ex: release) to alter the behavior of the /download page.
876878
@ (Property: "download-tag")
877879
@ </p>
878880
@ <hr />
879
- onoff_attribute("Enable WYSIWYG Wiki Editing",
880
- "wysiwyg-wiki", "wysiwyg-wiki", 0, 0);
881
- @ <p>Enable what-you-see-is-what-you-get (WYSIWYG) editing of wiki pages.
882
- @ The WYSIWYG editor generates HTML instead of markup, which makes
883
- @ subsequent manual editing more difficult.
884
- @ (Property: "wysiwyg-wiki")</p>
885
- @ <hr />
886881
entry_attribute("Index Page", 60, "index-page", "idxpg", "/home", 0);
887882
@ <p>Enter the pathname of the page to display when the "Home" menu
888883
@ option is selected and when no pathname is
889884
@ specified in the URL. For example, if you visit the url:</p>
890885
@
@@ -922,10 +917,41 @@
922917
"", 0);
923918
@ (Property: sitemap-license)<br>
924919
entry_attribute("Contact", 40, "sitemap-contact", "smcontact",
925920
"", 0);
926921
@ (Property: sitemap-contact)
922
+ @ <hr />
923
+ @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
924
+ @ </div></form>
925
+ db_end_transaction(0);
926
+ style_footer();
927
+}
928
+
929
+/*
930
+** WEBPAGE: setup_wiki
931
+**
932
+** The "Admin/Wiki" page. Requires Setup privilege.
933
+*/
934
+void setup_wiki(void){
935
+ login_check_credentials();
936
+ if( !g.perm.Setup ){
937
+ login_needed(0);
938
+ return;
939
+ }
940
+
941
+ style_header("Wiki Configuration");
942
+ db_begin_transaction();
943
+ @ <form action="%s(g.zTop)/setup_config" method="post"><div>
944
+ login_insert_csrf_secret();
945
+ @ <input type="submit" name="submit" value="Apply Changes" /></p>
946
+ @ <hr />
947
+ onoff_attribute("Enable WYSIWYG Wiki Editing",
948
+ "wysiwyg-wiki", "wysiwyg-wiki", 0, 0);
949
+ @ <p>Enable what-you-see-is-what-you-get (WYSIWYG) editing of wiki pages.
950
+ @ The WYSIWYG editor generates HTML instead of markup, which makes
951
+ @ subsequent manual editing more difficult.
952
+ @ (Property: "wysiwyg-wiki")</p>
927953
@ <hr />
928954
onoff_attribute("Use HTML as wiki markup language",
929955
"wiki-use-html", "wiki-use-html", 0, 0);
930956
@ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
931957
@ but all other wiki formatting will be ignored. This option is helpful
932958
--- src/setup.c
+++ src/setup.c
@@ -119,10 +119,12 @@
119 setup_menu_entry("Login-Group", "setup_login_group",
120 "Manage single sign-on between this repository and others"
121 " on the same server");
122 setup_menu_entry("Tickets", "tktsetup",
123 "Configure the trouble-ticketing system for this repository");
 
 
124 }
125 setup_menu_entry("Search","srchsetup",
126 "Configure the built-in search engine");
127 setup_menu_entry("URL Aliases", "waliassetup",
128 "Configure URL aliases");
@@ -874,17 +876,10 @@
874 @ the latest trunk check-in is downloaded. Change this tag to something
875 @ else (ex: release) to alter the behavior of the /download page.
876 @ (Property: "download-tag")
877 @ </p>
878 @ <hr />
879 onoff_attribute("Enable WYSIWYG Wiki Editing",
880 "wysiwyg-wiki", "wysiwyg-wiki", 0, 0);
881 @ <p>Enable what-you-see-is-what-you-get (WYSIWYG) editing of wiki pages.
882 @ The WYSIWYG editor generates HTML instead of markup, which makes
883 @ subsequent manual editing more difficult.
884 @ (Property: "wysiwyg-wiki")</p>
885 @ <hr />
886 entry_attribute("Index Page", 60, "index-page", "idxpg", "/home", 0);
887 @ <p>Enter the pathname of the page to display when the "Home" menu
888 @ option is selected and when no pathname is
889 @ specified in the URL. For example, if you visit the url:</p>
890 @
@@ -922,10 +917,41 @@
922 "", 0);
923 @ (Property: sitemap-license)<br>
924 entry_attribute("Contact", 40, "sitemap-contact", "smcontact",
925 "", 0);
926 @ (Property: sitemap-contact)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
927 @ <hr />
928 onoff_attribute("Use HTML as wiki markup language",
929 "wiki-use-html", "wiki-use-html", 0, 0);
930 @ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
931 @ but all other wiki formatting will be ignored. This option is helpful
932
--- src/setup.c
+++ src/setup.c
@@ -119,10 +119,12 @@
119 setup_menu_entry("Login-Group", "setup_login_group",
120 "Manage single sign-on between this repository and others"
121 " on the same server");
122 setup_menu_entry("Tickets", "tktsetup",
123 "Configure the trouble-ticketing system for this repository");
124 setup_menu_entry("Wiki", "setup_wiki",
125 "Configure the wiki for this repository");
126 }
127 setup_menu_entry("Search","srchsetup",
128 "Configure the built-in search engine");
129 setup_menu_entry("URL Aliases", "waliassetup",
130 "Configure URL aliases");
@@ -874,17 +876,10 @@
876 @ the latest trunk check-in is downloaded. Change this tag to something
877 @ else (ex: release) to alter the behavior of the /download page.
878 @ (Property: "download-tag")
879 @ </p>
880 @ <hr />
 
 
 
 
 
 
 
881 entry_attribute("Index Page", 60, "index-page", "idxpg", "/home", 0);
882 @ <p>Enter the pathname of the page to display when the "Home" menu
883 @ option is selected and when no pathname is
884 @ specified in the URL. For example, if you visit the url:</p>
885 @
@@ -922,10 +917,41 @@
917 "", 0);
918 @ (Property: sitemap-license)<br>
919 entry_attribute("Contact", 40, "sitemap-contact", "smcontact",
920 "", 0);
921 @ (Property: sitemap-contact)
922 @ <hr />
923 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
924 @ </div></form>
925 db_end_transaction(0);
926 style_footer();
927 }
928
929 /*
930 ** WEBPAGE: setup_wiki
931 **
932 ** The "Admin/Wiki" page. Requires Setup privilege.
933 */
934 void setup_wiki(void){
935 login_check_credentials();
936 if( !g.perm.Setup ){
937 login_needed(0);
938 return;
939 }
940
941 style_header("Wiki Configuration");
942 db_begin_transaction();
943 @ <form action="%s(g.zTop)/setup_config" method="post"><div>
944 login_insert_csrf_secret();
945 @ <input type="submit" name="submit" value="Apply Changes" /></p>
946 @ <hr />
947 onoff_attribute("Enable WYSIWYG Wiki Editing",
948 "wysiwyg-wiki", "wysiwyg-wiki", 0, 0);
949 @ <p>Enable what-you-see-is-what-you-get (WYSIWYG) editing of wiki pages.
950 @ The WYSIWYG editor generates HTML instead of markup, which makes
951 @ subsequent manual editing more difficult.
952 @ (Property: "wysiwyg-wiki")</p>
953 @ <hr />
954 onoff_attribute("Use HTML as wiki markup language",
955 "wiki-use-html", "wiki-use-html", 0, 0);
956 @ <p>Use HTML as the wiki markup language. Wiki links will still be parsed
957 @ but all other wiki formatting will be ignored. This option is helpful
958

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button