|
48 | 48 | $fieldsData = array();
|
49 | 49 | $statusColumnWidth = 0;
|
50 | 50 | ?>
|
| 51 | +<div class="tjucm-wrapper"> |
51 | 52 | <form action="<?php echo JRoute::_($link . '&Itemid=' . $itemId); ?>" method="post" name="adminForm" id="adminForm">
|
52 | 53 | <?php
|
53 |
| - if (isset($this->items)) |
54 |
| - { |
55 |
| - ?> |
56 |
| - <div class="page-header"> |
57 |
| - <h1 class="page-title"> |
58 |
| - <?php echo strtoupper($this->title) . " " . JText::_("COM_TJUCM_FORM_LIST"); ?> |
59 |
| - <h1> |
60 |
| - </div> <?php |
61 |
| - }?> |
62 |
| - <?php echo $this->loadTemplate('filters'); ?> |
63 |
| - <div class="pull-right"> |
| 54 | + if (isset($this->items)) |
| 55 | + { |
| 56 | + ?> |
| 57 | + <div class="page-header"> |
| 58 | + <h1 class="page-title"> |
| 59 | + <?php echo strtoupper($this->title) . " " . JText::_("COM_TJUCM_FORM_LIST"); ?> |
| 60 | + </h1> |
| 61 | + </div> <?php |
| 62 | + } |
| 63 | + |
| 64 | + echo $this->loadTemplate('filters'); |
| 65 | + ?> |
| 66 | + <div class="pull-right"> |
64 | 67 | <?php
|
65 | 68 | if ($this->allowedToAdd)
|
66 | 69 | {
|
|
90 | 93 | if (!empty($this->showList))
|
91 | 94 | {
|
92 | 95 | if (!empty($this->items))
|
93 |
| - {?> |
94 |
| - <thead> |
95 |
| - <tr> |
96 |
| - <?php |
97 |
| - if (isset($this->items[0]->state)) |
98 |
| - { |
| 96 | + { |
| 97 | + ?> |
| 98 | + <thead> |
| 99 | + <tr> |
| 100 | + <?php |
| 101 | + if (isset($this->items[0]->state)) |
| 102 | + { |
99 | 103 | ?>
|
100 |
| - <th class="center" width="3%"> |
| 104 | + <th class="center" width="3%"> |
101 | 105 | <?php echo JHtml::_('grid.sort', 'JPUBLISHED', 'a.state', $listDirn, $listOrder); ?>
|
102 |
| - </th> |
| 106 | + </th> |
103 | 107 | <?php
|
104 |
| - } |
105 |
| - ?> |
106 |
| - <th width="2%"> |
107 |
| - <?php echo JHtml::_('grid.sort', 'COM_TJUCM_ITEMS_ID', 'a.id', $listDirn, $listOrder); ?> |
108 |
| - </th> |
109 |
| - |
110 |
| - <?php |
111 |
| - if (!empty($this->ucmTypeParams->allow_draft_save) && $this->ucmTypeParams->allow_draft_save == 1) |
112 |
| - { |
113 |
| - $statusColumnWidth = 2; |
114 |
| - ?> |
| 108 | + } |
| 109 | + ?> |
115 | 110 | <th width="2%">
|
116 | 111 | <?php echo JHtml::_('grid.sort', 'COM_TJUCM_DATA_STATUS', 'a.draft', $listDirn, $listOrder); ?>
|
117 | 112 | </th>
|
118 | 113 | <?php
|
119 |
| - } |
120 | 114 |
|
121 |
| - if (!empty($this->listcolumn)) |
122 |
| - { |
123 |
| - JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjfields/tables'); |
124 |
| - $tjFieldsFieldTable = JTable::getInstance('field', 'TjfieldsTable'); |
| 115 | + if (!empty($this->ucmTypeParams->allow_draft_save) && $this->ucmTypeParams->allow_draft_save == 1) |
| 116 | + { |
| 117 | + $statusColumnWidth = 2; |
| 118 | + ?> |
| 119 | + <th width="2%"> |
| 120 | + <?php echo JHtml::_('grid.sort', 'COM_TJUCM_DATA_STATUS', 'a.draft', $listDirn, $listOrder); ?> |
| 121 | + </th> |
| 122 | + <?php |
| 123 | + } |
125 | 124 |
|
126 | 125 | foreach ($this->listcolumn as $fieldId => $col_name)
|
127 | 126 | {
|
|
137 | 136 | }
|
138 | 137 | ?>
|
139 | 138 |
|
140 |
| - <th style="word-break: break-word;" width="<?php echo (85 - $statusColumnWidth)/count($this->listcolumn).'%';?>"> |
| 139 | + <th style="word-break: break-word;" width="<?php echo (85 - $statusColumnWidth) / count($this->listcolumn) . '%';?>"> |
141 | 140 | <?php echo htmlspecialchars($col_name, ENT_COMPAT, 'UTF-8'); ?>
|
142 | 141 | </th>
|
143 | 142 | <?php
|
144 | 143 | }
|
145 |
| - } |
146 | 144 |
|
147 | 145 | if ($this->canEdit || $this->canDelete)
|
148 | 146 | {
|
|
153 | 151 | <?php
|
154 | 152 | }
|
155 | 153 | ?>
|
156 |
| - </tr> |
157 |
| - </thead> |
158 |
| - <?php |
159 |
| - } |
160 |
| - }?> |
| 154 | + </tr> |
| 155 | + </thead> |
| 156 | + <?php |
| 157 | + } |
| 158 | + }?> |
161 | 159 | <?php
|
162 | 160 | if (!empty($this->items))
|
163 | 161 | {
|
164 | 162 | ?>
|
165 | 163 | <tfoot>
|
166 | 164 | <tr>
|
167 |
| - <td colspan="<?php echo isset($this->items[0]) ? count($this->items[0]->field_values)+3 : 10; ?>"> |
| 165 | + <td colspan="<?php echo isset($this->items[0]) ? count($this->items[0]->field_values) + 3 : 10; ?>"> |
168 | 166 | <?php echo $this->pagination->getListFooter(); ?>
|
169 | 167 | </td>
|
170 | 168 | </tr>
|
|
197 | 195 | {
|
198 | 196 | // Call the JLayout to render the fields in the details view
|
199 | 197 | $layout = new JLayoutFile('list.list', JPATH_ROOT . '/components/com_tjucm/');
|
200 |
| - echo $layout->render(array('itemsData' => $item, 'created_by' => $this->created_by, 'client' => $this->client, 'xmlFormObject' => $formXml, 'ucmTypeId' => $this->ucmTypeId, 'ucmTypeParams' => $this->ucmTypeParams, 'fieldsData' => $fieldsData, 'formObject' => $formObject)); |
| 198 | + echo $layout->render( |
| 199 | + array( |
| 200 | + 'itemsData' => $item, |
| 201 | + 'created_by' => $this->created_by, |
| 202 | + 'client' => $this->client, |
| 203 | + 'xmlFormObject' => $formXml, |
| 204 | + 'ucmTypeId' => $this->ucmTypeId, |
| 205 | + 'ucmTypeParams' => $this->ucmTypeParams, |
| 206 | + 'fieldsData' => $fieldsData, |
| 207 | + 'formObject' => $formObject |
| 208 | + ) |
| 209 | + ); |
201 | 210 | }
|
202 | 211 | }
|
203 | 212 | else
|
|
223 | 232 | if ($this->allowedToAdd)
|
224 | 233 | {
|
225 | 234 | ?>
|
226 |
| - <a target="_blank" href="<?php echo JRoute::_('index.php?option=com_tjucm&task=itemform.edit' . $appendUrl, false); ?>" class="btn btn-success btn-small"> |
227 |
| - <i class="icon-plus"></i><?php echo JText::_('COM_TJUCM_ADD_ITEM'); ?> |
| 235 | + <a target="_blank" |
| 236 | + href="<?php echo JRoute::_('index.php?option=com_tjucm&task=itemform.edit' . $appendUrl, false); ?>" |
| 237 | + class="btn btn-success btn-small"> |
| 238 | + <i class="icon-plus"></i> |
| 239 | + <?php echo JText::_('COM_TJUCM_ADD_ITEM'); ?> |
228 | 240 | </a>
|
229 | 241 | <?php
|
230 | 242 | }
|
|
235 | 247 | <input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>"/>
|
236 | 248 | <?php echo JHtml::_('form.token'); ?>
|
237 | 249 | </form>
|
| 250 | +</div> |
238 | 251 | <?php
|
239 | 252 | if ($this->canDelete)
|
240 | 253 | {
|
|
0 commit comments