Commit cd1b4d94 authored by Penom Nom's avatar Penom Nom
Browse files

Hide directories in download tab-pane.

parent 8c152380
......@@ -61,7 +61,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{assign var="nb_files" value=0}
{$dir=$data_folder|cat:$analyse.directory}
{foreach $dir|scandir as $file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
{$nb_files = $nb_files + 1}
{/if}
{/foreach}
......@@ -72,8 +73,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{else}
<ul>
{foreach $dir|scandir as $file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
{$link=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
<li class="filelist"><a href="{$link}">{$file}</a> </li>
{/if}
{/foreach}
......
......@@ -248,22 +248,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div>
<div class="tab-pane fade" id="downloads">
{block name=download}
{if $nb_files != 0}
<p><ul>
{$dir=$data_folder|cat:$analyse.directory}
{assign var="nb_files" value=0}
{$dir=$data_folder|cat:$analyse.directory}
{foreach $dir|scandir as $file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png"}
{$link=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
<li class="filelist"><a href="{$link}">{$file}</a> </li>
{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
{$nb_files = $nb_files + 1}
{/if}
{/foreach}
</ul></p>
{else}
{if $nb_files == 0}
<div class="alert alert-info">
Results folder not synchronized yet...
</div>
{else}
<ul>
{foreach $dir|scandir as $file}
{assign var="link" value=(('fileadmin'|cat:$analyse.directory)|cat:'/')|cat:$file}
{if $file != "." and $file != "" and $file != ".." and ($file|substr:-strlen(".png")) != ".png" and !is_dir($link)}
<li class="filelist"><a href="{$link}">{$file}</a> </li>
{/if}
{/foreach}
</ul>
{/if}
{/block}
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment