{{$action := .Action}}
{{$result := .Result}}
{{$context := .Context}}
{{$resource := .Resource}}
{{$bulkEdit := .BulkEdit}}
{{define "url" -}}
{{ if .Action.URL }}
{{- call .Action.URL .Result .Context -}}
{{else if (and (not .Multiple) (not .BulkEdit))}}
{{- join_url (url_for .Result .Resource) .Action.ToParam -}}
{{else}}
{{- join_url (url_for .Resource) "!action" .Action.ToParam -}}
{{ end }}
{{- end}}
{{if (and $action.URL (eq $action.Method "GET"))}}
{{if (or (eq $action.URLOpenType "bottomsheet") (eq $action.URLOpenType "slideout"))}}
{{t (printf "%v.actions.%v" $resource.ToParam $action.Label) $action.Label}}
{{else}}
{{t (printf "%v.actions.%v" $resource.ToParam $action.Label) $action.Label}}
{{end}}
{{else}}
{{t (printf "%v.actions.%v" $resource.ToParam $action.Label) $action.Label}}
{{end}}