source: trunk/admin/themes/default/template/history.tpl @ 22703

Last change on this file since 22703 was 22703, checked in by rvelices, 11 years ago

feature 2885: Add geoip info in the stats / history page - fixes and add a location map image

  • Property svn:eol-style set to LF
File size: 5.2 KB
Line 
1
2{include file='include/datepicker.inc.tpl'}
3
4{footer_script}{literal}
5        pwg_initialization_datepicker("#start_day", "#start_month", "#start_year", "#start_linked_date", null, null, "#end_linked_date");
6        pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, "#start_linked_date", null);
7{/literal}{/footer_script}
8
9<h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
10
11<form class="filter" method="post" name="filter" action="{$F_ACTION}">
12<fieldset>
13  <legend>{'Filter'|@translate}</legend>
14  <ul>
15    <li><label>{'Date'|@translate}</label></li>
16    <li>
17      <select id="start_day" name="start_day">
18        <option value="0">--</option>
19        {section name=day start=1 loop=32}
20        <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
21        {/section}
22      </select>
23      <select id="start_month" name="start_month">
24      {html_options options=$month_list selected=$START_MONTH_SELECTED}
25      </select>
26      <input id="start_year" name="start_year" value="{$START_YEAR}" type="text" size="4" maxlength="4" >
27      <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled">
28    </li>
29  </ul>
30  <ul>
31    <li><label>{'End-Date'|@translate}</label></li>
32    <li>
33      <select id="end_day" name="end_day">
34        <option value="0">--</option>
35        {section name=day start=1 loop=32}
36        <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
37        {/section}
38      </select>
39      <select id="end_month" name="end_month">
40      {html_options options=$month_list selected=$END_MONTH_SELECTED}
41      </select>
42      <input id="end_year" name="end_year" value="{$END_YEAR}" type="text" size="4" maxlength="4" >
43      <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled">
44    </li>
45  </ul>
46
47  <label>
48    {'Element type'|@translate}
49    <select name="types[]" multiple="multiple" size="4">
50      {html_options values=$type_option_values output=$type_option_values|translate selected=$type_option_selected}
51    </select>
52  </label>
53
54  <label>
55    {'User'|@translate}
56    <select name="user">
57      <option value="-1">------------</option>
58      {html_options options=$user_options selected=$user_options_selected}
59    </select>
60  </label>
61
62  <label>
63    {'Image id'|@translate}
64    <input name="image_id" value="{$IMAGE_ID}" type="text" size="5">
65  </label>
66
67  <label>
68    {'File name'|@translate}
69                <input name="filename" value="{$FILENAME}" type="text" size="12">
70  </label>
71
72        <label>
73                {'IP'|@translate}
74                <input name="ip" value="{$IP}" type="text" size="12">
75        </label>
76
77  <label>
78    {'Thumbnails'|@translate}
79    <select name="display_thumbnail">
80      {html_options options=$display_thumbnails selected=$display_thumbnail_selected}
81    </select>
82  </label>
83
84  <input type="submit" name="submit" value="{'Submit'|@translate}">
85</fieldset>
86</form>
87
88{if isset($search_summary)}
89<fieldset>
90  <legend>{'Summary'|@translate}</legend>
91
92  <ul>
93    <li>{$search_summary.NB_LINES}, {$search_summary.FILESIZE}</li>
94    <li>
95      {$search_summary.USERS}
96      <ul>
97        <li>{$search_summary.MEMBERS}</li>
98        <li>{$search_summary.GUESTS}</li>
99      </ul>
100    </li>
101  </ul>
102</fieldset>
103{/if}
104
105{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
106
107<table class="table2" id="detailedStats">
108<tr class="throw">
109  <th>{'Date'|@translate}</th>
110  <th>{'Time'|@translate}</th>
111  <th>{'User'|@translate}</th>
112  <th>{'IP'|@translate}</th>
113  <th>{'Element'|@translate}</th>
114  <th>{'Element type'|@translate}</th>
115  <th>{'Section'|@translate}</th>
116  <th>{'Album'|@translate}</th>
117  <th>{'Tags'|@translate}</th>
118</tr>
119{if !empty($search_results) }
120{foreach from=$search_results item=detail name=res_loop}
121<tr class="{if $smarty.foreach.res_loop.index is odd}row1{else}row2{/if}">
122  <td class="hour">{$detail.DATE}</td>
123  <td class="hour">{$detail.TIME}</td>
124  <td>{$detail.USER}</td>
125  <td class="IP">{$detail.IP}</td>
126  <td>{$detail.IMAGE}</td>
127  <td>{$detail.TYPE}</td>
128  <td>{$detail.SECTION}</td>
129  <td>{$detail.CATEGORY}</td>
130  <td>{$detail.TAGS}</td>
131</tr>
132{/foreach}
133{/if}
134</table>
135
136{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
137
138{combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'}
139
140{footer_script}{literal}
141jQuery(document).ready( function(){
142jQuery(".IP").one( "mouseenter", function(){
143        var that = $(this);
144        that
145                .data("isOver", true)
146                .one("mouseleave", function() {
147                        that.removeData("isOver");
148                });
149        GeoIp.get( that.text(), function(data) {
150                if (!data.fullName) return;
151                var content = data.fullName;
152                if (data.latitude && data.region_name) {
153                        content += "<br><img width=300 height=220 src=\"http://maps.googleapis.com/maps/api/staticmap?sensor=false&size=300x220&zoom=6"
154                                + "&markers=size:tiny%7C" + data.latitude + "," + data.longitude
155                                + "\">";
156                }
157                that.tipTip( {
158                        content: content,
159                        maxWidth: 320
160                        }       );
161                if (that.data("isOver"))
162                        that.trigger("mouseenter");
163        });
164} );
165});
166{/literal}{/footer_script}
Note: See TracBrowser for help on using the repository browser.