mirror of
https://github.com/unraid/webgui.git
synced 2026-01-20 00:19:59 -06:00
55 lines
2.0 KiB
Plaintext
55 lines
2.0 KiB
Plaintext
Menu="Shares:1"
|
|
Title="User Shares"
|
|
Tag="user-circle"
|
|
Cond="_var($var,'fsState')!='Stopped' && _var($var,'shareUser')=='e'"
|
|
---
|
|
<?PHP
|
|
/* Copyright 2005-2023, Lime Technology
|
|
* Copyright 2012-2023, Bergware International.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License version 2,
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*/
|
|
?>
|
|
<script>
|
|
function displayShares(all) {
|
|
if (all == 'yes') {
|
|
$.cookie('ssz','ssz');
|
|
$('#shareslist').html("<tr><td colspan='8'><div class='spinner'></div></td></tr>");
|
|
$('div.spinner').html(unraid_logo);
|
|
}
|
|
$.get('/webGui/include/ShareList.php',{compute:all,path:'<?=addslashes(htmlspecialchars($path))?>',scale:'<?=_var($display,'scale')?>',number:'<?=_var($display,'number','.,')?>',raw:'<?=_var($display,'raw')?>',fill:$.cookie('ssz')},function(data){
|
|
$.removeCookie('ssz')
|
|
$('#shareslist').html(data);
|
|
$('#compute-shares').prop('disabled',!data || data.indexOf('colspan=')!=-1);
|
|
});
|
|
}
|
|
$(function() {
|
|
displayShares('no');
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
table.share_status thead tr td:first-child{width:15%}
|
|
table.share_status thead tr td:nth-child(n+3){width:10%}
|
|
</style>
|
|
|
|
<table class="share_status">
|
|
<thead><tr><td>_(Name)_</td><td>_(Comment)_</td><td>_(SMB)_</td><td>_(NFS)_</td><td>_(Cache)_</td><td>_(Size)_</td><td>_(Free)_</td></tr></thead>
|
|
<tbody id="shareslist"></tbody>
|
|
</table>
|
|
<p><form name="share_form" method="POST" action="<?=htmlspecialchars($path)?>/Share?name=">
|
|
<input id="compute-shares" type="button" value="_(Compute All)_" onclick="$(this).prop('disabled',true);displayShares('yes')">
|
|
<?if (_var($var,'startMode')=='Normal'):?>
|
|
<input type="submit" value="_(Add Share)_"<?=_var($var,'shareUser')=='e'?'>':' disabled>User shares must be <strong>enabled</strong> to add shares.'?>
|
|
<?else:?>
|
|
<input type="submit" value="_(Add Share)_" disabled>
|
|
<?endif;?>
|
|
</form></p>
|
|
|
|
:share_list_help:
|