diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/OrchardCore.Roles.csproj b/src/OrchardCore.Modules/OrchardCore.Roles/OrchardCore.Roles.csproj index 6700605cccb..86a1c6a0046 100644 --- a/src/OrchardCore.Modules/OrchardCore.Roles/OrchardCore.Roles.csproj +++ b/src/OrchardCore.Modules/OrchardCore.Roles/OrchardCore.Roles.csproj @@ -25,6 +25,7 @@ + diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Design.cshtml b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Design.cshtml new file mode 100644 index 00000000000..b22755e982f --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Design.cshtml @@ -0,0 +1,13 @@ +@using OrchardCore.Workflows.ViewModels +@using OrchardCore.Workflows.Helpers +@using OrchardCore.Roles.Workflows.Activities +@using OrchardCore.Roles.Workflows.ViewModels + +@model ActivityViewModel + +
+

+ @Model.Activity.GetTitleOrDefault(() => T["Get users in roles"]) +

+
+@T["Get users in roles {0} to {1}", string.Join(',', Model.Activity.Roles), Model.Activity.OutputKeyName] diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Edit.cshtml new file mode 100644 index 00000000000..e127ea6f91a --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Edit.cshtml @@ -0,0 +1,17 @@ +@using OrchardCore.Roles.Workflows.ViewModels + +@model GetUsersByRoleTaskViewModel + +
+ + + + @T["The designated key name for storing the users' list in the workflow output. This key enables later access to the list within the workflow.With Liquid support."] +
+ +
+ + @await Component.InvokeAsync("SelectRoles", new { selectedRoles = Model.Roles, htmlName = Html.NameFor(m => m.Roles), except = new[] { "Anonymous", "Authenticated" } }) + + @T["Choose the roles used to identify users during list generation."] +
diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Thumbnail.cshtml b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Thumbnail.cshtml new file mode 100644 index 00000000000..af8fe0c29f4 --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/GetUsersByRoleTask.Fields.Thumbnail.cshtml @@ -0,0 +1,4 @@ +

+ @T["Get users in roles"] +

+

@T["Get users in roles."]

diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Design.cshtml b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Design.cshtml new file mode 100644 index 00000000000..8476667d3f6 --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Design.cshtml @@ -0,0 +1,13 @@ +@using OrchardCore.Workflows.ViewModels +@using OrchardCore.Workflows.Helpers +@using OrchardCore.Roles.Workflows.Activities +@using OrchardCore.Roles.Workflows.ViewModels + +@model ActivityViewModel + +
+

+ @Model.Activity.GetTitleOrDefault(() => T["Unassign user from roles"]) +

+
+@T["Unassign {0} from roles {1}", Model.Activity.UserName, string.Join(",", Model.Activity.Roles)] diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Edit.cshtml b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Edit.cshtml new file mode 100644 index 00000000000..a48ad1dc01f --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Edit.cshtml @@ -0,0 +1,17 @@ +@using OrchardCore.Roles.Workflows.ViewModels + +@model UnassignUserRoleTaskViewModel + +
+ + + + @T["The User to update. With Liquid support."] +
+ +
+ + @await Component.InvokeAsync("SelectRoles", new { selectedRoles = Model.Roles, htmlName = Html.NameFor(m => m.Roles), except = new[] { "Anonymous", "Authenticated" } }) + + @T["The Roles to remove."] +
diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Thumbnail.cshtml b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Thumbnail.cshtml new file mode 100644 index 00000000000..825971a5265 --- /dev/null +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Items/UnassignUserRoleTask.Fields.Thumbnail.cshtml @@ -0,0 +1,4 @@ +

+ @T["Unassign user from roles"] +

+

@T["Unassign a user from roles."]

diff --git a/src/OrchardCore.Modules/OrchardCore.Roles/Views/Shared/Components/SelectRoles/Default.cshtml b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Shared/Components/SelectRoles/Default.cshtml index 06a4d9cb2a8..23388e17d15 100644 --- a/src/OrchardCore.Modules/OrchardCore.Roles/Views/Shared/Components/SelectRoles/Default.cshtml +++ b/src/OrchardCore.Modules/OrchardCore.Roles/Views/Shared/Components/SelectRoles/Default.cshtml @@ -1,13 +1,15 @@ @model SelectRolesViewModel -
+
@for (var i = 0; i < Model.RoleSelections.Count; i++) { var role = Model.RoleSelections[i]; -
-