* Set up links and templates for the history page, along with a nice set of toggles...
[citadel.git] / webcit / roomops.c
index 456b19ce657c104fcc68a0f178bc8bdb0185a6a8..14c4c359030fa9a883ae8f4dd83ce44b8f258e00 100644 (file)
@@ -663,6 +663,31 @@ void embed_room_banner(char *got, int navbar_style) {
                                        "%s"
                                        "</span></a></li>\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 */
+                                       wprintf(
+                                               "<li class=\"newmess\">"
+                                               "<a href=\"wiki?page=%s\">"
+                                               "<img  src=\"static/newmess3_24x.gif\" "
+                                               "alt=\"\" width=\"24\" height=\"24\">"
+                                               "<span class=\"navbar_link\">"
+                                               "%s"
+                                               "</span></a></li>\n", buf, _("Current version")
+                                               );
+                               }
+                               else {
+                                       /* display a link to the history */
+                                       wprintf(
+                                               "<li class=\"newmess\">"
+                                               "<a href=\"wiki_history?page=%s\">"
+                                               "<img  src=\"static/newmess3_24x.gif\" "
+                                               "alt=\"\" width=\"24\" height=\"24\">"
+                                               "<span class=\"navbar_link\">"
+                                               "%s"
+                                               "</span></a></li>\n", buf, _("History")
+                                               );
+                               }
                                break;
                        case VIEW_MAILBOX:
                                wprintf(