v0.28.0 fca9155

issues_templ.go RawHistoryFolder

1// Code generated by templ - DO NOT EDIT.
2
3// templ: version: v0.3.1020
4// SPDX-License-Identifier: AGPL-3.0-or-later
5
6package web
7
8//lint:file-ignore SA4006 This context is only used if a nested component is present.
9
10import "github.com/a-h/templ"
11import templruntime "github.com/a-h/templ/runtime"
12
13// IssueList is the list of the issues of a repository, open or closed.
14func IssueList(l Layout, p IssueListPage) templ.Component {
15	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
16		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
17		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
18			return templ_7745c5c3_CtxErr
19		}
20		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
21		if !templ_7745c5c3_IsBuffer {
22			defer func() {
23				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
24				if templ_7745c5c3_Err == nil {
25					templ_7745c5c3_Err = templ_7745c5c3_BufErr
26				}
27			}()
28		}
29		ctx = templ.InitializeContext(ctx)
30		templ_7745c5c3_Var1 := templ.GetChildren(ctx)
31		if templ_7745c5c3_Var1 == nil {
32			templ_7745c5c3_Var1 = templ.NopComponent
33		}
34		ctx = templ.ClearChildren(ctx)
35		templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
36			templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
37			templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
38			if !templ_7745c5c3_IsBuffer {
39				defer func() {
40					templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
41					if templ_7745c5c3_Err == nil {
42						templ_7745c5c3_Err = templ_7745c5c3_BufErr
43					}
44				}()
45			}
46			ctx = templ.InitializeContext(ctx)
47			if p.Live {
48				templ_7745c5c3_Err = LiveSlot("mr-notice").Render(ctx, templ_7745c5c3_Buffer)
49				if templ_7745c5c3_Err != nil {
50					return templ_7745c5c3_Err
51				}
52			}
53			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " <nav class=\"since\" aria-label=\"State\"><a href=\"")
54			if templ_7745c5c3_Err != nil {
55				return templ_7745c5c3_Err
56			}
57			var templ_7745c5c3_Var3 templ.SafeURL
58			templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.OpenHref))
59			if templ_7745c5c3_Err != nil {
60				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 13, Col: 36}
61			}
62			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
63			if templ_7745c5c3_Err != nil {
64				return templ_7745c5c3_Err
65			}
66			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\"")
67			if templ_7745c5c3_Err != nil {
68				return templ_7745c5c3_Err
69			}
70			if !p.Closed {
71				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, " aria-current=\"page\"")
72				if templ_7745c5c3_Err != nil {
73					return templ_7745c5c3_Err
74				}
75			}
76			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, ">open</a> <a href=\"")
77			if templ_7745c5c3_Err != nil {
78				return templ_7745c5c3_Err
79			}
80			var templ_7745c5c3_Var4 templ.SafeURL
81			templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.ClosedHref))
82			if templ_7745c5c3_Err != nil {
83				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 19, Col: 38}
84			}
85			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
86			if templ_7745c5c3_Err != nil {
87				return templ_7745c5c3_Err
88			}
89			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\"")
90			if templ_7745c5c3_Err != nil {
91				return templ_7745c5c3_Err
92			}
93			if p.Closed {
94				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, " aria-current=\"page\"")
95				if templ_7745c5c3_Err != nil {
96					return templ_7745c5c3_Err
97				}
98			}
99			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, ">closed</a></nav><div class=\"filter\"><label for=\"issue-filter\" class=\"sr\">filter</label> <input id=\"issue-filter\" type=\"search\" data-filter=\".mrs tbody tr\" placeholder=\"Filter by title, author or state…\" autocomplete=\"off\" hx-on:input=\"ermite.filter(this)\"></div><h2 class=\"rule-h\">")
100			if templ_7745c5c3_Err != nil {
101				return templ_7745c5c3_Err
102			}
103			if p.Closed {
104				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<span>Closed</span> ")
105				if templ_7745c5c3_Err != nil {
106					return templ_7745c5c3_Err
107				}
108			} else {
109				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "<span>Open</span> ")
110				if templ_7745c5c3_Err != nil {
111					return templ_7745c5c3_Err
112				}
113			}
114			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<span class=\"count\">")
115			if templ_7745c5c3_Err != nil {
116				return templ_7745c5c3_Err
117			}
118			var templ_7745c5c3_Var5 string
119			templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Rows)))
120			if templ_7745c5c3_Err != nil {
121				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 42, Col: 42}
122			}
123			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
124			if templ_7745c5c3_Err != nil {
125				return templ_7745c5c3_Err
126			}
127			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</span></h2>")
128			if templ_7745c5c3_Err != nil {
129				return templ_7745c5c3_Err
130			}
131			templ_7745c5c3_Err = issueRows(p.Rows).Render(ctx, templ_7745c5c3_Buffer)
132			if templ_7745c5c3_Err != nil {
133				return templ_7745c5c3_Err
134			}
135			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, " ")
136			if templ_7745c5c3_Err != nil {
137				return templ_7745c5c3_Err
138			}
139			if len(p.Rows) == 0 {
140				if p.Closed {
141					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<p class=\"lede dim\">no closed issues.</p>")
142					if templ_7745c5c3_Err != nil {
143						return templ_7745c5c3_Err
144					}
145				} else {
146					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<p class=\"lede dim\">no open issues.</p>")
147					if templ_7745c5c3_Err != nil {
148						return templ_7745c5c3_Err
149					}
150				}
151			}
152			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, " ")
153			if templ_7745c5c3_Err != nil {
154				return templ_7745c5c3_Err
155			}
156			if p.Older != "" || p.Newest != "" {
157				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<nav class=\"pager\" aria-label=\"Pages\">")
158				if templ_7745c5c3_Err != nil {
159					return templ_7745c5c3_Err
160				}
161				if p.Newest != "" {
162					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<a class=\"btn\" href=\"")
163					if templ_7745c5c3_Err != nil {
164						return templ_7745c5c3_Err
165					}
166					var templ_7745c5c3_Var6 templ.SafeURL
167					templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Newest))
168					if templ_7745c5c3_Err != nil {
169						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 55, Col: 50}
170					}
171					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
172					if templ_7745c5c3_Err != nil {
173						return templ_7745c5c3_Err
174					}
175					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">← Newest</a> ")
176					if templ_7745c5c3_Err != nil {
177						return templ_7745c5c3_Err
178					}
179				} else {
180					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<span class=\"btn\" aria-disabled=\"true\">← Newest</span> ")
181					if templ_7745c5c3_Err != nil {
182						return templ_7745c5c3_Err
183					}
184				}
185				if p.Older != "" {
186					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<a class=\"btn\" href=\"")
187					if templ_7745c5c3_Err != nil {
188						return templ_7745c5c3_Err
189					}
190					var templ_7745c5c3_Var7 templ.SafeURL
191					templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Older))
192					if templ_7745c5c3_Err != nil {
193						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 60, Col: 49}
194					}
195					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
196					if templ_7745c5c3_Err != nil {
197						return templ_7745c5c3_Err
198					}
199					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\" rel=\"next\">Older →</a>")
200					if templ_7745c5c3_Err != nil {
201						return templ_7745c5c3_Err
202					}
203				} else {
204					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<span class=\"btn\" aria-disabled=\"true\">Older →</span>")
205					if templ_7745c5c3_Err != nil {
206						return templ_7745c5c3_Err
207					}
208				}
209				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</nav>")
210				if templ_7745c5c3_Err != nil {
211					return templ_7745c5c3_Err
212				}
213			}
214			return nil
215		})
216		templ_7745c5c3_Err = Shell(l, issueListRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
217		if templ_7745c5c3_Err != nil {
218			return templ_7745c5c3_Err
219		}
220		return nil
221	})
222}
223
224func issueRows(rows []IssueRow) templ.Component {
225	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
226		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
227		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
228			return templ_7745c5c3_CtxErr
229		}
230		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
231		if !templ_7745c5c3_IsBuffer {
232			defer func() {
233				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
234				if templ_7745c5c3_Err == nil {
235					templ_7745c5c3_Err = templ_7745c5c3_BufErr
236				}
237			}()
238		}
239		ctx = templ.InitializeContext(ctx)
240		templ_7745c5c3_Var8 := templ.GetChildren(ctx)
241		if templ_7745c5c3_Var8 == nil {
242			templ_7745c5c3_Var8 = templ.NopComponent
243		}
244		ctx = templ.ClearChildren(ctx)
245		if len(rows) > 0 {
246			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<table class=\"list mrs\" aria-label=\"Issues\"><tbody data-rows>")
247			if templ_7745c5c3_Err != nil {
248				return templ_7745c5c3_Err
249			}
250			for _, i := range rows {
251				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<tr")
252				if templ_7745c5c3_Err != nil {
253					return templ_7745c5c3_Err
254				}
255				if i.Cursor {
256					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, " data-cursor")
257					if templ_7745c5c3_Err != nil {
258						return templ_7745c5c3_Err
259					}
260				}
261				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, " data-state=\"")
262				if templ_7745c5c3_Err != nil {
263					return templ_7745c5c3_Err
264				}
265				var templ_7745c5c3_Var9 string
266				templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.ResolveAttributeValue(i.State)
267				if templ_7745c5c3_Err != nil {
268					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 74, Col: 55}
269				}
270				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var9)
271				if templ_7745c5c3_Err != nil {
272					return templ_7745c5c3_Err
273				}
274				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "\"><td class=\"c-n mute\">")
275				if templ_7745c5c3_Err != nil {
276					return templ_7745c5c3_Err
277				}
278				var templ_7745c5c3_Var10 string
279				templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(i.Number)
280				if templ_7745c5c3_Err != nil {
281					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 75, Col: 37}
282				}
283				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
284				if templ_7745c5c3_Err != nil {
285					return templ_7745c5c3_Err
286				}
287				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</td><td class=\"c-state\">")
288				if templ_7745c5c3_Err != nil {
289					return templ_7745c5c3_Err
290				}
291				var templ_7745c5c3_Var11 string
292				templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(i.State)
293				if templ_7745c5c3_Err != nil {
294					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 76, Col: 35}
295				}
296				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
297				if templ_7745c5c3_Err != nil {
298					return templ_7745c5c3_Err
299				}
300				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</td><td class=\"c-subject\"><a href=\"")
301				if templ_7745c5c3_Err != nil {
302					return templ_7745c5c3_Err
303				}
304				var templ_7745c5c3_Var12 templ.SafeURL
305				templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(i.Href))
306				if templ_7745c5c3_Err != nil {
307					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 77, Col: 59}
308				}
309				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
310				if templ_7745c5c3_Err != nil {
311					return templ_7745c5c3_Err
312				}
313				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "\">")
314				if templ_7745c5c3_Err != nil {
315					return templ_7745c5c3_Err
316				}
317				var templ_7745c5c3_Var13 string
318				templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(i.Title)
319				if templ_7745c5c3_Err != nil {
320					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 77, Col: 71}
321				}
322				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
323				if templ_7745c5c3_Err != nil {
324					return templ_7745c5c3_Err
325				}
326				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</a></td><td class=\"c-who dim\">")
327				if templ_7745c5c3_Err != nil {
328					return templ_7745c5c3_Err
329				}
330				var templ_7745c5c3_Var14 string
331				templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(i.Author)
332				if templ_7745c5c3_Err != nil {
333					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 78, Col: 38}
334				}
335				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
336				if templ_7745c5c3_Err != nil {
337					return templ_7745c5c3_Err
338				}
339				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</td><td class=\"c-when nowrap dim\">")
340				if templ_7745c5c3_Err != nil {
341					return templ_7745c5c3_Err
342				}
343				if i.WhenAt != "" {
344					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<time datetime=\"")
345					if templ_7745c5c3_Err != nil {
346						return templ_7745c5c3_Err
347					}
348					var templ_7745c5c3_Var15 string
349					templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.ResolveAttributeValue(i.WhenAt)
350					if templ_7745c5c3_Err != nil {
351						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 81, Col: 33}
352					}
353					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var15)
354					if templ_7745c5c3_Err != nil {
355						return templ_7745c5c3_Err
356					}
357					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\" title=\"")
358					if templ_7745c5c3_Err != nil {
359						return templ_7745c5c3_Err
360					}
361					var templ_7745c5c3_Var16 string
362					templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.ResolveAttributeValue(i.WhenAt)
363					if templ_7745c5c3_Err != nil {
364						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 81, Col: 52}
365					}
366					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var16)
367					if templ_7745c5c3_Err != nil {
368						return templ_7745c5c3_Err
369					}
370					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "\">")
371					if templ_7745c5c3_Err != nil {
372						return templ_7745c5c3_Err
373					}
374					var templ_7745c5c3_Var17 string
375					templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(i.When)
376					if templ_7745c5c3_Err != nil {
377						return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 81, Col: 63}
378					}
379					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
380					if templ_7745c5c3_Err != nil {
381						return templ_7745c5c3_Err
382					}
383					templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</time>")
384					if templ_7745c5c3_Err != nil {
385						return templ_7745c5c3_Err
386					}
387				}
388				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "</td></tr>")
389				if templ_7745c5c3_Err != nil {
390					return templ_7745c5c3_Err
391				}
392			}
393			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</tbody></table>")
394			if templ_7745c5c3_Err != nil {
395				return templ_7745c5c3_Err
396			}
397		}
398		return nil
399	})
400}
401
402func issueListRail(p IssueListPage) templ.Component {
403	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
404		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
405		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
406			return templ_7745c5c3_CtxErr
407		}
408		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
409		if !templ_7745c5c3_IsBuffer {
410			defer func() {
411				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
412				if templ_7745c5c3_Err == nil {
413					templ_7745c5c3_Err = templ_7745c5c3_BufErr
414				}
415			}()
416		}
417		ctx = templ.InitializeContext(ctx)
418		templ_7745c5c3_Var18 := templ.GetChildren(ctx)
419		if templ_7745c5c3_Var18 == nil {
420			templ_7745c5c3_Var18 = templ.NopComponent
421		}
422		ctx = templ.ClearChildren(ctx)
423		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<section aria-labelledby=\"r-states\"><h2 id=\"r-states\">States</h2><dl class=\"kv\"><dt>open</dt><dd>being worked on</dd><dt>closed</dt><dd>done with, can be reopened</dd></dl></section>")
424		if templ_7745c5c3_Err != nil {
425			return templ_7745c5c3_Err
426		}
427		if p.NewHref != "" {
428			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<section aria-labelledby=\"r-new\"><h2 id=\"r-new\">Open one</h2><a class=\"btn primary\" href=\"")
429			if templ_7745c5c3_Err != nil {
430				return templ_7745c5c3_Err
431			}
432			var templ_7745c5c3_Var19 templ.SafeURL
433			templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.NewHref))
434			if templ_7745c5c3_Err != nil {
435				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 104, Col: 57}
436			}
437			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
438			if templ_7745c5c3_Err != nil {
439				return templ_7745c5c3_Err
440			}
441			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\">New issue</a></section>")
442			if templ_7745c5c3_Err != nil {
443				return templ_7745c5c3_Err
444			}
445		}
446		return nil
447	})
448}
449
450// IssueNew is the form that opens an issue.
451func IssueNew(l Layout, p IssueNewPage) templ.Component {
452	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
453		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
454		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
455			return templ_7745c5c3_CtxErr
456		}
457		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
458		if !templ_7745c5c3_IsBuffer {
459			defer func() {
460				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
461				if templ_7745c5c3_Err == nil {
462					templ_7745c5c3_Err = templ_7745c5c3_BufErr
463				}
464			}()
465		}
466		ctx = templ.InitializeContext(ctx)
467		templ_7745c5c3_Var20 := templ.GetChildren(ctx)
468		if templ_7745c5c3_Var20 == nil {
469			templ_7745c5c3_Var20 = templ.NopComponent
470		}
471		ctx = templ.ClearChildren(ctx)
472		templ_7745c5c3_Var21 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
473			templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
474			templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
475			if !templ_7745c5c3_IsBuffer {
476				defer func() {
477					templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
478					if templ_7745c5c3_Err == nil {
479						templ_7745c5c3_Err = templ_7745c5c3_BufErr
480					}
481				}()
482			}
483			ctx = templ.InitializeContext(ctx)
484			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<header class=\"show mr-h\"><h1>New issue</h1></header><form class=\"cform create\" method=\"post\" action=\"")
485			if templ_7745c5c3_Err != nil {
486				return templ_7745c5c3_Err
487			}
488			var templ_7745c5c3_Var22 templ.SafeURL
489			templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Action))
490			if templ_7745c5c3_Err != nil {
491				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 115, Col: 75}
492			}
493			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
494			if templ_7745c5c3_Err != nil {
495				return templ_7745c5c3_Err
496			}
497			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\"><label for=\"issue-title\">title</label> <input id=\"issue-title\" name=\"title\" type=\"text\" maxlength=\"120\" required autocomplete=\"off\" autofocus> <label for=\"issue-body\">description</label> <textarea id=\"issue-body\" name=\"body\" rows=\"8\" maxlength=\"10000\" placeholder=\"Markdown, optional\"></textarea><div class=\"f-btns\"><button type=\"submit\" class=\"btn primary\">Create issue</button> <a class=\"btn\" href=\"")
498			if templ_7745c5c3_Err != nil {
499				return templ_7745c5c3_Err
500			}
501			var templ_7745c5c3_Var23 templ.SafeURL
502			templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Cancel))
503			if templ_7745c5c3_Err != nil {
504				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 122, Col: 49}
505			}
506			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
507			if templ_7745c5c3_Err != nil {
508				return templ_7745c5c3_Err
509			}
510			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "\">Cancel</a></div></form>")
511			if templ_7745c5c3_Err != nil {
512				return templ_7745c5c3_Err
513			}
514			return nil
515		})
516		templ_7745c5c3_Err = Shell(l, issueNewRail()).Render(templ.WithChildren(ctx, templ_7745c5c3_Var21), templ_7745c5c3_Buffer)
517		if templ_7745c5c3_Err != nil {
518			return templ_7745c5c3_Err
519		}
520		return nil
521	})
522}
523
524func issueNewRail() templ.Component {
525	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
526		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
527		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
528			return templ_7745c5c3_CtxErr
529		}
530		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
531		if !templ_7745c5c3_IsBuffer {
532			defer func() {
533				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
534				if templ_7745c5c3_Err == nil {
535					templ_7745c5c3_Err = templ_7745c5c3_BufErr
536				}
537			}()
538		}
539		ctx = templ.InitializeContext(ctx)
540		templ_7745c5c3_Var24 := templ.GetChildren(ctx)
541		if templ_7745c5c3_Var24 == nil {
542			templ_7745c5c3_Var24 = templ.NopComponent
543		}
544		ctx = templ.ClearChildren(ctx)
545		templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "<section aria-labelledby=\"r-about\"><h2 id=\"r-about\">Issues</h2><p class=\"dim\">issues share their numbers with the merge requests of the repository.</p></section>")
546		if templ_7745c5c3_Err != nil {
547			return templ_7745c5c3_Err
548		}
549		return nil
550	})
551}
552
553// IssueShow is an issue: its facts, its body, its comments and, for the
554// owner, the form to comment and the button that closes or reopens it.
555func IssueShow(l Layout, p IssuePage) templ.Component {
556	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
557		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
558		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
559			return templ_7745c5c3_CtxErr
560		}
561		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
562		if !templ_7745c5c3_IsBuffer {
563			defer func() {
564				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
565				if templ_7745c5c3_Err == nil {
566					templ_7745c5c3_Err = templ_7745c5c3_BufErr
567				}
568			}()
569		}
570		ctx = templ.InitializeContext(ctx)
571		templ_7745c5c3_Var25 := templ.GetChildren(ctx)
572		if templ_7745c5c3_Var25 == nil {
573			templ_7745c5c3_Var25 = templ.NopComponent
574		}
575		ctx = templ.ClearChildren(ctx)
576		templ_7745c5c3_Var26 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
577			templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
578			templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
579			if !templ_7745c5c3_IsBuffer {
580				defer func() {
581					templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
582					if templ_7745c5c3_Err == nil {
583						templ_7745c5c3_Err = templ_7745c5c3_BufErr
584					}
585				}()
586			}
587			ctx = templ.InitializeContext(ctx)
588			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<section class=\"mr-card\"><header class=\"show mr-h\"><h1><span class=\"mute\">")
589			if templ_7745c5c3_Err != nil {
590				return templ_7745c5c3_Err
591			}
592			var templ_7745c5c3_Var27 string
593			templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(p.Number)
594			if templ_7745c5c3_Err != nil {
595				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 141, Col: 37}
596			}
597			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
598			if templ_7745c5c3_Err != nil {
599				return templ_7745c5c3_Err
600			}
601			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</span> ")
602			if templ_7745c5c3_Err != nil {
603				return templ_7745c5c3_Err
604			}
605			var templ_7745c5c3_Var28 string
606			templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(p.Title)
607			if templ_7745c5c3_Err != nil {
608				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 141, Col: 56}
609			}
610			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
611			if templ_7745c5c3_Err != nil {
612				return templ_7745c5c3_Err
613			}
614			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</h1><dl class=\"kv show-kv\"><dt>state</dt><dd class=\"mr-state\" data-state=\"")
615			if templ_7745c5c3_Err != nil {
616				return templ_7745c5c3_Err
617			}
618			var templ_7745c5c3_Var29 string
619			templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.State)
620			if templ_7745c5c3_Err != nil {
621				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 144, Col: 46}
622			}
623			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var29)
624			if templ_7745c5c3_Err != nil {
625				return templ_7745c5c3_Err
626			}
627			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "\">")
628			if templ_7745c5c3_Err != nil {
629				return templ_7745c5c3_Err
630			}
631			var templ_7745c5c3_Var30 string
632			templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(p.State)
633			if templ_7745c5c3_Err != nil {
634				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 144, Col: 58}
635			}
636			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
637			if templ_7745c5c3_Err != nil {
638				return templ_7745c5c3_Err
639			}
640			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "</dd><dt>opened</dt><dd>")
641			if templ_7745c5c3_Err != nil {
642				return templ_7745c5c3_Err
643			}
644			var templ_7745c5c3_Var31 string
645			templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(p.Opened.Name)
646			if templ_7745c5c3_Err != nil {
647				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 147, Col: 21}
648			}
649			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
650			if templ_7745c5c3_Err != nil {
651				return templ_7745c5c3_Err
652			}
653			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, " ")
654			if templ_7745c5c3_Err != nil {
655				return templ_7745c5c3_Err
656			}
657			if p.Opened.WhenAt != "" {
658				var templ_7745c5c3_Var32 string
659				templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(" · ")
660				if templ_7745c5c3_Err != nil {
661					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 149, Col: 15}
662				}
663				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
664				if templ_7745c5c3_Err != nil {
665					return templ_7745c5c3_Err
666				}
667				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "<time datetime=\"")
668				if templ_7745c5c3_Err != nil {
669					return templ_7745c5c3_Err
670				}
671				var templ_7745c5c3_Var33 string
672				templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Opened.WhenAt)
673				if templ_7745c5c3_Err != nil {
674					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 149, Col: 49}
675				}
676				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var33)
677				if templ_7745c5c3_Err != nil {
678					return templ_7745c5c3_Err
679				}
680				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "\" title=\"")
681				if templ_7745c5c3_Err != nil {
682					return templ_7745c5c3_Err
683				}
684				var templ_7745c5c3_Var34 string
685				templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.Opened.Abs)
686				if templ_7745c5c3_Err != nil {
687					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 149, Col: 72}
688				}
689				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34)
690				if templ_7745c5c3_Err != nil {
691					return templ_7745c5c3_Err
692				}
693				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\">")
694				if templ_7745c5c3_Err != nil {
695					return templ_7745c5c3_Err
696				}
697				var templ_7745c5c3_Var35 string
698				templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(p.Opened.When)
699				if templ_7745c5c3_Err != nil {
700					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 149, Col: 90}
701				}
702				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
703				if templ_7745c5c3_Err != nil {
704					return templ_7745c5c3_Err
705				}
706				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</time>")
707				if templ_7745c5c3_Err != nil {
708					return templ_7745c5c3_Err
709				}
710			}
711			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</dd>")
712			if templ_7745c5c3_Err != nil {
713				return templ_7745c5c3_Err
714			}
715			if p.UpdatedAt != "" {
716				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "<dt>updated</dt><dd><time datetime=\"")
717				if templ_7745c5c3_Err != nil {
718					return templ_7745c5c3_Err
719				}
720				var templ_7745c5c3_Var36 string
721				templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.ResolveAttributeValue(p.UpdatedAt)
722				if templ_7745c5c3_Err != nil {
723					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 154, Col: 38}
724				}
725				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var36)
726				if templ_7745c5c3_Err != nil {
727					return templ_7745c5c3_Err
728				}
729				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "\">")
730				if templ_7745c5c3_Err != nil {
731					return templ_7745c5c3_Err
732				}
733				var templ_7745c5c3_Var37 string
734				templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(p.Updated)
735				if templ_7745c5c3_Err != nil {
736					return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 154, Col: 52}
737				}
738				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
739				if templ_7745c5c3_Err != nil {
740					return templ_7745c5c3_Err
741				}
742				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "</time></dd>")
743				if templ_7745c5c3_Err != nil {
744					return templ_7745c5c3_Err
745				}
746			}
747			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "</dl></header>")
748			if templ_7745c5c3_Err != nil {
749				return templ_7745c5c3_Err
750			}
751			if p.Desc != "" {
752				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "<article class=\"mr-desc prose\" aria-label=\"description\" hx-ignore>")
753				if templ_7745c5c3_Err != nil {
754					return templ_7745c5c3_Err
755				}
756				templ_7745c5c3_Err = templ.Raw(string(p.Desc)).Render(ctx, templ_7745c5c3_Buffer)
757				if templ_7745c5c3_Err != nil {
758					return templ_7745c5c3_Err
759				}
760				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</article>")
761				if templ_7745c5c3_Err != nil {
762					return templ_7745c5c3_Err
763				}
764			}
765			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "</section>")
766			if templ_7745c5c3_Err != nil {
767				return templ_7745c5c3_Err
768			}
769			if p.Live {
770				templ_7745c5c3_Err = LiveSlot("mr-notice").Render(ctx, templ_7745c5c3_Buffer)
771				if templ_7745c5c3_Err != nil {
772					return templ_7745c5c3_Err
773				}
774			}
775			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, " <h2 class=\"rule-h\" id=\"comments\"><span>Comments</span><span class=\"count\">")
776			if templ_7745c5c3_Err != nil {
777				return templ_7745c5c3_Err
778			}
779			var templ_7745c5c3_Var38 string
780			templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(itoa(len(p.Comments)))
781			if templ_7745c5c3_Err != nil {
782				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 167, Col: 99}
783			}
784			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
785			if templ_7745c5c3_Err != nil {
786				return templ_7745c5c3_Err
787			}
788			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</span></h2>")
789			if templ_7745c5c3_Err != nil {
790				return templ_7745c5c3_Err
791			}
792			for _, c := range p.Comments {
793				templ_7745c5c3_Err = commentView(c, "").Render(ctx, templ_7745c5c3_Buffer)
794				if templ_7745c5c3_Err != nil {
795					return templ_7745c5c3_Err
796				}
797			}
798			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, " ")
799			if templ_7745c5c3_Err != nil {
800				return templ_7745c5c3_Err
801			}
802			if len(p.Comments) == 0 {
803				templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "<p class=\"dim\">no comments yet.</p>")
804				if templ_7745c5c3_Err != nil {
805					return templ_7745c5c3_Err
806				}
807			}
808			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, " ")
809			if templ_7745c5c3_Err != nil {
810				return templ_7745c5c3_Err
811			}
812			if p.Form != nil {
813				templ_7745c5c3_Err = commentForm(*p.Form, "").Render(ctx, templ_7745c5c3_Buffer)
814				if templ_7745c5c3_Err != nil {
815					return templ_7745c5c3_Err
816				}
817			}
818			return nil
819		})
820		templ_7745c5c3_Err = Shell(l, issueRail(p)).Render(templ.WithChildren(ctx, templ_7745c5c3_Var26), templ_7745c5c3_Buffer)
821		if templ_7745c5c3_Err != nil {
822			return templ_7745c5c3_Err
823		}
824		return nil
825	})
826}
827
828func issueRail(p IssuePage) templ.Component {
829	return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
830		templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
831		if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
832			return templ_7745c5c3_CtxErr
833		}
834		templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
835		if !templ_7745c5c3_IsBuffer {
836			defer func() {
837				templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
838				if templ_7745c5c3_Err == nil {
839					templ_7745c5c3_Err = templ_7745c5c3_BufErr
840				}
841			}()
842		}
843		ctx = templ.InitializeContext(ctx)
844		templ_7745c5c3_Var39 := templ.GetChildren(ctx)
845		if templ_7745c5c3_Var39 == nil {
846			templ_7745c5c3_Var39 = templ.NopComponent
847		}
848		ctx = templ.ClearChildren(ctx)
849		if p.Transition != nil {
850			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, "<section aria-labelledby=\"r-act\"><h2 id=\"r-act\">Issue</h2><form method=\"post\" action=\"")
851			if templ_7745c5c3_Err != nil {
852				return templ_7745c5c3_Err
853			}
854			var templ_7745c5c3_Var40 templ.SafeURL
855			templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(p.Transition.Action))
856			if templ_7745c5c3_Err != nil {
857				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 184, Col: 66}
858			}
859			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
860			if templ_7745c5c3_Err != nil {
861				return templ_7745c5c3_Err
862			}
863			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, "\"><button type=\"submit\" class=\"btn\">")
864			if templ_7745c5c3_Err != nil {
865				return templ_7745c5c3_Err
866			}
867			var templ_7745c5c3_Var41 string
868			templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(p.Transition.Label)
869			if templ_7745c5c3_Err != nil {
870				return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/adapters/web/issues.templ`, Line: 185, Col: 58}
871			}
872			_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
873			if templ_7745c5c3_Err != nil {
874				return templ_7745c5c3_Err
875			}
876			templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</button></form></section>")
877			if templ_7745c5c3_Err != nil {
878				return templ_7745c5c3_Err
879			}
880		}
881		return nil
882	})
883}
884
885var _ = templruntime.GeneratedTemplate

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 45

↑↓ moveenter openesc close