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

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

history - merge album/tags link into a single column (table is already very large and these columns are mutually exclusive

  • add tags link in the history table
  • Property svn:eol-style set to LF
File size: 5.6 KB
RevLine 
[2632]1
2{include file='include/datepicker.inc.tpl'}
3
[7995]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}
[2632]8
[22664]9<h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
[2531]10
11<form class="filter" method="post" name="filter" action="{$F_ACTION}">
12<fieldset>
13  <legend>{'Filter'|@translate}</legend>
14  <ul>
[5021]15    <li><label>{'Date'|@translate}</label></li>
[2531]16    <li>
[2680]17      <select id="start_day" name="start_day">
[3055]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}
[2531]22      </select>
[2680]23      <select id="start_month" name="start_month">
[3055]24      {html_options options=$month_list selected=$START_MONTH_SELECTED}
[2531]25      </select>
[2680]26      <input id="start_year" name="start_year" value="{$START_YEAR}" type="text" size="4" maxlength="4" >
[3185]27      <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled">
[2531]28    </li>
29  </ul>
30  <ul>
[5021]31    <li><label>{'End-Date'|@translate}</label></li>
[2531]32    <li>
[2680]33      <select id="end_day" name="end_day">
[3055]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}
[2531]38      </select>
[2680]39      <select id="end_month" name="end_month">
[3055]40      {html_options options=$month_list selected=$END_MONTH_SELECTED}
[2531]41      </select>
[2680]42      <input id="end_year" name="end_year" value="{$END_YEAR}" type="text" size="4" maxlength="4" >
[3185]43      <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled">
[2531]44    </li>
45  </ul>
46
47  <label>
48    {'Element type'|@translate}
49    <select name="types[]" multiple="multiple" size="4">
[3055]50      {html_options values=$type_option_values output=$type_option_values|translate selected=$type_option_selected}
[2531]51    </select>
52  </label>
53
54  <label>
55    {'User'|@translate}
56    <select name="user">
[3055]57      <option value="-1">------------</option>
58      {html_options options=$user_options selected=$user_options_selected}
[2531]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}
[14688]69                <input name="filename" value="{$FILENAME}" type="text" size="12">
[2531]70  </label>
71
[14688]72        <label>
73                {'IP'|@translate}
74                <input name="ip" value="{$IP}" type="text" size="12">
75        </label>
76
[3055]77  <label>
78    {'Thumbnails'|@translate}
79    <select name="display_thumbnail">
[5576]80      {html_options options=$display_thumbnails selected=$display_thumbnail_selected}
[3055]81    </select>
82  </label>
83
[22664]84  <input type="submit" name="submit" value="{'Submit'|@translate}">
[2531]85</fieldset>
86</form>
[3055]87
[2531]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
[3182]105{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
[2531]106
107<table class="table2" id="detailedStats">
[23151]108<thead>
[2531]109<tr class="throw">
110  <th>{'Date'|@translate}</th>
[5021]111  <th>{'Time'|@translate}</th>
112  <th>{'User'|@translate}</th>
[2531]113  <th>{'IP'|@translate}</th>
[5021]114  <th>{'Element'|@translate}</th>
[2531]115  <th>{'Element type'|@translate}</th>
[5021]116  <th>{'Section'|@translate}</th>
[23151]117        <th>{'Album'|@translate} / {'Tags'|@translate}</th>
[2531]118</tr>
[23151]119</thead>
120{if !empty($search_results)}
[3055]121{foreach from=$search_results item=detail name=res_loop}
[2531]122<tr class="{if $smarty.foreach.res_loop.index is odd}row1{else}row2{/if}">
123  <td class="hour">{$detail.DATE}</td>
124  <td class="hour">{$detail.TIME}</td>
125  <td>{$detail.USER}</td>
[22664]126  <td class="IP">{$detail.IP}</td>
[2531]127  <td>{$detail.IMAGE}</td>
128  <td>{$detail.TYPE}</td>
129  <td>{$detail.SECTION}</td>
[23151]130        <td>{$detail.CATEGORY}{$detail.TAGS}</td>
[2531]131</tr>
[3055]132{/foreach}
[2531]133{/if}
134</table>
[3055]135
[3182]136{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
[22664]137
138{combine_script id='jquery.geoip' load='async' path='admin/themes/default/js/jquery.geoip.js'}
139
140{footer_script}{literal}
[22683]141jQuery(".IP").one( "mouseenter", function(){
142        var that = $(this);
143        that
144                .data("isOver", true)
145                .one("mouseleave", function() {
146                        that.removeData("isOver");
[22664]147                });
[22683]148        GeoIp.get( that.text(), function(data) {
149                if (!data.fullName) return;
[22715]150
151    var content = data.fullName;
152    if (data.latitude && data.region_name) {
153      content += '<br><a class="ipGeoOpen" data-lat="'+data.latitude+'" data-lon="'+data.longitude+'"';
154      content += ' href="#">show on a Google Map</a>';
155    }
156
[22683]157                that.tipTip( {
[22703]158                        content: content,
[22715]159      keepAlive: true,
160      defaultPosition: "right",
161      maxWidth: 320,
[22683]162                        }       );
163                if (that.data("isOver"))
164                        that.trigger("mouseenter");
165        });
166} );
[22715]167
168jQuery(document).on('click', '.ipGeoOpen',  function() {
169  var lat = jQuery(this).data("lat");
170  var lon = jQuery(this).data("lon");
171  var parent = jQuery(this).parent();
172  jQuery(this).remove();
173
174  var append = '<br><img width=300 height=220 src="http://maps.googleapis.com/maps/api/staticmap';
175  append += '?sensor=false&size=300x220&zoom=6&markers=size:tiny%7C' + lat + ',' + lon + '">';
176
177  jQuery(parent).append(append);
178  return false;
[22703]179});
[22664]180{/literal}{/footer_script}
Note: See TracBrowser for help on using the repository browser.