File tree Expand file tree Collapse file tree 3 files changed +16
-19
lines changed
src/DynamicAuthorization.Mvc.Ui/Views Expand file tree Collapse file tree 3 files changed +16
-19
lines changed Original file line number Diff line number Diff line change 1313 <header >
1414 <nav class =" navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3" >
1515 <div class =" container" >
16- <a class =" navbar-brand" asp-area =" " asp-controller =" Home" asp-action =" Index" >SampleMvcWebAppWithUi</a >
17- <button class =" navbar-toggler" type =" button" data-toggle =" collapse" data-target =" .navbar-collapse" aria-controls =" navbarSupportedContent"
18- aria-expanded =" false" aria-label =" Toggle navigation" >
19- <span class =" navbar-toggler-icon" ></span >
20- </button >
2116 <div class =" navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse" >
2217 <ul class =" navbar-nav" >
2318 <li class =" nav-item" >
2621 </ul >
2722 <ul class =" navbar-nav flex-grow-1" >
2823 <li class =" nav-item" >
29- <a class =" nav-link text-dark" asp-area = " " asp-controller = " Home " asp-action = " Index " >Home</a >
24+ <a class =" nav-link text-dark" href = " / " >Home</a >
3025 </li >
3126 <li class =" nav-item dropdown" >
3227 <a class =" nav-link dropdown-toggle" href =" #" role =" button" data-toggle =" dropdown" aria-haspopup =" true" aria-expanded =" false" >
3328 Access
3429 </a >
3530 <div class =" dropdown-menu" aria-labelledby =" navbarDropdownMenuLink" >
36- <a class =" dropdown-item text-dark" asp-area = " Access " asp-controller = " Role " asp-action = " Index " >Role List</a >
37- <a class =" dropdown-item text-dark" asp-area = " Access " asp-controller = " UserRole " asp-action = " Index " >User Role List</a >
31+ <a class =" dropdown-item text-dark" href = " /role " >Role List</a >
32+ <a class =" dropdown-item text-dark" href = " /userrole " >User Role List</a >
3833 </div >
3934 </li >
4035 </ul >
Original file line number Diff line number Diff line change 44@model UserRoleViewModel
55@{
66 ViewData [" Title" ] = " Edit User Access" ;
7+ Layout = " ~/Views/Shared/_AuthLayout.cshtml" ;
78 var roles = (IEnumerable <IdentityRole >)ViewData [" Roles" ];
89}
910
Original file line number Diff line number Diff line change 33@model IEnumerable <UserRoleViewModel >
44@{
55 ViewData [" Title" ] = " User Role List" ;
6+ Layout = " ~/Views/Shared/_AuthLayout.cshtml" ;
67}
78
89<h2 >Access List</h2 >
2122 <tbody >
2223 @foreach ( var user in Model )
2324 {
24- <tr >
25- <td >@Html.DisplayFor(m => user .UserName )</td >
26- <td >
27- @for ( var i = 0 ; i < user .Roles .Count (); i ++ )
25+ <tr >
26+ <td >@Html.DisplayFor(m => user .UserName )</td >
27+ <td >
28+ @for ( var i = 0 ; i < user .Roles .Count (); i ++ )
2829 {
2930 if (i < user .Roles .Count () - 1 )
3031 {
3132 var element = user .Roles .ElementAt (i );
32- < span > @Html .DisplayFor (_ => element ) | < / span >
33+ < span > @Html .DisplayFor (_ => element ) | < / span >
3334 }
3435 else
3536 {
3637 var element = user .Roles .ElementAt (i );
37- <span >@Html.DisplayFor(_ => element )</span >
38+ <span >@Html.DisplayFor(_ => element )</span >
3839 }
3940 }
40- </td >
41- <td >
42- <a asp-action =" Edit" asp-route-id =" @user.UserId" >Edit </a >
43- </td >
44- </tr >
41+ </td >
42+ <td >
43+ <a asp-action =" Edit" asp-route-id =" @user.UserId" >Edit </a >
44+ </td >
45+ </tr >
4546 }
4647 </tbody >
4748 </table >
You can’t perform that action at this time.
0 commit comments