Merge pull request #2198 from sbwalker/dev
remove columns from main user management view and migrate them to edit view
This commit is contained in:
commit
0fe3ea25af
|
@ -72,8 +72,19 @@ else
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="lastlogin" HelpText="The date and time when the user last signed in" ResourceKey="LastLogin"></Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input id="lastlogin" class="form-control" @bind="@lastlogin" readonly />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row mb-1 align-items-center">
|
||||||
|
<Label Class="col-sm-3" For="lastipaddress" HelpText="The IP Address of the user recorded during their last login" ResourceKey="LastIPAddress"></Label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input id="lastipaddress" class="form-control" @bind="@lastipaddress" readonly />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
}
|
}
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel Name="Profile" ResourceKey="Profile">
|
<TabPanel Name="Profile" ResourceKey="Profile">
|
||||||
|
@ -137,63 +148,70 @@ else
|
||||||
<AuditInfo CreatedBy="@createdby" CreatedOn="@createdon" ModifiedBy="@modifiedby" ModifiedOn="@modifiedon" DeletedBy="@deletedby" DeletedOn="@deletedon"></AuditInfo>
|
<AuditInfo CreatedBy="@createdby" CreatedOn="@createdon" ModifiedBy="@modifiedby" ModifiedOn="@modifiedon" DeletedBy="@deletedby" DeletedOn="@deletedon"></AuditInfo>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private int userid;
|
private int userid;
|
||||||
private string username = string.Empty;
|
private string username = string.Empty;
|
||||||
private string _password = string.Empty;
|
private string _password = string.Empty;
|
||||||
private string _passwordtype = "password";
|
private string _passwordtype = "password";
|
||||||
private string _togglepassword = string.Empty;
|
private string _togglepassword = string.Empty;
|
||||||
private string confirm = string.Empty;
|
private string confirm = string.Empty;
|
||||||
private string email = string.Empty;
|
private string email = string.Empty;
|
||||||
private string displayname = string.Empty;
|
private string displayname = string.Empty;
|
||||||
private FileManager filemanager;
|
private FileManager filemanager;
|
||||||
private int photofileid = -1;
|
private int photofileid = -1;
|
||||||
private File photo = null;
|
private File photo = null;
|
||||||
private List<Profile> profiles;
|
private string isdeleted;
|
||||||
private Dictionary<string, string> settings;
|
private string lastlogin;
|
||||||
private string category = string.Empty;
|
private string lastipaddress;
|
||||||
private string createdby;
|
|
||||||
private DateTime createdon;
|
|
||||||
private string modifiedby;
|
|
||||||
private DateTime modifiedon;
|
|
||||||
private string deletedby;
|
|
||||||
private DateTime? deletedon;
|
|
||||||
private string isdeleted;
|
|
||||||
|
|
||||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin;
|
private List<Profile> profiles;
|
||||||
|
private Dictionary<string, string> settings;
|
||||||
|
private string category = string.Empty;
|
||||||
|
|
||||||
protected override async Task OnParametersSetAsync()
|
private string createdby;
|
||||||
{
|
private DateTime createdon;
|
||||||
try
|
private string modifiedby;
|
||||||
{
|
private DateTime modifiedon;
|
||||||
if (PageState.QueryString.ContainsKey("id"))
|
private string deletedby;
|
||||||
{
|
private DateTime? deletedon;
|
||||||
_togglepassword = SharedLocalizer["ShowPassword"];
|
|
||||||
profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId);
|
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin;
|
||||||
userid = Int32.Parse(PageState.QueryString["id"]);
|
|
||||||
var user = await UserService.GetUserAsync(userid, PageState.Site.SiteId);
|
protected override async Task OnParametersSetAsync()
|
||||||
if (user != null)
|
{
|
||||||
{
|
try
|
||||||
username = user.Username;
|
{
|
||||||
email = user.Email;
|
if (PageState.QueryString.ContainsKey("id"))
|
||||||
displayname = user.DisplayName;
|
{
|
||||||
if (user.PhotoFileId != null)
|
_togglepassword = SharedLocalizer["ShowPassword"];
|
||||||
{
|
profiles = await ProfileService.GetProfilesAsync(PageState.Site.SiteId);
|
||||||
photofileid = user.PhotoFileId.Value;
|
userid = Int32.Parse(PageState.QueryString["id"]);
|
||||||
photo = await FileService.GetFileAsync(photofileid);
|
var user = await UserService.GetUserAsync(userid, PageState.Site.SiteId);
|
||||||
}
|
if (user != null)
|
||||||
else
|
{
|
||||||
{
|
username = user.Username;
|
||||||
photofileid = -1;
|
email = user.Email;
|
||||||
photo = null;
|
displayname = user.DisplayName;
|
||||||
}
|
if (user.PhotoFileId != null)
|
||||||
settings = await SettingService.GetUserSettingsAsync(user.UserId);
|
{
|
||||||
|
photofileid = user.PhotoFileId.Value;
|
||||||
|
photo = await FileService.GetFileAsync(photofileid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
photofileid = -1;
|
||||||
|
photo = null;
|
||||||
|
}
|
||||||
|
isdeleted = user.IsDeleted.ToString();
|
||||||
|
lastlogin = string.Format("{0:MMM dd yyyy HH:mm:ss}", user.LastLoginOn);
|
||||||
|
lastipaddress = user.LastIPAddress;
|
||||||
|
|
||||||
|
settings = await SettingService.GetUserSettingsAsync(user.UserId);
|
||||||
createdby = user.CreatedBy;
|
createdby = user.CreatedBy;
|
||||||
createdon = user.CreatedOn;
|
createdon = user.CreatedOn;
|
||||||
modifiedby = user.ModifiedBy;
|
modifiedby = user.ModifiedBy;
|
||||||
modifiedon = user.ModifiedOn;
|
modifiedon = user.ModifiedOn;
|
||||||
deletedby = user.DeletedBy;
|
deletedby = user.DeletedBy;
|
||||||
deletedon = user.DeletedOn;
|
deletedon = user.DeletedOn;
|
||||||
isdeleted = user.IsDeleted.ToString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,14 +33,12 @@ else
|
||||||
</div>
|
</div>
|
||||||
<Pager Items="@users" RowClass="align-middle">
|
<Pager Items="@users" RowClass="align-middle">
|
||||||
<Header>
|
<Header>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th style="width: 1px;"> </th>
|
<th style="width: 1px;"> </th>
|
||||||
<th>@SharedLocalizer["Username"]</th>
|
<th>@SharedLocalizer["Username"]</th>
|
||||||
<th>@SharedLocalizer["Email"]</th>
|
<th>@SharedLocalizer["Name"]</th>
|
||||||
<th>@Localizer["LastLoginOn"]</th>
|
<th>@Localizer["LastLoginOn"]</th>
|
||||||
<th>@Localizer["LastIPAddress"]</th>
|
|
||||||
<th>@Localizer["CreatedOn"]</th>
|
|
||||||
</Header>
|
</Header>
|
||||||
<Row>
|
<Row>
|
||||||
<td>
|
<td>
|
||||||
|
@ -54,10 +52,7 @@ else
|
||||||
</td>
|
</td>
|
||||||
<td>@context.User.Username</td>
|
<td>@context.User.Username</td>
|
||||||
<td>@((MarkupString)string.Format("<a href=\"mailto:{0}\">{1}</a>", @context.User.Email, @context.User.DisplayName))</td>
|
<td>@((MarkupString)string.Format("<a href=\"mailto:{0}\">{1}</a>", @context.User.Email, @context.User.DisplayName))</td>
|
||||||
<td>@string.Format("{0:dd-MMM-yyyy HH:mm}",context.User.LastLoginOn)</td>
|
<td>@string.Format("{0:dd-MMM-yyyy HH:mm:ss}", context.User.LastLoginOn)</td>
|
||||||
<td>@context.User.LastIPAddress</td>
|
|
||||||
<td>@string.Format("{0:dd-MMM-yyyy HH:mm}",context.User.CreatedOn)</td>
|
|
||||||
|
|
||||||
</Row>
|
</Row>
|
||||||
</Pager>
|
</Pager>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|
|
@ -186,4 +186,16 @@
|
||||||
<data name="Password.Placeholder" xml:space="preserve">
|
<data name="Password.Placeholder" xml:space="preserve">
|
||||||
<value>Password</value>
|
<value>Password</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LastIPAddress.HelpText" xml:space="preserve">
|
||||||
|
<value>The IP Address of the user recorded during their last login</value>
|
||||||
|
</data>
|
||||||
|
<data name="LastIPAddress.Text" xml:space="preserve">
|
||||||
|
<value>Last IP Address: </value>
|
||||||
|
</data>
|
||||||
|
<data name="LastLogin.HelpText" xml:space="preserve">
|
||||||
|
<value>The date and time when the user last signed in</value>
|
||||||
|
</data>
|
||||||
|
<data name="LastLogin.Text" xml:space="preserve">
|
||||||
|
<value>Last Login:</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -369,12 +369,6 @@
|
||||||
<data name="Required" xml:space="preserve">
|
<data name="Required" xml:space="preserve">
|
||||||
<value>Required</value>
|
<value>Required</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="CreatedOn" xml:space="preserve">
|
|
||||||
<value>Created On</value>
|
|
||||||
</data>
|
|
||||||
<data name="LastIPAddress" xml:space="preserve">
|
|
||||||
<value>Last IP Address</value>
|
|
||||||
</data>
|
|
||||||
<data name="LastLoginOn" xml:space="preserve">
|
<data name="LastLoginOn" xml:space="preserve">
|
||||||
<value>Last Login</value>
|
<value>Last Login</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user