Esempio n. 1
0
echo '<th class="ph-id">' . JHTML::_('grid.sort', $OPT . '_ID', 'a.id', $listDirn, $listOrder) . '</th>' . "\n";
echo $r->endTblHeader();
echo '<tbody>' . "\n";
$originalOrders = array();
$parentsStr = "";
$j = 0;
if (is_array($this->items)) {
    foreach ($this->items as $i => $item) {
        if ($i >= (int) $this->pagination->limitstart && $j < (int) $this->pagination->limit) {
            $j++;
            $linkCat = JRoute::_('index.php?option=com_phocagallery&task=phocagalleryc.edit&id=' . (int) $item->category_id);
            $canEditCat = $user->authorise('core.edit', $option);
            $iD = $i % 2;
            echo "\n\n";
            echo '<tr class="row' . $iD . '" sortable-group-id="' . $item->category_id . '" item-id="' . $item->id . '" parents="' . $item->category_id . '" level="0">' . "\n";
            echo $r->tdOrder(0, 0, 0);
            echo $r->td(JHtml::_('grid.id', $i, $item->id), "small hidden-phone");
            $usrU = $item->ratingname;
            if ($item->ratingusername) {
                $usrU = $usrU . ' (' . $item->ratingusername . ')';
            }
            echo $r->td($usrU, "small hidden-phone");
            if ($canEditCat) {
                $catO = '<a href="' . JRoute::_($linkCat) . '">' . $this->escape($item->category_title) . '</a>';
            } else {
                $catO = $this->escape($item->category_title);
            }
            echo $r->td($catO, "small hidden-phone");
            echo $r->td($item->rating, "small hidden-phone");
            echo $r->td($item->id, "small hidden-phone");
            echo '</tr>' . "\n";
Esempio n. 2
0
 $orderkey = array_search($item->id, $this->ordering[$item->catid]);
 $ordering = $listOrder == 'a.ordering';
 $canCreate = $user->authorise('core.create', $option);
 $canEdit = $user->authorise('core.edit', $option);
 $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id') || $item->checked_out == 0;
 $canChange = $user->authorise('core.edit.state', $option) && $canCheckin;
 $linkEdit = JRoute::_($urlEdit . $item->id);
 $linkRotate90 = JRoute::_($urlTask . '.rotate&angle=90&id=' . $item->id);
 $linkRotate270 = JRoute::_($urlTask . '.rotate&angle=270&id=' . $item->id);
 $linkDeleteThumbs = JRoute::_($urlTask . '.recreate&cid[]=' . (int) $item->id);
 $linkCat = JRoute::_('index.php?option=com_phocagallery&task=phocagalleryc.edit&id=' . (int) $item->category_id);
 $canEditCat = $user->authorise('core.edit', $option);
 $iD = $i % 2;
 echo "\n\n";
 echo '<tr class="row' . $iD . '" sortable-group-id="' . $item->category_id . '" item-id="' . $item->id . '" parents="' . $item->category_id . '" level="0">' . "\n";
 echo $r->tdOrder($canChange, $saveOrder, $orderkey);
 echo $r->td(JHtml::_('grid.id', $i, $item->id), "small hidden-phone");
 echo $r->tdImage($item, $this->button, 'COM_PHOCAGALLERY_ENLARGE_IMAGE');
 $checkO = '';
 if ($item->checked_out) {
     $checkO .= JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, $tasks . '.', $canCheckin);
 }
 if ($canCreate || $canEdit) {
     $checkO .= '<a href="' . JRoute::_($linkEdit) . '">' . $this->escape($item->title) . '</a>';
 } else {
     $checkO .= $this->escape($item->title);
 }
 $checkO .= ' <span class="smallsub">(<span>' . JText::_($OPT . '_FIELD_ALIAS_LABEL') . ':</span>' . $this->escape($item->alias) . ')</span>';
 echo $r->td($checkO, "small hidden-phone");
 if (isset($item->extid) && $item->extid != '') {
     if (isset($item->exttype) && $item->exttype == 1) {