Commit 209e18f5 authored by Lucas Brown's avatar Lucas Brown

Added breakcrumbs

parent 27fc20d4
......@@ -292,7 +292,7 @@ func (h *Projects) View(ctx context.Context, w http.ResponseWriter, r *http.Requ
return err
}
data["project"] = prj.Response(ctx)
data["urlProjectsView"] = urlProjectsView(projectID)
data["urlProjectsUpdate"] = urlProjectsUpdate(projectID)
return h.Renderer.Render(ctx, w, r, TmplLayoutBase, "projects-view.gohtml", web.MIMETextHTMLCharsetUTF8, http.StatusOK, data)
......@@ -373,6 +373,8 @@ func (h *Projects) Update(ctx context.Context, w http.ResponseWriter, r *http.Re
}
data["project"] = prj.Response(ctx)
data["urlProjectsView"] = urlProjectsView(projectID)
if req.ID == "" {
req.Name = &prj.Name
req.Status = &prj.Status
......
......@@ -4,6 +4,13 @@
{{end}}
{{define "content"}}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/projects">Projects</a></li>
<li class="breadcrumb-item active" aria-current="page">Create</li>
</ol>
</nav>
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Create Project</h1>
</div>
......
{{define "title"}}Projects{{end}}
{{define "content"}}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/projects">Projects</a></li>
<li class="breadcrumb-item active" aria-current="page">Index</li>
</ol>
</nav>
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Projects</h1>
{{ if HasRole $._Ctx "admin" }}
<a href="{{ .urlProjectsCreate }}" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-folder-plus fa-sm text-white-50 mr-1"></i>Create Project</a>
......
......@@ -4,6 +4,15 @@
{{end}}
{{define "content"}}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/projects">Projects</a></li>
<li class="breadcrumb-item"><a href="{{ .urlProjectsView }}">{{ .form.Name }}</a></li>
<li class="breadcrumb-item active" aria-current="page">Update</li>
</ol>
</nav>
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Update Project</h1>
</div>
......
......@@ -4,6 +4,14 @@
{{end}}
{{define "content"}}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/projects">Projects</a></li>
<li class="breadcrumb-item"><a href="{{ .urlProjectsView }}">{{ .project.Name }}</a></li>
<li class="breadcrumb-item active" aria-current="page">View</li>
</ol>
</nav>
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">{{ .project.Name }}</h1>
<!-- a href="{{ .urlProjectsUpdate }}" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="far fa-edit fa-sm text-white-50 mr-1"></i>Edit Details</a -->
......
......@@ -32,7 +32,7 @@
<div class="form-group ">
<input type="password" class="form-control form-control-user {{ ValidationFieldClass $.validationErrors "Password" }}" name="Password" value="{{ $.form.Password }}" placeholder="New Password" required>
{{template "invalid-feedback" dict "validationDefaults" $.validationDefaults "validationErrors" $.validationErrors "fieldName" "Password" }}
</div>
<div class="form-group ">
<input type="password" class="form-control form-control-user {{ ValidationFieldClass $.validationErrors "PasswordConfirm" }}" name="PasswordConfirm" value="{{ $.form.PasswordConfirm }}" placeholder="Repeat New Password" required>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment