Merge pull request #77 from emamut/master

Add open links in another window option
This commit is contained in:
Chris Kankiewicz
2015-08-06 14:27:38 -07:00
3 changed files with 13 additions and 1 deletions

View File

@@ -202,6 +202,17 @@ class DirectoryLister {
}
/**
* Returns open links in another window
*
* @return boolean Returns true if in config is enabled open links in another window, false if not
* @access public
*/
public function determineOpenLinksAnotherWindow() {
return $this->_config['open_links_another_window'];
}
/**
* Returns the path to the chosen theme directory
*

View File

@@ -7,6 +7,7 @@ return array(
'list_folders_first' => true,
'list_sort_order' => 'natcasesort',
'theme_name' => 'bootstrap',
'open_links_another_window' => true,
// Hidden files
'hidden_files' => array(

View File

@@ -110,7 +110,7 @@
<?php if ($lister->containsIndex($fileInfo['file_path'])): ?>
<a href="<?php echo $fileInfo['file_path']; ?>" class="web-link-button">
<a href="<?php echo $fileInfo['file_path']; ?>" class="web-link-button" <?php if($lister->determineOpenLinksAnotherWindow()) echo 'target="_blank"'?> >
<i class="fa fa-external-link"></i>
</a>