webdav portal search view added
This commit is contained in:
parent
839f6cda2b
commit
0ebe24141e
24 changed files with 345 additions and 99 deletions
|
@ -53,9 +53,3 @@ else
|
|||
</script>
|
||||
}
|
||||
}
|
||||
|
||||
@section popups
|
||||
{
|
||||
@Html.Partial("_ProcessDialog", null)
|
||||
@Html.Partial("_ConfirmDialog")
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
@using WebsitePanel.WebDavPortal.Resources
|
||||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
|
||||
|
||||
@Html.Partial("_ShowContentTopMenu", Model)
|
||||
|
||||
<div class="prevent-deselect container">
|
||||
<table id="search-items-table" class="display table table-striped table-bordered noselect" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@UI.File</th>
|
||||
<th>@UI.Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@section scripts
|
||||
{
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
wsp.fileBrowser.setSettings({ deletionUrl: "@Url.RouteUrl(FileSystemRouteNames.DeleteFiles)" });
|
||||
wsp.fileBrowser.initSearchDataTable('#search-items-table', '@Url.RouteUrl(FileSystemRouteNames.ShowContentDetails)', '@Model.SearchValue');
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
|
@ -3,21 +3,6 @@
|
|||
@using WebsitePanel.WebDavPortal.UI.Routes
|
||||
@model WebsitePanel.WebDavPortal.Models.ModelForWebDav
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="search-block navbar-right">
|
||||
<div>
|
||||
@using (Html.BeginRouteForm(FileSystemRouteNames.ShowContentPath))
|
||||
{
|
||||
<label>
|
||||
@UI.Search:
|
||||
</label>
|
||||
@Html.TextBoxFor(x => x.SearchValue, new { @class = "form-control input-sm"})
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
|
|
|
@ -15,8 +15,3 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
@section popups
|
||||
{
|
||||
@Html.Partial("_ProcessDialog", null)
|
||||
@Html.Partial("_ConfirmDialog")
|
||||
}
|
|
@ -10,42 +10,69 @@
|
|||
@if (Model != null)
|
||||
{
|
||||
string header = WspContext.User.OrganizationId;
|
||||
<a href="/@header/" class="processing-dialog">@header</a>
|
||||
string[] elements = Model.UrlSuffix.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < elements.Length; i++)
|
||||
{
|
||||
<span style="top: 2px;"> / </span>
|
||||
<a href="@string.Concat("/" + header + "/", string.Join("/", elements.Take(i + 1)))" class="processing-dialog">@elements[i]</a>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="container file-actions-menu prevent-deselect">
|
||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||
{
|
||||
<div class="file-deletion navbar-left">
|
||||
<a id="delete-button" class="btn btn-danger btn-sm active" role="button"
|
||||
data-target="#confirm-dialog"
|
||||
data-target-positive-button-text="@UI.Delete"
|
||||
data-target-title-text="@UI.DeleteFileQuestion"
|
||||
data-target-content="@UI.DialogsContentConfrimFileDeletion">@UI.Delete</a>
|
||||
|
||||
<div class="breadcrumb-wsp">
|
||||
@if (String.IsNullOrEmpty(Model.SearchValue))
|
||||
{
|
||||
<a href="/@header/" class="processing-dialog">@header</a>
|
||||
|
||||
for (int i = 0; i < elements.Length; i++)
|
||||
{
|
||||
<span style="top: 2px;"> / </span>
|
||||
<a href="@string.Concat("/" + header + "/", string.Join("/", elements.Take(i + 1)))" class="processing-dialog">@elements[i]</a>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<a href="@Url.RouteUrl(FileSystemRouteNames.ShowContentPath)" class="processing-dialog">@UI.SearchResults</a>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="search-block navbar-right">
|
||||
<div>
|
||||
@using (Html.BeginRouteForm(FileSystemRouteNames.SearchFiles, FormMethod.Post))
|
||||
{
|
||||
<div>
|
||||
<label>
|
||||
@UI.SearchDocuments:
|
||||
</label>
|
||||
@Html.TextBox("searchValue", Model.SearchValue, new { @class = "form-control input-sm" })
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="file-upload navbar-right">
|
||||
@if (Request.Browser.IsMobileDevice == false)
|
||||
</div>
|
||||
@if (string.IsNullOrEmpty(Model.SearchValue))
|
||||
{
|
||||
<div class="container file-actions-menu prevent-deselect">
|
||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||
{
|
||||
<div class="btn-toolbar change-view-block" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default" title="@UI.Details" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new { viewType = FolderViewTypes.BigIcons, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix })"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span></a>
|
||||
<a class="btn btn-default" title="@UI.Table" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new { viewType = FolderViewTypes.Table, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix })"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
<div class="file-deletion navbar-left">
|
||||
<a id="delete-button" class="btn btn-danger btn-sm active" role="button"
|
||||
data-target="#confirm-dialog"
|
||||
data-target-positive-button-text="@UI.Delete"
|
||||
data-target-title-text="@UI.DeleteFileQuestion"
|
||||
data-target-content="@UI.DialogsContentConfrimFileDeletion">@UI.Delete</a>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||
{
|
||||
<a id="upload-button" class="btn btn-success btn-sm active" href="@Url.RouteUrl(FileSystemRouteNames.UploadFile)" role="button">@UI.FileUpload</a>
|
||||
}
|
||||
<div class="file-upload navbar-right">
|
||||
@if (Request.Browser.IsMobileDevice == false)
|
||||
{
|
||||
<div class="btn-toolbar change-view-block" role="toolbar">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default" title="@UI.Details" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new {viewType = FolderViewTypes.BigIcons, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix})"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span></a>
|
||||
<a class="btn btn-default" title="@UI.Table" href="@Url.RouteUrl(FileSystemRouteNames.ChangeWebDavViewType, new {viewType = FolderViewTypes.Table, org = WspContext.User.OrganizationId, pathPart = Model.UrlSuffix})"><span class="glyphicon glyphicon-th-list" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (Model.Permissions.HasFlag(WebDavPermissions.Write))
|
||||
{
|
||||
<a id="upload-button" class="btn btn-success btn-sm active" href="@Url.RouteUrl(FileSystemRouteNames.UploadFile)" role="button">@UI.FileUpload</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue