search in user list
loading gif lists can be closed and opened number of trainings at diary
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
|
||||
<div class="list">
|
||||
|
||||
{foreach $training_array as $training}
|
||||
{if
|
||||
$training@first ||
|
||||
@@ -10,9 +9,16 @@
|
||||
)
|
||||
|
||||
}
|
||||
<span class="date_separator">{$training_array[$training@index]->get_tr_date()|substr:0:4}.
|
||||
{if !$training@first &&
|
||||
$training_array[$training@index]->get_tr_date()|substr:5:2 != $training_array[$training@index-1]->get_tr_date()|substr:5:2
|
||||
}
|
||||
</div>
|
||||
{/if}
|
||||
<span class="date_separator">{$training_array[$training@index]->get_tr_date()|substr:0:4}.
|
||||
{$months[$training_array[$training@index]->get_tr_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$training->get_tr_date()|substr:0:4}{$training->get_tr_date()|substr:5:2}');">
|
||||
</span>
|
||||
<div id="block_{$training->get_tr_date()|substr:0:4}{$training->get_tr_date()|substr:5:2}" class="month_block">
|
||||
{/if}
|
||||
<a href="/admin/{if $edit=='edit'}edit_training{elseif $edit=='view'}trainings{else}presence{/if}/{$training->get_tr_id()}">
|
||||
<div class="list_item">
|
||||
@@ -25,6 +31,41 @@
|
||||
{if $training->get_tr_training_type_trt_id()}({$training->get_tr_type_name_by_id()}){/if}
|
||||
</div>
|
||||
</a>
|
||||
{if $training@last}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function open_block(block_id) {
|
||||
$("#"+block_id).slideDown("slow");
|
||||
}
|
||||
|
||||
function close_block(block_id) {
|
||||
$("#"+block_id).slideUp("slow");
|
||||
}
|
||||
|
||||
function block_action(block_id) {
|
||||
if ($("#"+block_id).is(':hidden')) {
|
||||
open_block(block_id);
|
||||
}
|
||||
else {
|
||||
close_block(block_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$( document ).ready(function() {
|
||||
var divs = $( "div[class=month_block]" );
|
||||
$( ".list" ).find( divs ).hide();
|
||||
var div_list = $( ".list" ).find( divs );
|
||||
|
||||
open_block(div_list[0].id);
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@@ -12,9 +12,16 @@
|
||||
)
|
||||
|
||||
}
|
||||
{if !$training@first &&
|
||||
$training_array[$training@index]->get_tr_date()|substr:5:2 != $training_array[$training@index-1]->get_tr_date()|substr:5:2
|
||||
}
|
||||
</div>
|
||||
{/if}
|
||||
<span class="date_separator">{$training_array[$training@index]->get_tr_date()|substr:0:4}.
|
||||
{$months[$training_array[$training@index]->get_tr_date()|substr:5:2]}
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$training->get_tr_date()|substr:0:4}{$training->get_tr_date()|substr:5:2}');">
|
||||
</span>
|
||||
<div id="block_{$training->get_tr_date()|substr:0:4}{$training->get_tr_date()|substr:5:2}" class="month_block">
|
||||
{/if}
|
||||
<a href="/admin/{if $edit=='edit'}edit_training{elseif $edit=='view'}trainings{else}presence{/if}/{$training->get_tr_id()}">
|
||||
<div class="list_item">
|
||||
@@ -27,6 +34,41 @@
|
||||
{if $training->get_tr_training_type_trt_id()}({$training->get_tr_type_name_by_id()}){/if}
|
||||
</div>
|
||||
</a>
|
||||
{if $training@last}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function open_block(block_id) {
|
||||
$("#"+block_id).slideDown("slow");
|
||||
}
|
||||
|
||||
function close_block(block_id) {
|
||||
$("#"+block_id).slideUp("slow");
|
||||
}
|
||||
|
||||
function block_action(block_id) {
|
||||
if ($("#"+block_id).is(':hidden')) {
|
||||
open_block(block_id);
|
||||
}
|
||||
else {
|
||||
close_block(block_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$( document ).ready(function() {
|
||||
var divs = $( "div[class=month_block]" );
|
||||
$( ".list" ).find( divs ).hide();
|
||||
var div_list = $( ".list" ).find( divs );
|
||||
|
||||
open_block(div_list[0].id);
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="list">
|
||||
{foreach $training_array as $training}
|
||||
<div class="bigger_space">
|
||||
|
||||
{if
|
||||
$training@first ||
|
||||
(
|
||||
@@ -8,11 +8,19 @@
|
||||
)
|
||||
|
||||
}
|
||||
{if !$training@first &&
|
||||
$training_array[$training@index]->get_tr_date()|substr:5:2 != $training_array[$training@index-1]->get_tr_date()|substr:5:2
|
||||
}
|
||||
</div>
|
||||
{/if}
|
||||
<span class="date_separator">{$training_array[$training@index]->get_tr_date()|substr:0:4}.
|
||||
{$months[$training_array[$training@index]->get_tr_date()|substr:5:2]}
|
||||
({$user_login->get_training_number_in_month({$training->get_tr_date()|substr:0:4},{$training->get_tr_date()|substr:5:2})} edzés)
|
||||
<img src="/_image/open_folder.png" onclick="block_action('block_{$training->get_tr_date()|substr:0:4}{$training->get_tr_date()|substr:5:2}');">
|
||||
</span>
|
||||
<div id="block_{$training->get_tr_date()|substr:0:4}{$training->get_tr_date()|substr:5:2}" class="month_block">
|
||||
{/if}
|
||||
<div class="list_item line_height14">
|
||||
<div class="list_item line_height14 bigger_space">
|
||||
<span class="size20 bold">
|
||||
{$training->get_tr_date()|substr:0:4}.
|
||||
{$months[$training_array[$training@index]->get_tr_date()|substr:5:2]}
|
||||
@@ -29,6 +37,40 @@
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{if $training@last}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
function open_block(block_id) {
|
||||
$("#"+block_id).slideDown("slow");
|
||||
}
|
||||
|
||||
function close_block(block_id) {
|
||||
$("#"+block_id).slideUp("slow");
|
||||
}
|
||||
|
||||
function block_action(block_id) {
|
||||
if ($("#"+block_id).is(':hidden')) {
|
||||
open_block(block_id);
|
||||
}
|
||||
else {
|
||||
close_block(block_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$( document ).ready(function() {
|
||||
var divs = $( "div[class=month_block]" );
|
||||
$( ".list" ).find( divs ).hide();
|
||||
var div_list = $( ".list" ).find( divs );
|
||||
|
||||
open_block(div_list[0].id);
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
@@ -1,24 +1,72 @@
|
||||
<div class="buttons">
|
||||
|
||||
<a href="/admin/create/member" class="addbutton add-big">Új tag hozzáadása</a>
|
||||
<a href="/admin/parents" class="addbutton add-big">Szülők</a>
|
||||
<a href="/admin/shirts" class="addbutton add-big">Pólók</a>
|
||||
<a href="/admin/cities" class="addbutton add-big">Települések</a>
|
||||
<a href="/admin/schools" class="addbutton add-big">Iskolák</a>
|
||||
<a href="/admin/regions" class="addbutton add-big">Diákolimpia körzetek</a>
|
||||
<!-- a href="/admin/school" class="addbutton add-big">Iskolák</a -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="user_filter">
|
||||
<input name="uk_filter_name" id="uk_filter_name" placeholder="Keresés...">
|
||||
<select name="is_active" id="is_active">
|
||||
<option value="1">Aktív tagok</option>
|
||||
<option value="0">Passzív tagok</option>
|
||||
<option value="3">Minden tag</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="list" id="user_list">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="list">
|
||||
{foreach $user_array as $user}
|
||||
<a href="/admin/{if !$edit}members{else}edit_member{/if}/{$user->get_uk_id()}">
|
||||
<div class="list_item">
|
||||
<img src="/_image/shuttlecock.png">
|
||||
{$user->get_uk_name()}
|
||||
</div>
|
||||
</a>
|
||||
{/foreach}
|
||||
<script>
|
||||
|
||||
</div>
|
||||
var Timer;
|
||||
|
||||
$( document ).ready(function() {
|
||||
$("#is_active").trigger("change");
|
||||
});
|
||||
|
||||
|
||||
$("#is_active").change(search);
|
||||
$("#uk_filter_name").keypress(function() {
|
||||
document.getElementById('user_list').innerHTML = 'Betöltés...';
|
||||
clearTimeout(Timer);
|
||||
Timer = window.setTimeout(search, 1000);
|
||||
|
||||
});
|
||||
|
||||
function search() {
|
||||
document.getElementById('user_list').innerHTML = 'Betöltés...';
|
||||
$("#is_active").prop("disabled",true);
|
||||
$.post("/_ajax/get_user_list.php",
|
||||
{
|
||||
uk_filter_name: $("#uk_filter_name").val(),
|
||||
is_active: $("#is_active").val()
|
||||
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
var content = '';
|
||||
for (var i=0; i<pdata.length; ++i) {
|
||||
//console.log(pdata[i]['uk_id']);
|
||||
//add_list_item(pdata[i]['uk_id'],pdata[i]['uk_name']);
|
||||
content +=
|
||||
'<a href="/admin/members/'+pdata[i]['uk_id']+'">\
|
||||
<div class="list_item">\
|
||||
<img src="/_image/shuttlecock.png">\
|
||||
'+pdata[i]['uk_name']+'\
|
||||
</div>\
|
||||
</a>';
|
||||
}
|
||||
document.getElementById('user_list').innerHTML = content;
|
||||
$("#is_active").prop("disabled",false);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -1,3 +1,8 @@
|
||||
<div class="danger">
|
||||
|
||||
Változás, téves vagy hiányzó adat esetén a helyes információt e-mail-ben kérjük megadni: <a href="mailto:szucs.zoltan@interware.hu?subject={$user_login->get_uk_name()}">szucs.zoltan@interware.hu</a>
|
||||
|
||||
</div>
|
||||
<div class="list">
|
||||
<div class="list_item">
|
||||
<label class="desc">
|
||||
|
||||
Reference in New Issue
Block a user