webdav portal upload func added
This commit is contained in:
parent
1da7c6c3b3
commit
a882072b02
23 changed files with 553 additions and 17 deletions
|
@ -3,6 +3,9 @@
|
|||
@using Ninject
|
||||
@using WebsitePanel.WebDav.Core.Config
|
||||
@using WebsitePanel.WebDav.Core.Interfaces.Managers
|
||||
@using WebsitePanel.WebDav.Core.Security.Authorization.Enums
|
||||
@using WebsitePanel.WebDavPortal.UI
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
@{
|
||||
|
@ -34,6 +37,21 @@ else
|
|||
<span class="glyphicon glyphicon-chevron-right" style="top: 2px;"></span>
|
||||
<a href="@string.Concat("/" + header + "/", string.Join("/", elements.Take(i + 1)))" class="btn btn-primary btn-sm active" role="button">@elements[i]</a>
|
||||
}
|
||||
|
||||
if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||
{
|
||||
@*<a id="upload-button" class="btn btn-success btn-sm active" data-toggle="modal" data-target="#file-upload" role="button">@Resources.FileUpload</a>*@
|
||||
|
||||
<div class="dropdown navbar-right">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-expanded="true">
|
||||
@Resources.Actions
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
|
||||
<li role="presentation"><a id="upload-button" data-toggle="modal" data-target="#file-upload" role="menuitem" tabindex="-1" href="#">@Resources.FileUpload</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<br />
|
||||
|
@ -48,4 +66,31 @@ else
|
|||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@section popups
|
||||
{
|
||||
<div id="file-upload" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal-file-upload-title" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="modal-file-upload-title">@Resources.FileUpload</h4>
|
||||
</div>
|
||||
@using (Html.BeginRouteForm(FileSystemRouteNames.UploadFile, FormMethod.Post, new {enctype = "multipart/form-data"}))
|
||||
{
|
||||
<div class="modal-body">
|
||||
<input type="file" name="file" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">@Resources.Close</button>
|
||||
<button type="submit" class="btn btn-primary processing-dialog">@Resources.Upload</button>
|
||||
</div>
|
||||
}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div>
|
||||
|
||||
@Html.Partial("_ProcessDialog", null)
|
||||
}
|
|
@ -17,7 +17,7 @@
|
|||
case FileOpenerType.OfficeOnline:
|
||||
isTargetBlank = true;
|
||||
var pathPart = Model.Href.AbsolutePath.Replace("/" + WspContext.User.OrganizationId, "");
|
||||
href = string.Concat(Url.RouteUrl(FileSystemRouteNames.OfficeOnlinePath, new { org = WspContext.User.OrganizationId, pathPart = "" }), pathPart);
|
||||
href = string.Concat(Url.RouteUrl(FileSystemRouteNames.ShowOfficeOnlinePath, new { org = WspContext.User.OrganizationId, pathPart = "" }), pathPart);
|
||||
break;
|
||||
default:
|
||||
isTargetBlank = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue