Bug 20515: Fix permission check on "ILL request" menu options
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / intranet-main.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha staff client</title>
6 [% Asset.css("css/mainpage.css") %]
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9 <body id="main_intranet-main" class="intranet-main">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'home-search.inc' %]
12
13 <div id="breadcrumbs">Home</div>
14
15     <div id="container-main" class="container-fluid">
16         <div class="row">
17             <div class="col-sm-3">
18                 [% IF ( koha_news_count ) %]
19                     <div id="area-news">
20                         <h3><span class="news_title">News</span></h3>
21                         [% SET newsdisp = Koha.Preference('NewsAuthorDisplay') %]
22                         [% FOREACH koha_new IN koha_news %]
23                             <div class="newsitem" id="news[% koha_new.idnew %]"><h4>[% koha_new.title %]</h4>
24                                 <div class="newsbody">[% koha_new.content %]</div>
25                                 <p class="newsfooter"> Posted on [% koha_new.newdate %][% IF( ( newsdisp == 'staff' || newsdisp == 'both' ) && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title %] </span>[% koha_new.author_firstname %] [% koha_new.author_surname %]<br />[% END %]
26                                     [% IF ( CAN_user_tools ) %]
27                                         <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew %]">Edit</a>
28                                          | <a class="news_delete" href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% koha_new.idnew %]">Delete</a>
29                                          | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>
30                                     [% END %]
31                                 </p>
32                             </div>
33                         [% END %]
34                     </div><!-- /koha-news -->
35                 [% END %]
36             </div> <!-- /.col-sm-2 -->
37             <div class="col-sm-9">
38                 [% IF adminWarning %]
39                     <div id="adminwarning" class="dialog alert">
40                         <p><strong>Warning:</strong> You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p>
41                         <p>Please log in instead with a regular staff account. To create a staff account, create a library, a patron category 'Staff' and add a new patron. Then give this patron permissions from 'More' in the toolbar.</p>
42                         <p><a class="btn btn-default btn-sm" href="/cgi-bin/koha/members/members-home.pl"><i class="fa fa-plus"> </i> Create patron</a></p>
43                     </div>
44                 [% END %]
45                 <div class="row">
46                     <div class="col-xs-6">
47                         <ul class="biglinks-list">
48                             [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
49                             <li>
50                                 <a class="icon_general icon_circulation" href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
51                             </li>
52                             [% END %]
53
54                             [% IF CAN_user_borrowers_edit_borrowers %]
55                             <li>
56                                 <a class="icon_general icon_patrons" href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
57                             </li>
58                             [% END %]
59
60                             [% IF ( CAN_user_catalogue ) %]
61                             <li>
62                                 <a class="icon_general icon_search" href="/cgi-bin/koha/catalogue/search.pl">Advanced search</a>
63                             </li>
64                             [% END %]
65
66                             <li>
67                                 <a class="icon_general icon_lists" href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>
68                             </li>
69
70                             [% IF ( UseCourseReserves ) %]
71                                 <li>
72                                     <a class="icon_general icon_course_reserves" href="/cgi-bin/koha/course_reserves/course-reserves.pl">Course reserves</a>
73                                 </li>
74                             [% END %]
75
76                             [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items ) %]
77                             <li>
78                                 <a class="icon_general icon_cataloging" href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a>
79                             </li>
80                             [% END %]
81                             <li>
82                                 <a class="icon_general icon_authorities" href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
83                             </li>
84                             [% IF Koha.Preference('ILLModule') && (CAN_user_ill || CAN_user_superlibrarian) %]
85                             <li>
86                                 <a class="icon_general icon_ill" href="/cgi-bin/koha/ill/ill-requests.pl">ILL requests</a>
87                             </li>
88                             [% END %]
89                         </ul>
90                     </div> <!-- /.col-xs-6 -->
91                     <div class="col-xs-6">
92                         <ul class="biglinks-list">
93                             [% IF ( CAN_user_serials ) %]
94                             <li>
95                                 <a class="icon_general icon_serials" href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
96                                 <span class="biglink"></span>
97                             </li>
98                             [% END %]
99
100                             [% IF ( CAN_user_acquisition ) %]
101                             <li>
102                                 <a class="icon_general icon_acquisitions" href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
103                                 <span class="biglink"></span>
104                             </li>
105                             [% END %]
106
107                             [% IF ( CAN_user_reports ) %]
108                             <li>
109                                 <a class="icon_general icon_reports" href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
110                             </li>
111                             [% END %]
112
113
114                             [% IF ( CAN_user_tools ) %]
115                             <li>
116                                 <a class="icon_general icon_tools" href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
117                             </li>
118                             [% END %]
119
120                             [% IF ( CAN_user_parameters ) %]
121                             <li>
122                                 <a class="icon_general icon_administration" href="/cgi-bin/koha/admin/admin-home.pl">Koha administration</a>
123                             </li>
124                             [% END %]
125                             <li>
126                                 <a class="icon_general icon_koha" href="/cgi-bin/koha/about.pl">About Koha</a>
127                             </li>
128                         </ul>
129                     </div> <!-- /.col-sm-6 -->
130
131                 </div> <!-- /.row -->
132                 <div class="row">
133                     <div class="col-sm-12">
134                         [%# Following statement must be in one line for translatability %]
135                         [% IF ( ( CAN_user_tools_moderate_comments  && pendingcomments ) || ( CAN_user_tools_moderate_tags && pendingtags ) || ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) || ( CAN_user_acquisition && pendingsuggestions ) || ( CAN_user_borrowers_edit_borrowers && pending_discharge_requests ) || pending_article_requests) %]
136                             <div id="area-pending">
137                                 [% IF pending_article_requests %]
138                                 <div class="pending-info" id="article_requests_pending">
139
140                                     <a href="/cgi-bin/koha/circ/article-requests.pl">Article requests</a>:
141                                     <span class="pending-number-link">[% pending_article_requests %]</span>
142                                 </div>
143                                 [% END %]
144
145                                 [% IF ( CAN_user_acquisition && pendingsuggestions ) %]
146                                 <div class="pending-info" id="suggestions_pending">
147
148                                     <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Suggestions pending approval</a>:
149                                     <span class="pending-number-link">[% pendingsuggestions %]</span>
150                                 </div>
151                                 [% END %]
152
153                                 [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) %]
154                                 <div class="pending-info" id="comments_pending">
155                                     <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>:
156                                     <span class="pending-number-link">[% pendingcomments %]</span>
157                                 </div>
158                                 [% END %]
159
160                                 [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]
161                                 <div class="pending-info" id="tags_pending">
162                                     <a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>:
163                                     <span class="pending-number-link">[% pendingtags %]</span>
164                                 </div>
165                                 [% END %]
166
167
168                                 [% IF ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) %]
169                                 <div class="pending-info" id="patron_updates_pending">
170                                     <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
171                                     <span class="pending-number-link">[% pending_borrower_modifications %]</span>
172                                 </div>
173                                 [% END %]
174
175                                 [% IF CAN_user_borrowers_edit_borrowers && pending_discharge_requests %]
176                                 <div class="pending-info" id="patron_discharges_pending">
177                                     <a href="/cgi-bin/koha/members/discharges.pl">Discharge requests pending</a>:
178                                     <span class="pending-number-link">[% pending_discharge_requests %]</span>
179                                 </div>
180                                 [% END %]
181
182                             </div>
183
184                         [% END %]
185
186                     </div> <!-- /.col-sm-12 -->
187                 </div> <!-- /.row -->
188
189                 [% IF ( IntranetmainUserblock ) %]
190                     <div class="row">
191                         <div class="col-sm-12">
192                             <div id="area-userblock">
193                                 <div class="user-info">
194                                     [% IntranetmainUserblock %]
195                                 </div>
196                             </div>
197                         </div>
198                     </div>
199                 [% END %]
200             </div> <!-- /.col-sm-9 -->
201
202         </div> <!-- /.row -->
203     </div> <!-- /.container-fluid -->
204
205 [% MACRO jsinclude BLOCK %]
206     <script type="text/javascript">
207     //<![CDATA[
208     var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone.");
209         $(document).ready(function(){
210             $(".news_delete").on("click", function(){
211                 return confirmDelete(MSG_CONFIRM_DELETE);
212             });
213         });
214     //]]>
215     </script>
216 [% END %]
217 <!-- the main div is closed in intranet-bottom.inc -->
218 [% INCLUDE 'intranet-bottom.inc' %]