{{define "title"}}{{T "app.title.assets"}}{{end}} {{define "content"}} {{if .FormMode}} {{if .EditingItem}}

{{T "items.edit.basic_info"}}

{{range .Tags}} {{end}}

{{T "items.edit.purchase_warranty"}}

{{T "items.edit.docs_visuals"}}

{{if .EditingItem.ImagePath}} {{T "items.edit.active_image"}}: {{.EditingItem.ImagePath}} {{end}}
{{if .EditingItem.ReceiptPath}} {{T "items.edit.active_receipt"}}: {{.EditingItem.ReceiptPath}} {{end}}

{{T "items.edit.custom_fields"}}

{{T "items.edit.custom_fields_help"}}

{{else}}
1 {{T "wizard.step_category"}}
2 {{T "wizard.step_item"}}
3 {{T "wizard.step_brand"}}

{{T "wizard.category_question"}}

{{end}} {{else if .ViewMode}}
{{.Item.Status}}
{{if .IsAuthenticated}} {{T "items.detail.quantity"}}: {{.Item.Quantity}} {{end}}
{{if .IsAuthenticated}}
{{range .Item.Tags}} {{.Name}} {{end}}
{{end}}

{{T "items.detail.description"}}

{{if .Item.Description}}{{.Item.Description}}{{else}}{{T "items.detail.no_description"}}{{end}}

{{if .IsAuthenticated}}
{{T "items.detail.model_number"}} {{if .Item.ModelNumber}}{{.Item.ModelNumber}}{{else}}--{{end}}
{{T "items.detail.serial_number"}} {{if .Item.SerialNumber}}{{.Item.SerialNumber}}{{else}}--{{end}}
{{end}}
{{if .IsAuthenticated}}

{{T "items.detail.photo"}}

{{if .Item.ImagePath}} Asset Photo {{else}}
{{T "items.detail.no_photo"}}
{{end}}

{{T "items.detail.receipt"}}

{{if .Item.ReceiptPath}} Receipt {{else}}
{{T "items.detail.no_receipt"}}
{{end}}

{{T "items.detail.custom_fields"}}

{{if .CustomFieldsMap}}
{{range $key, $value := .CustomFieldsMap}} {{end}}
{{$key}} {{$value}}
{{else}}

{{T "items.detail.no_custom"}}

{{end}}
{{end}}
{{if .IsAuthenticated}}

{{T "items.detail.qr"}}

{{if .Item.ShortSlug}} QR Code s/{{.Item.ShortSlug}} {{T "items.detail.download_qr"}} {{else}} {{T "items.detail.no_short_url"}} {{end}}

{{T "items.detail.purchase_context"}}

{{T "items.detail.purchase_price"}} {{if .Item.PurchasePrice.Valid}}{{formatPrice .Item.PurchasePrice}}{{else}}--{{end}}
{{T "items.detail.supplier"}} {{if .Item.Supplier}}{{.Item.Supplier}}{{else}}--{{end}}
{{T "items.detail.purchase_date"}} {{if .Item.PurchaseDate.Valid}}{{formatDate .Item.PurchaseDate}}{{else}}--{{end}}
{{T "items.detail.warranty_period"}} {{if .Item.WarrantyMonths.Valid}}{{.Item.WarrantyMonths.Int64}} {{T "items.detail.months"}}{{else}}--{{end}}
{{T "items.detail.assigned_location"}} {{if .Item.LocationName.Valid}} {{.Item.LocationName.String}} {{else}} {{T "common.unassigned"}} {{end}}
{{end}}
{{else}}
{{if or .SearchQuery (or .SelectedStatus (or .SelectedLocation (or .SelectedTag .ShowRemoved)))}} {{T "common.reset"}} {{end}}
{{if .Items}} {{range .Items}} {{end}} {{else}} {{end}}
{{T "items.col.qr"}} {{T "items.col.name"}} {{T "items.col.location"}} {{T "items.col.status"}} {{T "items.col.quantity"}} {{T "items.col.tags"}} {{T "common.actions"}}
{{if .ShortSlug}} QR Label {{else}} -- {{end}}
{{.Name}} {{if .ModelNumber}} {{T "items.model_prefix"}}: {{.ModelNumber}} {{end}}
{{if .LocationName.Valid}} {{.LocationName.String}} {{else}} {{T "common.unassigned"}} {{end}} {{if eq .LifecycleState "archived"}} {{T "common.archived"}} {{else}} {{.Status}} {{end}} {{.Quantity}}
{{range .Tags}} {{.Name}} {{end}}
{{if eq .LifecycleState "removed"}}
{{else}} {{T "common.details"}} {{if ne .LifecycleState "archived"}} {{T "common.edit"}} {{end}}
{{if ne .LifecycleState "archived"}}
{{end}}
{{end}}

{{T "items.empty.title"}}

{{T "items.empty.subtitle"}}

{{end}} {{end}}