0
0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2024-11-22 07:52:36 +00:00
salesagility_SuiteCRM/modules/Alerts/templates/default.tpl
Connor Shea 565efcd11d Replace image icons in Alerts with icons from the icon font.
The icons now work in more cases (the extra 's' is necessary for
pluralizing certain modules but not all of them) and should look much
better now.
2019-07-30 10:43:24 -06:00

42 lines
1.9 KiB
Smarty

{$Flash}
{if !$Flash}
<div class="clear-all-alerts-container">
<a class="clear-all-alerts-btn btn btn-warning btn-xs">{sugar_translate label="LBL_CLEARALL"}</a>
{literal}
<script>
$('.clear-all-alerts-btn').unbind('click').click(function (event) {
$('.desktop_notifications:first .alert-dismissible .close').each(function (i, v) {
$(v).click();
});
});
</script>
{/literal}
</div>
{/if}
{foreach from=$Results item=result}
<div class="alert alert-{if $result->type != null}{$result->type}{else}info{/if} alert-dismissible module-alert" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close" onclick="Alerts.prototype.markAsRead('{$result->id}');"><span aria-hidden="true">&times;</span></button>
<h4 class="alert-header">
{if $result->url_redirect != null && !($result->url_redirect|strstr:"fake_") }
<a class="alert-link text-{if $result->type != null}{$result->type}{else}info{/if}" href="index.php?module=Alerts&action=redirect&record={$result->id}">
{/if}
{if $result->target_module != null }
{* Pluralize the module name if necessary. *}
<span class="suitepicon suitepicon-module-{$result->target_module|lower|replace:'_':'-'}{if substr($result->target_module, -1) !== 's'}s{/if}"></span>
<strong class="text-{if $result->type != null}{$result->type}{else}info{/if}">{$result->target_module}</strong>
{else}
<strong class="text-{if $result->type != null}{$result->type}{else}info{/if}">Alert</strong>
{/if}
{if $result->url_redirect != null }
</a>
{/if}
</h4>
<p class="alert-body">
{$result->name|nl2br}<br/>
{$result->description|nl2br}
</p>
</div>
{/foreach}