Bug 27251: Rewrite QOTD with the Koha REST API
[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 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha staff interface</title>
8 [% Asset.css("css/mainpage.css") | $raw %]
9 [% INCLUDE 'doc-head-close.inc' %]
10 </head>
11 <body id="main_intranet-main" class="intranet-main">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'home-search.inc' %]
14
15 <div id="breadcrumbs">Home</div>
16
17     <div id="container-main" class="container-fluid">
18         <div class="row">
19             <div class="col-sm-3">
20                 [% IF ( koha_news_count ) %]
21                     <div id="area-news">
22                         <h3><span class="news_title">News</span></h3>
23                         [% SET newsdisp = Koha.Preference('NewsAuthorDisplay') %]
24                         [% FOREACH koha_new IN koha_news %]
25                             <div class="newsitem" id="news[% koha_new.idnew | html %]"><h4>[% koha_new.title | html %]</h4>
26                                 <div class="newsbody">[% koha_new.content | $raw %]</div>
27                                 <p class="newsfooter"> Posted on [% koha_new.newdate | html %][% IF( ( newsdisp == 'staff' || newsdisp == 'both' ) && koha_new.borrowernumber ) %] by <span class="newsauthor_title">[% koha_new.author_title | html %] </span>[% koha_new.author_firstname | html %] [% koha_new.author_surname | html %]<br />[% END %]
28                                     [% IF ( CAN_user_tools ) %]
29                                         <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&amp;id=[% koha_new.idnew | uri %]">Edit</a>
30                                          | <a class="news_delete" href="/cgi-bin/koha/tools/koha-news.pl?op=del&amp;ids=[% koha_new.idnew | html %]">Delete</a>
31                                          | <a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form">New</a>
32                                     [% END %]
33                                 </p>
34                             </div>
35                         [% END %]
36                     </div><!-- /koha-news -->
37                 [% END %]
38                 [% IF ( daily_quote ) %]
39                     <div id="area-news">
40                         <h3>Quote of the day</h3>
41                         <div class="newsitem">
42                             <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>
43                         </div>
44                     </div>
45                 [% END %]
46             </div> <!-- /.col-sm-2 -->
47             <div class="col-sm-9">
48                 <div class="row">
49                     <div class="col-xs-6">
50                         <ul class="biglinks-list">
51                             [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
52                             <li>
53                                 <a class="icon_general icon_circulation" href="/cgi-bin/koha/circ/circulation-home.pl"><i class="fa fa-exchange"></i>Circulation</a>
54                             </li>
55                             [% END %]
56
57                             [% IF CAN_user_borrowers_edit_borrowers %]
58                             <li>
59                                 <a class="icon_general icon_patrons" href="/cgi-bin/koha/members/members-home.pl"><i class="fa fa-id-card-o"></i>Patrons</a>
60                             </li>
61                             [% END %]
62
63                             [% IF ( CAN_user_catalogue ) %]
64                             <li>
65                                 <a class="icon_general icon_search" href="/cgi-bin/koha/catalogue/search.pl"><i class="fa fa-search"></i>Advanced search</a>
66                             </li>
67                             [% END %]
68
69                             <li>
70                                 <a class="icon_general icon_lists" href="/cgi-bin/koha/virtualshelves/shelves.pl"><i class="fa fa-list-alt"></i>Lists</a>
71                             </li>
72
73                             [% IF ( UseCourseReserves ) %]
74                                 <li>
75                                     <a class="icon_general icon_course_reserves" href="/cgi-bin/koha/course_reserves/course-reserves.pl"><i class="fa fa-book"></i>Course reserves</a>
76                                 </li>
77                             [% END %]
78
79                             <li>
80                                 <a class="icon_general icon_authorities" href="/cgi-bin/koha/authorities/authorities-home.pl"><i class="fa fa-link"></i>Authorities</a>
81                             </li>
82                             [% IF Koha.Preference('ILLModule') && CAN_user_ill %]
83                             <li>
84                                 <a class="icon_general icon_ill" href="/cgi-bin/koha/ill/ill-requests.pl"><i class="fa fa-retweet"></i>ILL requests</a>
85                             </li>
86                             [% END %]
87                         </ul>
88                     </div> <!-- /.col-xs-6 -->
89                     <div class="col-xs-6">
90                         <ul class="biglinks-list">
91
92                             [% IF ( Koha.Preference('EnablePointOfSale') && Koha.Preference('UseCashRegisters') && CAN_user_cash_management_takepayment ) %]
93                             <li>
94                                 <a class="icon_general icon_pos" href="/cgi-bin/koha/pos/pay.pl"><i class="fa fa-shopping-cart"></i>Point of sale</a>
95                             </li>
96                             [% END %]
97
98                             [% IF ( CAN_user_editcatalogue_edit_catalogue || CAN_user_editcatalogue_edit_items ) %]
99                             <li>
100                                 <a class="icon_general icon_cataloging" href="/cgi-bin/koha/cataloguing/addbooks.pl"><i class="fa fa-tag"></i>Cataloging</a>
101                             </li>
102                             [% END %]
103
104                             [% IF ( CAN_user_serials ) %]
105                             <li>
106                                 <a class="icon_general icon_serials" href="/cgi-bin/koha/serials/serials-home.pl"><i class="fa fa-newspaper-o"></i>Serials</a>
107                                 <span class="biglink"></span>
108                             </li>
109                             [% END %]
110
111                             [% IF ( CAN_user_acquisition ) %]
112                             <li>
113                                 <a class="icon_general icon_acquisitions" href="/cgi-bin/koha/acqui/acqui-home.pl"><i class="fa fa-gift"></i>Acquisitions</a>
114                                 <span class="biglink"></span>
115                             </li>
116                             [% END %]
117
118                             [% IF ( CAN_user_reports ) %]
119                             <li>
120                                 <a class="icon_general icon_reports" href="/cgi-bin/koha/reports/reports-home.pl"><i class="fa fa-pie-chart"></i>Reports</a>
121                             </li>
122                             [% END %]
123
124
125                             [% IF ( CAN_user_tools ) %]
126                             <li>
127                                 <a class="icon_general icon_tools" href="/cgi-bin/koha/tools/tools-home.pl"><i class="fa fa-wrench"></i>Tools</a>
128                             </li>
129                             [% END %]
130
131                             [% IF ( CAN_user_parameters ) %]
132                             <li>
133                                 <a class="icon_general icon_administration" href="/cgi-bin/koha/admin/admin-home.pl"><i class="fa fa-cogs"></i>Koha administration</a>
134                             </li>
135                             [% END %]
136                             <li>
137                                 <a class="icon_general icon_koha" href="/cgi-bin/koha/about.pl">About Koha<img src="[% interface | html %]/[% theme | html %]/img/koha-egg.svg" alt="Koha Logo SVG"/></a>
138                             </li>
139                         </ul>
140                     </div> <!-- /.col-sm-6 -->
141
142                 </div> <!-- /.row -->
143                 <div class="row">
144                     <div class="col-sm-12">
145                         [%# Following statement must be in one line for translatability %]
146                         [% 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 ) || ( 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 ) %]
147                             <div id="area-pending">
148                                 [% IF pending_article_requests %]
149                                 <div class="pending-info" id="article_requests_pending">
150
151                                     <a href="/cgi-bin/koha/circ/article-requests.pl">Article requests</a>:
152                                     <span class="pending-number-link">[% pending_article_requests | html %]</span>
153                                 </div>
154                                 [% END %]
155
156                                 [% IF ( CAN_user_suggestions_suggestions_manage && pendingsuggestions ) %]
157                                 <div class="pending-info" id="suggestions_pending">
158
159                                     Suggestions pending approval:
160                                     <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=[% Branches.GetLoggedInBranchcode | url %]#ASKED">
161                                     <span id="pendingsuggestions" class="pending-number-link">[% Branches.GetLoggedInBranchname | html %]: [% pendingsuggestions | html %]</span>
162                                     </a>
163                                     [% IF (all_pendingsuggestions > 0) %]
164                                         /
165                                         <a href="/cgi-bin/koha/suggestion/suggestion.pl?branchcode=__ANY__#ASKED">
166                                             <span id="all_pendingsuggestions" class="pending-number-link">All libraries: [% all_pendingsuggestions | html %]</span>
167                                         </a>
168                                     [% END %]
169                                 </div>
170                                 [% END %]
171
172                                 [% IF ( CAN_user_tools_moderate_comments  && pendingcomments ) %]
173                                 <div class="pending-info" id="comments_pending">
174                                     <a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Comments pending approval</a>:
175                                     <span class="pending-number-link">[% pendingcomments | html %]</span>
176                                 </div>
177                                 [% END %]
178
179                                 [% IF ( CAN_user_tools_moderate_tags && pendingtags ) %]
180                                 <div class="pending-info" id="tags_pending">
181                                     <a href="/cgi-bin/koha/tags/review.pl">Tags pending approval</a>:
182                                     <span class="pending-number-link">[% pendingtags | html %]</span>
183                                 </div>
184                                 [% END %]
185
186
187                                 [% IF ( CAN_user_borrowers_edit_borrowers && pending_borrower_modifications ) %]
188                                 <div class="pending-info" id="patron_updates_pending">
189                                     <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
190                                     <span class="pending-number-link">[% pending_borrower_modifications | html %]</span>
191                                 </div>
192                                 [% END %]
193
194                                 [% IF CAN_user_borrowers_edit_borrowers && pending_discharge_requests %]
195                                 <div class="pending-info" id="patron_discharges_pending">
196                                     <a href="/cgi-bin/koha/members/discharges.pl">Discharge requests pending</a>:
197                                     <span class="pending-number-link">[% pending_discharge_requests | html %]</span>
198                                 </div>
199                                 [% END %]
200
201                                 [% IF Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes && pending_checkout_notes.count %]
202                                     <div class="pending-info" id="checkout_notes_pending">
203                                         <a href="/cgi-bin/koha/circ/checkout-notes.pl">Checkout notes pending</a>:
204                                         <span class="pending-number-link">[% pending_checkout_notes.count | html %]</span>
205                                     </div>
206                                 [% END %]
207
208                                 [% IF ( Koha.Preference('OPACReportProblem') && CAN_user_problem_reports && pending_problem_reports.count ) %]
209                                     <div class="pending-info" id="problem_reports_pending">
210                                         <a href="/cgi-bin/koha/tools/problem-reports.pl">OPAC problem reports pending</a>:
211                                         <span class="pending-number-link">[% pending_problem_reports.count | html %]</span>
212                                     </div>
213                                 [% END %]
214
215                             </div>
216
217                         [% END %]
218
219                     </div> <!-- /.col-sm-12 -->
220                 </div> <!-- /.row -->
221
222                 [% IF ( IntranetmainUserblock ) %]
223                     <div class="row">
224                         <div class="col-sm-12">
225                             <div id="area-userblock">
226                                 <div class="user-info">
227                                     [% IntranetmainUserblock | $raw %]
228                                 </div>
229                             </div>
230                         </div>
231                     </div>
232                 [% END %]
233             </div> <!-- /.col-sm-9 -->
234
235         </div> <!-- /.row -->
236     </div> <!-- /.container-fluid -->
237
238 [% MACRO jsinclude BLOCK %]
239     <script type="text/javascript">
240     //<![CDATA[
241     var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this news item? This cannot be undone.");
242         $(document).ready(function(){
243             $(".news_delete").on("click", function(){
244                 return confirmDelete(MSG_CONFIRM_DELETE);
245             });
246         });
247     //]]>
248     </script>
249 [% END %]
250 <!-- the main div is closed in intranet-bottom.inc -->
251 [% INCLUDE 'intranet-bottom.inc' %]