github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/components/edit/File.html.go (about) 1 // Code generated by qtc from "File.html". DO NOT EDIT. 2 // See https://github.com/valyala/quicktemplate for details. 3 4 // <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 5 6 //line views/components/edit/File.html:2 7 package edit 8 9 //line views/components/edit/File.html:2 10 import "github.com/kyleu/dbaudit/views/components" 11 12 //line views/components/edit/File.html:4 13 import ( 14 qtio422016 "io" 15 16 qt422016 "github.com/valyala/quicktemplate" 17 ) 18 19 //line views/components/edit/File.html:4 20 var ( 21 _ = qtio422016.Copy 22 _ = qt422016.AcquireByteBuffer 23 ) 24 25 //line views/components/edit/File.html:4 26 func StreamFile(qw422016 *qt422016.Writer, key string, id string, label string, value string, placeholder ...string) { 27 //line views/components/edit/File.html:5 28 if id == "" { 29 //line views/components/edit/File.html:5 30 qw422016.N().S(`<label><input type="file" name="`) 31 //line views/components/edit/File.html:6 32 qw422016.E().S(key) 33 //line views/components/edit/File.html:6 34 qw422016.N().S(`" value="`) 35 //line views/components/edit/File.html:6 36 qw422016.E().S(value) 37 //line views/components/edit/File.html:6 38 qw422016.N().S(`"`) 39 //line views/components/edit/File.html:6 40 components.StreamPlaceholderFor(qw422016, placeholder) 41 //line views/components/edit/File.html:6 42 qw422016.N().S(`/>`) 43 //line views/components/edit/File.html:6 44 qw422016.E().S(label) 45 //line views/components/edit/File.html:6 46 qw422016.N().S(`</label>`) 47 //line views/components/edit/File.html:7 48 } else { 49 //line views/components/edit/File.html:7 50 qw422016.N().S(`<label><input id="`) 51 //line views/components/edit/File.html:8 52 qw422016.E().S(id) 53 //line views/components/edit/File.html:8 54 qw422016.N().S(`" type="file" name="`) 55 //line views/components/edit/File.html:8 56 qw422016.E().S(key) 57 //line views/components/edit/File.html:8 58 qw422016.N().S(`" value="`) 59 //line views/components/edit/File.html:8 60 qw422016.E().S(value) 61 //line views/components/edit/File.html:8 62 qw422016.N().S(`"`) 63 //line views/components/edit/File.html:8 64 components.StreamPlaceholderFor(qw422016, placeholder) 65 //line views/components/edit/File.html:8 66 qw422016.N().S(`/>`) 67 //line views/components/edit/File.html:8 68 qw422016.E().S(label) 69 //line views/components/edit/File.html:8 70 qw422016.N().S(`</label>`) 71 //line views/components/edit/File.html:9 72 } 73 //line views/components/edit/File.html:10 74 } 75 76 //line views/components/edit/File.html:10 77 func WriteFile(qq422016 qtio422016.Writer, key string, id string, label string, value string, placeholder ...string) { 78 //line views/components/edit/File.html:10 79 qw422016 := qt422016.AcquireWriter(qq422016) 80 //line views/components/edit/File.html:10 81 StreamFile(qw422016, key, id, label, value, placeholder...) 82 //line views/components/edit/File.html:10 83 qt422016.ReleaseWriter(qw422016) 84 //line views/components/edit/File.html:10 85 } 86 87 //line views/components/edit/File.html:10 88 func File(key string, id string, label string, value string, placeholder ...string) string { 89 //line views/components/edit/File.html:10 90 qb422016 := qt422016.AcquireByteBuffer() 91 //line views/components/edit/File.html:10 92 WriteFile(qb422016, key, id, label, value, placeholder...) 93 //line views/components/edit/File.html:10 94 qs422016 := string(qb422016.B) 95 //line views/components/edit/File.html:10 96 qt422016.ReleaseByteBuffer(qb422016) 97 //line views/components/edit/File.html:10 98 return qs422016 99 //line views/components/edit/File.html:10 100 } 101 102 //line views/components/edit/File.html:12 103 func StreamFileTable(qw422016 *qt422016.Writer, key string, id string, title string, label string, value string) { 104 //line views/components/edit/File.html:12 105 qw422016.N().S(`<tr><th class="shrink"><label for="`) 106 //line views/components/edit/File.html:14 107 qw422016.E().S(id) 108 //line views/components/edit/File.html:14 109 qw422016.N().S(`">`) 110 //line views/components/edit/File.html:14 111 qw422016.E().S(title) 112 //line views/components/edit/File.html:14 113 qw422016.N().S(`</label></th><td>`) 114 //line views/components/edit/File.html:16 115 StreamFile(qw422016, key, id, label, value) 116 //line views/components/edit/File.html:16 117 qw422016.N().S(`</td></tr>`) 118 //line views/components/edit/File.html:19 119 } 120 121 //line views/components/edit/File.html:19 122 func WriteFileTable(qq422016 qtio422016.Writer, key string, id string, title string, label string, value string) { 123 //line views/components/edit/File.html:19 124 qw422016 := qt422016.AcquireWriter(qq422016) 125 //line views/components/edit/File.html:19 126 StreamFileTable(qw422016, key, id, title, label, value) 127 //line views/components/edit/File.html:19 128 qt422016.ReleaseWriter(qw422016) 129 //line views/components/edit/File.html:19 130 } 131 132 //line views/components/edit/File.html:19 133 func FileTable(key string, id string, title string, label string, value string) string { 134 //line views/components/edit/File.html:19 135 qb422016 := qt422016.AcquireByteBuffer() 136 //line views/components/edit/File.html:19 137 WriteFileTable(qb422016, key, id, title, label, value) 138 //line views/components/edit/File.html:19 139 qs422016 := string(qb422016.B) 140 //line views/components/edit/File.html:19 141 qt422016.ReleaseByteBuffer(qb422016) 142 //line views/components/edit/File.html:19 143 return qs422016 144 //line views/components/edit/File.html:19 145 } 146 147 //line views/components/edit/File.html:21 148 func StreamFileMultiple(qw422016 *qt422016.Writer, key string, id string, label string, value string, placeholder ...string) { 149 //line views/components/edit/File.html:22 150 if id == "" { 151 //line views/components/edit/File.html:22 152 qw422016.N().S(`<label><input type="file" name="`) 153 //line views/components/edit/File.html:23 154 qw422016.E().S(key) 155 //line views/components/edit/File.html:23 156 qw422016.N().S(`" value="`) 157 //line views/components/edit/File.html:23 158 qw422016.E().S(value) 159 //line views/components/edit/File.html:23 160 qw422016.N().S(`" multiple="multiple"`) 161 //line views/components/edit/File.html:23 162 components.StreamPlaceholderFor(qw422016, placeholder) 163 //line views/components/edit/File.html:23 164 qw422016.N().S(`/>`) 165 //line views/components/edit/File.html:23 166 qw422016.E().S(label) 167 //line views/components/edit/File.html:23 168 qw422016.N().S(`</label>`) 169 //line views/components/edit/File.html:24 170 } else { 171 //line views/components/edit/File.html:24 172 qw422016.N().S(`<label><input id="`) 173 //line views/components/edit/File.html:25 174 qw422016.E().S(id) 175 //line views/components/edit/File.html:25 176 qw422016.N().S(`" type="file" name="`) 177 //line views/components/edit/File.html:25 178 qw422016.E().S(key) 179 //line views/components/edit/File.html:25 180 qw422016.N().S(`" value="`) 181 //line views/components/edit/File.html:25 182 qw422016.E().S(value) 183 //line views/components/edit/File.html:25 184 qw422016.N().S(`" multiple="multiple"`) 185 //line views/components/edit/File.html:25 186 components.StreamPlaceholderFor(qw422016, placeholder) 187 //line views/components/edit/File.html:25 188 qw422016.N().S(`/>`) 189 //line views/components/edit/File.html:25 190 qw422016.E().S(label) 191 //line views/components/edit/File.html:25 192 qw422016.N().S(`</label>`) 193 //line views/components/edit/File.html:26 194 } 195 //line views/components/edit/File.html:27 196 } 197 198 //line views/components/edit/File.html:27 199 func WriteFileMultiple(qq422016 qtio422016.Writer, key string, id string, label string, value string, placeholder ...string) { 200 //line views/components/edit/File.html:27 201 qw422016 := qt422016.AcquireWriter(qq422016) 202 //line views/components/edit/File.html:27 203 StreamFileMultiple(qw422016, key, id, label, value, placeholder...) 204 //line views/components/edit/File.html:27 205 qt422016.ReleaseWriter(qw422016) 206 //line views/components/edit/File.html:27 207 } 208 209 //line views/components/edit/File.html:27 210 func FileMultiple(key string, id string, label string, value string, placeholder ...string) string { 211 //line views/components/edit/File.html:27 212 qb422016 := qt422016.AcquireByteBuffer() 213 //line views/components/edit/File.html:27 214 WriteFileMultiple(qb422016, key, id, label, value, placeholder...) 215 //line views/components/edit/File.html:27 216 qs422016 := string(qb422016.B) 217 //line views/components/edit/File.html:27 218 qt422016.ReleaseByteBuffer(qb422016) 219 //line views/components/edit/File.html:27 220 return qs422016 221 //line views/components/edit/File.html:27 222 } 223 224 //line views/components/edit/File.html:29 225 func StreamFileMultipleTable(qw422016 *qt422016.Writer, key string, id string, title string, label string, value string) { 226 //line views/components/edit/File.html:29 227 qw422016.N().S(`<tr><th class="shrink"><label for="`) 228 //line views/components/edit/File.html:31 229 qw422016.E().S(id) 230 //line views/components/edit/File.html:31 231 qw422016.N().S(`">`) 232 //line views/components/edit/File.html:31 233 qw422016.E().S(title) 234 //line views/components/edit/File.html:31 235 qw422016.N().S(`</label></th><td>`) 236 //line views/components/edit/File.html:33 237 StreamFileMultiple(qw422016, key, id, label, value) 238 //line views/components/edit/File.html:33 239 qw422016.N().S(`</td></tr>`) 240 //line views/components/edit/File.html:36 241 } 242 243 //line views/components/edit/File.html:36 244 func WriteFileMultipleTable(qq422016 qtio422016.Writer, key string, id string, title string, label string, value string) { 245 //line views/components/edit/File.html:36 246 qw422016 := qt422016.AcquireWriter(qq422016) 247 //line views/components/edit/File.html:36 248 StreamFileMultipleTable(qw422016, key, id, title, label, value) 249 //line views/components/edit/File.html:36 250 qt422016.ReleaseWriter(qw422016) 251 //line views/components/edit/File.html:36 252 } 253 254 //line views/components/edit/File.html:36 255 func FileMultipleTable(key string, id string, title string, label string, value string) string { 256 //line views/components/edit/File.html:36 257 qb422016 := qt422016.AcquireByteBuffer() 258 //line views/components/edit/File.html:36 259 WriteFileMultipleTable(qb422016, key, id, title, label, value) 260 //line views/components/edit/File.html:36 261 qs422016 := string(qb422016.B) 262 //line views/components/edit/File.html:36 263 qt422016.ReleaseByteBuffer(qb422016) 264 //line views/components/edit/File.html:36 265 return qs422016 266 //line views/components/edit/File.html:36 267 }