diff --git a/cmd/web-app/handlers/projects.go b/cmd/web-app/handlers/projects.go index 1025e60..d3bda68 100644 --- a/cmd/web-app/handlers/projects.go +++ b/cmd/web-app/handlers/projects.go @@ -91,7 +91,7 @@ func (h *Projects) Index(ctx context.Context, w http.ResponseWriter, r *http.Req subStatusIcon = "far fa-circle" } - v.Formatted = fmt.Sprintf("%s", subStatusClass, subStatusIcon, web.EnumValueTitle(v.Value)) + v.Formatted = fmt.Sprintf("%s", subStatusClass, subStatusIcon, web.EnumValueTitle(v.Value)) case "created_at": dt := web.NewTimeResponse(ctx, q.CreatedAt) v.Value = dt.Local diff --git a/cmd/web-app/handlers/users.go b/cmd/web-app/handlers/users.go index 329311c..ec29bf6 100644 --- a/cmd/web-app/handlers/users.go +++ b/cmd/web-app/handlers/users.go @@ -44,6 +44,10 @@ func urlUsersCreate() string { return fmt.Sprintf("/users/create") } +func urlUsersInvite() string { + return fmt.Sprintf("/users/invite") +} + func urlUsersView(userID string) string { return fmt.Sprintf("/users/%s", userID) } @@ -117,7 +121,7 @@ func (h *Users) Index(ctx context.Context, w http.ResponseWriter, r *http.Reques subStatusIcon = "far fa-circle" } - v.Formatted = fmt.Sprintf("%s", subStatusClass, subStatusIcon, web.EnumValueTitle(v.Value)) + v.Formatted = fmt.Sprintf("%s", subStatusClass, subStatusIcon, web.EnumValueTitle(v.Value)) case "created_at": dt := web.NewTimeResponse(ctx, q.CreatedAt) v.Value = dt.Local @@ -175,6 +179,7 @@ func (h *Users) Index(ctx context.Context, w http.ResponseWriter, r *http.Reques data := map[string]interface{}{ "datatable": dt.Response(), "urlUsersCreate": urlUsersCreate(), + "urlUsersInvite": urlUsersInvite(), } return h.Renderer.Render(ctx, w, r, TmplLayoutBase, "users-index.gohtml", web.MIMETextHTMLCharsetUTF8, http.StatusOK, data) @@ -362,6 +367,7 @@ func (h *Users) View(ctx context.Context, w http.ResponseWriter, r *http.Request } } + data["urlUsersView"] = urlUsersView(userID) data["urlUsersUpdate"] = urlUsersUpdate(userID) data["urlUserVirtualLogin"] = urlUserVirtualLogin(userID) @@ -531,6 +537,8 @@ func (h *Users) Update(ctx context.Context, w http.ResponseWriter, r *http.Reque data["passwordValidationDefaults"] = verr.(*weberror.Error) } + data["urlUsersView"] = urlUsersView(userID) + return h.Renderer.Render(ctx, w, r, TmplLayoutBase, "users-update.gohtml", web.MIMETextHTMLCharsetUTF8, http.StatusOK, data) } diff --git a/cmd/web-app/templates/content/account-update.gohtml b/cmd/web-app/templates/content/account-update.gohtml index 0b27332..3dc40d1 100644 --- a/cmd/web-app/templates/content/account-update.gohtml +++ b/cmd/web-app/templates/content/account-update.gohtml @@ -4,6 +4,13 @@ {{end}} {{define "content"}} + +
- Role
+ Roles
{{ if .userAccount }}
{{ range $r := .userAccount.Roles.Options }}{{ if $r.Selected }}
diff --git a/cmd/web-app/templates/content/users-create.gohtml b/cmd/web-app/templates/content/users-create.gohtml
index b132caa..7be684c 100644
--- a/cmd/web-app/templates/content/users-create.gohtml
+++ b/cmd/web-app/templates/content/users-create.gohtml
@@ -4,6 +4,13 @@
{{end}}
{{define "content"}}
+
+
Create User