Bug 35935: Ensure login branch will be used after incorrect login
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / intranet-main.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE Branches %]
5 [% USE KohaDates %]
6 [% PROCESS 'i18n.inc' %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% FILTER collapse %]
10     [% t("Koha staff interface") | html %]
11 [% END %]</title>
12 [% Asset.css("css/mainpage.css") | $raw %]
13 [% INCLUDE 'doc-head-close.inc' %]
14 </head>
15
16 <body id="main_intranet-main" class="intranet-main">
17     [% WRAPPER 'header.inc' %]
18         [% INCLUDE 'home-search.inc' %]
19     [% END %]
20
21     [% WRAPPER 'sub-header.inc' %]
22         [% WRAPPER breadcrumbs %]
23         [% END #/ WRAPPER breadcrumbs %]
24     [% END %]
25
26     <div id="container-main" class="container-fluid">
27         <div class="row">
28             <h1 class="sr-only">Koha home</h1>
29             <div class="col-sm-3">
30                 [% IF ( koha_news.count ) %]
31                     <div id="area-news" class="page-section">
32                         <h3><span class="news_title">News</span></h3>
33                         [% SET show_author = Koha.Preference('NewsAuthorDisplay') == 'staff' || Koha.Preference('NewsAuthorDisplay') == 'both' %]
34                         [% FOREACH koha_new IN koha_news %]
35                             <div class="newsitem" id="news[% koha_new.additional_content_id | html %]"><h4>[% koha_new.title | html %]</h4>
36                                 <div class="newsbody">[% koha_new.content | $raw %]</div>
37                                 <p class="newsfooter"> Posted on [% koha_new.published_on | $KohaDates %][% IF( show_author && koha_new.author ) %] by <span class="newsauthor">[% INCLUDE 'patron-title.inc' patron=koha_new.author %]<br />[% END %]
38                                     [% IF ( CAN_user_tools_edit_additional_contents ) %]
39                                         <a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form&amp;id=[% koha_new.additional_content_id | uri %]">Edit</a>
40                                          | <a class="news_delete" href="/cgi-bin/koha/tools/additional-contents.pl?op=delete_confirmed&amp;ids=[% koha_new.additional_content_id | html %]&amp;csrf_token=[% csrf_token | uri %]">Delete</a>
41                                          | <a href="/cgi-bin/koha/tools/additional-contents.pl?op=add_form">New</a>
42                                     [% END %]
43                                 </p>
44                             </div>
45                         [% END %]
46                     </div><!-- /additional-contents -->
47                 [% END %]
48                 [% IF ( daily_quote ) %]
49                     <div id="area-quote" class="page-section">
50                         <h3>Quote of the day</h3>
51                         <div class="newsitem">
52                             <span id="daily-quote-text">[% daily_quote.text | html %]</span><span id="daily-quote-sep"> ~ </span><span id="daily-quote-source">[% daily_quote.source | html %]</span>
53                         </div>
54                     </div>
55                 [% END %]
56             </div> <!-- /.col-sm-2 -->
57             <div class="col-sm-9 col-lg-6">
58                 <div class="row">
59                     <div class="col-sm-6">
60                         <ul class="biglinks-list">
61                             [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
62                             <li>
63                                 <a class="icon_general icon_circulation" href="/cgi-bin/koha/circ/circulation-home.pl"><i class="fa fa-fw fa-exchange"></i>Circulation</a>
64                             </li>
65                             [% END %]
66
67                             [% IF (CAN_user_borrowers_edit_borrowers) || (CAN_user_borrowers_list_borrowers) %]
68                             <li>
69                                 <a class="icon_general icon_patrons" href="/cgi-bin/koha/members/members-home.pl"><i class="fa fa-fw fa-id-card"></i>Patrons</a>
70                             </li>
71                             [% END %]
72
73                             [% IF ( CAN_user_catalogue ) %]
74                             <li>
75                                 <a class="icon_general icon_search" href="/cgi-bin/koha/catalogue/search.pl">
76                                     <span class="fa-stack">
77                                         <i class="fa fa-fw fa-book fa-stack-1x"></i>
78                                         <i class="fa fa-fw fa-search fa-stack-2x"></i>
79                                     </span>
80                                     Advanced search
81                                 </a>
82                             </li>
83                             <li>
84                                 <a class="icon_general icon_search" href="/cgi-bin/koha/catalogue/itemsearch.pl">
85                                     <span class="fa-stack">
86                                         <i class="fa fa-fw fa-list fa-stack-1x"></i>
87                                         <i class="fa fa-fw fa-search fa-stack-2x"></i>
88                                     </span>
89                                     Item search
90                                 </a>
91                             </li>
92                             [% END %]
93
94                             <li>
95                                 <a class="icon_general icon_lists" href="/cgi-bin/koha/virtualshelves/shelves.pl"><i class="fa fa-fw fa-list-alt"></i>Lists</a>
96                             </li>
97
98                             [% IF ( UseCourseReserves ) %]
99                                 <li>
100                                     <a class="icon_general icon_course_reserves" href="/cgi-bin/koha/course_reserves/course-reserves.pl"><i class="fa fa-fw fa-book"></i>Course reserves</a>
101                                 </li>
102                             [% END %]
103
104                             <li>
105                                 <a class="icon_general icon_authorities" href="/cgi-bin/koha/authorities/authorities-home.pl"><i class="fa fa-fw fa-link"></i>Authorities</a>
106                             </li>
107                             [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
108                             <li>
109                                 <a class="icon_general icon_ill" href="/cgi-bin/koha/ill/ill-requests.pl"><i class="fa fa-fw fa-retweet"></i>ILL requests</a>
110                             </li>
111                             [% END %]
112
113                             [% IF Koha.Preference('ERMModule') && CAN_user_erm %]
114                             <li>
115                                 <a class="icon_general icon_erm" href="/cgi-bin/koha/erm/erm.pl"><i class="fa fa-fw fa-external-link-square"></i>E-resource management</a>
116                             </li>
117                             [% END %]
118
119                         </ul>
120                     </div> <!-- /.col-sm-6 -->
121                     <div class="col-sm-6">
122                         <ul class="biglinks-list">
123
124                             [% IF ( Koha.Preference('EnablePointOfSale') && Koha.Preference('UseCashRegisters') && CAN_user_cash_management_takepayment ) %]
125                             <li>
126                                 <a class="icon_general icon_pos" href="/cgi-bin/koha/pos/pay.pl"><i class="fa fa-fw fa-shopping-cart"></i>Point of sale</a>
127                             </li>
128                             [% END %]
129
130                             [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items || ( fast_cataloging && CAN_user_editcatalogue_fast_cataloging || can_see_cataloguing_module ) ) %]
131                             <li>
132                                 <a class="icon_general icon_cataloging" href="/cgi-bin/koha/cataloguing/cataloging-home.pl"><i class="fa fa-fw fa-tag"></i>Cataloging</a>
133                             </li>
134                             [% END %]
135
136                             [% IF ( CAN_user_serials ) %]
137                             <li>
138                                 <a class="icon_general icon_serials" href="/cgi-bin/koha/serials/serials-home.pl"><i class="fa fa-fw fa-newspaper"></i>Serials</a>
139                                 <span class="biglink"></span>
140                             </li>
141                             [% END %]
142
143                             [% IF ( CAN_user_acquisition ) %]
144                             <li>
145                                 <a class="icon_general icon_acquisitions" href="/cgi-bin/koha/acqui/acqui-home.pl"><i class="fa fa-fw fa-gift"></i>Acquisitions</a>
146                                 <span class="biglink"></span>
147                             </li>
148                             [% END %]
149
150                             [% IF ( CAN_user_reports ) %]
151                             <li>
152                                 <a class="icon_general icon_reports" href="/cgi-bin/koha/reports/reports-home.pl"><i class="fa fa-fw fa-pie-chart"></i>Reports</a>
153                             </li>
154                             [% END %]
155
156                             [% IF Koha.Preference('PreservationModule') && CAN_user_preservation%]
157                             <li>
158                                 <a class="icon_general icon_preservation" href="/cgi-bin/koha/preservation/home.pl"><i class="fa fa-fw fa-book"></i>Preservation</a>
159                             </li>
160                             [% END %]
161
162
163                             [% IF ( CAN_user_tools || CAN_user_clubs ) %]
164                             <li>
165                                 <a class="icon_general icon_tools" href="/cgi-bin/koha/tools/tools-home.pl"><i class="fa fa-fw fa-wrench"></i>Tools</a>
166                             </li>
167                             [% END %]
168
169                             [% IF ( CAN_user_parameters ) %]
170                             <li>
171                                 <a class="icon_general icon_administration" href="/cgi-bin/koha/admin/admin-home.pl"><i class="fa fa-fw fa-gears"></i>Koha administration</a>
172                             </li>
173                             [% END %]
174                             <li>
175                                 <a class="icon_general icon_koha" href="/cgi-bin/koha/about.pl"><img src="[% interface | html %]/[% theme | html %]/img/koha-egg.svg" alt="Koha Logo SVG"/> About Koha</a>
176                             </li>
177                         </ul>
178                     </div> <!-- /.col-sm-6 -->
179
180                 </div> <!-- /.row -->
181                 <div class="row">
182                     <div class="col-sm-12">
183                         [%# Following statement must be in one line for translatability %]
184                         [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_suggestions_suggestions_manage && ( pendingsuggestions || all_pendingsuggestions )) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests || ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count ) || ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && pending_biblio_tickets && CAN_user_editcatalogue_edit_catalogue ) || ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) || already_ran_jobs || new_curbside_pickups.count %]
185                             <div id="area-pending" class="page-section">
186                                 [% IF pending_article_requests %]
187                                 <div class="pending-info" id="article_requests_pending">
188
189                                     <a href="/cgi-bin/koha/circ/article-requests.pl">Article requests</a>:
190                                     <span class="pending-number-link">[% pending_article_requests | html %]</span>
191                                 </div>
192                                 [% END %]
193
194                                 [% IF CAN_user_suggestions_suggestions_manage && ( pendingsuggestions || all_pendingsuggestions ) %]
195                                 <div class="pending-info" id="suggestions_pending">
196
197                                     Suggestions pending approval:
198                                     <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
199                                     <span id="pendingsuggestions" class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pendingsuggestions | html %]</span>
200                                     </a>
201                                     [% IF (all_pendingsuggestions > 0) %]
202                                         /
203                                         <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
204                                             <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
205                                         </a>
206                                     [% END %]
207                                 </div>
208                                 [% END %]
209
210                                 [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) %]
211                                 <div class="pending-info" id="comments_pending">
212                                     <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>:
213                                     <span class="pending-number-link">[% pendingcomments | html %]</span>
214                                 </div>
215                                 [% END %]
216
217                                 [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]
218                                 <div class="pending-info" id="tags_pending">
219                                     <a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>:
220                                     <span class="pending-number-link">[% pendingtags | html %]</span>
221                                 </div>
222                                 [% END %]
223
224
225                                 [% IF ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) %]
226                                 <div class="pending-info" id="patron_updates_pending">
227                                     <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
228                                     <span class="pending-number-link">[% pending_borrower_modifications | html %]</span>
229                                 </div>
230                                 [% END %]
231
232                                 [% IF CAN_user_borrowers_edit_borrowers && pending_discharge_requests %]
233                                 <div class="pending-info" id="patron_discharges_pending">
234                                     <a href="/cgi-bin/koha/members/discharges.pl">Discharge requests pending</a>:
235                                     <span class="pending-number-link">[% pending_discharge_requests | html %]</span>
236                                 </div>
237                                 [% END %]
238
239                                 [% IF ( ( Koha.Preference('OpacCatalogConcerns') || Koha.Preference('CatalogConcerns') ) && pending_biblio_tickets && CAN_user_editcatalogue_edit_catalogue ) %]
240                                 <div class="pending-info" id="catalog_concerns_pending">
241                                     <a href="/cgi-bin/koha/cataloguing/concerns.pl">Catalog concerns pending</a>:
242                                     <span class="pending-number-link">[% pending_biblio_tickets | html %]</span>
243                                 </div>
244                                 [% END %]
245
246                                 [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count %]
247                                     <div class="pending-info" id="checkout_notes_pending">
248                                         <a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes pending</a>:
249                                         <span class="pending-number-link">[% pending_checkout_notes.count | html %]</span>
250                                     </div>
251                                 [% END %]
252
253                                 [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) %]
254                                     <div class="pending-info" id="problem_reports_pending">
255                                         <a href="/cgi-bin/koha/tools/problem-reports.pl">OPAC problem reports pending</a>:
256                                         <span class="pending-number-link">[% pending_problem_reports.count | html %]</span>
257                                     </div>
258                                 [% END %]
259
260                                 [% IF already_ran_jobs %]
261                                     <div class="pending-info" id="background_jobs">
262                                         <a href="/cgi-bin/koha/admin/background_jobs.pl">Access your background jobs</a>
263                                     </div>
264                                 [% END %]
265
266                                 [% IF new_curbside_pickups.count %]
267                                     <div class="pending-info" id="new_curbside_pickups">
268                                         <a href="/cgi-bin/koha/circ/curbside_pickups.pl">New curbside pickups</a>:
269                                         <span class="pending-number-link">[% new_curbside_pickups.count | html %]</span>
270                                     </div>
271                                 [% END %]
272
273                             </div>
274
275                         [% END %]
276
277                     </div> <!-- /.col-sm-12 -->
278                 </div> <!-- /.row -->
279
280                 [% IF ( IntranetmainUserblock ) %]
281                     <div class="row">
282                         <div class="col-sm-12">
283                             <div id="area-userblock" class="page-section">
284                                 <div class="user-info">
285                                     [% IntranetmainUserblock | $raw %]
286                                 </div>
287                             </div>
288                         </div>
289                     </div>
290                 [% END %]
291
292                 <div class="row">
293                     <div class="col-sm-12">
294                         <div id="koha_version"><a href="https://koha-community.org">Koha [% Koha.Version.maintenance | html %]</a></div>
295                     </div>
296                 </div>
297
298             </div> <!-- /.col-sm-9 -->
299
300         </div> <!-- /.row -->
301     </div> <!-- /.container-fluid -->
302
303 [% MACRO jsinclude BLOCK %]
304     <script>
305     //<![CDATA[
306     var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone.");
307         $(document).ready(function(){
308             $(".news_delete").on("click", function(){
309                 return confirmDelete(MSG_CONFIRM_DELETE);
310             });
311         });
312     //]]>
313     </script>
314 [% END %]
315 <!-- the main div is closed in intranet-bottom.inc -->
316 [% INCLUDE 'intranet-bottom.inc' %]