add notify emails
This commit is contained in:
37
template/templates/email.tpl
Normal file
37
template/templates/email.tpl
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="list">
|
||||
<div class="list_item">
|
||||
<label class="desc" id="title1" for="tr_duration">
|
||||
Címzett:
|
||||
</label>
|
||||
<div>{$email->get_el_to_name()}<br><{$email->get_el_to_email()}></div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc" id="title1" for="tr_duration">
|
||||
Tárgy:
|
||||
</label>
|
||||
<div>{$email->get_el_subject()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc" id="title1" for="tr_duration">
|
||||
Kiküldés dátuma:
|
||||
</label>
|
||||
<div>{$email->get_el_sent_date()}</div>
|
||||
</div>
|
||||
<div class="list_item">
|
||||
<label class="desc" id="title1" for="tr_duration">
|
||||
Üzenet:
|
||||
</label>
|
||||
<div>{$email->get_el_message()}</div>
|
||||
</div>
|
||||
|
||||
{if $email->get_el_exception()}
|
||||
<div class="list_item">
|
||||
<label class="desc" id="title1" for="tr_duration">
|
||||
Üzenet:
|
||||
</label>
|
||||
<div>{$email->get_el_exception()}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
</div>
|
||||
75
template/templates/emails.tpl
Normal file
75
template/templates/emails.tpl
Normal file
@@ -0,0 +1,75 @@
|
||||
{if $fold}
|
||||
|
||||
<div class="navigator">
|
||||
<div class="previous">
|
||||
{if $previous_id}
|
||||
<a href="/admin/emails/{$previous_id}">
|
||||
{/if}
|
||||
<img src="/_image/previous.png" {if !$previous_id}class="grayscale" {/if}>
|
||||
{if $previous_id}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="next">
|
||||
{if $next_id}
|
||||
<a href="/admin/emails/{$next_id}">
|
||||
{/if}
|
||||
<img src="/_image/previous.png" {if !$next_id}class="grayscale" {/if}>
|
||||
{if $next_id}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
<div style="overflow-x:auto;">
|
||||
<table class="email log">
|
||||
<tr>
|
||||
<th class="left">#ID</th>
|
||||
<th class="left">Címzett</th>
|
||||
<th class="left">Kiküldés dátuma</th>
|
||||
<th class="left">Tárgy</th>
|
||||
<th class="left">Üzenet</th>
|
||||
<th class="left">Hibaüzenet</th>
|
||||
</tr>
|
||||
{foreach $el_array as $log}
|
||||
<tr class="email-log{if $log->get_el_exception()} delete{else} tick{/if}" data-log-id="{$log->get_el_id()}">
|
||||
<td>#{$log->get_el_id()}</td>
|
||||
<td>{$log->get_el_to_name()}<br><{$log->get_el_to_email()}></td>
|
||||
<td>{$log->get_el_sent_date()}</td>
|
||||
<td>{$log->get_el_subject()}</td>
|
||||
<td>{$log->get_el_message()|truncate:50}</td>
|
||||
<td>{$log->get_el_exception()|truncate:50}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="navigator">
|
||||
<div class="previous">
|
||||
{if $previous_id}
|
||||
<a href="/admin/emails/{$previous_id}">
|
||||
{/if}
|
||||
<img src="/_image/previous.png" {if !$previous_id}class="grayscale" {/if}>
|
||||
{if $previous_id}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="next">
|
||||
{if $next_id}
|
||||
<a href="/admin/emails/{$next_id}">
|
||||
{/if}
|
||||
<img src="/_image/previous.png" {if !$next_id}class="grayscale" {/if}>
|
||||
{if $next_id}
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('table.email.log tr.email-log').click(function() {
|
||||
window.location.href = '/admin/email/' + $(this).data('log-id');
|
||||
});
|
||||
</script>
|
||||
@@ -7,14 +7,67 @@
|
||||
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="dev" value="{$dev}">
|
||||
|
||||
<div class="list half_width">
|
||||
{foreach $user_kids as $user}
|
||||
<a href="#" id="kid_{$user->get_uk_id()}">
|
||||
<div class="list_item">
|
||||
<a href="/preview/diary/{$user->get_uk_id()}" target="_blank" id="kid_{$user->get_uk_id()}">
|
||||
<div class="list_item{if !$user->get_uk_is_active()} passive{/if}">
|
||||
<img src="/_image/shuttlecock.png">
|
||||
{$user->get_uk_name()}
|
||||
{if $user->get_uk_last_notification() && $page_id >= 2}
|
||||
<span style="font-size: 14px; font-weight: normal; font-style: italic;">({$user->get_uk_last_notification()})</span>
|
||||
{/if}
|
||||
{if $user->get_uk_balance() < 0 && $page_id >= 2}
|
||||
{if $user->get_uk_parent_1() == null}
|
||||
<span class="float_right notification-text disabled">Értesítő e-mail</span>
|
||||
{else}
|
||||
<span class="float_right notification-text" id="{$user->get_uk_id()}" >Értesítő e-mail</span>
|
||||
{/if}
|
||||
{/if}
|
||||
<span class="float_right">{$user->get_uk_balance()|number_format:0:'':' '} Ft</span>
|
||||
</div>
|
||||
</a>
|
||||
{/foreach}
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var clickFunction = function(event) {
|
||||
if ($('#dev').val() > 0) {
|
||||
return false;
|
||||
}
|
||||
event.preventDefault();
|
||||
$(event.target).off('click', clickFunction)
|
||||
$(event.target).addClass('in-progress');
|
||||
$(event.target).html('Küldés folyamatban...');
|
||||
|
||||
$.post("/_ajax/send_notify.php",
|
||||
{
|
||||
uk_id: event.target.id,
|
||||
},
|
||||
function(data, status){
|
||||
var pdata = JSON.parse(data);
|
||||
|
||||
if (null == pdata) {
|
||||
//error
|
||||
$(event.target).removeClass('in-progress');
|
||||
$(event.target).addClass('fail');
|
||||
$(event.target).html('Küldés sikertelen');
|
||||
}
|
||||
else if ('missing-data' == pdata) {
|
||||
$(event.target).removeClass('in-progress');
|
||||
$(event.target).addClass('fail');
|
||||
$(event.target).html('Hiányzó adatok!');
|
||||
}
|
||||
else {
|
||||
$(event.target).removeClass('in-progress');
|
||||
$(event.target).addClass('success');
|
||||
$(event.target).html('Kiküldve');
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.notification-text:not(.disabled)').on('click', clickFunction);
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user