Merge pull request #23085 from civicrm/5.48
[civicrm-core.git] / templates / CRM / Block / RecentlyViewed.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
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 |
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">
12 <ul>
13 {foreach from=$recentlyViewed item=item}
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>
31 {/foreach}
32 </ul>
33 </div>
34 {literal}
35 <script type="text/javascript">
36 CRM.$(function($) {
37 if ($('#crm-recently-viewed').offset().left > 150) {
38 $('#crm-recently-viewed').removeClass('left').addClass('right');
39 }
40 });
41 </script>
42 {/literal}