@@ -40,7 +40,7 @@ templ envelopeView(m meta.Meta, props envelopeViewProps) {
40
40
</tr >
41
41
<tr >
42
42
<th class =" w-0 whitespace-nowrap" >To</th >
43
- <td >
43
+ <td class = " flex items-center gap-2 " >
44
44
for _ , to := range props.Envelope .Message .To {
45
45
<span class =" badge" >
46
46
{ to }
@@ -62,7 +62,7 @@ templ envelopeView(m meta.Meta, props envelopeViewProps) {
62
62
<div class =" flex flex-col gap-4 p-4" >
63
63
<form class =" join" hx-post ={ routes.EnvelopeEndpointSend (props.Envelope .Message .ID ).URLString () } hx-target =" next div" hx-swap =" outerHTML" >
64
64
<select name =" endpoint" id =" endpoint" class =" select select-bordered select-sm join-item w-full" >
65
- <option disabled selected >Endpoint</option >
65
+ <option disabled selected >Select Endpoint</option >
66
66
for _ , end := range props.Endpoints {
67
67
<option value ={ strconv.FormatInt (end.ID , 10 ) }>{ end.Name }</option >
68
68
}
@@ -115,11 +115,12 @@ templ envelopeListView(m meta.Meta, props envelopeListViewProps) {
115
115
Ascending : props.EnvelopeRequestRequest .Ascending ,
116
116
})
117
117
</div >
118
- <div class =" bordery overflow-x-auto" >
119
- <table class =" table-pin-cols table " >
118
+ <div class =" overflow-x-auto" >
119
+ <table class =" table table -pin-cols" >
120
120
<thead >
121
121
<tr >
122
- <th >
122
+ <th ></th >
123
+ <td >
123
124
@ c.TableOrderTH (c.TableOrderTHProps {
124
125
Query : props.Query ,
125
126
Ascending : props.EnvelopeRequestRequest .Ascending ,
@@ -128,8 +129,8 @@ templ envelopeListView(m meta.Meta, props envelopeListViewProps) {
128
129
}) {
129
130
Created At
130
131
}
131
- </th >
132
- <th >
132
+ </td >
133
+ <td >
133
134
@ c.TableOrderTH (c.TableOrderTHProps {
134
135
Query : props.Query ,
135
136
Ascending : props.EnvelopeRequestRequest .Ascending ,
@@ -138,8 +139,8 @@ templ envelopeListView(m meta.Meta, props envelopeListViewProps) {
138
139
}) {
139
140
From
140
141
}
141
- </th >
142
- <th >
142
+ </td >
143
+ <td >
143
144
@ c.TableOrderTH (c.TableOrderTHProps {
144
145
Query : props.Query ,
145
146
Ascending : props.EnvelopeRequestRequest .Ascending ,
@@ -148,43 +149,46 @@ templ envelopeListView(m meta.Meta, props envelopeListViewProps) {
148
149
}) {
149
150
Subject
150
151
}
151
- </th >
152
+ </td >
152
153
<th ></th >
153
154
</tr >
154
155
</thead >
155
156
<tbody >
156
157
for _ , env := range props.EnvelopeRequestResult .Envelopes {
157
- <tr >
158
- <td class =" w-0 whitespace-nowrap" >
159
- <div class =" tooltip tooltip-right" data-tip ={ helpers.TimeHumanize (env.Message .CreatedAt .Time ()) }>
158
+ <tr >
159
+ <th class =" w-0 whitespace-nowrap z-10" >
160
+ { strconv.FormatInt (env.Message .ID , 10 ) }
161
+ </th >
162
+ <td class =" w-0 whitespace-nowrap" >
163
+ <div class =" tooltip tooltip-right" data-tip ={ helpers.TimeHumanize (env.Message .CreatedAt .Time ()) }>
164
+ <a href ={ routes.Envelope (env.Message .ID ).URL () }>
165
+ @ c.FormatDate (m, time.Time (env.Message .CreatedAt ))
166
+ </a >
167
+ </div >
168
+ </td >
169
+ <td class =" w-0 whitespace-nowrap" >
160
170
<a href ={ routes.Envelope (env.Message .ID ).URL () }>
161
- @ c. FormatDate (m, time. Time ( env.Message .CreatedAt ))
171
+ { env.Message .From }
162
172
</a >
163
- </div >
164
- </td >
165
- <td class =" w-0 whitespace-nowrap" >
166
- <a href ={ routes.Envelope (env.Message .ID ).URL () }>
167
- { env.Message .From }
168
- </a >
169
- </td >
170
- <td class =" whitespace-nowrap" >
171
- <a href ={ routes.Envelope (env.Message .ID ).URL () }>
172
- { env.Message .Subject }
173
- </a >
174
- </td >
175
- <td class =" w-0 whitespace-nowrap" >
176
- if len (env.Attachments ) != 0 {
177
- <a href ={ routes.Envelope (env.Message .ID ).URLQuery (" tab=" + routes.EnvelopeTabAttachments .String ()) } class =" tooltip tooltip-left fill-current flex items-center" data-tip ={ strconv.Itoa (len (env.Attachments )) + " Attachment(s)" }>
178
- @ icons.Attachment (" h-4 w-4" )
179
- </a >
180
- }
181
- </td >
182
- <th class =" w-0 whitespace-nowrap" >
183
- <button class =" btn btn-error btn-xs join-item" hx-delete ={ routes.Envelope (env.Message .ID ).URLString () } hx-target =" closest tr" hx-confirm =" Are you sure you wish to delete this envelope?" >
184
- @ icons.Trash (" h-4 w-4" )
185
- </button >
186
- </th >
187
- </tr >
173
+ </td >
174
+ <td class =" whitespace-nowrap" >
175
+ <a href ={ routes.Envelope (env.Message .ID ).URL () }>
176
+ { env.Message .Subject }
177
+ </a >
178
+ </td >
179
+ <th class =" w-0 whitespace-nowrap" >
180
+ <div class =" flex flex-row justify-end gap-2" >
181
+ if len (env.Attachments ) != 0 {
182
+ <a href ={ routes.Envelope (env.Message .ID ).URLQuery (" tab=" + routes.EnvelopeTabAttachments .String ()) } class =" tooltip tooltip-left fill-current flex items-center" data-tip ={ strconv.Itoa (len (env.Attachments )) + " Attachment(s)" }>
183
+ @ icons.Attachment (" h-4 w-4" )
184
+ </a >
185
+ }
186
+ <button class =" btn btn-error btn-xs join-item" hx-delete ={ routes.Envelope (env.Message .ID ).URLString () } hx-target =" closest tr" hx-confirm =" Are you sure you wish to delete this envelope?" >
187
+ @ icons.Trash (" h-4 w-4" )
188
+ </button >
189
+ </div >
190
+ </th >
191
+ </tr >
188
192
}
189
193
</tbody >
190
194
</table >
0 commit comments