aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template/history.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'admin/themes/default/template/history.tpl')
-rw-r--r--admin/themes/default/template/history.tpl64
1 files changed, 54 insertions, 10 deletions
diff --git a/admin/themes/default/template/history.tpl b/admin/themes/default/template/history.tpl
index 4cc5e93c6..3fe4e738d 100644
--- a/admin/themes/default/template/history.tpl
+++ b/admin/themes/default/template/history.tpl
@@ -6,9 +6,7 @@
pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, "#start_linked_date", null);
{/literal}{/footer_script}
-<div class="titrePage">
- <h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
-</div>
+<h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
<form class="filter" method="post" name="filter" action="{$F_ACTION}">
<fieldset>
@@ -83,7 +81,7 @@
</select>
</label>
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
+ <input type="submit" name="submit" value="{'Submit'|@translate}">
</fieldset>
</form>
@@ -107,6 +105,7 @@
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
<table class="table2" id="detailedStats">
+<thead>
<tr class="throw">
<th>{'Date'|@translate}</th>
<th>{'Time'|@translate}</th>
@@ -115,24 +114,69 @@
<th>{'Element'|@translate}</th>
<th>{'Element type'|@translate}</th>
<th>{'Section'|@translate}</th>
- <th>{'Album'|@translate}</th>
- <th>{'Tags'|@translate}</th>
+ <th>{'Album'|@translate} / {'Tags'|@translate}</th>
</tr>
-{if !empty($search_results) }
+</thead>
+{if !empty($search_results)}
{foreach from=$search_results item=detail name=res_loop}
<tr class="{if $smarty.foreach.res_loop.index is odd}row1{else}row2{/if}">
<td class="hour">{$detail.DATE}</td>
<td class="hour">{$detail.TIME}</td>
<td>{$detail.USER}</td>
- <td>{$detail.IP}</td>
+ <td class="IP">{$detail.IP}</td>
<td>{$detail.IMAGE}</td>
<td>{$detail.TYPE}</td>
<td>{$detail.SECTION}</td>
- <td>{$detail.CATEGORY}</td>
- <td>{$detail.TAGS}</td>
+ <td>{$detail.CATEGORY}{$detail.TAGS}</td>
</tr>
{/foreach}
{/if}
</table>
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
+
+{combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'}
+
+{footer_script}{literal}
+jQuery(document).ready( function() {
+ jQuery(".IP").one( "mouseenter", function(){
+ var that = $(this);
+ that
+ .data("isOver", true)
+ .one("mouseleave", function() {
+ that.removeData("isOver");
+ });
+ GeoIp.get( that.text(), function(data) {
+ if (!data.fullName) return;
+
+ var content = data.fullName;
+ if (data.latitude && data.region_name) {
+ content += '<br><a class="ipGeoOpen" data-lat="'+data.latitude+'" data-lon="'+data.longitude+'"';
+ content += ' href="#">show on a Google Map</a>';
+ }
+
+ that.tipTip( {
+ content: content,
+ keepAlive: true,
+ defaultPosition: "right",
+ maxWidth: 320,
+ } );
+ if (that.data("isOver"))
+ that.trigger("mouseenter");
+ });
+ } );
+
+ jQuery(document).on('click', '.ipGeoOpen', function() {
+ var lat = jQuery(this).data("lat");
+ var lon = jQuery(this).data("lon");
+ var parent = jQuery(this).parent();
+ jQuery(this).remove();
+
+ var append = '<br><img width=300 height=220 src="http://maps.googleapis.com/maps/api/staticmap';
+ append += '?sensor=false&size=300x220&zoom=6&markers=size:tiny%7C' + lat + ',' + lon + '">';
+
+ jQuery(parent).append(append);
+ return false;
+ });
+});
+{/literal}{/footer_script} \ No newline at end of file