default_items.php
5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.core');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
// Create a shortcut for params.
$params = &$this->item->params;
?>
<?php if (empty($this->items)) : ?>
<p> <?php echo JText::_('COM_CONTACT_NO_CONTACTS'); ?> </p>
<?php else : ?>
<form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm">
<fieldset class="filters">
<legend class="hidelabeltxt"><?php echo JText::_('JGLOBAL_FILTER_LABEL'); ?></legend>
<?php if ($this->params->get('show_pagination_limit')) : ?>
<div class="display-limit">
<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?> 
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
</fieldset>
<table class="category">
<?php if ($this->params->get('show_headings')) : ?>
<thead><tr>
<th class="item-num">
<?php echo JText::_('JGLOBAL_NUM'); ?>
</th>
<th class="item-title">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_CONTACT_EMAIL_NAME_LABEL', 'a.name', $listDirn, $listOrder); ?>
</th>
<?php if ($this->params->get('show_position_headings')) : ?>
<th class="item-position">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_POSITION', 'a.con_position', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_email_headings')) : ?>
<th class="item-email">
<?php echo JText::_('JGLOBAL_EMAIL'); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_telephone_headings')) : ?>
<th class="item-phone">
<?php echo JText::_('COM_CONTACT_TELEPHONE'); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_mobile_headings')) : ?>
<th class="item-phone">
<?php echo JText::_('COM_CONTACT_MOBILE'); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_fax_headings')) : ?>
<th class="item-phone">
<?php echo JText::_('COM_CONTACT_FAX'); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_suburb_headings')) : ?>
<th class="item-suburb">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_SUBURB', 'a.suburb', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_state_headings')) : ?>
<th class="item-state">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_STATE', 'a.state', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_country_headings')) : ?>
<th class="item-state">
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_COUNTRY', 'a.country', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
</tr>
</thead>
<?php endif; ?>
<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="<?php echo ($i % 2) ? 'odd' : 'even'; ?>" itemscope itemtype="https://schema.org/Person">
<td class="item-num">
<?php echo $i; ?>
</td>
<td class="item-title">
<?php if ($this->items[$i]->published == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<a href="<?php echo JRoute::_(ContactHelperRoute::getContactRoute($item->slug, $item->catid)); ?>" itemprop="url">
<span itemprop="name"><?php echo $item->name; ?></span>
</a>
</td>
<?php if ($this->params->get('show_position_headings')) : ?>
<td class="item-position" itemprop="jobTitle">
<?php echo $item->con_position; ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('show_email_headings')) : ?>
<td class="item-email" itemprop="email">
<?php echo $item->email_to; ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('show_telephone_headings')) : ?>
<td class="item-phone" itemprop="telephone">
<?php echo $item->telephone; ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('show_mobile_headings')) : ?>
<td class="item-phone" itemprop="telephone">
<?php echo $item->mobile; ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('show_fax_headings')) : ?>
<td class="item-phone" itemprop="faxNumber">
<?php echo $item->fax; ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('show_suburb_headings')) : ?>
<td class="item-suburb" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="addressLocality"><?php echo $item->suburb; ?></span>
</td>
<?php endif; ?>
<?php if ($this->params->get('show_state_headings')) : ?>
<td class="item-state" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="addressRegion"><?php echo $item->state; ?></span>
</td>
<?php endif; ?>
<?php if ($this->params->get('show_country_headings')) : ?>
<td class="item-state" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="addressCountry"><?php echo $item->country; ?></span>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</form>
<?php endif; ?>