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