]> code.citadel.org Git - citadel.git/blobdiff - webcit/roomops.c
More work on the wiki view. Don't try to use it yet.
[citadel.git] / webcit / roomops.c
index 5ed5c5a3e67709ff7441413bef49a45f02d26e8a..9573fc9b3860bc681a5593b38d2fd35fbb0fc88f 100644 (file)
@@ -8,7 +8,7 @@
 
 char floorlist[128][SIZ];
 
-char *viewdefs[6];
+char *viewdefs[7];
 
 void initialize_viewdefs(void) {
        viewdefs[0] = _("Bulletin Board");
@@ -17,6 +17,7 @@ void initialize_viewdefs(void) {
        viewdefs[3] = _("Calendar");
        viewdefs[4] = _("Task List");
        viewdefs[5] = _("Notes List");
+       viewdefs[6] = _("Wiki");
 }
 
 
@@ -516,6 +517,9 @@ void embed_room_banner(char *got, int navbar_style) {
                                                "</span></a></td>\n", _("Add new note")
                                        );
                                        break;
+                               case VIEW_WIKI:
+                                       /* Don't let users create unlinked pages. */
+                                       break;
                                default:
                                        wprintf(
                                                "<td><a href=\"display_enter\">"
@@ -1861,14 +1865,15 @@ void display_entroom(void)
         wprintf("</SELECT>\n");
 
        /* Our clever little snippet of JavaScript automatically selects
-        * a public room if the view is set to Bulletin Board, and it
-        * selects a mailbox room otherwise.  The user can override this,
-        * of course.
+        * a public room if the view is set to Bulletin Board or wiki, and
+        * it selects a mailbox room otherwise.  The user can override this,
+        * of course.  We also disable the floor selector for mailboxes.
         */
        wprintf("<LI>");
        wprintf(_("Default view for room: "));
         wprintf("<SELECT NAME=\"er_view\" SIZE=\"1\" OnChange=\""
-               "       if (this.form.er_view.value == 0) {     "       
+               "       if ( (this.form.er_view.value == 0)             "
+               "          || (this.form.er_view.value == 6) ) {        "
                "               this.form.type[0].checked=true;         "
                "               this.form.er_floor.disabled = false;    "
                "       }                                               "