add support for public content folders
This commit is contained in:
@ -33,6 +33,24 @@
|
||||
<input id="name" class="form-control" @bind="@_name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<Label for="type" HelpText="Select the folder type. Private folders are only accessible by authorized users. Public folders can be accessed by all users" ResourceKey="Name">Type: </Label>
|
||||
</td>
|
||||
<td>
|
||||
@if (PageState.QueryString.ContainsKey("id"))
|
||||
{
|
||||
<input id="type" class="form-control" readonly @bind="@_type" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<select id="type" class="form-control" @bind="@_type">
|
||||
<option value="@FolderTypes.Private">@Localizer[FolderTypes.Private]</option>
|
||||
<option value="@FolderTypes.Public">@Localizer[FolderTypes.Public]</option>
|
||||
</select>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="center">
|
||||
<Label For="permissions" HelpText="Select the permissions you want for the folder" ResourceKey="Permissions">Permissions: </Label>
|
||||
@ -60,8 +78,9 @@
|
||||
@code {
|
||||
private List<Folder> _folders;
|
||||
private int _folderId = -1;
|
||||
private string _name;
|
||||
private int _parentId = -1;
|
||||
private string _name;
|
||||
private string _type = FolderTypes.Private;
|
||||
private bool _isSystem;
|
||||
private string _permissions = string.Empty;
|
||||
private string _createdBy;
|
||||
@ -91,6 +110,7 @@
|
||||
{
|
||||
_parentId = folder.ParentId ?? -1;
|
||||
_name = folder.Name;
|
||||
_type = folder.Type;
|
||||
_isSystem = folder.IsSystem;
|
||||
_permissions = folder.Permissions;
|
||||
_createdBy = folder.CreatedBy;
|
||||
@ -150,6 +170,7 @@
|
||||
}
|
||||
|
||||
folder.Name = _name;
|
||||
folder.Type = _type;
|
||||
folder.IsSystem = _isSystem;
|
||||
folder.Permissions = _permissionGrid.GetPermissions();
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
<Row>
|
||||
<td><ActionLink Action="Details" Text="Edit" Parameters="@($"id=" + context.FileId.ToString())" ResourceKey="Details" /></td>
|
||||
<td><ActionDialog Header="Delete File" Message="@Localizer["Are You Sure You Wish To Delete {0}?", context.Name]" Action="Delete" Security="SecurityAccessLevel.Admin" Class="btn btn-danger" OnClick="@(async () => await DeleteFile(context))" ResourceKey="DeleteFile" /></td>
|
||||
<td><a href="@(ContentUrl(context.FileId))" target="_new">@context.Name</a></td>
|
||||
<td><a href="@context.Url" target="_new">@context.Name</a></td>
|
||||
<td>@context.ModifiedOn</td>
|
||||
<td>@context.Extension.ToUpper() @Localizer["File"]</td>
|
||||
<td>@string.Format("{0:0.00}", ((decimal)context.Size / 1000)) KB</td>
|
||||
|
Reference in New Issue
Block a user