diff --git a/internal/server/templates/location_folder.html b/internal/server/templates/location_folder.html new file mode 100644 index 0000000..67962e3 --- /dev/null +++ b/internal/server/templates/location_folder.html @@ -0,0 +1,232 @@ +{{define "content"}} +
+ +
+ + {{if .IsAuthenticated}} + + {{end}} + +
+

{{.CurrentLocation.Name}}

+ {{if .CurrentLocation.Description}} +

{{.CurrentLocation.Description}}

+ {{end}} + +
+ {{if .IsAuthenticated}} +
+ +
+ {{end}} + + {{if .IsAuthenticated}} +
+ + Edit Location + + + Add Asset Here + +
+ {{end}} +
+
+
+ + + {{if .IsAuthenticated}} + {{if .CurrentLocation.ParentID.Valid}} +
+ + + + Drag items or folders here to move up to the parent directory +
+ {{end}} + {{end}} + + + {{if .IsAuthenticated}} +
+

Folders

+
+ {{if not .ChildLocations}} +
+

No sub-folders in this location.

+
+ {{else}} + {{range .ChildLocations}} +
+
+
+ + + +
+
+ {{.Name}} + {{if eq .LifecycleState "removed"}}Removed{{else if eq .LifecycleState "archived"}}Archived{{else}}Active{{end}} +
+
+ {{if $.IsAuthenticated}} +
+ +
+ + Edit Folder + + {{if eq .LifecycleState "removed"}} +
+ + +
+
+ + +
+ {{else}} +
+ + +
+
+ + +
+ {{end}} +
+
+ {{end}} +
+ {{end}} + {{end}} +
+
+ {{end}} + + + {{if .IsAuthenticated}} +
+

Assets

+
+ {{if not .Items}} +
+ + + +

No assets found in this location.

+
+ {{else}} + {{range .Items}} +
+
+ {{if .ImagePath}} + {{.Name}} + {{else}} +
+ + + +
+ {{end}} +
+
+
+ {{.Name}} + {{.Status}} +
+

+ Qty: {{.Quantity}} + {{if .ModelNumber}}• Model: {{.ModelNumber}}{{end}} +

+
+ {{range .Tags}} + {{.Name}} + {{end}} +
+
+ {{if $.IsAuthenticated}} +
+ +
+ + Edit Asset + + + {{if eq .LifecycleState "removed"}} +
+ + +
+
+ + +
+ {{else}} +
+ + +
+
+ + +
+ {{end}} +
+
+ {{end}} +
+ {{end}} + {{end}} +
+
+ {{end}} +
+ + +{{end}}