Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc
Nicholas van Oudtshoorn 722a098eac Bug 10988 - Fixes for comments 57 and 58
Test Plan (remains the same):
     0) Back up your database
     1) Apply all these patches
     2) In your mysql client use your Koha database and execute:
        > DELETE FROM systempreferences;
        > SOURCE ~/kohaclone/installer/data/mysql/sysprefs.sql;
        -- Should be no errors.
        > SELECT * FROM systempreferences LIKE 'GoogleO%';
        -- Should see 4 entries.
        > QUIT;
     3) Restore your database
     4) Run ./installer/data/mysql/updatedatabase.pl;
     5) In your mysql client use your Koha database and execute:
        > SELECT * FROM systempreferences LIKE 'GoogleO%';
        -- Should see the same 4 entries.
     6) Log into the staff client
     7) Home -> Koha administration -> Global system preferences
     8) -> OPAC
        -- make sure your OPACBaseURL is set (e.g. https://opac.koha.ca)
     9) -> Administration
        -- There should be a 'Google OAuth2' section with the ability
           to set those 4 system preferences.
    10) In a new tab, go to https://console.developers.google.com/project
    11) Click 'Create Project'
    12) Type in a project name that won't freak users out, like your
        library name (e.g. South Pole Library).
    13) Click the 'Create' button.
    14) Click the 'APIs & auth' in the left frame.
    15) Click 'Credentials'
    16) Click 'Create new Client ID'
    17) Select 'Web application' and click 'Configure consent screen'.
    18) Select the Email Address.
    19) Put it a meaningful string into the Product Name
        (e.g. South Pole Library Authentication)
    20) Fill in the other fields as desired (or not)
    21) Click 'Save'
    22) Change the 'AUTHORIZED JAVASCRIPT ORIGINS' to your OPACBaseURL.
        (http://library.yourDNS.org)
    23) Change the 'AUTHORIZED REDIRECT URIS' to point to the new
        googleoauth2 script
        (http://library.yourDNS.org/cgi-bin/koha/svc/auth/googleopenidconnect)
    24) Click 'Create Client ID'
    25) Copy and paste the 'CLIENT ID' into the GoogleOAuth2ClientID
        system preference.
    26) Copy and paste the 'CLIENT SECRET' into the GoogleOAuth2ClientSecret
        system preference.
    27) Change the GoogleOpenIDConnect preference to 'Use'.
    28) Click 'Save all Administration preferences'
    29) In the OPAC, click 'Log in to your account'.
        -- You should get a confirmation request, if you are
            already logged in, OR a login screen if you are not.
        -- You need to have the primary email address set to one
           authenticated by Google in order to log in.
    30) Run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-04-01 19:25:35 +00:00

339 lines
24 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[% USE Koha %]
[% SET OpacLangSelectorMode = Koha.Preference('OpacLangSelectorMode') %]
<div id="wrap">
<div id="header-region" class="noprint">
<div class="navbar navbar-inverse navbar-static-top">
<div class="navbar-inner">
<div class="container-fluid">
<h1 id="logo">
<a class="brand" href="/cgi-bin/koha/opac-main.pl">
[% IF ( LibraryNameTitle ) %]
[% LibraryNameTitle %]
[% ELSE %]
Koha online
[% END %]
</a>
</h1>
[% IF ( Koha.Preference( 'opacbookbag' ) == 1 ) %]
<div id="cartDetails" class="cart-message">Your cart is empty.</div>
[% END %]
<ul class="nav">
[% IF ( Koha.Preference( 'opacbookbag' ) == 1 ) %]
<li class="dropdown">
<a href="#" title="Collect items you are interested in" class="dropdown-toggle" id="cartmenulink" data-toggle="dropdown" role="button">
<i id="carticon" class="icon-shopping-cart icon-white"></i> <span class="cartlabel">Cart</span> <span id="basketcount"></span> <b class="caret"></b>
</a>
<ul aria-labelledby="cartmenulink" role="menu" class="dropdown-menu">
<li role="presentation">
<a href="#" id="cartmenuitem" class="cart-message" tabindex="-1" role="menuitem">Your cart is empty.</a>
</li>
</ul>
</li>
[% END %]
[% IF ( Koha.Preference( 'virtualshelves' ) == 1 ) && ( Koha.Preference( 'opacbookbag' ) == 1 ) %]
<li class="divider-vertical"></li>
[% END %]
[% IF ( Koha.Preference( 'virtualshelves' ) == 1 ) %]
<li class="dropdown">
<a href="#" title="Show lists" class="dropdown-toggle" id="listsmenu" data-toggle="dropdown" role="button"><i class="icon-list icon-white"></i> <span class="listslabel">Lists</span> <b class="caret"></b></a>
<ul aria-labelledby="listsmenu" role="menu" class="dropdown-menu">
[% IF some_public_shelves.count %]
<li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=2" tabindex="-1" role="menuitem"><strong>Public lists</strong></a></li>
[% SET number_of_public_shelves = 0 %]
[% FOREACH s IN some_public_shelves %]
<li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% s.shelfnumber %]&amp;sortfield=[% s.sortfield %]" tabindex="-1" role="menuitem">[% s.shelfname |html %]</a></li>
[% SET number_of_public_shelves = number_of_public_shelves + 1 %]
[% IF number_of_public_shelves >= 10 %][% LAST %][% END %]
[% END %]
[% IF some_public_shelves > 10 %]
<li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=2" tabindex="-1" role="menuitem" class="listmenulink">View All</a></li>
[% END %]
[% ELSE %]
<li role="presentation"><a href="#" tabindex="-1" class="menu-inactive" role="menuitem">No public lists</a></li>
[% END %]
<li class="divider" role="presentation"></li>
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
<li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1" tabindex="-1" role="menuitem"><strong>Your lists</strong></a></li>
[% IF loggedinusername %]
[% IF some_private_shelves.count %]
[% SET number_of_private_shelves = 0 %]
[% FOREACH s IN some_private_shelves %]
<li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=view&amp;shelfnumber=[% s.shelfnumber %]&amp;sortfield=[% s.sortfield %]" tabindex="-1" role="menuitem">[% s.shelfname |html %]</a></li>
[% SET number_of_private_shelves = number_of_private_shelves + 1 %]
[% IF number_of_private_shelves >= 10 %][% LAST %][% END %]
[% END %]
[% IF some_private_shelves > 10 %]
<li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1" tabindex="-1" role="menuitem" class="listmenulink">View All</a></li>
[% END %]
[% ELSE %]
<li role="presentation"><a href="#" tabindex="-1" class="menu-inactive" role="menuitem">No private lists</a></li>
<li role="presentation"><a href="/cgi-bin/koha/opac-shelves.pl?op=list&amp;category=1" tabindex="-1" role="menuitem" class="listmenulink">New list</a></li>
[% END %]
[% ELSE %]
<li role="presentation"><a href="/cgi-bin/koha/opac-user.pl" tabindex="-1" class="menu-inactive loginModal-trigger" role="menuitem">Log in to create your own lists</a></li>
[% END # / IF loggedinusername %]
[% END # / IF opacuserlogin %]
</ul> <!-- / .dropdown-menu -->
</li> <!-- / .dropdown -->
[% END # / IF virtualshelves %]
</ul> <!-- / .nav -->
[% IF Koha.Preference( 'virtualshelves' ) == 1 %]<div id="listsDetails"></div>[% END %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 || opaclanguagesdisplay || EnableOpacSearchHistory %]
<a id="user-menu-trigger" class="pull-right" href="#"><i class="icon-user"></i> <span class="caret"></span></a>
<div id="members">
<ul class="nav pull-right">
[% INCLUDE 'masthead-langmenu.inc' %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
[% UNLESS ( loggedinusername ) %]
[% IF Koha.Preference('casAuthentication') %]
[%# CAS authentication is too complicated for modal window %]
<li><a href="/cgi-bin/koha/opac-user.pl">Log in to your account</a></li>
[% ELSIF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %]
<li><a href="/cgi-bin/koha/svc/auth/googleopenidconnect" role="button" data-toggle="modal">Log in to your account</a></li>
[% ELSE %]
<li><a href="/cgi-bin/koha/opac-user.pl" class="loginModal-trigger" role="button" data-toggle="modal">Log in to your account</a></li>
[% END %]
[% END %]
[% IF ( loggedinusername ) %]
<li><p class="members navbar-text">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername">[% USER_INFO.title %] [% USER_INFO.firstname %] [% USER_INFO.surname %]</span></a></p></li>
<li class="divider-vertical"></li>
[% END %]
[% END %]
[% IF EnableOpacSearchHistory %]
<li><p class="navbar-text"><a href="/cgi-bin/koha/opac-search-history.pl" title="View your search history">Search history</a> [<a class="logout" href="/cgi-bin/koha/opac-search-history.pl?action=delete" title="Delete your search history" onclick="return confirm(MSG_DELETE_SEARCH_HISTORY);">x</a>]</p></li>
<li class="divider-vertical"></li>
[% END %]
[% IF Koha.Preference( 'opacuserlogin' ) == 1 %]
[% IF ( loggedinusername ) %]
<li><p class="navbar-text">
[% IF persona %]
<a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1" onclick='navigator.id.logout();'>
[% ELSE %]
<a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1">
[% END %]
Log out</a></p></li>
[% END %]
[% END %]
</ul>
</div> <!-- /members -->
[% END # IF opacuserlogin %]
</div> <!-- /container-fluid -->
</div> <!-- /navbar-inner -->
</div> <!-- /navbar -->
[% IF ( opacheader ) %]
<div class="container-fluid">
<div class="row-fluid">
<div id="opacheader">
[% opacheader %]
</div>
</div>
</div>
[% END %]
</div> <!-- / header-region -->
<div class="container-fluid">
<div class="row-fluid">
<div id="opac-main-search">
<!-- <div class="span2">
[% IF ( opacsmallimage ) %]
<h1 id="libraryname" style="background-image: url('[% opacsmallimage %]');">
[% ELSE %]
<h1 id="libraryname">
[% END %]
<a href="/cgi-bin/koha/opac-main.pl">[% IF ( LibraryName ) %][% LibraryName %][% ELSE %]Koha Online Catalog[% END %]</a></h1>
</div> /.span2 -->
<div class="span12">
[% IF ( OpacPublic ) %]
[% UNLESS ( advsearch ) %]
[% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
<div class="mastheadsearch librarypulldown">
[% ELSE %]
<div class="mastheadsearch">
[% END %]
[% IF Koha.Preference('OpacCustomSearch') == '' %]
<form name="searchform" method="get" action="/cgi-bin/koha/opac-search.pl" id="searchform" class="form-inline">
<label for="masthead_search"> Search
[% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
[% IF ( mylibraryfirst ) %]
(in [% mylibraryfirst %] only)
[% END %]
[% END %]
</label>
<select name="idx" id="masthead_search">
[% IF ( ms_kw ) %]
<option selected="selected" value="">Library catalog</option>
[% ELSE %]
<option value="">Library catalog</option>
[% END # /ms_kw %]
[% IF ( ms_ti ) %]
<option selected="selected" value="ti">Title</option>
[% ELSE %]
<option value="ti">Title</option>
[% END # /ms_ti %]
[% IF ( ms_au ) %]
<option selected="selected" value="au">Author</option>
[% ELSE %]
<option value="au">Author</option>
[% END # /ms_au%]
[% IF ( ms_su ) %]
<option selected="selected" value="su">Subject</option>
[% ELSE %]
<option value="su">Subject</option>
[% END # /ms_su %]
[% IF ( ms_nb ) %]
<option selected="selected" value="nb">ISBN</option>
[% ELSE %]
<option value="nb">ISBN</option>
[% END # /ms_nb%]
[% IF ( ms_se ) %]
<option selected="selected" value="se">Series</option>
[% ELSE %]
<option value="se">Series</option>
[% END # /ms_se %]
[% IF ( numbersphr ) %]
[% IF ( ms_callnum ) %]
<option selected="selected" value="callnum,phr">Call number</option>
[% ELSE %]
<option value="callnum,phr">Call number</option>
[% END #/ms_callnum %]
[% ELSE %]
[% IF ( ms_callnum ) %]
<option selected="selected" value="callnum">Call number</option>
[% ELSE %]
<option value="callnum">Call number</option>
[% END # /ms_callnum %]
[% END # /numbersphr %]
</select>
[% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
<div class="input-append nolibrarypulldown">
[% END %]
[% IF ( ms_value ) %]
<input type="text" title="Type search term" class="transl1" id = "translControl1" name="q" value="[% ms_value |html %]" /><span id="translControl"></span>
[% ELSE %]
<input type="text" title="Type search term" class="transl1" id = "translControl1" name="q" /><span id="translControl"></span>
[% END # /ms_value %]
[% UNLESS ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
<button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
</div>
[% END %]
[% IF ( Koha.Preference( 'OpacAddMastheadLibraryPulldown' ) == 1 ) %]
<div class="input-append">
<select name="branch_group_limit" id="select_library">
<option value="">All libraries</option>
[% IF BranchCategoriesLoop %]<optgroup label="Libraries">[% END %]
[% FOREACH BranchesLoo IN BranchesLoop %]
[% IF ( BranchesLoo.selected ) %]<option selected="selected" value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>
[% ELSE %]<option value="branch:[% BranchesLoo.value %]">[% BranchesLoo.branchname %]</option>[% END %]
[% END %]
[% IF BranchCategoriesLoop %]
</optgroup>
<optgroup label="Groups">
[% FOREACH bc IN BranchCategoriesLoop %]
[% IF bc.categorycode == opac_name %]
<option selected="selected" value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
[% ELSE %]
<option value="multibranchlimit-[% bc.categorycode %]">[% bc.categoryname %]</option>
[% END # / bc.selected %]
[% END %]
</optgroup>
[% END # / BranchCategoriesLoop %]
</select>
<button type="submit" id="searchsubmit" class="btn btn-primary">Go</button>
</div>
[% ELSE %]
[% IF ( opac_limit_override ) %]
[% IF ( opac_search_limit ) %]
<input name="limit" value="[% opac_search_limit %]" type="hidden" />
[% END %]
[% ELSE %]
[% IF ( mylibraryfirst ) %]
<input name="limit" value="branch:[% mylibraryfirst %]" type="hidden" />
[% END %]
[% END # / opac_limit_override %]
[% END # / OpacAddMastheadLibraryPulldown %]
</form>
[% ELSE # / Koha.Preference('OpacCustomSearch') == '' %]
[% Koha.Preference('OpacCustomSearch') %]
[% END # / Koha.Preference('OpacCustomSearch') == '' %]
</div> <!-- / .mastheadsearch -->
[% END # / UNLESS advsearch %]
<div class="row-fluid">
<div id="moresearches">
<ul>
<li><a href="/cgi-bin/koha/opac-search.pl">Advanced search</a></li>
[% IF ( Koha.Preference( 'UseCourseReserves' ) == 1 ) %]<li><a href="/cgi-bin/koha/opac-course-reserves.pl">Course reserves</a></li>[% END %]
[% IF Koha.Preference( 'OpacBrowser' ) == 1 %]<li><a href="/cgi-bin/koha/opac-browser.pl">Browse by hierarchy</a></li>[% END %]
[% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]<li><a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a></li>[% END %]
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'reviewson' ) == 1 ) && ( Koha.Preference( 'OpacShowRecentComments' ) == 1 ) ) %]<li><a href="/cgi-bin/koha/opac-showreviews.pl">Recent comments</a></li>[% END %]
[% IF Koha.Preference( 'TagsEnabled' ) == 1 %]<li><a href="/cgi-bin/koha/opac-tags.pl">Tag cloud</a></li>[% END %]
[% IF Koha.Preference( 'OpacCloud' ) == 1 %]<li><a href="/cgi-bin/koha/opac-tags_subject.pl">Subject cloud</a></li>[% END %]
[% IF Koha.Preference( 'OpacTopissue' ) == 1 %]<li><a href="/cgi-bin/koha/opac-topissues.pl">Most popular</a></li>[% END %]
[% IF Koha.Preference( 'suggestion' ) == 1 %]
[% IF Koha.Preference( 'AnonSuggestions' ) == 1 %]
<li><a href="/cgi-bin/koha/opac-suggestions.pl">Purchase suggestions</a></li>
[% ELSIF ( ( Koha.Preference( 'OPACViewOthersSuggestions' ) == 1 ) ) %]
<li><a href="/cgi-bin/koha/opac-suggestions.pl">Purchase suggestions</a></li>
[% END %]
[% END %]
</ul>
</div> <!-- /#moresearches -->
</div> <!-- /.row-fluid -->
[% END # / OpacPublic %]
</div> <!-- /.span10 -->
</div> <!-- /.opac-main-search -->
</div> <!-- / .row-fluid -->
</div> <!-- /.container-fluid -->
<!-- Login form hidden by default, used for modal window -->
<div id="loginModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="modalLoginLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="modalLoginLabel">Log in to your account</h3>
</div>
<form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="modalAuth">
<div class="modal-body">
[% IF ( shibbolethAuthentication ) %]
[% IF ( invalidShibLogin ) %]
<!-- This is what is displayed if shibboleth login has failed to match a koha user -->
<div class="alert alert-info">
<p>Sorry, your Shibboleth identity does not match a valid library identity. If you have a local login, you may use that below.</p>
</div>
[% ELSE %]
<h4>Shibboleth Login</h4>
<p>If you have a Shibboleth account, please <a href="[% shibbolethLoginUrl %]">click here to login</a>.</p>
<h4>Local Login</h4>
[% END %]
[% END %]
<input type="hidden" name="koha_login_context" value="opac" />
<fieldset class="brief">
<label for="muserid">Login:</label><input type="text" id="muserid" name="userid" />
<label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" />
[% IF Koha.Preference('OpacPasswordChange') && Koha.Preference('OpacResetPassword') %]
<div id="forgotpassword-modal">
<a href="/cgi-bin/koha/opac-password-recovery.pl">Forgot your password?</a>
</div>
[% END %]
[% IF Koha.Preference( 'NoLoginInstructions' ) %]
<div id="nologininstructions-modal">
[% Koha.Preference( 'NoLoginInstructions' ) %]
</div>
[% END %]
[% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<div id="mpatronregistration"><p>Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></p></div>[% END %]
</fieldset>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-primary" value="Log in" />
<a href="#" data-dismiss="modal" aria-hidden="true" class="cancel">Cancel</a>
</div>
</form> <!-- /#auth -->
</div> <!-- /#modalAuth -->