Disk quota

This commit is contained in:
Paul Schneider 2016-11-30 11:05:10 +01:00
commit 81b9a2522e
9 changed files with 1193 additions and 22 deletions

View file

@ -75,6 +75,7 @@ editorcontenu.on('text-change',function(delta,source){
}
});
$('#contentcnt').focus(function(){
$('#contentbar').removeClass('hidden');
$('#Titletoolbar').addClass('hidden');
@ -89,7 +90,7 @@ editorcontenu.on('text-change',function(delta,source){
}
else { done(); }
},
url: "/UserFiles/Create?PostId=@Model.Id"
url: "/api/fs"
};
});
@ -187,14 +188,9 @@ editorcontenu.on('text-change',function(delta,source){
<div >
<form id="postfiles" class="dropzone" method="post" enctype="multipart/form-data">
<div class="fallback">
<input name="File[]" type="file"/>
<input name="File[]" type="file" id="filesinput"/>
</div>
<input type="hidden" name="postId" value="@Model.Id" />
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="button" value="Upload" class="btn btn-default" />
</div>
</div>
@Html.AntiForgeryToken()
</form>
</div>

View file

@ -99,6 +99,18 @@
@(Model.Balance?.Credits ?? 0) &euro;
[<a asp-action="Credits">@SR["Manage"]</a>]
</dd>
<dt>Usage disque</dt>
<dd>
@if (Model.DiskQuota>0)
{
<text>
@((Model.DiskUsage/Model.DiskQuota).ToString("%#0")) :
</text>
}
<text>
@(Model.DiskUsage.ToString("0,#")) / @(Model.DiskQuota.ToString("0,#"))
</text>
</dd>
</dl>
<h4>
<a asp-controller="Account" asp-action="Delete" >@SR["Unregister"]</a>