CRM-21698 move formatting to processor class.
[civicrm-core.git] / templates / CRM / Block / RecentlyViewed.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2017 |
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">
31 <div class="crm-recentview-item">
32 <a href="{$item.url}" title="{$item.title|escape:'html'}">
33 {if $item.image_url}
34 <span class="icon crm-icon {if $item.subtype}{$item.subtype}{else}{$item.type}{/if}-icon" style="background: url('{$item.image_url}')"></span>
35 {else}
36 <span class="icon crm-icon {$item.type}{if $item.subtype}-subtype{/if}-icon"></span>
37 {/if}
38 {if $item.isDeleted}<del>{/if}{$item.title}{if $item.isDeleted}</del>{/if}
39 </a>
40 </div>
41 <div class="crm-recentview-wrapper">
42 <a href='{$item.url}' class="crm-actions-view">{ts}View{/ts}</a>
43 {if $item.edit_url}<a href='{$item.edit_url}' class="crm-actions-edit">{ts}Edit{/ts}</a>{/if}
44 {if $item.delete_url}<a href='{$item.delete_url}' class="crm-actions-delete">{ts}Delete{/ts}</a>{/if}
45 </div>
46 </li>
47 {/foreach}
48 </ul>
49 </div>
50 {literal}
51 <script type="text/javascript">
52 CRM.$(function($) {
53 if ($('#crm-recently-viewed').offset().left > 150) {
54 $('#crm-recently-viewed').removeClass('left').addClass('right');
55 }
56 });
57 </script>
58 {/literal}