Esempio n. 1
0
                echo '<a class="modal download" rel="{handler: \'iframe\', size: {x: ' . JOOMDOC_LIGHTBOX_WIDTH . ', y: ' . JOOMDOC_LIGHTBOX_HEIGHT . '}, onClose: function() {}}" href="' . JRoute::_(JoomDOCRoute::viewLicense($this->access->licenseID, $this->access->licenseAlias, $this->access->relativePath, $this->access->alias)) . '">' . JText::_('JOOMDOC_DOWNLOAD_FILE') . '</a>';
            } else {
                echo '<a class="download" href="' . JRoute::_(JoomDOCRoute::download($this->access->relativePath, $this->access->alias)) . '" title="">' . JText::_('JOOMDOC_DOWNLOAD_FILE') . '</a>';
            }
        }
        if ($this->access->canCreate) {
            echo '<a class="add" href="' . JRoute::_(JoomDOCRoute::add($this->access->relativePath, $this->access->alias)) . '" title="">' . JText::_('JOOMDOC_ADD_DOCUMENT') . '</a>';
        }
        if ($this->access->canEdit) {
            echo '<a class="edit" href="' . JRoute::_(JoomDOCRoute::edit($this->access->relativePath, $this->access->alias)) . '" title="">' . JText::_('JOOMDOC_EDIT_DOC') . '</a>';
        }
        if ($this->access->canEditState) {
            if ($this->root->document->state == JOOMDOC_STATE_UNPUBLISHED) {
                echo '<a class="publish" href="' . JRoute::_(JoomDOCRoute::publish($this->access->relativePath, $this->access->alias)) . '" title="">' . JText::_('JOOMDOC_PUBLISH') . '</a>';
            } elseif ($this->root->document->state == JOOMDOC_STATE_PUBLISHED) {
                echo '<a class="unpublish" href="' . JRoute::_(JoomDOCRoute::unpublish($this->access->relativePath, $this->access->alias)) . '" title="">' . JText::_('JOOMDOC_UNPUBLISH') . '</a>';
            }
        }
        if ($this->access->canDeleteFile) {
            echo '<a class="delete" href="javascript:void(0)" onclick="JoomDOC.confirm(\'' . addslashes(JRoute::_(JoomDOCRoute::deletefile($this->access->relativePath, $this->access->alias))) . '\')" title="">' . JText::_('JOOMDOC_DELETE_ITEM') . '</a>';
        }
        if ($this->access->canDeleteDoc) {
            echo '<a class="deleteDocument" href="javascript:void(0)" onclick="JoomDOC.confirm(\'' . addslashes(JRoute::_(JoomDOCRoute::delete($this->access->relativePath, $this->access->alias))) . '\')" title="">' . JText::_('JOOMDOC_DELETE_DOCUMENT') . '</a>';
        }
        echo '<div class="clr"></div>';
        echo '</div>';
    }
}
echo '<input type="hidden" id="joomdocToken" name="' . JSession::getFormToken() . '" value="1" />';
echo '</div>';
echo '</form>';