You've already forked joomla_test
first commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
130
administrator/components/com_media/views/images/tmpl/default.php
Normal file
130
administrator/components/com_media/views/images/tmpl/default.php
Normal file
@ -0,0 +1,130 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('formbehavior.chosen', 'select');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$input = JFactory::getApplication()->input;
|
||||
?>
|
||||
<script type='text/javascript'>
|
||||
var image_base_path = '<?php $params = JComponentHelper::getParams('com_media');
|
||||
echo $params->get('image_path', 'images'); ?>/';
|
||||
</script>
|
||||
<form action="index.php?option=com_media&asset=<?php echo $input->getCmd('asset');?>&author=<?php echo $input->getCmd('author'); ?>" class="form-vertical" id="imageForm" method="post" enctype="multipart/form-data">
|
||||
<div id="messages" style="display: none;">
|
||||
<span id="message"></span><?php echo JHtml::_('image', 'media/dots.gif', '...', array('width' => 22, 'height' => 12), true) ?>
|
||||
</div>
|
||||
<div class="well">
|
||||
<div class="row">
|
||||
<div class="span9 control-group">
|
||||
<div class="control-label">
|
||||
<label class="control-label" for="folder"><?php echo JText::_('COM_MEDIA_DIRECTORY') ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<?php echo $this->folderList; ?>
|
||||
<button class="btn" type="button" id="upbutton" title="<?php echo JText::_('COM_MEDIA_DIRECTORY_UP') ?>"><?php echo JText::_('COM_MEDIA_UP') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-primary" type="button" onclick="<?php if ($this->state->get('field.id')):?>window.parent.jInsertFieldValue(document.id('f_url').value,'<?php echo $this->state->get('field.id');?>');<?php else:?>ImageManager.onok();<?php endif;?>window.parent.SqueezeBox.close();"><?php echo JText::_('COM_MEDIA_INSERT') ?></button>
|
||||
<button class="btn" type="button" onclick="window.parent.SqueezeBox.close();"><?php echo JText::_('JCANCEL') ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<iframe id="imageframe" name="imageframe" src="index.php?option=com_media&view=imagesList&tmpl=component&folder=<?php echo $this->state->folder?>&asset=<?php echo $input->getCmd('asset');?>&author=<?php echo $input->getCmd('author');?>"></iframe>
|
||||
|
||||
<div class="well">
|
||||
<div class="row">
|
||||
<div class="span6 control-group">
|
||||
<div class="control-label">
|
||||
<label for="f_url"><?php echo JText::_('COM_MEDIA_IMAGE_URL') ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" id="f_url" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!$this->state->get('field.id')):?>
|
||||
<div class="span6 control-group">
|
||||
<div class="control-label">
|
||||
<label for="f_align"><?php echo JText::_('COM_MEDIA_ALIGN') ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<select size="1" id="f_align">
|
||||
<option value="" selected="selected"><?php echo JText::_('COM_MEDIA_NOT_SET') ?></option>
|
||||
<option value="left"><?php echo JText::_('JGLOBAL_LEFT') ?></option>
|
||||
<option value="right"><?php echo JText::_('JGLOBAL_RIGHT') ?></option>
|
||||
</select>
|
||||
<p class="help-block"><?php echo JText::_('COM_MEDIA_ALIGN_DESC');?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php if (!$this->state->get('field.id')):?>
|
||||
<div class="row">
|
||||
<div class="span6 control-group">
|
||||
<div class="control-label">
|
||||
<label for="f_alt"><?php echo JText::_('COM_MEDIA_IMAGE_DESCRIPTION') ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" id="f_alt" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="span6 control-group">
|
||||
<div class="control-label">
|
||||
<label for="f_title"><?php echo JText::_('COM_MEDIA_TITLE') ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="text" id="f_title" value="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span12 control-group">
|
||||
<div class="control-label">
|
||||
<label for="f_caption"><?php echo JText::_('COM_MEDIA_CAPTION') ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<select size="1" id="f_caption" >
|
||||
<option value="" selected="selected" ><?php echo JText::_('JNO') ?></option>
|
||||
<option value="1"><?php echo JText::_('JYES') ?></option>
|
||||
</select>
|
||||
<p class="help-block"><?php echo JText::_('COM_MEDIA_CAPTION_DESC');?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<input type="hidden" id="dirPath" name="dirPath" />
|
||||
<input type="hidden" id="f_file" name="f_file" />
|
||||
<input type="hidden" id="tmpl" name="component" />
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php if ($user->authorise('core.create', 'com_media')) : ?>
|
||||
<form action="<?php echo JUri::base(); ?>index.php?option=com_media&task=file.upload&tmpl=component&<?php echo $this->session->getName() . '=' . $this->session->getId(); ?>&<?php echo JSession::getFormToken();?>=1&asset=<?php echo $input->getCmd('asset');?>&author=<?php echo $input->getCmd('author');?>&view=images" id="uploadForm" class="form-horizontal" name="uploadForm" method="post" enctype="multipart/form-data">
|
||||
<div id="uploadform" class="well">
|
||||
<fieldset id="upload-noflash" class="actions">
|
||||
<div class="control-group">
|
||||
<div class="control-label">
|
||||
<label for="upload-file" class="control-label"><?php echo JText::_('COM_MEDIA_UPLOAD_FILE'); ?></label>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<input type="file" id="upload-file" name="Filedata[]" multiple /><button class="btn btn-primary" id="upload-submit"><i class="icon-upload icon-white"></i> <?php echo JText::_('COM_MEDIA_START_UPLOAD'); ?></button>
|
||||
<p class="help-block"><?php echo $this->config->get('upload_maxsize') == '0' ? JText::_('COM_MEDIA_UPLOAD_FILES_NOLIMIT') : JText::sprintf('COM_MEDIA_UPLOAD_FILES', $this->config->get('upload_maxsize')); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="return-url" value="<?php echo base64_encode('index.php?option=com_media&view=images&tmpl=component&fieldid=' . $input->getCmd('fieldid', '') . '&e_name=' . $input->getCmd('e_name') . '&asset=' . $input->getCmd('asset') . '&author=' . $input->getCmd('author')); ?>" />
|
||||
</div>
|
||||
</form>
|
||||
<?php endif; ?>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML View class for the Media component
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
* @since 1.0
|
||||
*/
|
||||
class MediaViewImages extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$config = JComponentHelper::getParams('com_media');
|
||||
$lang = JFactory::getLanguage();
|
||||
|
||||
JHtml::_('behavior.framework', true);
|
||||
JHtml::_('script', 'media/popup-imagemanager.js', true, true);
|
||||
JHtml::_('stylesheet', 'media/popup-imagemanager.css', array(), true);
|
||||
|
||||
if ($lang->isRTL())
|
||||
{
|
||||
JHtml::_('stylesheet', 'media/popup-imagemanager_rtl.css', array(), true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Display form for FTP credentials?
|
||||
* Don't set them here, as there are other functions called before this one if there is any file write operation
|
||||
*/
|
||||
$ftp = !JClientHelper::hasCredentials('ftp');
|
||||
|
||||
$this->session = JFactory::getSession();
|
||||
$this->config = $config;
|
||||
$this->state = $this->get('state');
|
||||
$this->folderList = $this->get('folderList');
|
||||
$this->require_ftp = $ftp;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<?php if (count($this->images) > 0 || count($this->folders) > 0) { ?>
|
||||
<ul class="manager thumbnails">
|
||||
<?php for ($i = 0, $n = count($this->folders); $i < $n; $i++) :
|
||||
$this->setFolder($i);
|
||||
echo $this->loadTemplate('folder');
|
||||
endfor; ?>
|
||||
|
||||
<?php for ($i = 0, $n = count($this->images); $i < $n; $i++) :
|
||||
$this->setImage($i);
|
||||
echo $this->loadTemplate('image');
|
||||
endfor; ?>
|
||||
</ul>
|
||||
<?php } else { ?>
|
||||
<div id="media-noimages">
|
||||
<div class="alert alert-info"><?php echo JText::_('COM_MEDIA_NO_IMAGES_FOUND'); ?></div>
|
||||
</div>
|
||||
<?php } ?>
|
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$input = JFactory::getApplication()->input;
|
||||
?>
|
||||
<li class="imgOutline thumbnail height-80 width-80 center">
|
||||
<a href="index.php?option=com_media&view=imagesList&tmpl=component&folder=<?php echo $this->_tmp_folder->path_relative; ?>&asset=<?php echo $input->getCmd('asset');?>&author=<?php echo $input->getCmd('author');?>" target="imageframe">
|
||||
<div class="height-50">
|
||||
<i class="icon-folder-2"></i>
|
||||
</div>
|
||||
<div class="small">
|
||||
<?php echo JHtml::_('string.truncate', $this->_tmp_folder->name, 10, false); ?>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$params = new JRegistry;
|
||||
$dispatcher = JEventDispatcher::getInstance();
|
||||
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_img, &$params));
|
||||
?>
|
||||
<li class="imgOutline thumbnail height-80 width-80 center">
|
||||
<a class="img-preview" href="javascript:ImageManager.populateFields('<?php echo $this->_tmp_img->path_relative; ?>')" title="<?php echo $this->_tmp_img->name; ?>" >
|
||||
<div class="height-50">
|
||||
<?php echo JHtml::_('image', $this->baseURL . '/' . $this->_tmp_img->path_relative, JText::sprintf('COM_MEDIA_IMAGE_TITLE', $this->_tmp_img->title, JHtml::_('number.bytes', $this->_tmp_img->size)), array('width' => $this->_tmp_img->width_60, 'height' => $this->_tmp_img->height_60)); ?>
|
||||
</div>
|
||||
<div class="small">
|
||||
<?php echo JHtml::_('string.truncate', $this->_tmp_img->name, 10, false); ?>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_img, &$params));
|
||||
?>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML View class for the Media component
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
* @since 1.0
|
||||
*/
|
||||
class MediaViewImagesList extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Do not allow cache
|
||||
JResponse::allowCache(false);
|
||||
|
||||
$lang = JFactory::getLanguage();
|
||||
|
||||
JHtml::_('stylesheet', 'media/popup-imagelist.css', array(), true);
|
||||
if ($lang->isRTL()) {
|
||||
JHtml::_('stylesheet', 'media/popup-imagelist_rtl.css', array(), true);
|
||||
}
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
$document->addScriptDeclaration("var ImageManager = window.parent.ImageManager;");
|
||||
|
||||
$images = $this->get('images');
|
||||
$folders = $this->get('folders');
|
||||
$state = $this->get('state');
|
||||
|
||||
$this->baseURL = COM_MEDIA_BASEURL;
|
||||
$this->images = &$images;
|
||||
$this->folders = &$folders;
|
||||
$this->state = &$state;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
function setFolder($index = 0)
|
||||
{
|
||||
if (isset($this->folders[$index]))
|
||||
{
|
||||
$this->_tmp_folder = &$this->folders[$index];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tmp_folder = new JObject;
|
||||
}
|
||||
}
|
||||
|
||||
function setImage($index = 0)
|
||||
{
|
||||
if (isset($this->images[$index]))
|
||||
{
|
||||
$this->_tmp_img = &$this->images[$index];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tmp_img = new JObject;
|
||||
}
|
||||
}
|
||||
}
|
1
administrator/components/com_media/views/index.html
Normal file
1
administrator/components/com_media/views/index.html
Normal file
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$input = JFactory::getApplication()->input;
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<!-- Begin Sidebar -->
|
||||
<div class="span2">
|
||||
<div id="treeview">
|
||||
<div id="media-tree_tree" class="sidebar-nav">
|
||||
<?php echo $this->loadTemplate('folders'); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.overall-progress,
|
||||
.current-progress {
|
||||
width: 150px;
|
||||
}
|
||||
</style>
|
||||
<!-- End Sidebar -->
|
||||
<!-- Begin Content -->
|
||||
<div class="span10">
|
||||
<?php echo $this->loadTemplate('navigation'); ?>
|
||||
<?php if (($user->authorise('core.create', 'com_media')) and $this->require_ftp) : ?>
|
||||
<form action="index.php?option=com_media&task=ftpValidate" name="ftpForm" id="ftpForm" method="post">
|
||||
<fieldset title="<?php echo JText::_('COM_MEDIA_DESCFTPTITLE'); ?>">
|
||||
<legend><?php echo JText::_('COM_MEDIA_DESCFTPTITLE'); ?></legend>
|
||||
<?php echo JText::_('COM_MEDIA_DESCFTP'); ?>
|
||||
<label for="username"><?php echo JText::_('JGLOBAL_USERNAME'); ?></label>
|
||||
<input type="text" id="username" name="username" class="inputbox" size="70" value="" />
|
||||
|
||||
<label for="password"><?php echo JText::_('JGLOBAL_PASSWORD'); ?></label>
|
||||
<input type="password" id="password" name="password" class="inputbox" size="70" value="" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="index.php?option=com_media" name="adminForm" id="mediamanager-form" method="post" enctype="multipart/form-data" >
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="cb1" id="cb1" value="0" />
|
||||
<input class="update-folder" type="hidden" name="folder" id="folder" value="<?php echo $this->state->folder; ?>" />
|
||||
</form>
|
||||
|
||||
<?php if ($user->authorise('core.create', 'com_media')):?>
|
||||
<!-- File Upload Form -->
|
||||
<div id="collapseUpload" class="collapse">
|
||||
<form action="<?php echo JUri::base(); ?>index.php?option=com_media&task=file.upload&tmpl=component&<?php echo $this->session->getName().'='.$this->session->getId(); ?>&<?php echo JSession::getFormToken();?>=1&format=html" id="uploadForm" class="form-inline" name="uploadForm" method="post" enctype="multipart/form-data">
|
||||
<div id="uploadform">
|
||||
<fieldset id="upload-noflash" class="actions">
|
||||
<label for="upload-file" class="control-label"><?php echo JText::_('COM_MEDIA_UPLOAD_FILE'); ?></label>
|
||||
<input type="file" id="upload-file" name="Filedata[]" multiple /> <button class="btn btn-primary" id="upload-submit"><i class="icon-upload icon-white"></i> <?php echo JText::_('COM_MEDIA_START_UPLOAD'); ?></button>
|
||||
<p class="help-block"><?php echo $this->config->get('upload_maxsize') == '0' ? JText::_('COM_MEDIA_UPLOAD_FILES_NOLIMIT') : JText::sprintf('COM_MEDIA_UPLOAD_FILES', $this->config->get('upload_maxsize')); ?></p>
|
||||
</fieldset>
|
||||
<input class="update-folder" type="hidden" name="folder" id="folder" value="<?php echo $this->state->folder; ?>" />
|
||||
<input type="hidden" name="return-url" value="<?php echo base64_encode('index.php?option=com_media'); ?>" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="collapseFolder" class="collapse">
|
||||
<form action="index.php?option=com_media&task=folder.create&tmpl=<?php echo $input->getCmd('tmpl', 'index');?>" name="folderForm" id="folderForm" class="form-inline" method="post">
|
||||
<div class="path">
|
||||
<input class="inputbox" type="text" id="folderpath" readonly="readonly" />
|
||||
<input class="inputbox" type="text" id="foldername" name="foldername" />
|
||||
<input class="update-folder" type="hidden" name="folderbase" id="folderbase" value="<?php echo $this->state->folder; ?>" />
|
||||
<button type="submit" class="btn"><i class="icon-folder-open"></i> <?php echo JText::_('COM_MEDIA_CREATE_FOLDER'); ?></button>
|
||||
</div>
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<form action="index.php?option=com_media&task=folder.create&tmpl=<?php echo $input->getCmd('tmpl', 'index');?>" name="folderForm" id="folderForm" method="post">
|
||||
<div id="folderview">
|
||||
<div class="view">
|
||||
<iframe class="thumbnail" src="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->state->folder;?>" id="folderframe" name="folderframe" width="100%" height="500px" marginwidth="0" marginheight="0" scrolling="auto"></iframe>
|
||||
</div>
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- End Content -->
|
||||
</div>
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
// Set up the sanitised target for the ul
|
||||
$ulTarget = str_replace('/', '-', $this->folders['data']->relative);
|
||||
|
||||
?>
|
||||
<ul class="nav nav-list collapse in" id="collapseFolder-<?php echo $ulTarget; ?>">
|
||||
<?php if (isset($this->folders['children'])) :
|
||||
foreach ($this->folders['children'] as $folder) :
|
||||
// Get a sanitised name for the target
|
||||
$target = str_replace('/', '-', $folder['data']->relative); ?>
|
||||
<li id="<?php echo $target; ?>">
|
||||
<i class="icon-folder-2 pull-left" data-toggle="collapse" data-target="#collapseFolder-<?php echo $target; ?>"></i>
|
||||
<a href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $folder['data']->relative; ?>" target="folderframe">
|
||||
<?php echo $folder['data']->name; ?>
|
||||
</a>
|
||||
<?php echo $this->getFolderLevel($folder); ?>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
</ul>
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
$app = JFactory::getApplication();
|
||||
$style = $app->getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word');
|
||||
?>
|
||||
<div class="media btn-group">
|
||||
<a href="#" id="thumbs" onclick="MediaManager.setViewType('thumbs')" class="btn <?php echo ($style == "thumbs") ? 'active' : '';?>">
|
||||
<i class="icon-grid-view-2"></i> <?php echo JText::_('COM_MEDIA_THUMBNAIL_VIEW'); ?></a>
|
||||
<a href="#" id="details" onclick="MediaManager.setViewType('details')" class="btn <?php echo ($style == "details") ? 'active' : '';?>">
|
||||
<i class="icon-list-view"></i> <?php echo JText::_('COM_MEDIA_DETAIL_VIEW'); ?></a>
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
159
administrator/components/com_media/views/media/view.html.php
Normal file
159
administrator/components/com_media/views/media/view.html.php
Normal file
@ -0,0 +1,159 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML View class for the Media component
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
* @since 1.0
|
||||
*/
|
||||
class MediaViewMedia extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
$app = JFactory::getApplication();
|
||||
$config = JComponentHelper::getParams('com_media');
|
||||
|
||||
$lang = JFactory::getLanguage();
|
||||
|
||||
$style = $app->getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word');
|
||||
|
||||
$document = JFactory::getDocument();
|
||||
|
||||
JHtml::_('behavior.framework', true);
|
||||
|
||||
JHtml::_('script', 'media/mediamanager.js', true, true);
|
||||
/*
|
||||
JHtml::_('stylesheet', 'media/mediamanager.css', array(), true);
|
||||
if ($lang->isRTL()) :
|
||||
JHtml::_('stylesheet', 'media/mediamanager_rtl.css', array(), true);
|
||||
endif;
|
||||
*/
|
||||
JHtml::_('behavior.modal');
|
||||
$document->addScriptDeclaration("
|
||||
window.addEvent('domready', function()
|
||||
{
|
||||
document.preview = SqueezeBox;
|
||||
});");
|
||||
|
||||
// JHtml::_('script', 'system/mootree.js', true, true, false, false);
|
||||
JHtml::_('stylesheet', 'system/mootree.css', array(), true);
|
||||
if ($lang->isRTL()) :
|
||||
JHtml::_('stylesheet', 'media/mootree_rtl.css', array(), true);
|
||||
endif;
|
||||
|
||||
if (DIRECTORY_SEPARATOR == '\\')
|
||||
{
|
||||
$base = str_replace(DIRECTORY_SEPARATOR, "\\\\", COM_MEDIA_BASE);
|
||||
}
|
||||
else
|
||||
{
|
||||
$base = COM_MEDIA_BASE;
|
||||
}
|
||||
|
||||
$js = "
|
||||
var basepath = '".$base."';
|
||||
var viewstyle = '".$style."';
|
||||
";
|
||||
$document->addScriptDeclaration($js);
|
||||
|
||||
/*
|
||||
* Display form for FTP credentials?
|
||||
* Don't set them here, as there are other functions called before this one if there is any file write operation
|
||||
*/
|
||||
$ftp = !JClientHelper::hasCredentials('ftp');
|
||||
|
||||
$session = JFactory::getSession();
|
||||
$state = $this->get('state');
|
||||
$this->session = $session;
|
||||
$this->config = &$config;
|
||||
$this->state = &$state;
|
||||
$this->require_ftp = $ftp;
|
||||
$this->folders_id = ' id="media-tree"';
|
||||
$this->folders = $this->get('folderTree');
|
||||
|
||||
// Set the toolbar
|
||||
$this->addToolbar();
|
||||
|
||||
parent::display($tpl);
|
||||
echo JHtml::_('behavior.keepalive');
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar()
|
||||
{
|
||||
// Get the toolbar object instance
|
||||
$bar = JToolBar::getInstance('toolbar');
|
||||
$user = JFactory::getUser();
|
||||
|
||||
// Set the titlebar text
|
||||
JToolbarHelper::title(JText::_('COM_MEDIA'), 'mediamanager.png');
|
||||
|
||||
// Add a upload button
|
||||
if ($user->authorise('core.create', 'com_media'))
|
||||
{
|
||||
$title = JText::_('JTOOLBAR_UPLOAD');
|
||||
$dhtml = "<button data-toggle=\"collapse\" data-target=\"#collapseUpload\" class=\"btn btn-small btn-success\">
|
||||
<i class=\"icon-plus icon-white\" title=\"$title\"></i>
|
||||
$title</button>";
|
||||
$bar->appendButton('Custom', $dhtml, 'upload');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
// Add a create folder button
|
||||
if ($user->authorise('core.create', 'com_media'))
|
||||
{
|
||||
$title = JText::_('COM_MEDIA_CREATE_NEW_FOLDER');
|
||||
$dhtml = "<button data-toggle=\"collapse\" data-target=\"#collapseFolder\" class=\"btn btn-small\">
|
||||
<i class=\"icon-folder\" title=\"$title\"></i>
|
||||
$title</button>";
|
||||
$bar->appendButton('Custom', $dhtml, 'folder');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
|
||||
// Add a delete button
|
||||
if ($user->authorise('core.delete', 'com_media'))
|
||||
{
|
||||
$title = JText::_('JTOOLBAR_DELETE');
|
||||
$dhtml = "<button onclick=\"MediaManager.submit('folder.delete')\" class=\"btn btn-small\">
|
||||
<i class=\"icon-remove\" title=\"$title\"></i>
|
||||
$title</button>";
|
||||
$bar->appendButton('Custom', $dhtml, 'delete');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
// Add a delete button
|
||||
if ($user->authorise('core.admin', 'com_media'))
|
||||
{
|
||||
JToolbarHelper::preferences('com_media');
|
||||
JToolbarHelper::divider();
|
||||
}
|
||||
JToolbarHelper::help('JHELP_CONTENT_MEDIA_MANAGER');
|
||||
}
|
||||
|
||||
function getFolderLevel($folder)
|
||||
{
|
||||
$this->folders_id = null;
|
||||
$txt = null;
|
||||
if (isset($folder['children']) && count($folder['children']))
|
||||
{
|
||||
$tmp = $this->folders;
|
||||
$this->folders = $folder;
|
||||
$txt = $this->loadTemplate('folders');
|
||||
$this->folders = $tmp;
|
||||
}
|
||||
return $txt;
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
$user = JFactory::getUser();
|
||||
?>
|
||||
<form target="_parent" action="index.php?option=com_media&tmpl=index&folder=<?php echo $this->state->folder; ?>" method="post" id="mediamanager-form" name="mediamanager-form">
|
||||
<div class="manager">
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="1%"><?php echo JText::_('JGLOBAL_PREVIEW'); ?></th>
|
||||
<th><?php echo JText::_('COM_MEDIA_NAME'); ?></th>
|
||||
<th width="15%"><?php echo JText::_('COM_MEDIA_PIXEL_DIMENSIONS'); ?></th>
|
||||
<th width="8%"><?php echo JText::_('COM_MEDIA_FILESIZE'); ?></th>
|
||||
<?php if ($user->authorise('core.delete', 'com_media')):?>
|
||||
<th width="8%"><?php echo JText::_('JACTION_DELETE'); ?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php echo $this->loadTemplate('up'); ?>
|
||||
|
||||
<?php for ($i = 0, $n = count($this->folders); $i < $n; $i++) :
|
||||
$this->setFolder($i);
|
||||
echo $this->loadTemplate('folder');
|
||||
endfor; ?>
|
||||
|
||||
<?php for ($i = 0, $n = count($this->documents); $i < $n; $i++) :
|
||||
$this->setDoc($i);
|
||||
echo $this->loadTemplate('doc');
|
||||
endfor; ?>
|
||||
|
||||
<?php for ($i = 0, $n = count($this->images); $i < $n; $i++) :
|
||||
$this->setImage($i);
|
||||
echo $this->loadTemplate('img');
|
||||
endfor; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="task" value="list" />
|
||||
<input type="hidden" name="username" value="" />
|
||||
<input type="hidden" name="password" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</div>
|
||||
</form>
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$params = new JRegistry;
|
||||
$dispatcher = JEventDispatcher::getInstance();
|
||||
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_doc, &$params));
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a title="<?php echo $this->_tmp_doc->name; ?>">
|
||||
<?php echo JHtml::_('image', $this->_tmp_doc->icon_16, $this->_tmp_doc->title, null, true, true) ? JHtml::_('image', $this->_tmp_doc->icon_16, $this->_tmp_doc->title, array('width' => 16, 'height' => 16), true) : JHtml::_('image', 'media/con_info.png', $this->_tmp_doc->title, array('width' => 16, 'height' => 16), true);?> </a>
|
||||
</td>
|
||||
<td class="description" title="<?php echo $this->_tmp_doc->name; ?>">
|
||||
<?php echo $this->_tmp_doc->title; ?>
|
||||
</td>
|
||||
<td> 
|
||||
|
||||
</td>
|
||||
<td class="filesize">
|
||||
<?php echo JHtml::_('number.bytes', $this->_tmp_doc->size); ?>
|
||||
</td>
|
||||
<?php if ($user->authorise('core.delete', 'com_media')):?>
|
||||
<td>
|
||||
<a class="delete-item" target="_top" href="index.php?option=com_media&task=file.delete&tmpl=index&<?php echo JSession::getFormToken(); ?>=1&folder=<?php echo $this->state->folder; ?>&rm[]=<?php echo $this->_tmp_doc->name; ?>" rel="<?php echo $this->_tmp_doc->name; ?>"><i class="icon-remove hasTooltip" title="<?php echo JHtml::tooltipText('JACTION_DELETE');?>"></i></a>
|
||||
<input type="checkbox" name="rm[]" value="<?php echo $this->_tmp_doc->name; ?>" />
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php
|
||||
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_doc, &$params));
|
||||
?>
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
?>
|
||||
<tr>
|
||||
<td class="imgTotal">
|
||||
<a href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->_tmp_folder->path_relative; ?>" target="folderframe">
|
||||
<i class="icon-folder-2"></i></a>
|
||||
</td>
|
||||
<td class="description">
|
||||
<a href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->_tmp_folder->path_relative; ?>" target="folderframe"><?php echo $this->_tmp_folder->name; ?></a>
|
||||
</td>
|
||||
<td> 
|
||||
|
||||
</td>
|
||||
<td> 
|
||||
|
||||
</td>
|
||||
<?php if ($user->authorise('core.delete', 'com_media')):?>
|
||||
<td>
|
||||
<a class="delete-item" target="_top" href="index.php?option=com_media&task=folder.delete&tmpl=index&folder=<?php echo $this->state->folder; ?>&<?php echo JSession::getFormToken(); ?>=1&rm[]=<?php echo $this->_tmp_folder->name; ?>" rel="<?php echo $this->_tmp_folder->name; ?>' :: <?php echo $this->_tmp_folder->files + $this->_tmp_folder->folders; ?>"><i class="icon-remove hasTooltip" title="<?php echo JHtml::tooltipText('JACTION_DELETE');?>"></i></a>
|
||||
<input type="checkbox" name="rm[]" value="<?php echo $this->_tmp_folder->name; ?>" />
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JHtml::_('bootstrap.tooltip');
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$params = new JRegistry;
|
||||
$dispatcher = JEventDispatcher::getInstance();
|
||||
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_img, &$params));
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<a class="img-preview" href="<?php echo COM_MEDIA_BASEURL.'/'.$this->_tmp_img->path_relative; ?>" title="<?php echo $this->_tmp_img->name; ?>"><?php echo JHtml::_('image', COM_MEDIA_BASEURL.'/'.$this->_tmp_img->path_relative, JText::sprintf('COM_MEDIA_IMAGE_TITLE', $this->_tmp_img->title, JHtml::_('number.bytes', $this->_tmp_img->size)), array('width' => $this->_tmp_img->width_16, 'height' => $this->_tmp_img->height_16)); ?></a>
|
||||
</td>
|
||||
<td class="description">
|
||||
<a href="<?php echo COM_MEDIA_BASEURL.'/'.$this->_tmp_img->path_relative; ?>" title="<?php echo $this->_tmp_img->name; ?>" rel="preview"><?php echo $this->escape($this->_tmp_img->title); ?></a>
|
||||
</td>
|
||||
<td class="dimensions">
|
||||
<?php echo JText::sprintf('COM_MEDIA_IMAGE_DIMENSIONS', $this->_tmp_img->width, $this->_tmp_img->height); ?>
|
||||
</td>
|
||||
<td class="filesize">
|
||||
<?php echo JHtml::_('number.bytes', $this->_tmp_img->size); ?>
|
||||
</td>
|
||||
<?php if ($user->authorise('core.delete', 'com_media')):?>
|
||||
<td>
|
||||
<a class="delete-item" target="_top" href="index.php?option=com_media&task=file.delete&tmpl=index&<?php echo JSession::getFormToken(); ?>=1&folder=<?php echo $this->state->folder; ?>&rm[]=<?php echo $this->_tmp_img->name; ?>" rel="<?php echo $this->_tmp_img->name; ?>"><i class="icon-remove hasTooltip" title="<?php echo JHtml::tooltipText('JACTION_DELETE');?>"></i></a>
|
||||
<input type="checkbox" name="rm[]" value="<?php echo $this->_tmp_img->name; ?>" />
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php
|
||||
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_img, &$params));
|
||||
?>
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$user = JFactory::getUser();
|
||||
?>
|
||||
<tr>
|
||||
<td class="imgTotal">
|
||||
<a href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->state->parent; ?>" target="folderframe">
|
||||
<i class="icon-arrow-up"></i></a>
|
||||
</td>
|
||||
<td class="description">
|
||||
<a href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->state->parent; ?>" target="folderframe">..</a>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<?php if ($user->authorise('core.delete', 'com_media')):?>
|
||||
<td> </td>
|
||||
<?php endif;?>
|
||||
</tr>
|
@ -0,0 +1 @@
|
||||
<!DOCTYPE html><title></title>
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<form target="_parent" action="index.php?option=com_media&tmpl=index&folder=<?php echo $this->state->folder; ?>" method="post" id="mediamanager-form" name="mediamanager-form">
|
||||
<ul class="manager thumbnails">
|
||||
<?php
|
||||
echo $this->loadTemplate('up');
|
||||
?>
|
||||
|
||||
<?php for ($i = 0, $n = count($this->folders); $i < $n; $i++) :
|
||||
$this->setFolder($i);
|
||||
echo $this->loadTemplate('folder');
|
||||
endfor; ?>
|
||||
|
||||
<?php for ($i = 0, $n = count($this->documents); $i < $n; $i++) :
|
||||
$this->setDoc($i);
|
||||
echo $this->loadTemplate('doc');
|
||||
endfor; ?>
|
||||
|
||||
<?php for ($i = 0, $n = count($this->images); $i < $n; $i++) :
|
||||
$this->setImage($i);
|
||||
echo $this->loadTemplate('img');
|
||||
endfor; ?>
|
||||
|
||||
<input type="hidden" name="task" value="" />
|
||||
<input type="hidden" name="username" value="" />
|
||||
<input type="hidden" name="password" value="" />
|
||||
<?php echo JHtml::_('form.token'); ?>
|
||||
</ul>
|
||||
</form>
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
$user = JFactory::getUser();
|
||||
$params = new JRegistry;
|
||||
$dispatcher = JEventDispatcher::getInstance();
|
||||
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_doc, &$params));
|
||||
?>
|
||||
<li class="imgOutline thumbnail height-80 width-80 center">
|
||||
<?php if ($user->authorise('core.delete', 'com_media')):?>
|
||||
<a class="close delete-item" target="_top" href="index.php?option=com_media&task=file.delete&tmpl=index&<?php echo JSession::getFormToken(); ?>=1&folder=<?php echo $this->state->folder; ?>&rm[]=<?php echo $this->_tmp_doc->name; ?>" rel="<?php echo $this->_tmp_doc->name; ?>" title="<?php echo JText::_('JACTION_DELETE');?>">x</a>
|
||||
<input class="pull-left" type="checkbox" name="rm[]" value="<?php echo $this->_tmp_doc->name; ?>" />
|
||||
<div class="clearfix"></div>
|
||||
<?php endif;?>
|
||||
<div class="height-50">
|
||||
<a style="display: block; width: 100%; height: 100%" title="<?php echo $this->_tmp_doc->name; ?>" >
|
||||
<?php echo JHtml::_('image', $this->_tmp_doc->icon_32, $this->_tmp_doc->name, null, true, true) ? JHtml::_('image', $this->_tmp_doc->icon_32, $this->_tmp_doc->title, null, true) : JHtml::_('image', 'media/con_info.png', $this->_tmp_doc->name, null, true); ?></a>
|
||||
</div>
|
||||
<div class="small" title="<?php echo $this->_tmp_doc->name; ?>" >
|
||||
<?php echo JHtml::_('string.truncate', $this->_tmp_doc->name, 10, false); ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_doc, &$params));
|
||||
?>
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
$user = JFactory::getUser();
|
||||
?>
|
||||
<li class="imgOutline thumbnail height-80 width-80 center">
|
||||
<?php if ($user->authorise('core.delete', 'com_media')):?>
|
||||
<a class="close delete-item" target="_top" href="index.php?option=com_media&task=folder.delete&tmpl=index&<?php echo JSession::getFormToken(); ?>=1&folder=<?php echo $this->state->folder; ?>&rm[]=<?php echo $this->_tmp_folder->name; ?>" rel="<?php echo $this->_tmp_folder->name; ?> :: <?php echo $this->_tmp_folder->files + $this->_tmp_folder->folders; ?>" title="<?php echo JText::_('JACTION_DELETE');?>">x</a>
|
||||
<input class="pull-left" type="checkbox" name="rm[]" value="<?php echo $this->_tmp_folder->name; ?>" />
|
||||
<div class="clearfix"></div>
|
||||
<?php endif;?>
|
||||
<div class="height-50">
|
||||
<a href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->_tmp_folder->path_relative; ?>" target="folderframe">
|
||||
<i class="icon-folder-2"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="small">
|
||||
<a href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->_tmp_folder->path_relative; ?>" target="folderframe"><?php echo JHtml::_('string.truncate', $this->_tmp_folder->name, 10, false); ?></a>
|
||||
</div>
|
||||
</li>
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
$user = JFactory::getUser();
|
||||
$params = new JRegistry;
|
||||
$dispatcher = JEventDispatcher::getInstance();
|
||||
$dispatcher->trigger('onContentBeforeDisplay', array('com_media.file', &$this->_tmp_img, &$params));
|
||||
?>
|
||||
<li class="imgOutline thumbnail height-80 width-80 center">
|
||||
<?php if ($user->authorise('core.delete', 'com_media')):?>
|
||||
<a class="close delete-item" target="_top" href="index.php?option=com_media&task=file.delete&tmpl=index&<?php echo JSession::getFormToken(); ?>=1&folder=<?php echo $this->state->folder; ?>&rm[]=<?php echo $this->_tmp_img->name; ?>" rel="<?php echo $this->_tmp_img->name; ?>" title="<?php echo JText::_('JACTION_DELETE');?>">x</a>
|
||||
<input class="pull-left" type="checkbox" name="rm[]" value="<?php echo $this->_tmp_img->name; ?>" />
|
||||
<div class="clearfix"></div>
|
||||
<?php endif;?>
|
||||
<div class="height-50">
|
||||
<a class="img-preview" href="<?php echo COM_MEDIA_BASEURL.'/'.$this->_tmp_img->path_relative; ?>" title="<?php echo $this->_tmp_img->name; ?>" >
|
||||
<?php echo JHtml::_('image', COM_MEDIA_BASEURL.'/'.$this->_tmp_img->path_relative, JText::sprintf('COM_MEDIA_IMAGE_TITLE', $this->_tmp_img->title, JHtml::_('number.bytes', $this->_tmp_img->size)), array('width' => $this->_tmp_img->width_60, 'height' => $this->_tmp_img->height_60)); ?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="small">
|
||||
<a href="<?php echo COM_MEDIA_BASEURL.'/'.$this->_tmp_img->path_relative; ?>" title="<?php echo $this->_tmp_img->name; ?>" class="preview"><?php echo JHtml::_('string.truncate', $this->_tmp_img->name, 10, false); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
$dispatcher->trigger('onContentAfterDisplay', array('com_media.file', &$this->_tmp_img, &$params));
|
||||
?>
|
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
?>
|
||||
<li class="imgOutline thumbnail height-80 width-80 center">
|
||||
<div class="imgTotal">
|
||||
<div class="imgBorder">
|
||||
<a class="btn" href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->state->parent; ?>" target="folderframe">
|
||||
<i class="icon-arrow-up"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<span> </span>
|
||||
</div>
|
||||
<div class="imginfoBorder">
|
||||
<a href="index.php?option=com_media&view=mediaList&tmpl=component&folder=<?php echo $this->state->parent; ?>" target="folderframe">..</a>
|
||||
</div>
|
||||
</li>
|
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
*
|
||||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* HTML View class for the Media component
|
||||
*
|
||||
* @package Joomla.Administrator
|
||||
* @subpackage com_media
|
||||
* @since 1.0
|
||||
*/
|
||||
class MediaViewMediaList extends JViewLegacy
|
||||
{
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// Do not allow cache
|
||||
JResponse::allowCache(false);
|
||||
|
||||
JHtml::_('behavior.framework', true);
|
||||
|
||||
JFactory::getDocument()->addScriptDeclaration("
|
||||
window.addEvent('domready', function()
|
||||
{
|
||||
window.parent.document.updateUploader();
|
||||
$$('a.img-preview').each(function(el)
|
||||
{
|
||||
el.addEvent('click', function(e)
|
||||
{
|
||||
window.top.document.preview.fromElement(el);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});");
|
||||
|
||||
$images = $this->get('images');
|
||||
$documents = $this->get('documents');
|
||||
$folders = $this->get('folders');
|
||||
$state = $this->get('state');
|
||||
|
||||
$this->baseURL = JUri::root();
|
||||
$this->images = &$images;
|
||||
$this->documents = &$documents;
|
||||
$this->folders = &$folders;
|
||||
$this->state = &$state;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
function setFolder($index = 0)
|
||||
{
|
||||
if (isset($this->folders[$index]))
|
||||
{
|
||||
$this->_tmp_folder = &$this->folders[$index];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tmp_folder = new JObject;
|
||||
}
|
||||
}
|
||||
|
||||
function setImage($index = 0)
|
||||
{
|
||||
if (isset($this->images[$index]))
|
||||
{
|
||||
$this->_tmp_img = &$this->images[$index];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tmp_img = new JObject;
|
||||
}
|
||||
}
|
||||
|
||||
function setDoc($index = 0)
|
||||
{
|
||||
if (isset($this->documents[$index]))
|
||||
{
|
||||
$this->_tmp_doc = &$this->documents[$index];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_tmp_doc = new JObject;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user