From: Reini U. <ru...@us...> - 2004-03-26 03:24:17
|
Update of /cvsroot/phpwiki/phpwiki/themes/Sidebar/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10711/templates Added Files: body.tmpl calendar.tmpl signin.tmpl Log Message: Added flat jscalendar to SideBar theme. A real-time clock when the calender is not shown. Shorter signin strings. --- NEW FILE: body.tmpl --- <?php // -*-html-*- rcs_id('$Id: body.tmpl,v 1.1 2004/03/26 03:13:23 rurban Exp $'); ?> <body<?= $Theme->getMoreAttr('body') ?>> <div id="header"><?php // for top-and-bottom toolbars style sheet ?> <?= Template('top') ?> </div> <?php /* Today's calendar page for the user, if the Calender subpage is defined. */ $UserCalPageTitle = $user->getId() . SUBPAGE_SEPARATOR . _("Calendar"); $dbi = $request->getDbh(); // display flat calender dhtml under the clock if ($dbi->isWikiPage($UserCalPageTitle)) { ?> <?= Template('calendar') ?> <?php } else { ?> <div id="clock"> <? include($Theme->_findFile("clock.php")); ?> </div> <?php } ?> <?= $CONTENT ?> <?= Template('bottom') ?> </body> --- NEW FILE: calendar.tmpl --- <?php // -*-html-*- rcs_id('$Id: calendar.tmpl,v 1.1 2004/03/26 03:13:23 rurban Exp $'); ?> <div id="calendar"> <?= JavaScript(' function dateChanged(calendar) { if (calendar.dateClicked) { var y = calendar.date.getFullYear(); var m = calendar.date.getMonth(); // integer, 0..11 var d = calendar.date.getDate(); // integer, 1..31 m = m < 10 ? "0" + m : m; d = d < 10 ? "0" + d : d; window.location = "' . $Theme->calendarBase() . SUBPAGE_SEPARATOR . '" + y + "-" + m + "-" + d; } }; Calendar.setup({flat : "calendar", flatCallback : dateChanged, weekNumbers : false})') ?> </div> --- NEW FILE: signin.tmpl --- <?php // -*-html-*- rcs_id('$Id: signin.tmpl,v 1.1 2004/03/26 03:13:23 rurban Exp $'); if (empty($FORMNAME)) $FORMNAME = 'signin'; else $NOFORM = true; ?> <?php if (empty($NOFORM)) { ?> <form method="post" action="<?=$request->getURLtoSelf()?>" accept-charset="<?=CHARSET?>" name="<?=$FORMNAME?>"> <?= HiddenInputs($request->getArgs(), false, array('auth')) ?> <?php } ?> <?php if ($user->isAuthenticated()) { $Sep = $Theme->getButtonSeparator(); $SignOutB = $Theme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction'); ?> <?= fmt("User: %s", WikiLink($user->getId(), 'auto')) ?> <?=$Sep?> <script language="JavaScript" type="text/javascript"><!-- document.write('<input type="hidden" name="auth[logout]" value="0" />'); function SignOut() { document.forms["<?=$FORMNAME?>"].elements["auth[logout]"].value = 1; document.forms["<?=$FORMNAME?>"].submit(); } document.write('<?=$SignOutB?>'); // --> </script> <noscript> <?= Button("submit:auth[logout]", _("Sign Out"), 'wikiaction') ?> </noscript> <?php } else { ?> <?php $SignInInput = HTML::input(array('type' => 'text', 'name' => "auth[userid]", 'size' => 12, 'maxlength' => 256, 'onchange' => "SignIn(this.form,false);")); $SignInInput->addTooltip(_("Enter your UserId to sign in")); $userid = $user->getId(); if ($user->isSignedIn()) echo sprintf(_("(User: %s)"), asXml(HTML::a(array( 'href'=>'#', 'title' => sprintf(_("Click to authenticate as %s"),$userid), 'onclick'=>'SignIn(document.forms["'.$FORMNAME.'"],"'.$userid.'");'), $userid))); ?> <script type="text/javascript"> <!-- function SignIn(form,userid) { <?php if (defined('EDITING_POLICY') and EDITING_POLICY) { ?> if (window.focus) { window.open('<?= WikiUrl(EDITING_POLICY) ?>',<!-- url --> 'PleaseReadThisFirst',<!-- window name --> 'width=600,height=430,scrollbars=yes,resizable=yes,toolbar=yes'); } <?php } ?> if (userid) { form.elements["auth[userid]"].value = userid; } form.submit(); } //--> </script> <?= Button("submit:auth[login]", _("Sign In:"), 'wikiaction')?> <?= $SignInInput ?> <noscript> <?= Button("submit:auth[login]", _("Sign In:"), 'wikiaction')?> </noscript> <?php } ?> <?php if (empty($NOFORM)) { ?> </form> <?php } ?> |