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