Artifact 0d7ddb243e25f27c10b67756f2b509fed21e60b67b5ff665c7e99e6f1fbb4e4d:
- File
skin/tickets/editpage.th1
— part of check-in
[243e1f93d6]
at
2026-12-01 11:37:26
on branch trunk
— Support Tcl custom ticket schema and add tcl mirror metadata
- Treat Deleted and Rejected as closed statuses, and Pending as review/warn - Order SourceForge numeric priorities (9 Immediate..1 Zero) alongside stock labels - Derive board status/priority/top-subsystem columns dynamically and show match totals when capped at 200 - Honor cmimetype on initial ticket descriptions and show optional assignee/submitter/closer fields - Allow .meta line-5 flags (skin-tickets) to opt custom-table mirrors into skinned ticket templates (user: dmestas, size: 7765) [annotate] [blame] [check-ins using]
<th1> if {![info exists mutype]} { set mutype Markdown } if {![info exists icomment]} { set icomment {} } if {![info exists username]} { set username $login } if {[info exists submit] && ![info exists preview]} { if {$mutype eq "Wiki"} { set mimetype text/x-fossil-wiki } elseif {$mutype eq "Markdown"} { set mimetype text/x-markdown } elseif {$mutype eq "HTML"} { set mimetype text/html } elseif {$mutype eq {[links only]}} { set mimetype text/x-fossil-plain } else { set mimetype text/plain } submit_ticket set preview 1 } </th1> <div class="tkt-shell" data-tkt-page="tktedit" data-tkt-preview-url="$baseurl/ajax/preview-text"> <div class="tkt-layout"> <div class="tkt-main"> <div class="tkt-card" data-pv-scope="edit"> <div class="tkt-card-hdr"> <span class="tkt-card-hdr-l"> <strong>Edit ticket</strong> <span class="tkt-tabs" role="tablist" aria-label="Comment mode"> <button type="button" class="tkt-tab" role="tab" aria-selected="true" data-pv-tab="write" data-pv-for="edit">Write</button> <button type="button" class="tkt-tab" role="tab" aria-selected="false" data-pv-tab="preview" data-pv-for="edit">Preview <span class="tkt-tab-dot" data-pv-dot="edit" hidden></span></button> </span> </span> <span>Format: <th1>combobox mutype {Markdown Wiki {Plain Text} {[links only]} HTML} 1</th1></span> </div> <div class="tkt-form-stack"> <div class="tkt-field"> <label class="tkt-field-label" for="tkt-edit-title">Title</label> <input id="tkt-edit-title" type="text" name="title" value="$<title>"> </div> <div class="tkt-field tkt-composer-wrap"> <label class="tkt-field-label" for="tkt-edit-comment">Add comment</label> <textarea id="tkt-edit-comment" name="icomment" rows="10" class="wikiedit" data-tkt-slash="1" data-tkt-draft="edit-$<tkt_uuid>" data-pv-input="edit" placeholder="Optional Markdown remark... (type / for blocks)">$<icomment></textarea> <div class="tkt-preview-pane markdown" data-pv-pane="edit" hidden></div> </div> <div class="tkt-form-actions"> <span class="tkt-help"> <span class="tkt-draft-pill" data-tkt-draft-badge="edit-$<tkt_uuid>" hidden>Draft saved in tab · </span> <span class="tkt-gate-note" data-pv-gate="edit">Field-only edits save immediately; typing a comment requires Preview first.</span> <input type="hidden" name="username" value="$<username>"> </span> <div class="tkt-form-btns"> <input type="submit" name="cancel" value="Cancel" class="tkt-btn"> <input type="submit" name="preview" value="Preview" class="tkt-btn" data-pv-btn="edit"> <input type="submit" name="submit" value="Save changes" class="tkt-btn tkt-btn-primary" data-pv-submit-optional="edit"> </div> </div> </div> </div> <th1>enable_output [info exists preview]</th1> <div class="tkt-preview-box"> <h3>Comment preview</h3> <th1> if {$mutype eq "Wiki"} { wiki $icomment } elseif {$mutype eq "Plain Text"} { set r [randhex] wiki "<verbatim-$r>\n[string trimright $icomment]\n</verbatim-$r>" } elseif {$mutype eq "Markdown"} { html [lindex [markdown "$icomment\n"] 1] } elseif {$mutype eq {[links only]}} { set r [randhex] wiki "<verbatim-$r links>\n[string trimright $icomment]</verbatim-$r>" } else { wiki "<nowiki>\n[string trimright $icomment]\n</nowiki>" } </th1> </div> <th1>enable_output 1</th1> <th1> set seenRow 0 set alwaysPlaintext [info exists plaintext] query {SELECT datetime(tkt_mtime,toLocal()) AS xdate, login AS xlogin, mimetype AS xmimetype, icomment AS xcomment, username AS xusername FROM ticketchng WHERE tkt_id=$tkt_id AND length(icomment)>0 ORDER BY tkt_mtime ASC} { if {!$seenRow} { set seenRow 1 html "<h3 style='margin:0.5rem 0 0; font-size:0.95em; color:var(--muted);'>Previous comments</h3>\n" } html "<div class='tkt-card tktCommentEntry'>" html "<div class='tkt-card-hdr'><span class='tktDspCommenter'><strong>[htmlize $xlogin]</strong>" if {$xlogin ne $xusername && [string length $xusername] > 0} { html " (claiming to be [htmlize $xusername])" } html "</span><span>[htmlize $xdate]</span></div>" html "<div class='tkt-card-body'>" if {$alwaysPlaintext || $xmimetype eq "text/plain"} { set r [randhex] if {$xmimetype ne "text/plain"} { puts "($xmimetype)\n" } wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n" } elseif {$xmimetype eq "text/x-fossil-wiki"} { wiki "<p>\n[string trimright $xcomment]\n</p>\n" } elseif {$xmimetype eq "text/x-markdown"} { html [lindex [markdown $xcomment] 1] } elseif {$xmimetype eq "text/html"} { wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n" } else { set r [randhex] wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n" } html "</div></div>\n" } </th1> </div> <aside class="tkt-sidebar" aria-label="Ticket properties"> <div class="tkt-field"><span class="tkt-field-label">Status</span><th1>combobox status $status_choices 1</th1></div> <div class="tkt-field"><span class="tkt-field-label">Type</span><th1>combobox type $type_choices 1</th1></div> <div class="tkt-field"><span class="tkt-field-label">Severity</span><th1>combobox severity $severity_choices 1</th1></div> <div class="tkt-field"><span class="tkt-field-label">Priority</span><th1>combobox priority $priority_choices 1</th1></div> <div class="tkt-field"><span class="tkt-field-label">Resolution</span><th1>combobox resolution $resolution_choices 1</th1></div> <th1> if {[info exists assignee] && [info exists assignee_choices]} { if {[llength $assignee_choices] > 0} { html "<div class='tkt-field'><span class='tkt-field-label'>Assignee</span>" combobox assignee $assignee_choices 1 html "</div>\n" } } </th1> <div class="tkt-field"> <span class="tkt-field-label">Subsystem</span> <th1> if {[llength $subsystem_choices] > 0} { combobox subsystem $subsystem_choices 1 } else { html "<input id='tkt-edit-sub' type='text' name='subsystem' value='[htmlize $subsystem]' list='tkt-edit-sublist' placeholder='Subsystem'>" html "<datalist id='tkt-edit-sublist'>" query {SELECT DISTINCT subsystem AS sv FROM ticket WHERE length(subsystem)>0 ORDER BY subsystem} { html "<option value='[htmlize $sv]'>" } html "</datalist>" } </th1> </div> <div class="tkt-field"> <label class="tkt-field-label" for="tkt-edit-foundin">Version found in</label> <input id="tkt-edit-foundin" type="text" name="foundin" value="$<foundin>"> </div> <th1> if {[hascap e]} { html "<div class='tkt-field'><label class='tkt-field-label' for='tkt-edit-contact'>Contact</label>" html "<input id='tkt-edit-contact' type='text' name='private_contact' value='[htmlize $private_contact]'></div>" } </th1> </aside> </div> </div>