From 1b313e6df4a5742aa07e654ea4ef12102877af57 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 23 Mar 2018 09:48:36 -0400 Subject: [PATCH] Adjust listing link for view/edit --- src/Admin/Controllers/OrganizationsController.cs | 3 ++- src/Admin/Controllers/UsersController.cs | 3 ++- src/Admin/Models/OrganizationsModel.cs | 1 + src/Admin/Models/UsersModel.cs | 1 + src/Admin/Views/Organizations/Index.cshtml | 2 +- src/Admin/Views/Users/Index.cshtml | 2 +- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Admin/Controllers/OrganizationsController.cs b/src/Admin/Controllers/OrganizationsController.cs index c8d4a0adb..73c1f3f89 100644 --- a/src/Admin/Controllers/OrganizationsController.cs +++ b/src/Admin/Controllers/OrganizationsController.cs @@ -50,7 +50,8 @@ namespace Bit.Admin.Controllers UserEmail = string.IsNullOrWhiteSpace(userEmail) ? null : userEmail, Paid = paid, Page = page, - Count = count + Count = count, + Action = _globalSettings.SelfHosted ? "View" : "Edit" }); } diff --git a/src/Admin/Controllers/UsersController.cs b/src/Admin/Controllers/UsersController.cs index 79e15a28e..ef2716541 100644 --- a/src/Admin/Controllers/UsersController.cs +++ b/src/Admin/Controllers/UsersController.cs @@ -47,7 +47,8 @@ namespace Bit.Admin.Controllers Items = users as List, Email = string.IsNullOrWhiteSpace(email) ? null : email, Page = page, - Count = count + Count = count, + Action = _globalSettings.SelfHosted ? "View" : "Edit" }); } diff --git a/src/Admin/Models/OrganizationsModel.cs b/src/Admin/Models/OrganizationsModel.cs index a5d9dc241..371d15c91 100644 --- a/src/Admin/Models/OrganizationsModel.cs +++ b/src/Admin/Models/OrganizationsModel.cs @@ -7,5 +7,6 @@ namespace Bit.Admin.Models public string Name { get; set; } public string UserEmail { get; set; } public bool? Paid { get; set; } + public string Action { get; set; } } } diff --git a/src/Admin/Models/UsersModel.cs b/src/Admin/Models/UsersModel.cs index 024a1001f..7c0d146df 100644 --- a/src/Admin/Models/UsersModel.cs +++ b/src/Admin/Models/UsersModel.cs @@ -5,5 +5,6 @@ namespace Bit.Admin.Models public class UsersModel : PagedModel { public string Email { get; set; } + public string Action { get; set; } } } diff --git a/src/Admin/Views/Organizations/Index.cshtml b/src/Admin/Views/Organizations/Index.cshtml index e3f0001a4..35f1a4a29 100644 --- a/src/Admin/Views/Organizations/Index.cshtml +++ b/src/Admin/Views/Organizations/Index.cshtml @@ -43,7 +43,7 @@ { - @org.Name + @org.Name @org.Plan diff --git a/src/Admin/Views/Users/Index.cshtml b/src/Admin/Views/Users/Index.cshtml index c99777069..447b95c63 100644 --- a/src/Admin/Views/Users/Index.cshtml +++ b/src/Admin/Views/Users/Index.cshtml @@ -33,7 +33,7 @@ { - @user.Email + @user.Email