X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Froomops.c;h=1b7925641687d237af1800472de2a4442dabd250;hp=ad90f2d3ad9d580deb9e78fc740b65ba41de92f2;hb=c27e730a913cb5cd2fdd7ab6825b84892b832bf4;hpb=82dd23c039606ec1795a8cdf6d1fdcc3bc2ca504
diff --git a/webcit/roomops.c b/webcit/roomops.c
index ad90f2d3a..1b7925641 100644
--- a/webcit/roomops.c
+++ b/webcit/roomops.c
@@ -258,13 +258,11 @@ void zapped_list(void)
*
*/
-void embed_room_banner(char *got, int navbar_style) {
+void embed_room_banner(char *got)
+{
wcsession *WCC = WC;
char buf[256];
- char buf2[1024];
- char with_files[256];
- int file_count=0;
-
+
/*
* We need to have the information returned by a GOTO server command.
* If it isn't supplied, we fake it by issuing our own GOTO.
@@ -282,7 +280,7 @@ void embed_room_banner(char *got, int navbar_style) {
" room_is_trash = %d; \n"
"\n",
((WC->CurRoom.RAFlags & UA_ISTRASH) != 0)
- );
+ );
/*
* If the user happens to select the "make this my start page" link,
@@ -295,7 +293,7 @@ void embed_room_banner(char *got, int navbar_style) {
StrBufPrintf(WCC->Hdr->this_page,
"dotskip?room=%s",
ChrPtr(WC->CurRoom.name)
- );
+ );
/* Check for new mail. */
WC->new_mail = extract_int(&got[4], 9);
@@ -303,11 +301,11 @@ void embed_room_banner(char *got, int navbar_style) {
do_template("roombanner", NULL);
/* roombanner contains this for mobile */
- if (navbar_style != navbar_none && (WC->is_mobile < 1)) {
+ if (WC->is_mobile < 1) {
wc_printf("
");
- if (navbar_style == navbar_default) wc_printf(
+ wc_printf(
"- "
""
""
@@ -315,7 +313,7 @@ void embed_room_banner(char *got, int navbar_style) {
"
\n", _("Ungoto")
);
- if ( (navbar_style == navbar_default) && (WC->CurRoom.view == VIEW_BBS) ) {
+ if (WC->CurRoom.view == VIEW_BBS) {
wc_printf(
"- "
""
@@ -325,232 +323,228 @@ void embed_room_banner(char *got, int navbar_style) {
);
}
- if (navbar_style == navbar_default) {
- switch(WC->CurRoom.view) {
- case VIEW_ADDRESSBOOK:
- wc_printf(
- "
- "
- ""
- ""
- ""
- "%s"
- "
\n", _("View contacts")
- );
- break;
- case VIEW_CALENDAR:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Day view")
- );
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Month view")
- );
- break;
- case VIEW_CALBRIEF:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Calendar list")
- );
- break;
- case VIEW_TASKS:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("View tasks")
- );
- break;
- case VIEW_NOTES:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("View notes")
- );
- break;
- case VIEW_MAILBOX:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Refresh message list")
- );
- break;
- case VIEW_WIKI:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Wiki home")
- );
- break;
- default:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Read all messages")
- );
- break;
- }
+ switch(WC->CurRoom.view) {
+ case VIEW_ADDRESSBOOK:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("View contacts")
+ );
+ break;
+ case VIEW_CALENDAR:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Day view")
+ );
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Month view")
+ );
+ break;
+ case VIEW_CALBRIEF:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Calendar list")
+ );
+ break;
+ case VIEW_TASKS:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("View tasks")
+ );
+ break;
+ case VIEW_NOTES:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("View notes")
+ );
+ break;
+ case VIEW_MAILBOX:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Refresh message list")
+ );
+ break;
+ case VIEW_WIKI:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Wiki home")
+ );
+ break;
+ default:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Read all messages")
+ );
+ break;
}
- if (navbar_style == navbar_default) {
- switch(WC->CurRoom.view) {
- case VIEW_ADDRESSBOOK:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Add new contact")
- );
- break;
- case VIEW_CALENDAR:
- case VIEW_CALBRIEF:
- wc_printf("- "
- ""
- ""
- "%s"
- "
\n", _("Add new event")
- );
- break;
- case VIEW_TASKS:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Add new task")
- );
- break;
- case VIEW_NOTES:
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", _("Add new note")
- );
- break;
- case VIEW_WIKI:
- safestrncpy(buf, bstr("page"), sizeof buf);
- if (IsEmptyStr(buf)) {
- safestrncpy(buf, "home", sizeof buf);
- }
- str_wiki_index(buf);
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", buf, _("Edit this page")
- );
+ switch(WC->CurRoom.view) {
+ case VIEW_ADDRESSBOOK:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Add new contact")
+ );
+ break;
+ case VIEW_CALENDAR:
+ case VIEW_CALBRIEF:
+ wc_printf("- "
+ ""
+ ""
+ "%s"
+ "
\n", _("Add new event")
+ );
+ break;
+ case VIEW_TASKS:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Add new task")
+ );
+ break;
+ case VIEW_NOTES:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Add new note")
+ );
+ break;
+ case VIEW_WIKI:
+ safestrncpy(buf, bstr("page"), sizeof buf);
+ if (IsEmptyStr(buf)) {
+ safestrncpy(buf, "home", sizeof buf);
+ }
+ str_wiki_index(buf);
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", buf, _("Edit this page")
+ );
- if (bmstrcasestr((char *)ChrPtr(WCC->Hdr->HR.ReqLine), "wiki_history")) {
- /* already viewing history; display a link to the current page */
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", buf, _("Current version")
- );
- }
- else {
- /* display a link to the history */
- wc_printf(
- "- "
- ""
- ""
- ""
- "%s"
- "
\n", buf, _("History")
- );
- }
- break;
- case VIEW_MAILBOX:
+ if (bmstrcasestr((char *)ChrPtr(WCC->Hdr->HR.ReqLine), "wiki_history")) {
+ /* already viewing history; display a link to the current page */
wc_printf(
"- "
- ""
+ ""
""
""
"%s"
- "
\n", _("Write mail")
- );
- wc_printf(
- "- "
- ""
- ""
- "%s"
- "
\n", _("Delete")
+ " \n", buf, _("Current version")
);
- break;
- default:
+ }
+ else {
+ /* display a link to the history */
wc_printf(
"- "
- ""
+ ""
""
""
"%s"
- "
\n", _("Enter a message")
+ "\n", buf, _("History")
);
- break;
}
+ break;
+ case VIEW_MAILBOX:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Write mail")
+ );
+ wc_printf(
+ "- "
+ ""
+ ""
+ "%s"
+ "
\n", _("Delete")
+ );
+ break;
+ default:
+ wc_printf(
+ "- "
+ ""
+ ""
+ ""
+ "%s"
+ "
\n", _("Enter a message")
+ );
+ break;
}
- if (navbar_style == navbar_default) wc_printf(
+ wc_printf(
"- "
""
@@ -561,8 +555,8 @@ void embed_room_banner(char *got, int navbar_style) {
_("Leave all messages marked as unread, go to next room with unread messages"),
_("Skip this room")
);
-
- if (navbar_style == navbar_default) wc_printf(
+
+ wc_printf(
"
- "
""
@@ -573,10 +567,9 @@ void embed_room_banner(char *got, int navbar_style) {
_("Mark all messages as read, go to next room with unread messages"),
_("Goto next room")
);
-
+
wc_printf("
\n");
}
-
}
@@ -3295,7 +3288,7 @@ void tmplput_current_room(StrBuf *Target, WCTemplputParams *TP)
void tmplput_roombanner(StrBuf *Target, WCTemplputParams *TP)
{
wc_printf("\n");
- embed_room_banner(NULL, navbar_default);
+ embed_room_banner(NULL);
wc_printf("
\n");
}