Add URL links to mailer page
This commit is contained in:
parent
4be9c72060
commit
c9eee95cbb
4 changed files with 12 additions and 5 deletions
|
|
@ -20,7 +20,8 @@ func MakeGet[T any](f handlerFunctionGet[T]) http.HandlerFunc {
|
|||
return
|
||||
}
|
||||
RenderOrError(w, resp.Template, Content[T]{
|
||||
C: resp.Content,
|
||||
C: resp.Content,
|
||||
URL: NewContentURL(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,11 +126,14 @@
|
|||
|
||||
<!-- Action Buttons -->
|
||||
<div class="action-buttons">
|
||||
<a href="{{ .URL.RMO.Evidence }}" class="btn btn-success flex-grow-1">
|
||||
<a
|
||||
href="{{ call .URL.RMO.Evidence .C.PublicID }}"
|
||||
class="btn btn-success flex-grow-1"
|
||||
>
|
||||
<i class="bi bi-check-circle me-2"></i> Correct
|
||||
</a>
|
||||
<a
|
||||
href="{{ .URL.RMO.UpdateLocation }}"
|
||||
href="{{ call .URL.RMO.UpdateLocation .C.PublicID }}"
|
||||
class="btn btn-outline-primary flex-grow-1"
|
||||
>
|
||||
<i class="bi bi-geo-alt me-2"></i> Update Location
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ func NewContentURL() ContentURL {
|
|||
return ContentURL{
|
||||
Configuration: newContentURLConfiguration(),
|
||||
OAuthRefreshArcGIS: config.MakeURLNidus("/arcgis/oauth/begin"),
|
||||
RMO: newContentURLRMO(),
|
||||
Root: config.MakeURLNidus("/"),
|
||||
Route: config.MakeURLNidus("/route"),
|
||||
Sidebar: newContentURLSidebar(),
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@ type address struct {
|
|||
Country string `db:"country"`
|
||||
}
|
||||
type contentMailer struct {
|
||||
Address address
|
||||
Address address
|
||||
PublicID string
|
||||
}
|
||||
|
||||
func getMailer(ctx context.Context, r *http.Request) (*html.Response[contentMailer], *nhttp.ErrorWithStatus) {
|
||||
|
|
@ -60,7 +61,8 @@ func getMailer(ctx context.Context, r *http.Request) (*html.Response[contentMail
|
|||
}
|
||||
return html.NewResponse(
|
||||
"rmo/mailer.html", contentMailer{
|
||||
Address: report,
|
||||
Address: report,
|
||||
PublicID: public_id,
|
||||
},
|
||||
), nil
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue