Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
6a488035 TO |
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"> | |
e6110f20 | 28 | <ul> |
6a488035 | 29 | {foreach from=$recentlyViewed item=item} |
e6110f20 MW |
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> | |
6a488035 | 47 | {/foreach} |
e6110f20 | 48 | </ul> |
6a488035 TO |
49 | </div> |
50 | {literal} | |
e6110f20 | 51 | <script type="text/javascript"> |
3cc60a06 | 52 | CRM.$(function($) { |
ae8f569f CW |
53 | if ($('#crm-recently-viewed').offset().left > 150) { |
54 | $('#crm-recently-viewed').removeClass('left').addClass('right'); | |
55 | } | |
6a488035 | 56 | }); |
e6110f20 | 57 | </script> |
6a488035 | 58 | {/literal} |