-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from k3rn3l3rr0r/dev-hooks
Show, delete, batch-delete exception logs. Closes #19
- Loading branch information
Showing
3 changed files
with
142 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,54 @@ | ||
{block content} | ||
|
||
<div class="page-heading"> | ||
<h1>{_'Homepage title'}</h1> | ||
<h1>{_'Homepage title'}</h1> | ||
</div> | ||
|
||
|
||
{if $showExceptions == true} | ||
<div class="page-heading"> | ||
<h2>{_'Exception logs'}</h2> | ||
<div class="pull-right"> | ||
<a class="ajax btn btn-danger" href="{$basePath}/admin/homepage/delete-all-exception-logs/">{_'Delete all exception logs'}</a> | ||
</div> | ||
</div> | ||
|
||
<h2>{_'Log of events'}</h2> | ||
<div class="well"> | ||
{control exceptionLogsGrid} | ||
</div> | ||
{/if} | ||
|
||
<div class="page-heading"> | ||
<h2>{_'Log of events'}</h2> | ||
</div> | ||
|
||
<div class="well" style="height: 300px;overflow: auto;"> | ||
<table class="table"> | ||
<tr> | ||
<th>{_'Time'}</th> | ||
<th>{_'User'}</th> | ||
<th>{_'Action'}</th> | ||
<th>{_'Url'}</th> | ||
</tr> | ||
{foreach $logReader as $log} | ||
{if !empty($log)} | ||
<tr> | ||
<td>{$log['date']->format('d.m.y H:i:s')}</td> | ||
<td>{$log['context']['user']}</td> | ||
<td>{$log['context']['presenter']} - {$log['context']['action']} - {$log['context']['title']}</td> | ||
<td>{$log['context']['url']}</td> | ||
</tr> | ||
{/if} | ||
{/foreach} | ||
</table> | ||
<table class="table"> | ||
<tr> | ||
<th>{_'Time'}</th> | ||
<th>{_'User'}</th> | ||
<th>{_'Action'}</th> | ||
<th>{_'Url'}</th> | ||
</tr> | ||
{foreach $logReader as $log} | ||
{if !empty($log)} | ||
<tr> | ||
<td>{$log['date']->format('d.m.y H:i:s')}</td> | ||
<td>{$log['context']['user']}</td> | ||
<td>{$log['context']['presenter']} - {$log['context']['action']} - {$log['context']['title']}</td> | ||
<td>{$log['context']['url']}</td> | ||
</tr> | ||
{/if} | ||
{/foreach} | ||
</table> | ||
</div> | ||
|
||
<div class="page-heading"> | ||
<h2>{_'Favourite links'}</h2> | ||
<h2>{_'Favourite links'}</h2> | ||
</div> | ||
|
||
{foreach $links as $l} | ||
<a class="ajax btn btn-primary favourite" data-id="{$l->getId()}" href="{$l->getLink()}">{$l->getTitle()}</a> | ||
<a class="ajax btn btn-primary favourite" data-id="{$l->getId()}" href="{$l->getLink()}">{$l->getTitle()}</a> | ||
{/foreach} | ||
|
||
{/block} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{block modalContent} | ||
<div id="exceptionHtml" class="hidden"> | ||
|
||
</div> | ||
<iframe id="exceptionIframe" src="about:blank"> | ||
</iframe> | ||
|
||
<script type="text/javascript"> | ||
var doc = document.getElementById('exceptionIframe').contentWindow.document; | ||
doc.open(); | ||
doc.write('{!$content}'); | ||
doc.close(); | ||
</script> | ||
{/block} |