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/>. ...@@ -61,7 +61,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{assign var="nb_files" value=0} {assign var="nb_files" value=0}
{$dir=$data_folder|cat:$analyse.directory} {$dir=$data_folder|cat:$analyse.directory}
{foreach $dir|scandir as $file} {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} {$nb_files = $nb_files + 1}
{/if} {/if}
{/foreach} {/foreach}
...@@ -72,8 +73,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -72,8 +73,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{else} {else}
<ul> <ul>
{foreach $dir|scandir as $file} {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}
{$link=(('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> <li class="filelist"><a href="{$link}">{$file}</a> </li>
{/if} {/if}
{/foreach} {/foreach}
......
...@@ -248,22 +248,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -248,22 +248,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</div> </div>
<div class="tab-pane fade" id="downloads"> <div class="tab-pane fade" id="downloads">
{block name=download} {block name=download}
{if $nb_files != 0} {assign var="nb_files" value=0}
<p><ul> {$dir=$data_folder|cat:$analyse.directory}
{$dir=$data_folder|cat:$analyse.directory} {foreach $dir|scandir as $file}
{assign var="nb_files" value=0} {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}
{if $nb_files == 0}
<div class="alert alert-info">
Results folder not synchronized yet...
</div>
{else}
<ul>
{foreach $dir|scandir as $file} {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}
{$link=(('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> <li class="filelist"><a href="{$link}">{$file}</a> </li>
{$nb_files = $nb_files + 1}
{/if} {/if}
{/foreach} {/foreach}
</ul></p> </ul>
{else}
<div class="alert alert-info">
Results folder not synchronized yet...
</div>
{/if} {/if}
{/block} {/block}
</div> </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