|
1 | 1 | <?php
|
2 | 2 | /**
|
3 |
| - * @package TJ-UCM |
| 3 | + * @package TJ-UCM |
4 | 4 | *
|
5 |
| - * @author TechJoomla <extensions@techjoomla.com> |
| 5 | + * @author TechJoomla <extensions@techjoomla.com> |
6 | 6 | * @copyright Copyright (c) 2009-2019 TechJoomla. All rights reserved.
|
7 |
| - * @license GNU General Public License version 2 or later; see LICENSE.txt |
| 7 | + * @license GNU General Public License version 2 or later; see LICENSE.txt |
8 | 8 | */
|
9 | 9 |
|
10 | 10 | // No direct access
|
|
51 | 51 | $xmlFormObject = $displayData['xmlFormObject'];
|
52 | 52 | $formObject = $displayData['formObject'];
|
53 | 53 | $ucmTypeId = $displayData['ucmTypeId'];
|
54 |
| -$allowDraftSave= $displayData['ucmTypeParams']->allow_draft_save; |
| 54 | +$allowDraftSave = $displayData['ucmTypeParams']->allow_draft_save; |
55 | 55 |
|
56 | 56 | $appendUrl = '';
|
57 | 57 | $csrf = "&" . Session::getFormToken() . '=1';
|
|
93 | 93 | }
|
94 | 94 |
|
95 | 95 | ?>
|
| 96 | +<div class="tjucm-wrapper"> |
96 | 97 | <tr class="row<?php echo $item->id?>">
|
97 | 98 | <?php
|
98 | 99 | if (isset($item->state))
|
99 | 100 | {
|
100 | 101 | $class = ($canChange) ? 'active' : 'disabled'; ?>
|
101 | 102 | <td class="center">
|
102 |
| - <a class="<?php echo $class; ?>" href="<?php echo ($canChange) ? 'index.php?option=com_tjucm&task=item.publish&id=' . $item->id . '&state=' . (($item->state + 1) % 2) . $appendUrl . $csrf : '#'; ?>"> |
| 103 | + <a class="<?php echo $class; ?>" |
| 104 | + href="<?php echo ($canChange) ? 'index.php?option=com_tjucm&task=item.publish&id=' . |
| 105 | + $item->id . '&state=' . (($item->state + 1) % 2) . $appendUrl . $csrf : '#'; ?>"> |
103 | 106 | <?php
|
104 | 107 | if ($item->state == 1)
|
105 | 108 | {
|
|
116 | 119 | }
|
117 | 120 | ?>
|
118 | 121 | <td>
|
119 |
| - <a href="<?php echo Route::_('index.php?option=com_tjucm&view=item&id=' . (int) $item->id . "&client=" . $client . '&Itemid=' . $itemId, false); ?>"> |
| 122 | + <a href="<?php echo Route::_( |
| 123 | + 'index.php?option=com_tjucm&view=item&id=' . |
| 124 | + (int) $item->id . "&client=" . $client . '&Itemid=' . $itemId, false |
| 125 | + ); ?>"> |
120 | 126 | <?php echo $this->escape($item->id); ?>
|
121 | 127 | </a>
|
122 | 128 | </td>
|
123 | 129 | <?php
|
124 | 130 | if ($allowDraftSave)
|
125 |
| - { ?> |
| 131 | + { |
| 132 | + ?> |
126 | 133 | <td><?php echo ($item->draft) ? Text::_('COM_TJUCM_DATA_STATUS_DRAFT') : Text::_('COM_TJUCM_DATA_STATUS_SAVE'); ?></td>
|
127 | 134 | <?php
|
128 | 135 | }
|
| 136 | + |
129 | 137 | if (!empty($item->field_values))
|
130 | 138 | {
|
131 | 139 | foreach ($item->field_values as $key => $fieldValue)
|
|
147 | 155 | {
|
148 | 156 | $field = $formObject->getField($tjFieldsFieldTable->name);
|
149 | 157 | $field->setValue($fieldValue);
|
150 |
| - $layoutToUse = (array_key_exists(ucfirst($tjFieldsFieldTable->type), $fieldLayout)) ? $fieldLayout[ucfirst($tjFieldsFieldTable->type)] : 'field'; |
| 158 | + $layoutToUse = ( |
| 159 | + array_key_exists( |
| 160 | + ucfirst($tjFieldsFieldTable->type), $fieldLayout |
| 161 | + ) |
| 162 | + ) ? $fieldLayout[ucfirst($tjFieldsFieldTable->type)] : 'field'; |
151 | 163 | $layout = new JLayoutFile($layoutToUse, JPATH_ROOT . '/components/com_tjfields/layouts/fields');
|
152 | 164 | $output = $layout->render(array('fieldXml' => $fieldXml, 'field' => $field));
|
153 | 165 | echo $output;
|
|
156 | 168 | </td><?php
|
157 | 169 | }
|
158 | 170 | }
|
| 171 | + |
159 | 172 | if ($canEdit || $canDelete || $editown || $deleteOwn)
|
160 | 173 | {
|
161 | 174 | ?>
|
162 | 175 | <td class="center">
|
163 |
| - <a target="_blank" href="<?php echo $link; ?>" type="button" title="<?php echo Text::_('COM_TJUCM_VIEW_RECORD');?>"><i class="icon-eye-open"></i></a> |
| 176 | + <a target="_blank" href="<?php echo $link; ?>" |
| 177 | + type="button" title="<?php echo Text::_('COM_TJUCM_VIEW_RECORD');?>"> |
| 178 | + <i class="icon-eye-open"></i> |
| 179 | + </a> |
164 | 180 | <?php
|
165 | 181 | if ($canEdit || $editown)
|
166 | 182 | {
|
167 | 183 | ?>
|
168 |
| - <a target="_blank" href="<?php echo 'index.php?option=com_tjucm&task=itemform.edit&id=' . $item->id . $appendUrl; ?>" type="button" title="<?php echo Text::_('COM_TJUCM_EDIT_ITEM');?>"> | <i class="icon-apply" aria-hidden="true"></i></a> |
| 184 | + <a target="_blank" |
| 185 | + href="<?php echo 'index.php?option=com_tjucm&task=itemform.edit&id=' . $item->id . $appendUrl; ?>" |
| 186 | + type="button" |
| 187 | + title="<?php echo Text::_('COM_TJUCM_EDIT_ITEM');?>"> | |
| 188 | + <i class="icon-apply" aria-hidden="true"></i> |
| 189 | + </a> |
169 | 190 | <?php
|
170 | 191 | }
|
| 192 | + |
171 | 193 | if ($canDelete || $deleteOwn)
|
172 | 194 | {
|
173 | 195 | ?>
|
174 |
| - <a href="<?php echo 'index.php?option=com_tjucm&task=itemform.remove' . '&id=' . $item->id . $appendUrl . $csrf; ?>" class="delete-button" type="button" title="<?php echo Text::_('COM_TJUCM_DELETE_ITEM');?>"> | <i class="icon-delete" aria-hidden="true"></i></a> |
| 196 | + <a href="<?php echo 'index.php?option=com_tjucm&task=itemform.remove' . '&id=' . $item->id . $appendUrl . $csrf; ?>" |
| 197 | + class="delete-button" type="button" |
| 198 | + title="<?php echo Text::_('COM_TJUCM_DELETE_ITEM');?>"> | |
| 199 | + <i class="icon-delete" aria-hidden="true"></i> |
| 200 | + </a> |
175 | 201 | <?php
|
176 | 202 | }
|
177 | 203 | ?>
|
|
180 | 206 | }
|
181 | 207 | ?>
|
182 | 208 | </tr>
|
| 209 | +</div> |
0 commit comments