Lines 16-25
Link Here
|
16 |
|
16 |
|
17 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Usage statistics</div> |
17 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Usage statistics</div> |
18 |
|
18 |
|
19 |
<div id="doc3" class="yui-t2"> |
19 |
<div class="main container-fluid"> |
20 |
<div id="bd"> |
20 |
<div class="row"> |
21 |
<div id="yui-main"> |
21 |
<div class="col-sm-10 col-sm-push-2"> |
22 |
<div class="yui-b"> |
22 |
<main> |
23 |
|
23 |
|
24 |
[% FOR m IN messages %] |
24 |
[% FOR m IN messages %] |
25 |
<div class="dialog [% m.type | html %]"> |
25 |
<div class="dialog [% m.type | html %]"> |
Lines 50-219
Link Here
|
50 |
|
50 |
|
51 |
<form id="category_form" action="/cgi-bin/koha/admin/usage_statistics.pl" method="post"> |
51 |
<form id="category_form" action="/cgi-bin/koha/admin/usage_statistics.pl" method="post"> |
52 |
<h1>Modify the statistics you share with the Koha community</h1> |
52 |
<h1>Modify the statistics you share with the Koha community</h1> |
53 |
<fieldset class="rows"> |
53 |
<div class="row"> |
54 |
<ol style="float:left;"> |
54 |
<div class="col-xs-12 col-sm-6"> |
55 |
<li> |
55 |
<fieldset class="rows"> |
56 |
<label for="UsageStats">Share my Koha usage statistics: </label> |
56 |
<ol> |
57 |
<select name="UsageStats" id="UsageStats"> |
57 |
<li> |
58 |
[% IF Koha.Preference('UsageStats') %] |
58 |
<label for="UsageStats">Share my Koha usage statistics: </label> |
59 |
<option value="1" selected="selected">Yes</option> |
59 |
<select name="UsageStats" id="UsageStats"> |
60 |
<option value="0">No</option> |
60 |
[% IF Koha.Preference('UsageStats') %] |
61 |
[% ELSE %] |
61 |
<option value="1" selected="selected">Yes</option> |
62 |
<option value="1">Yes</option> |
62 |
<option value="0">No</option> |
63 |
<option value="0" selected="selected">No</option> |
|
|
64 |
[% END %] |
65 |
</select> |
66 |
</li> |
67 |
<li> |
68 |
<label for="UsageStatsCountry">Your country: </label> |
69 |
[% SET UsageStatsCountry = Koha.Preference('UsageStatsCountry') %] |
70 |
[% SET IsUsageStatsCountryValid = 0 %] |
71 |
[% IF NOT UsageStatsCountry %] |
72 |
[% SET IsUsageStatsCountryValid = 1 %] |
73 |
[% END %] |
74 |
[% PROCESS 'country-list.inc' %] |
75 |
<select name="UsageStatsCountry" id="UsageStatsCountry"> |
76 |
<option value=""> </option> |
77 |
[% FOR country IN countries %] |
78 |
[% IF country == UsageStatsCountry %] |
79 |
<option value="[% country | html %]" selected="selected">[% country | html %]</option> |
80 |
[% SET IsUsageStatsCountryValid = 1 %] |
81 |
[% ELSE %] |
63 |
[% ELSE %] |
82 |
<option value="[% country | html %]">[% country | html %]</option> |
64 |
<option value="1">Yes</option> |
|
|
65 |
<option value="0" selected="selected">No</option> |
83 |
[% END %] |
66 |
[% END %] |
84 |
[% END %] |
67 |
</select> |
85 |
</select> |
68 |
</li> |
86 |
[% UNLESS IsUsageStatsCountryValid %] |
69 |
<li> |
87 |
Note: The value of your system preference 'UsageStatsCountry' is not valid ([% UsageStatsCountry | html %]). |
70 |
<label for="UsageStatsCountry">Your country: </label> |
88 |
Please select a valid one. |
71 |
[% SET UsageStatsCountry = Koha.Preference('UsageStatsCountry') %] |
89 |
[% END %] |
72 |
[% SET IsUsageStatsCountryValid = 0 %] |
90 |
</li> |
73 |
[% IF NOT UsageStatsCountry %] |
91 |
<li> |
74 |
[% SET IsUsageStatsCountryValid = 1 %] |
92 |
<label for="UsageStatsLibraryName">Library name: </label> |
75 |
[% END %] |
93 |
<input type="text" value="[% Koha.Preference('UsageStatsLibraryName') | html %]" name="UsageStatsLibraryName" id="UsageStatsLibraryName" /> |
76 |
[% PROCESS 'country-list.inc' %] |
94 |
</li> |
77 |
<select name="UsageStatsCountry" id="UsageStatsCountry"> |
95 |
<li> |
78 |
<option value=""> </option> |
96 |
<label for="UsageStatsLibraryType">Library type: </label> |
79 |
[% FOR country IN countries %] |
97 |
[% SET UsageStatsLibraryType = Koha.Preference('UsageStatsLibraryType') %] |
80 |
[% IF country == UsageStatsCountry %] |
98 |
<select name="UsageStatsLibraryType" id="UsageStatsLibraryType"> |
81 |
<option value="[% country | html %]" selected="selected">[% country | html %]</option> |
99 |
<option value=""> </option> |
82 |
[% SET IsUsageStatsCountryValid = 1 %] |
100 |
[% IF UsageStatsLibraryType == 'public' %] |
83 |
[% ELSE %] |
101 |
<option value="public" selected="selected">Public</option> |
84 |
<option value="[% country | html %]">[% country | html %]</option> |
102 |
[% ELSE %] |
85 |
[% END %] |
103 |
<option value="public">Public</option> |
86 |
[% END %] |
104 |
[% END %] |
87 |
</select> |
|
|
88 |
[% UNLESS IsUsageStatsCountryValid %] |
89 |
Note: The value of your system preference 'UsageStatsCountry' is not valid ([% UsageStatsCountry | html %]). |
90 |
Please select a valid one. |
91 |
[% END %] |
92 |
</li> |
93 |
<li> |
94 |
<label for="UsageStatsLibraryName">Library name: </label> |
95 |
<input type="text" value="[% Koha.Preference('UsageStatsLibraryName') | html %]" name="UsageStatsLibraryName" id="UsageStatsLibraryName" /> |
96 |
</li> |
97 |
<li> |
98 |
<label for="UsageStatsLibraryType">Library type: </label> |
99 |
[% SET UsageStatsLibraryType = Koha.Preference('UsageStatsLibraryType') %] |
100 |
<select name="UsageStatsLibraryType" id="UsageStatsLibraryType"> |
101 |
<option value=""> </option> |
102 |
[% IF UsageStatsLibraryType == 'public' %] |
103 |
<option value="public" selected="selected">Public</option> |
104 |
[% ELSE %] |
105 |
<option value="public">Public</option> |
106 |
[% END %] |
105 |
|
107 |
|
106 |
[% IF UsageStatsLibraryType == 'school' %] |
108 |
[% IF UsageStatsLibraryType == 'school' %] |
107 |
<option value="school" selected="selected">School</option> |
109 |
<option value="school" selected="selected">School</option> |
108 |
[% ELSE %] |
110 |
[% ELSE %] |
109 |
<option value="school">School</option> |
111 |
<option value="school">School</option> |
110 |
[% END %] |
112 |
[% END %] |
111 |
[% IF UsageStatsLibraryType == 'academic' %] |
113 |
[% IF UsageStatsLibraryType == 'academic' %] |
112 |
<option value="academic" selected="selected">Academic</option> |
114 |
<option value="academic" selected="selected">Academic</option> |
113 |
[% ELSE %] |
115 |
[% ELSE %] |
114 |
<option value="academic">Academic</option> |
116 |
<option value="academic">Academic</option> |
115 |
[% END %] |
117 |
[% END %] |
116 |
[% IF UsageStatsLibraryType == 'research' %] |
118 |
[% IF UsageStatsLibraryType == 'research' %] |
117 |
<option value="research" selected="selected">Research</option> |
119 |
<option value="research" selected="selected">Research</option> |
118 |
[% ELSE %] |
120 |
[% ELSE %] |
119 |
<option value="research">Research</option> |
121 |
<option value="research">Research</option> |
120 |
[% END %] |
122 |
[% END %] |
121 |
[% IF UsageStatsLibraryType == 'private' %] |
123 |
[% IF UsageStatsLibraryType == 'private' %] |
122 |
<option value="private" selected="selected">Private</option> |
124 |
<option value="private" selected="selected">Private</option> |
123 |
[% ELSE %] |
125 |
[% ELSE %] |
124 |
<option value="private">Private</option> |
126 |
<option value="private">Private</option> |
125 |
[% END %] |
127 |
[% END %] |
126 |
[% IF UsageStatsLibraryType == 'societyAssociation' %] |
128 |
[% IF UsageStatsLibraryType == 'societyAssociation' %] |
127 |
<option value="societyAssociation" selected="selected">Society or association</option> |
129 |
<option value="societyAssociation" selected="selected">Society or association</option> |
128 |
[% ELSE %] |
130 |
[% ELSE %] |
129 |
<option value="societyAssociation">Society or association</option> |
131 |
<option value="societyAssociation">Society or association</option> |
130 |
[% END %] |
132 |
[% END %] |
131 |
[% IF UsageStatsLibraryType == 'corporate' %] |
133 |
[% IF UsageStatsLibraryType == 'corporate' %] |
132 |
<option value="corporate" selected="selected">Corporate</option> |
134 |
<option value="corporate" selected="selected">Corporate</option> |
133 |
[% ELSE %] |
135 |
[% ELSE %] |
134 |
<option value="corporate">Corporate</option> |
136 |
<option value="corporate">Corporate</option> |
135 |
[% END %] |
137 |
[% END %] |
136 |
[% IF UsageStatsLibraryType == 'government' %] |
138 |
[% IF UsageStatsLibraryType == 'government' %] |
137 |
<option value="government" selected="selected">Government</option> |
139 |
<option value="government" selected="selected">Government</option> |
138 |
[% ELSE %] |
140 |
[% ELSE %] |
139 |
<option value="government">Government</option> |
141 |
<option value="government">Government</option> |
140 |
[% END %] |
142 |
[% END %] |
141 |
[% IF UsageStatsLibraryType == 'religiousOrg' %] |
143 |
[% IF UsageStatsLibraryType == 'religiousOrg' %] |
142 |
<option value="religiousOrg" selected="selected">Religious organization</option> |
144 |
<option value="religiousOrg" selected="selected">Religious organization</option> |
143 |
[% ELSE %] |
145 |
[% ELSE %] |
144 |
<option value="religiousOrg">Religious organization</option> |
146 |
<option value="religiousOrg">Religious organization</option> |
145 |
[% END %] |
147 |
[% END %] |
146 |
[% IF UsageStatsLibraryType == 'subscription' %] |
148 |
[% IF UsageStatsLibraryType == 'subscription' %] |
147 |
<option value="subscription" selected="selected">Subscription</option> |
149 |
<option value="subscription" selected="selected">Subscription</option> |
148 |
[% ELSE %] |
150 |
[% ELSE %] |
149 |
<option value="subscription">Subscription</option> |
151 |
<option value="subscription">Subscription</option> |
150 |
[% END %] |
152 |
[% END %] |
151 |
</select> |
153 |
</select> |
152 |
</li> |
154 |
</li> |
153 |
<li> |
155 |
<li> |
154 |
<label for="UsageStatsLibraryUrl">Library URL: </label> |
156 |
<label for="UsageStatsLibraryUrl">Library URL: </label> |
155 |
<input type="text" name="UsageStatsLibraryUrl" value="[% Koha.Preference('UsageStatsLibraryUrl') | html %]" id="UsageStatsLibraryUrl" /> |
157 |
<input type="text" name="UsageStatsLibraryUrl" value="[% Koha.Preference('UsageStatsLibraryUrl') | html %]" id="UsageStatsLibraryUrl" /> |
156 |
</li> |
158 |
</li> |
157 |
<li> |
159 |
<li> |
158 |
<span class="label">Last update: </span> |
160 |
<span class="label">Last update: </span> |
159 |
[% IF UsageStatsLastUpdateTime %] |
161 |
[% IF UsageStatsLastUpdateTime %] |
160 |
[% UsageStatsLastUpdateTime | html %] |
162 |
[% UsageStatsLastUpdateTime | html %] |
161 |
[% ELSE %] |
163 |
[% ELSE %] |
162 |
Your data have never been shared |
164 |
Your data have never been shared |
163 |
[% END %] |
165 |
[% END %] |
164 |
</li> |
166 |
</li> |
165 |
<li> |
167 |
<li> |
166 |
<label for="UsageStatsGeolocation">Geolocation: </label> |
168 |
<label for="UsageStatsGeolocation">Geolocation: </label> |
167 |
<input id="UsageStatsGeolocation" name="UsageStatsGeolocation" value="[% Koha.Preference('UsageStatsGeolocation') | html %]" type="text" value="[% Koha.Preference('UsageStatsLibrariesInfo') | html %]" size="35" readonly="readonly" /> |
169 |
<input id="UsageStatsGeolocation" name="UsageStatsGeolocation" value="[% Koha.Preference('UsageStatsGeolocation') | html %]" type="text" value="[% Koha.Preference('UsageStatsLibrariesInfo') | html %]" size="35" readonly="readonly" /> |
168 |
<a href="#" class="change_geolocation" data-branchname="" data-id="UsageStatsGeolocation"><img src="[% interface | html %]/lib/leaflet/images/marker-icon.png" title="Set geolocation" style="max-height: 2em;" /></a> |
170 |
<a href="#" class="change_geolocation" data-branchname="" data-id="UsageStatsGeolocation"><img src="[% interface | html %]/lib/leaflet/images/marker-icon.png" title="Set geolocation" style="max-height: 2em;" /></a> |
169 |
</li> |
171 |
</li> |
170 |
<li> |
172 |
<li> |
171 |
<label for="UsageStatsLibrariesInfo">Libraries informations: </label> |
173 |
<label for="UsageStatsLibrariesInfo">Libraries informations: </label> |
172 |
<select name="UsageStatsLibrariesInfo" id="UsageStatsLibrariesInfo"> |
174 |
<select name="UsageStatsLibrariesInfo" id="UsageStatsLibrariesInfo"> |
173 |
[% IF Koha.Preference('UsageStatsLibrariesInfo') %] |
175 |
[% IF Koha.Preference('UsageStatsLibrariesInfo') %] |
174 |
<option value="1" selected="selected">Yes</option> |
176 |
<option value="1" selected="selected">Yes</option> |
175 |
<option value="0">No</option> |
177 |
<option value="0">No</option> |
176 |
[% ELSE %] |
178 |
[% ELSE %] |
177 |
<option value="1">Yes</option> |
179 |
<option value="1">Yes</option> |
178 |
<option value="0" selected="selected">No</option> |
180 |
<option value="0" selected="selected">No</option> |
179 |
[% END %] |
181 |
[% END %] |
180 |
</select> |
182 |
</select> |
181 |
</li> |
183 |
</li> |
182 |
|
184 |
|
183 |
<li id="libraries_info"> |
185 |
<li id="libraries_info"> |
184 |
<fieldset class="rows"> |
186 |
<fieldset class="rows"> |
185 |
<legend>Libraries</legend> |
187 |
<legend>Libraries</legend> |
186 |
<ol> |
188 |
<ol> |
187 |
[% FOR l IN libraries %] |
189 |
[% FOR l IN libraries %] |
|
|
190 |
<li> |
191 |
<label for="[% l.branchcode | html %]">[% l.branchname | html %]: </label> |
192 |
<div style="float:left;"> |
193 |
<div>Country: [% l.branchcountry | html %]</div> |
194 |
<div>Url: [% l.branchurl | html %]</div> |
195 |
<div> |
196 |
Geolocation: <input type="text" id="geolocation_[% l.branchcode | html %]" name="geolocation_[% l.branchcode | html %]" value="[% l.geolocation | html %]" size="35" readonly="readonly" /> |
197 |
<a href="#" class="change_geolocation" data-branchname="[% l.branchname | html %]" data-id="geolocation_[% l.branchcode | html %]"><img src="[% interface | html %]/lib/leaflet/images/marker-icon.png" title="Set geolocation for [% l.branchname | html %]" style="max-height: 2em;" /></a> |
198 |
</div> |
199 |
</div> |
200 |
</li> |
201 |
[% END %] |
202 |
</ol> |
203 |
</fieldset> |
204 |
</li> |
188 |
<li> |
205 |
<li> |
189 |
<label for="[% l.branchcode | html %]">[% l.branchname | html %]: </label> |
206 |
<label for="MyPublicLink">See your public page: </label> |
190 |
<div style="float:left;"> |
207 |
[% IF Koha.Preference('UsageStatsPublicID') %] |
191 |
<div>Country: [% l.branchcountry | html %]</div> |
208 |
[% SET my_url = 'https://hea.koha-community.org/libraries/' _ Koha.Preference('UsageStatsPublicID') %] |
192 |
<div>Url: [% l.branchurl | html %]</div> |
209 |
<a href="[% my_url | html %]">[% my_url | html %]</a> |
193 |
<div> |
210 |
[% ELSE %] |
194 |
Geolocation: <input type="text" id="geolocation_[% l.branchcode | html %]" name="geolocation_[% l.branchcode | html %]" value="[% l.geolocation | html %]" size="35" readonly="readonly" /> |
211 |
You do not have anything public yet. |
195 |
<a href="#" class="change_geolocation" data-branchname="[% l.branchname | html %]" data-id="geolocation_[% l.branchcode | html %]"><img src="[% interface | html %]/lib/leaflet/images/marker-icon.png" title="Set geolocation for [% l.branchname | html %]" style="max-height: 2em;" /></a> |
212 |
[% END %] |
196 |
</div> |
213 |
</li> |
197 |
</div> |
214 |
<li> |
|
|
215 |
<label for="MyPublicLink">See your public page: </label> |
216 |
[% IF Koha.Preference('UsageStatsPublicID') %] |
217 |
[% SET my_url = 'https://hea.koha-community.org/libraries/' _ Koha.Preference('UsageStatsPublicID') %] |
218 |
<a href="[% my_url | html %]">[% my_url | html %]</a> |
219 |
[% ELSE %] |
220 |
You do not have anything public yet. |
221 |
[% END %] |
198 |
</li> |
222 |
</li> |
199 |
[% END %] |
223 |
|
200 |
</ol> |
224 |
</ol> |
201 |
</fieldset> |
225 |
</fieldset> |
202 |
</li> |
226 |
</div> |
203 |
<li> |
227 |
<div class="col-xs-12 col-sm-6"> |
204 |
<label for="MyPublicLink">See your public page: </label> |
228 |
<div> |
205 |
[% IF Koha.Preference('UsageStatsPublicID') %] |
229 |
<div id="mapid" style="width:100%;height: 400px;"></div> |
206 |
[% SET my_url = 'https://hea.koha-community.org/libraries/' _ Koha.Preference('UsageStatsPublicID') %] |
230 |
</div> |
207 |
<a href="[% my_url | html %]">[% my_url | html %]</a> |
231 |
</div> |
208 |
[% ELSE %] |
|
|
209 |
You do not have anything public yet. |
210 |
[% END %] |
211 |
</li> |
212 |
|
232 |
|
213 |
</ol> |
233 |
</div> |
214 |
<div style="clear:right"></div> |
|
|
215 |
<div id="mapid" style="width: 600px; height: 400px; margin-left: 40%:"></div> |
216 |
</fieldset> |
217 |
|
234 |
|
218 |
<fieldset class="action"> |
235 |
<fieldset class="action"> |
219 |
<input type="hidden" name="op" value="update" /> |
236 |
<input type="hidden" name="op" value="update" /> |
Lines 221-238
Link Here
|
221 |
<a class="cancel" href="/cgi-bin/koha/admin/usage_statistics.pl">Cancel</a> |
238 |
<a class="cancel" href="/cgi-bin/koha/admin/usage_statistics.pl">Cancel</a> |
222 |
</fieldset> |
239 |
</fieldset> |
223 |
</form> |
240 |
</form> |
224 |
</div> |
241 |
|
225 |
</div> |
242 |
</main> |
226 |
<div class="yui-b"> |
243 |
</div> <!-- /.col-sm-10.col-sm-push-2 --> |
227 |
[% INCLUDE 'admin-menu.inc' %] |
244 |
|
228 |
</div> |
245 |
<div class="col-sm-2 col-sm-pull-10"> |
229 |
</div> |
246 |
<aside> |
|
|
247 |
[% INCLUDE 'admin-menu.inc' %] |
248 |
</aside> |
249 |
</div> <!-- /.col-sm-2.col-sm-pull-10 --> |
250 |
</div> <!-- /.row --> |
230 |
|
251 |
|
231 |
[% MACRO jsinclude BLOCK %] |
252 |
[% MACRO jsinclude BLOCK %] |
232 |
[% INCLUDE 'calendar.inc' %] |
253 |
[% INCLUDE 'calendar.inc' %] |
233 |
[% Asset.js("js/admin-menu.js") | $raw %] |
254 |
[% Asset.js("js/admin-menu.js") | $raw %] |
234 |
<script src="[% interface | html %]/lib/leaflet/leaflet.js"></script> |
255 |
[% Asset.js("/lib/leaflet/leaflet.js") | $raw %] |
235 |
<script type="text/javascript"> |
256 |
<script> |
236 |
function positionMap() { |
257 |
function positionMap() { |
237 |
var tbh = $("#mapid"); |
258 |
var tbh = $("#mapid"); |
238 |
var mapContainer = tbh.parent(); |
259 |
var mapContainer = tbh.parent(); |
239 |
- |
|
|