Bug 31162: (QA follow-up) Use new WRAPPPERs and fix help link
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / cataloging-home.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE Branches %]
4 [% SET footerjs = 1 %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Cataloging &rsaquo; Koha</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="cat_cataloging-home" class="cat">
11     [% WRAPPER 'header.inc' %]
12         [% INCLUDE 'cataloging-search.inc' %]
13     [% END %]
14
15     [% WRAPPER 'sub-header.inc' %]
16         <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17             <ol>
18                 <li>
19                     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20                 </li>
21                 <li>
22                     <a href="#" aria-current="page">Cataloging</a>
23                 </li>
24             </ol>
25         </nav>
26     [% END %]
27
28     <div class="main container-fluid">
29         <div class="row">
30             <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
31                 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
32                 <div id="toolbar" class="btn-toolbar">
33                     [% IF Koha.Preference( 'EnableAdvancedCatalogingEditor' ) == 1 && CAN_user_editcatalogue_advanced_editor %]
34                         <a id="useadvanced" href="/cgi-bin/koha/cataloguing/editor.pl" class="btn btn-default"><i class="fa fa-pencil"></i> Advanced editor</a>
35                     [% END %]
36                     <div class="btn-group">
37                         <button class="btn btn-default" id="newRecord"><i class="fa fa-plus"></i> New record</button>
38                         <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
39                         <ul class="dropdown-menu">
40                             <li><a id="newRecordDefault" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=">Default framework</a></li>
41                             [% FOREACH framework IN frameworks %]
42                             <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=[% framework.frameworkcode | uri %]">[% framework.frameworktext | html %]</a></li>
43                             [% END %]
44                         </ul>
45                     </div>
46                     [% IF servers.count > 0 %]
47                     <div class="btn-group">
48                         <button class="btn btn-default" id="z3950search"><i class="fa fa-search"></i> New from Z39.50/SRU</button>
49                         <button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
50                         <ul class="dropdown-menu">
51                             <li id="Default" class="z3950searchFw"><a href="#">Default framework</a></li>
52                             [% FOREACH framework IN frameworks %]
53                             <li id="[% framework.frameworkcode | html %]" class="z3950searchFw"><a href="#">[% framework.frameworktext | html %]</a></li>
54                             [% END %]
55                         </ul>
56                     </div>
57                     [% END # /IF servers.count %]
58                 </div> <!-- /#toolbar -->
59                 [% END # /IF CAN_user_editcatalogue_edit_catalogue %]
60
61                 <h1>Cataloging</h1>
62
63                 <div class="row">
64
65                     <div class="col-sm-4 col-md-4">
66                         [% IF ( CAN_user_tools_stage_marc_import || CAN_user_tools_manage_staged_marc ) %]
67                         <h3>Import</h3>
68                         <ul class="buttons-list">
69                             [% IF ( CAN_user_tools_stage_marc_import ) %]
70                             <li>
71                                 <a class="circ-button" href="/cgi-bin/koha/tools/stage-marc-import.pl"><i class="fa fa-download"></i> Stage records for import</a>
72                             </li>
73                             [% END %]
74
75                             [% IF ( CAN_user_tools_manage_staged_marc ) %]
76                             <li>
77                                 <a class="circ-button" href="/cgi-bin/koha/tools/manage-marc-import.pl"><i class="fa fa-tasks"></i> Manage staged records</a>
78                             </li>
79                             [% END %]
80                         </ul>
81                         [% END %]
82
83                         [% IF ( CAN_user_tools_export_catalog ) %]
84                         <h3>Export</h3>
85                         <ul class="buttons-list">
86                             [% IF ( CAN_user_tools_export_catalog ) %]
87                             <li>
88                                 <a class="circ-button" href="/cgi-bin/koha/tools/export.pl"><i class="fa fa-upload"></i> Export catalog data</a>
89                             </li>
90                             [% END %]
91                         </ul>
92                         [% END %]
93
94                         [% IF ( CAN_user_tools_inventory ) %]
95                         <h3>Reports</h3>
96                         <ul class="buttons-list">
97                             [% IF ( CAN_user_tools_inventory ) %]
98                             <li>
99                                 <a class="circ-button" href="/cgi-bin/koha/tools/inventory.pl"><i class="fa fa-line-chart"></i> Inventory</a>
100                             </li>
101                             [% END %]
102                         </ul>
103                         [% END %]
104
105                     </div>
106
107                     <div class="col-sm-4 col-md-4">
108
109                         [% IF ( CAN_user_tools_items_batchmod || CAN_user_tools_items_batchdel || CAN_user_tools_records_batchmod || CAN_user_tools_records_batchdel || CAN_user_tools_marc_modification_templates ) %]
110                         <h3>Batch editing</h3>
111                         <ul class="buttons-list">
112                             [% IF ( CAN_user_tools_items_batchmod ) %]
113                             <li>
114                                 <a class="circ-button" href="/cgi-bin/koha/tools/batchMod.pl"><i class="fa fa-pencil"></i> Batch item modification</a>
115                             </li>
116                             [% END %]
117                             [% IF ( CAN_user_tools_items_batchdel ) %]
118                             <li>
119                                 <a class="circ-button" href="/cgi-bin/koha/tools/batchMod.pl?del=1"><i class="fa fa-trash"></i> Batch item deletion</a>
120                             </li>
121                             [% END %]
122                             [% IF CAN_user_tools_records_batchmod %]
123                             <li>
124                                 <a class="circ-button" href="/cgi-bin/koha/tools/batch_record_modification.pl"><i class="fa fa-pencil"></i> Batch record modification</a>
125                             </li>
126                             [% END %]
127                             [% IF CAN_user_tools_records_batchdel %]
128                             <li>
129                                 <a class="circ-button" href="/cgi-bin/koha/tools/batch_delete_records.pl"><i class="fa fa-trash"></i> Batch record deletion</a>
130                             </li>
131                             [% END %]
132
133                             [% IF ( CAN_user_tools_marc_modification_templates ) %]
134                             <li>
135                                 <a class="circ-button" href="/cgi-bin/koha/tools/marc_modification_templates.pl"><i class="fa fa-gear"></i> MARC modification templates</a>
136                             </li>
137                             [% END %]
138                         </ul>
139                         [% END %]
140
141                         [% IF ( CAN_user_tools_items_batchmod || ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) ) %]
142                         <h3>Automation</h3>
143                         <ul class="buttons-list">
144                             [% IF ( CAN_user_tools_items_batchmod ) %]
145                             <li>
146                                 <a class="circ-button" href="/cgi-bin/koha/tools/automatic_item_modification_by_age.pl"><i class="fa fa-calendar"></i> Item modifications by age</a>
147                             </li>
148                             [% END %]
149                             [% IF ( CAN_user_stockrotation_manage_rotas && Koha.Preference('StockRotation') ) %]
150                             <li>
151                                 <a class="circ-button" href="/cgi-bin/koha/tools/stockrotation.pl"><i class="fa fa-refresh"></i> Stock rotation</a>
152                             </li>
153                             [% END %]
154                         </ul>
155                         [% END %]
156
157                     </div>
158
159                     <div class="col-sm-4 col-md-4">
160
161                         [% IF ( CAN_user_tools_label_creator || CAN_user_tools_upload_local_cover_images ) %]
162                         <h3>Tools</h3>
163                         <ul class="buttons-list">
164                             [% IF ( CAN_user_tools_label_creator ) %]
165                             <li>
166                                 <a class="circ-button" href="/cgi-bin/koha/labels/label-home.pl"><i class="fa fa-hashtag"></i> Label creator</a>
167                             </li>
168
169                             <li>
170                                 <a class="circ-button" href="/cgi-bin/koha/labels/barcode-print.pl"><i class="fa fa-barcode"></i> Barcode image generator</a>
171                             </li>
172
173                             <li>
174                                 <a class="circ-button" href="/cgi-bin/koha/labels/spinelabel-home.pl"><i class="fa fa-hashtag"></i> Quick spine label creator</a>
175                             </li>
176                             [% END %]
177
178                             [% IF ( CAN_user_tools_upload_local_cover_images ) %]
179                             <li>
180                                 <a class="circ-button" href="/cgi-bin/koha/tools/upload-cover-image.pl"><i class="fa fa-upload"></i> Upload local cover image</a>
181                             </li>
182                             [% END %]
183
184                         </ul>
185                         [% END %]
186
187                         [% IF ( CAN_user_parameters ) %]
188                         <h3>Administration</h3>
189                         <ul class="buttons-list">
190                             [% IF ( CAN_user_parameters_manage_sysprefs ) %]
191                             <li>
192                                 <a class="circ-button" href="/cgi-bin/koha/admin/preferences.pl?tab=cataloguing"><i class="fa fa-tasks"></i> Preferences</a>
193                             </li>
194                             [% END %]
195                             <li>
196                                 <a class="circ-button" href="/cgi-bin/koha/admin/admin-home.pl"><i class="fa fa-cogs"></i> Configuration</a>
197                             </li>
198                         </ul>
199                         [% END %]
200
201                     </div>
202                 </div>
203             </div>
204         </div>
205
206 [% MACRO jsinclude BLOCK %]
207 <script>
208     $(document).ready(function() {
209
210         $("#newRecord").click(function(){
211             var url = $("a#newRecordDefault").prop("href");
212             window.location.href = url;
213             return false;
214         });
215
216         $("#z3950search").click(function(){
217             PopupZ3950("Default");
218             return false;
219         });
220
221         $(".z3950searchFw").click(function(){
222             PopupZ3950($(this).prop('id'));
223             return false;
224         });
225
226         $("#useadvanced").click(function(){
227             Cookies.set( "catalogue_editor_[% logged_in_user.borrowernumber | html %]", "advanced", { expires: 365, path: '/', sameSite: 'Lax' } );
228             return true;
229         });
230     });
231
232     /* this function open a popup to search on z3950 server.  */
233     function PopupZ3950(fw) {
234         var strQuery = GetZ3950Terms(fw);
235         if(strQuery){
236             window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber | html %]"+strQuery,"z3950search",'width=800,height=500,location=yes,toolbar=no,scrollbars=yes,resize=yes');
237         }
238     }
239
240     /* provide Z3950 search points */
241     function GetZ3950Terms(fw){
242         var strQuery="&frameworkcode=" + fw;
243         return strQuery;
244     }
245 </script>
246
247 [% END %]
248 [% INCLUDE 'intranet-bottom.inc' %]