Skip to content

Commit

Permalink
Bug techjoomla#317 fix: Edge>> Action button alignment is not properl…
Browse files Browse the repository at this point in the history
…y placed as per chrome browser
  • Loading branch information
Aishwarya committed Dec 26, 2019
1 parent 64d81ce commit 45db73b
Showing 1 changed file with 37 additions and 12 deletions.
49 changes: 37 additions & 12 deletions src/components/com_tjucm/site/layouts/list/list.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
/**
* @package TJ-UCM
* @package TJ-UCM
*
* @author TechJoomla <[email protected]>
* @author TechJoomla <[email protected]>
* @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
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -99,7 +99,9 @@
{
$class = ($canChange) ? 'active' : 'disabled'; ?>
<td class="center">
<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 : '#'; ?>">
<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 : '#'; ?>">
<?php
if ($item->state == 1)
{
Expand All @@ -116,16 +118,21 @@
}
?>
<td>
<a href="<?php echo Route::_('index.php?option=com_tjucm&view=item&id=' . (int) $item->id . "&client=" . $client . '&Itemid=' . $itemId, false); ?>">
<a href="<?php echo Route::_(
'index.php?option=com_tjucm&view=item&id=' .
(int) $item->id . "&client=" . $client . '&Itemid=' . $itemId, false
); ?>">
<?php echo $this->escape($item->id); ?>
</a>
</td>
<?php
if ($allowDraftSave)
{ ?>
{
?>
<td><?php echo ($item->draft) ? Text::_('COM_TJUCM_DATA_STATUS_DRAFT') : Text::_('COM_TJUCM_DATA_STATUS_SAVE'); ?></td>
<?php
}

if (!empty($item->field_values))
{
foreach ($item->field_values as $key => $fieldValue)
Expand All @@ -141,13 +148,17 @@

$fieldXml = $formObject->getFieldXml($tjFieldsFieldTable->name);
?>
<td style="word-break: break-word;">
<td style="word-break: break-word;" width="<?php echo (85 - $statusColumnWidth) / count($this->listcolumn) . '%';?>">
<?php
if ($canView || ($item->created_by == $user->id))
{
$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;
Expand All @@ -156,22 +167,36 @@
</td><?php
}
}

if ($canEdit || $canDelete || $editown || $deleteOwn)
{
?>
<td class="center">
<a target="_blank" href="<?php echo $link; ?>" type="button" title="<?php echo Text::_('COM_TJUCM_VIEW_RECORD');?>"><i class="icon-eye-open"></i></a>
<a target="_blank" href="<?php echo $link; ?>"
type="button" title="<?php echo Text::_('COM_TJUCM_VIEW_RECORD');?>">
<i class="icon-eye-open"></i>
</a>
<?php
if ($canEdit || $editown)
{
?>
<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>
<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>
<?php
}

if ($canDelete || $deleteOwn)
{
?>
<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>
<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>
<?php
}
?>
Expand Down

0 comments on commit 45db73b

Please sign in to comment.