OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.41k stars 2.39k forks source link

When a user create a new role, redirect the use to the edit page instead of index #11959

Open MikeAlhayek opened 2 years ago

MikeAlhayek commented 2 years ago

Is your feature request related to a problem? Please describe.

When a new role is created, currently we redirect the user to the Index view. After a user adds a new role, they would likely want to assign permissions to it. from a user experience, I think it would be more logical to redirect the user to the Edit screen of that role instead.

Describe the solution you'd like

After a new role is successfully created, redirect the user to the edit view return RedirectToAction(nameof(Edit), new { id = role.RoleName});

ns8482e commented 2 years ago

May be you need a Save and Continue option

sebastienros commented 2 years ago

I might not disagree, but we should see if this is a pattern we actually copy in many places.

hishamco commented 2 years ago

I think we used this pattern in content items. I rethink again about the scenario, seems Save and Continue will not solve the problem. We might need another option underneath Create, let us say Create and Edit Permissions this way you either create a role and return back to the roles page or create a role, then redirect to set the proper permission for the created role

@CrestApps is this make sense to the issue that you - and all we are - facing?

hishamco commented 2 years ago

So we introduced the Save and Continue for a reason, in content items, IMHO there's a need here to add such options. Your thought guys?

Skrypt commented 2 years ago

Create = Create the role and go back to the list of roles page Create and Continue = Create the role and go to that role edit page Save = Save the role and go back to the list of roles page Save and Continue = Save the role and stay on that role edit page

That makes sense to me. Though, what @sebastienros means is if that would make sense to have a Shape for this if the pattern can be used in different places.

hishamco commented 2 years ago

The above options confuses little bit ;) let us focus on the create page options, Create and Continue might be confusing because many will think it will create a role and continue return back to create a new one