Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {* Displays recently viewed objects (contacts and other objects like groups, notes, etc. *} | |
11 | <div id="crm-recently-viewed" class="left crm-container"> | |
e6110f20 | 12 | <ul> |
6a488035 | 13 | {foreach from=$recentlyViewed item=item} |
e6110f20 MW |
14 | <li class="crm-recently-viewed"> |
15 | <div class="crm-recentview-item"> | |
16 | <a href="{$item.url}" title="{$item.title|escape:'html'}"> | |
17 | {if $item.image_url} | |
18 | <span class="icon crm-icon {if $item.subtype}{$item.subtype}{else}{$item.type}{/if}-icon" style="background: url('{$item.image_url}')"></span> | |
19 | {else} | |
20 | <span class="icon crm-icon {$item.type}{if $item.subtype}-subtype{/if}-icon"></span> | |
21 | {/if} | |
22 | {if $item.isDeleted}<del>{/if}{$item.title}{if $item.isDeleted}</del>{/if} | |
23 | </a> | |
24 | </div> | |
25 | <div class="crm-recentview-wrapper"> | |
26 | <a href='{$item.url}' class="crm-actions-view">{ts}View{/ts}</a> | |
27 | {if $item.edit_url}<a href='{$item.edit_url}' class="crm-actions-edit">{ts}Edit{/ts}</a>{/if} | |
28 | {if $item.delete_url}<a href='{$item.delete_url}' class="crm-actions-delete">{ts}Delete{/ts}</a>{/if} | |
29 | </div> | |
30 | </li> | |
6a488035 | 31 | {/foreach} |
e6110f20 | 32 | </ul> |
6a488035 TO |
33 | </div> |
34 | {literal} | |
e6110f20 | 35 | <script type="text/javascript"> |
3cc60a06 | 36 | CRM.$(function($) { |
ae8f569f CW |
37 | if ($('#crm-recently-viewed').offset().left > 150) { |
38 | $('#crm-recently-viewed').removeClass('left').addClass('right'); | |
39 | } | |
6a488035 | 40 | }); |
e6110f20 | 41 | </script> |
6a488035 | 42 | {/literal} |