mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-09-25 05:01:37 +02:00
Merge pull request #77 from emamut/master
Add open links in another window option
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
@@ -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(
|
||||
|
@@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user