3d377cd7c1
NOTE: This patch introduces code which generates an anonymous session when a patron first browses to OPAC. This anonymous session contains a minimal amount of information including the results of a query to discover all public lists/shevles. When the user logs in, the anonymous session is cleared and a new session created for that user. kohabug 1875 - fix error when editing a patron record C4::Auth::checkauth was not distinguishing between a 'userid' input from an OPAC or staff login form and a 'userid' input from (e.g.,) the patron editor. Consequently, adding or editing a patron record would result in Koha trying to log in as the new patron. To resolve this, added a hidden input to all login forms, 'koha_login_context', to explicitly signal when a login is occurring. The value of this input can be 'opac', 'intranet', or 'sco' - the value is not used at present, but may be of use later. C4::Auth - added debug flag to two warns kohabug 1875 - create anonymous sessions only for OPAC No need to create an anonymous session for the intranet. set yuipath correct for login pages When preparing the template parameters for a login form, C4::Auth was overriding the value of yuipath set by C4::Output::gettemplate(), thus causing 404 errors if the 'yuipath' syspref was set to 'local'. kohabug 1875 - avoid warns viewing lists anonymously During an anonymous OPAC session, the $loggedinuser variable is not set. As the undefined value causes warns in C4::VirtualShelves::Page::shelfpage, for the purpose of the shelfpage call the loggedinuser is set to -1, which should not correspond to any real borrower number. This is admittedly a hack to avoid digging through all of C4::VirtualShelves to deal with lists viewed anonymously. kohabug 1875 Refactoring of &ModShelf to avoid overwriting list owner needlessly kohabug 1875 Avoid warning if can't find owner of shelf Since virtualshelves.owner is not a true FK of borrowersnumber.number, set ownername to '' if can't find the patron Signed-off-by: Joshua Ferraro <jmf@liblime.com>
124 lines
4.5 KiB
Cheetah
124 lines
4.5 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_IF NAME="OpacNav" --><div id="doc3" class="yui-t1"><!-- TMPL_ELSE --><div id="doc3" class="yui-t7"><!-- /TMPL_IF -->
|
|
<div id="bd">
|
|
<!--TMPL_INCLUDE NAME="masthead.inc" -->
|
|
|
|
<div id="yui-main">
|
|
|
|
<div class="yui-b">
|
|
<!-- TMPL_IF NAME="opacuserlogin" -->
|
|
<!-- TMPL_IF NAME="loggedinusername" -->
|
|
<div class="yui-g">
|
|
<div>
|
|
<!-- TMPL_ELSE -->
|
|
<div class="yui-ge">
|
|
<div class="yui-u first">
|
|
<!-- /TMPL_IF -->
|
|
<!-- TMPL_ELSE -->
|
|
<div class="yui-g">
|
|
<div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF name="koha_news_count" -->
|
|
<div id="news" class="container">
|
|
<table>
|
|
<!-- TMPL_LOOP name="koha_news" -->
|
|
<tr><th><!-- TMPL_VAR name="title" --></th></tr>
|
|
<tr><td><p><!-- TMPL_VAR name="new" --></p>
|
|
<p><i>(published on <!-- TMPL_VAR name="newdate" -->)</i></p></td></tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="OpacMainUserBlock" --><div class="container"><!-- TMPL_VAR NAME="OpacMainUserBlock" --></div><!-- /TMPL_IF -->
|
|
|
|
<!-- TMPL_IF NAME="recentacquiloop"-->
|
|
<div class="searchresults">
|
|
<table>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Author</th>
|
|
<th>copyright</th>
|
|
<th>publication year</th>
|
|
<th>Date</th>
|
|
</tr>
|
|
<!-- TMPL_LOOP NAME="recentacquiloop" -->
|
|
<tr>
|
|
<td><p>
|
|
<!-- TMPL_IF name="BiblioDefaultViewmarc" -->
|
|
<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
|
|
<!-- TMPL_IF NAME="title"-->
|
|
<!-- TMPL_VAR NAME="title" -->
|
|
<!-- TMPL_ELSE -->
|
|
<span class="problem">(no title)</span>
|
|
<!-- /TMPL_IF -->
|
|
</a>
|
|
<!-- TMPL_ELSE -->
|
|
<!-- TMPL_IF name="BiblioDefaultViewisbd" -->
|
|
<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
|
|
<!-- TMPL_IF NAME="title"-->
|
|
<!-- TMPL_VAR NAME="title" -->
|
|
<!-- TMPL_ELSE -->
|
|
<span class="problem">(no title)</span>
|
|
<!-- /TMPL_IF -->
|
|
</a>
|
|
<!-- TMPL_ELSE -->
|
|
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
|
|
<!-- TMPL_IF NAME="title"-->
|
|
<!-- TMPL_VAR NAME="title" -->
|
|
<!-- TMPL_ELSE -->
|
|
<span class="problem">(no title)</span>
|
|
<!-- /TMPL_IF -->
|
|
</a>
|
|
<!-- /TMPL_IF -->
|
|
<!-- /TMPL_IF -->
|
|
</p></td>
|
|
<td><a href="/cgi-bin/koha/opac-search.pl?q=au:<!-- TMPL_VAR NAME="author" -->">
|
|
<!-- TMPL_VAR NAME="author" -->
|
|
</a></td>
|
|
<td><!-- TMPL_VAR NAME="copyrightdate" --></td>
|
|
<td><!-- TMPL_VAR NAME="publicationyear" --></td>
|
|
<td><!-- TMPL_VAR NAME="timestamp" --></td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
</div>
|
|
<!-- /TMPL_IF -->
|
|
</div>
|
|
|
|
<!-- TMPL_IF NAME="opacuserlogin" -->
|
|
<!-- TMPL_UNLESS NAME="loggedinusername" -->
|
|
<div class="yui-u">
|
|
<div id="login" class="container">
|
|
<form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="auth">
|
|
<input type="hidden" name="koha_login_context" value="opac" />
|
|
<fieldset class="brief">
|
|
<legend>Log in to Your Account:</legend>
|
|
<ol>
|
|
<li><label for="userid">Login:</label><input type="text" id="userid" size="10" name="userid" /></li>
|
|
<li><label for="password">Password:</label><input type="password" id="password" size="10" name="password" /></li>
|
|
</ol> <fieldset class="action">
|
|
<input type="submit" value="Log In" class="submit" />
|
|
</fieldset></fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<!-- /TMPL_UNLESS -->
|
|
|
|
<!-- /TMPL_IF -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_IF NAME="OpacNav" --><div class="yui-b">
|
|
<div class="container">
|
|
<!--TMPL_INCLUDE NAME="navigation.inc" -->
|
|
</div>
|
|
</div><!-- /TMPL_IF -->
|
|
</div>
|
|
|
|
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
|