Exemple #1
0
 }
 // figure out the file type so we can give it the appropriate CSS class
 $type = '';
 $liclass = '';
 $type = Filesystem::extension($url);
 $type = strlen($type) > 3 ? substr($type, 0, 3) : $type;
 if ($child->type == 12) {
     $liclass = ' class="ftitle html';
 } else {
     $type = $type ? $type : 'html';
     $liclass = ' class="ftitle ' . $type;
 }
 $out .= ' <tr>';
 $out .= '  <td width="100%">';
 if ($this->allowupload) {
     $out .= '<span' . $liclass . ' item:name id:' . $child->id . '" data-id="' . $child->id . '">' . $this->escape($child->title) . '</span><br /><span class="caption">(<a href="' . Route::url('index.php?option=com_resources&task=download&id=' . $child->id) . '" title="' . $child->title . '">' . \Components\Tools\Helpers\Html::getFileAttribs($url, $base) . '</a>)</span>';
 } else {
     $out .= '<span><a href="' . Route::url('index.php?option=com_resources&task=download&id=' . $child->id) . '">' . $this->escape($child->title) . '</a></span>';
 }
 $out .= '</td>';
 if ($this->allowupload) {
     $out .= '  <td class="d">';
     if ($i > 0 || $i + 0 > 0) {
         $out .= '<a href="' . $base . '/index.php?option=' . $this->option . '&amp;controller=' . $this->controller . '&amp;tmpl=component&amp;pid=' . $this->resource->id . '&amp;id=' . $child->id . '&amp;task=reorder&amp;move=up" class="order up" title="' . Lang::txt('COM_TOOLS_MOVE_UP') . '"><span>' . Lang::txt('COM_TOOLS_MOVE_UP') . '</span></a>';
     } else {
         $out .= '&nbsp;';
     }
     $out .= '</td>';
     $out .= '  <td class="u">';
     if ($i < $n - 1 || $i + 0 < $n - 1) {
         $out .= '<a href="' . $base . '/index.php?option=' . $this->option . '&amp;controller=' . $this->controller . '&amp;tmpl=component&amp;pid=' . $this->resource->id . '&amp;id=' . $child->id . '&amp;task=reorder&amp;move=down" class="order down" title="' . Lang::txt('COM_TOOLS_MOVE_DOWN') . '"><span>' . Lang::txt('COM_TOOLS_MOVE_DOWN') . '</span></a>';