diff --git a/src/components/com_tjucm/site/layouts/detail/fields.php b/src/components/com_tjucm/site/layouts/detail/fields.php index 41c6f7a8..fb8d2892 100644 --- a/src/components/com_tjucm/site/layouts/detail/fields.php +++ b/src/components/com_tjucm/site/layouts/detail/fields.php @@ -1,10 +1,10 @@ + * @package TJ-UCM + * + * @author TechJoomla * @copyright Copyright (c) 2009-2019 TechJoomla. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE.txt + * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access @@ -63,6 +63,7 @@ $count++; $fieldCount = 0; ?> +
getFieldset($fieldset->name) as $field) @@ -178,7 +179,21 @@ $layout = new JLayoutFile($layoutToUse, JPATH_ROOT . '/components/com_tjfields/layouts/fields'); $output = $layout->render(array('fieldXml' => $xmlField, 'field' => $field)); - echo $output; + + // To align text, textarea, textareacounter and editor fields properly + + if ($field->type == 'Textarea'|| $field->type == 'Textareacounter'|| $field->type == 'Text' || $field->type == 'Editor') + { + ?> +
+ +
+
@@ -188,5 +203,6 @@ } ?> + + * @author TechJoomla * @copyright Copyright (c) 2009-2019 TechJoomla. All rights reserved. - * @license GNU General Public License version 2 or later; see LICENSE.txt + * @license GNU General Public License version 2 or later; see LICENSE.txt */ // No direct access @@ -51,7 +51,7 @@ $xmlFormObject = $displayData['xmlFormObject']; $formObject = $displayData['formObject']; $ucmTypeId = $displayData['ucmTypeId']; -$allowDraftSave= $displayData['ucmTypeParams']->allow_draft_save; +$allowDraftSave = $displayData['ucmTypeParams']->allow_draft_save; $appendUrl = ''; $csrf = "&" . Session::getFormToken() . '=1'; @@ -93,13 +93,16 @@ } ?> +
state)) { $class = ($canChange) ? 'active' : 'disabled'; ?> - + state == 1) { @@ -116,16 +119,21 @@ } ?> - + escape($item->id); ?> + { + ?> draft) ? Text::_('COM_TJUCM_DATA_STATUS_DRAFT') : Text::_('COM_TJUCM_DATA_STATUS_SAVE'); ?> field_values)) { foreach ($item->field_values as $key => $fieldValue) @@ -147,7 +155,11 @@ { $field = $formObject->getField($tjFieldsFieldTable->name); $field->setValue($fieldValue); - $layoutToUse = (array_key_exists(ucfirst($tjFieldsFieldTable->type), $fieldLayout)) ? $fieldLayout[ucfirst($tjFieldsFieldTable->type)] : 'field'; + $layoutToUse = ( + array_key_exists( + ucfirst($tjFieldsFieldTable->type), $fieldLayout + ) + ) ? $fieldLayout[ucfirst($tjFieldsFieldTable->type)] : 'field'; $layout = new JLayoutFile($layoutToUse, JPATH_ROOT . '/components/com_tjfields/layouts/fields'); $output = $layout->render(array('fieldXml' => $fieldXml, 'field' => $field)); echo $output; @@ -156,22 +168,36 @@ - + + + - | + | + + - | + | + + @@ -180,3 +206,4 @@ } ?> +
diff --git a/src/components/com_tjucm/site/views/items/tmpl/default.php b/src/components/com_tjucm/site/views/items/tmpl/default.php index ed17e796..9e946804 100644 --- a/src/components/com_tjucm/site/views/items/tmpl/default.php +++ b/src/components/com_tjucm/site/views/items/tmpl/default.php @@ -48,19 +48,22 @@ $fieldsData = array(); $statusColumnWidth = 0; ?> +
items)) - { - ?> - - loadTemplate('filters'); ?> -
+ if (isset($this->items)) + { + ?> + loadTemplate('filters'); + ?> +
allowedToAdd) { @@ -90,38 +93,34 @@ if (!empty($this->showList)) { if (!empty($this->items)) - {?> - - - items[0]->state)) - { + { + ?> + + + items[0]->state)) + { ?> - + - + - - - - - ucmTypeParams->allow_draft_save) && $this->ucmTypeParams->allow_draft_save == 1) - { - $statusColumnWidth = 2; - ?> + } + ?> listcolumn)) - { - JTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjfields/tables'); - $tjFieldsFieldTable = JTable::getInstance('field', 'TjfieldsTable'); + if (!empty($this->ucmTypeParams->allow_draft_save) && $this->ucmTypeParams->allow_draft_save == 1) + { + $statusColumnWidth = 2; + ?> + + + + listcolumn as $fieldId => $col_name) { @@ -137,12 +136,11 @@ } ?> - + canEdit || $this->canDelete) { @@ -153,18 +151,18 @@ - - - + + + items)) { ?> - + pagination->getListFooter(); ?> @@ -197,7 +195,18 @@ { // Call the JLayout to render the fields in the details view $layout = new JLayoutFile('list.list', JPATH_ROOT . '/components/com_tjucm/'); - 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)); + 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 + ) + ); } } else @@ -223,8 +232,11 @@ if ($this->allowedToAdd) { ?> - - + + + "/> +
canDelete) {