Your IP : 216.73.216.240


Current Path : /home/juvelize/www/administrator/components/com_zhgooglemap/views/mapbufmrks/tmpl/
Upload File :
Current File : /home/juvelize/www/administrator/components/com_zhgooglemap/views/mapbufmrks/tmpl/default_body.php

<?php
/*------------------------------------------------------------------------
# com_zhgooglemap - Zh GoogleMap
# ------------------------------------------------------------------------
# author:    Dmitry Zhuk
# copyright: Copyright (C) 2011 zhuk.cc. All Rights Reserved.
# license:   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
# website:   http://zhuk.cc
# Technical Support Forum: http://forum.zhuk.cc/
-------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
?>
<?php 
    $user        = JFactory::getUser();
    $userId = $user->id;

    $listOrder    = $this->escape($this->state->get('list.ordering'));
    $listDirn    = $this->escape($this->state->get('list.direction'));

    foreach($this->items as $i => $item): 
    $ordering  = ($listOrder == 'ordering');
    
    $canDo = ZhGoogleMapHelper::getBufmrkActions($item->id);
    
    $canEdit    = $canDo->get('core.edit');
    $canEditOwn = $canDo->get('core.edit.own') && $item->createdbyuser == $userId;
    $canChange  = $canDo->get('core.edit.state');

    $saveOrder    = $listOrder == 'ordering';
    
    $imgpath = JURI::root() .'administrator/components/com_zhgooglemap/assets/icons/';
    $utilspath = JURI::root() .'administrator/components/com_zhgooglemap/assets/utils/';
    
?>
    <tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->catid?>">
        <td>
            <?php echo $item->id; ?>
        </td>
        <td>
            <?php echo JHtml::_('grid.id', $i, $item->id); ?>
        </td>
        <td>

            <?php if ($canEdit || $canEditOwn) : ?>
                    <a href="<?php echo JRoute::_('index.php?option=com_zhgooglemap&task=mapbufmrk.edit&id=' . $item->id); ?>">
                    <?php echo $this->escape($item->title); ?></a>
            <?php else : ?>
                    <?php echo $this->escape($item->title); ?>
            <?php endif; ?>

        </td>
        <td align="center">
            <?php echo '<img src="'.$imgpath.str_replace("#", "%23", $item->icontype).'.png" alt="" />'; ?>
        </td>
        <td align="center">
            <?php 
                echo JHtml::_('jgrid.published', $item->published, $i, 'mapbufmrks.', $canChange, 'cb', $item->publish_up, $item->publish_down); 
                //echo '<img src="'.JURI::root() .'administrator/components/com_zhgooglemap/assets/utils/published'.$item->published.'.png" alt="" />'; 
            ?>            
        </td>                
        <td>
            <?php echo $this->escape($item->markergroupname); ?>
        </td>
        <td>
            <?php 
            if ($item->category != "")
            {
                if ($item->category_language !== '*')
                {
                    echo $this->escape($item->category) . ' (' .$this->escape($item->category_language) . ')';
                }
                else
                {
                    echo $this->escape($item->category); 
                }  
            }
            ?>
        </td>
        <td>
            <?php echo $this->escape($item->fullusername); ?>
        </td>    
        <td>
            <?php 
                            $statusText = "";
                            if ((int)$item->status == 0)
                            {
                                $statusText = JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKS_DETAIL_STATUS_NEW');
                            } 
                            elseif ((int)$item->status == 1)
                            {
                                $statusText = JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKS_DETAIL_STATUS_PROCESSED');
                            } 
                            elseif ((int)$item->status == 8)
                            {
                                $statusText = JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKS_DETAIL_STATUS_SKIPPED');
                            }
                            elseif ((int)$item->status == 9)
                            {
                                $statusText = JText::_('COM_ZHGOOGLEMAP_MAPBUFMRKS_DETAIL_STATUS_ERROR');
                            }
                            echo $this->escape($statusText); 
                        ?>
        </td>    
    </tr>
<?php endforeach; ?>