CRM-14383 - Update cj closures
[civicrm-core.git] / templates / CRM / Block / RecentlyViewed.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 {* Displays recently viewed objects (contacts and other objects like groups, notes, etc. *}
27 <div id="crm-recently-viewed" class="left crm-container">
28 <ul>
29 {foreach from=$recentlyViewed item=item}
30 <li class="crm-recently-viewed" ><a href="{$item.url}" title="{$item.title}">
31 {if $item.image_url}
32 <span class="icon crm-icon {if $item.subtype}{$item.subtype}{else}{$item.type}{/if}-icon" style="background: url('{$item.image_url}')"></span>
33 {else}
34 <span class="icon crm-icon {$item.type}{if $item.subtype}-subtype{/if}-icon"></span>
35 {/if}
36 {if $item.isDeleted}<del>{/if}{$item.title|mb_truncate:25:"..":true}{if $item.isDeleted}</del>{/if}</a>
37 <div class="crm-recentview-wrapper">
38 <a href='{$item.url}' class="crm-actions-view">{ts}View{/ts}</a>
39 {if $item.edit_url}<a href='{$item.edit_url}' class="crm-actions-edit">{ts}Edit{/ts}</a>{/if}
40 {if $item.delete_url}<a href='{$item.delete_url}' class="crm-actions-delete">{ts}Delete{/ts}</a>{/if}
41 </div>
42 </li>
43 {/foreach}
44 </ul>
45 </div>
46 {literal}
47 <script type="text/javascript">
48 CRM.$(function($) {
49 if (cj('#crm-recently-viewed').offset().left > 150) {
50 cj('#crm-recently-viewed').removeClass('left').addClass('right');
51 }
52 });
53 </script>
54 {/literal}