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