Fossil SCM
different improvements to the ticket system as described in [forum:/forumpost/4756d97a64|forum post 4756d97a64]
Commit
fab9f0047720721ede37bdb7ee61745e37fab393594dcf9b65c0a71cd490bdf1
Parent
264250d67023421…
7 files changed
+2
-4
+8
-2
+8
-2
+92
-6
+92
-6
+3
+3
+2
-4
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -583,13 +583,10 @@ | ||
| 583 | 583 | zOwner = g.zLogin; |
| 584 | 584 | } |
| 585 | 585 | } |
| 586 | 586 | if( zOwner==0 ) zOwner = g.zLogin; |
| 587 | 587 | style_submenu_element("Cancel", "%R/reportlist"); |
| 588 | - if( rn>0 ){ | |
| 589 | - style_submenu_element("Delete", "%R/rptedit/%d?del1=1", rn); | |
| 590 | - } | |
| 591 | 588 | style_header("%s", rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 592 | 589 | if( zErr ){ |
| 593 | 590 | @ <blockquote class="reportError">%h(zErr)</blockquote> |
| 594 | 591 | } |
| 595 | 592 | @ <form action="rptedit" method="post"><div> |
| @@ -897,11 +894,12 @@ | ||
| 897 | 894 | |
| 898 | 895 | /* Output the separator above each entry in a table which has multiple lines |
| 899 | 896 | ** per database entry. |
| 900 | 897 | */ |
| 901 | 898 | if( pState->iNewRow>=0 ){ |
| 902 | - @ <tr><td colspan=%d(pState->nCol)><font size=1> </font></td></tr> | |
| 899 | + @ <tr><td colspan="%d(pState->nCol)" style="padding:0px"> | |
| 900 | + @ <hr style="margin:0px"></td></tr> | |
| 903 | 901 | } |
| 904 | 902 | |
| 905 | 903 | /* Output the data for this entry from the database |
| 906 | 904 | */ |
| 907 | 905 | zBg = pState->iBg>=0 ? azArg[pState->iBg] : 0; |
| 908 | 906 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -583,13 +583,10 @@ | |
| 583 | zOwner = g.zLogin; |
| 584 | } |
| 585 | } |
| 586 | if( zOwner==0 ) zOwner = g.zLogin; |
| 587 | style_submenu_element("Cancel", "%R/reportlist"); |
| 588 | if( rn>0 ){ |
| 589 | style_submenu_element("Delete", "%R/rptedit/%d?del1=1", rn); |
| 590 | } |
| 591 | style_header("%s", rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 592 | if( zErr ){ |
| 593 | @ <blockquote class="reportError">%h(zErr)</blockquote> |
| 594 | } |
| 595 | @ <form action="rptedit" method="post"><div> |
| @@ -897,11 +894,12 @@ | |
| 897 | |
| 898 | /* Output the separator above each entry in a table which has multiple lines |
| 899 | ** per database entry. |
| 900 | */ |
| 901 | if( pState->iNewRow>=0 ){ |
| 902 | @ <tr><td colspan=%d(pState->nCol)><font size=1> </font></td></tr> |
| 903 | } |
| 904 | |
| 905 | /* Output the data for this entry from the database |
| 906 | */ |
| 907 | zBg = pState->iBg>=0 ? azArg[pState->iBg] : 0; |
| 908 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -583,13 +583,10 @@ | |
| 583 | zOwner = g.zLogin; |
| 584 | } |
| 585 | } |
| 586 | if( zOwner==0 ) zOwner = g.zLogin; |
| 587 | style_submenu_element("Cancel", "%R/reportlist"); |
| 588 | style_header("%s", rn>0 ? "Edit Report Format":"Create New Report Format"); |
| 589 | if( zErr ){ |
| 590 | @ <blockquote class="reportError">%h(zErr)</blockquote> |
| 591 | } |
| 592 | @ <form action="rptedit" method="post"><div> |
| @@ -897,11 +894,12 @@ | |
| 894 | |
| 895 | /* Output the separator above each entry in a table which has multiple lines |
| 896 | ** per database entry. |
| 897 | */ |
| 898 | if( pState->iNewRow>=0 ){ |
| 899 | @ <tr><td colspan="%d(pState->nCol)" style="padding:0px"> |
| 900 | @ <hr style="margin:0px"></td></tr> |
| 901 | } |
| 902 | |
| 903 | /* Output the data for this entry from the database |
| 904 | */ |
| 905 | zBg = pState->iBg>=0 ? azArg[pState->iBg] : 0; |
| 906 |
+8
-2
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -190,11 +190,14 @@ | ||
| 190 | 190 | const char *zName; |
| 191 | 191 | Stmt q; |
| 192 | 192 | int i, n, size, j; |
| 193 | 193 | |
| 194 | 194 | zName = PD("name","-none-"); |
| 195 | - db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, *" | |
| 195 | + db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, " | |
| 196 | + "datetime(tkt_ctime,toLocal()) AS tkt_datetime_creation, " | |
| 197 | + "julianday('now') - tkt_mtime, " | |
| 198 | + "julianday('now') - tkt_ctime, *" | |
| 196 | 199 | " FROM ticket WHERE tkt_uuid GLOB '%q*'", |
| 197 | 200 | zName); |
| 198 | 201 | if( db_step(&q)==SQLITE_ROW ){ |
| 199 | 202 | n = db_column_count(&q); |
| 200 | 203 | for(i=0; i<n; i++){ |
| @@ -211,10 +214,12 @@ | ||
| 211 | 214 | }else if( memcmp(zName, "tkt_", 4)==0 && Th_Fetch(zName, &size)==0 ){ |
| 212 | 215 | Th_Store(zName, zVal); |
| 213 | 216 | } |
| 214 | 217 | free(zRevealed); |
| 215 | 218 | } |
| 219 | + Th_Store("tkt_mage", human_readable_age(db_column_double(&q, 2))); | |
| 220 | + Th_Store("tkt_cage", human_readable_age(db_column_double(&q, 3))); | |
| 216 | 221 | } |
| 217 | 222 | db_finalize(&q); |
| 218 | 223 | for(i=0; i<nField; i++){ |
| 219 | 224 | if( Th_Fetch(aField[i].zName, &size)==0 ){ |
| 220 | 225 | Th_Store(aField[i].zName, aField[i].zValue); |
| @@ -769,11 +774,12 @@ | ||
| 769 | 774 | } |
| 770 | 775 | zFullName = db_text(0, |
| 771 | 776 | "SELECT tkt_uuid FROM ticket" |
| 772 | 777 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 773 | 778 | if( g.perm.WrWiki && g.perm.WrTkt ){ |
| 774 | - style_submenu_element("Edit Description", "%R/wikiedit?name=ticket/%T", zFullName); | |
| 779 | + style_submenu_element("Edit Description", | |
| 780 | + "%R/wikiedit?name=ticket/%T", zFullName); | |
| 775 | 781 | } |
| 776 | 782 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br>\n", -1); |
| 777 | 783 | ticket_init(); |
| 778 | 784 | initializeVariablesFromCGI(); |
| 779 | 785 | getAllTicketFields(); |
| 780 | 786 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -190,11 +190,14 @@ | |
| 190 | const char *zName; |
| 191 | Stmt q; |
| 192 | int i, n, size, j; |
| 193 | |
| 194 | zName = PD("name","-none-"); |
| 195 | db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, *" |
| 196 | " FROM ticket WHERE tkt_uuid GLOB '%q*'", |
| 197 | zName); |
| 198 | if( db_step(&q)==SQLITE_ROW ){ |
| 199 | n = db_column_count(&q); |
| 200 | for(i=0; i<n; i++){ |
| @@ -211,10 +214,12 @@ | |
| 211 | }else if( memcmp(zName, "tkt_", 4)==0 && Th_Fetch(zName, &size)==0 ){ |
| 212 | Th_Store(zName, zVal); |
| 213 | } |
| 214 | free(zRevealed); |
| 215 | } |
| 216 | } |
| 217 | db_finalize(&q); |
| 218 | for(i=0; i<nField; i++){ |
| 219 | if( Th_Fetch(aField[i].zName, &size)==0 ){ |
| 220 | Th_Store(aField[i].zName, aField[i].zValue); |
| @@ -769,11 +774,12 @@ | |
| 769 | } |
| 770 | zFullName = db_text(0, |
| 771 | "SELECT tkt_uuid FROM ticket" |
| 772 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 773 | if( g.perm.WrWiki && g.perm.WrTkt ){ |
| 774 | style_submenu_element("Edit Description", "%R/wikiedit?name=ticket/%T", zFullName); |
| 775 | } |
| 776 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br>\n", -1); |
| 777 | ticket_init(); |
| 778 | initializeVariablesFromCGI(); |
| 779 | getAllTicketFields(); |
| 780 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -190,11 +190,14 @@ | |
| 190 | const char *zName; |
| 191 | Stmt q; |
| 192 | int i, n, size, j; |
| 193 | |
| 194 | zName = PD("name","-none-"); |
| 195 | db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, " |
| 196 | "datetime(tkt_ctime,toLocal()) AS tkt_datetime_creation, " |
| 197 | "julianday('now') - tkt_mtime, " |
| 198 | "julianday('now') - tkt_ctime, *" |
| 199 | " FROM ticket WHERE tkt_uuid GLOB '%q*'", |
| 200 | zName); |
| 201 | if( db_step(&q)==SQLITE_ROW ){ |
| 202 | n = db_column_count(&q); |
| 203 | for(i=0; i<n; i++){ |
| @@ -211,10 +214,12 @@ | |
| 214 | }else if( memcmp(zName, "tkt_", 4)==0 && Th_Fetch(zName, &size)==0 ){ |
| 215 | Th_Store(zName, zVal); |
| 216 | } |
| 217 | free(zRevealed); |
| 218 | } |
| 219 | Th_Store("tkt_mage", human_readable_age(db_column_double(&q, 2))); |
| 220 | Th_Store("tkt_cage", human_readable_age(db_column_double(&q, 3))); |
| 221 | } |
| 222 | db_finalize(&q); |
| 223 | for(i=0; i<nField; i++){ |
| 224 | if( Th_Fetch(aField[i].zName, &size)==0 ){ |
| 225 | Th_Store(aField[i].zName, aField[i].zValue); |
| @@ -769,11 +774,12 @@ | |
| 774 | } |
| 775 | zFullName = db_text(0, |
| 776 | "SELECT tkt_uuid FROM ticket" |
| 777 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 778 | if( g.perm.WrWiki && g.perm.WrTkt ){ |
| 779 | style_submenu_element("Edit Description", |
| 780 | "%R/wikiedit?name=ticket/%T", zFullName); |
| 781 | } |
| 782 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br>\n", -1); |
| 783 | ticket_init(); |
| 784 | initializeVariablesFromCGI(); |
| 785 | getAllTicketFields(); |
| 786 |
+8
-2
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -190,11 +190,14 @@ | ||
| 190 | 190 | const char *zName; |
| 191 | 191 | Stmt q; |
| 192 | 192 | int i, n, size, j; |
| 193 | 193 | |
| 194 | 194 | zName = PD("name","-none-"); |
| 195 | - db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, *" | |
| 195 | + db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, " | |
| 196 | + "datetime(tkt_ctime,toLocal()) AS tkt_datetime_creation, " | |
| 197 | + "julianday('now') - tkt_mtime, " | |
| 198 | + "julianday('now') - tkt_ctime, *" | |
| 196 | 199 | " FROM ticket WHERE tkt_uuid GLOB '%q*'", |
| 197 | 200 | zName); |
| 198 | 201 | if( db_step(&q)==SQLITE_ROW ){ |
| 199 | 202 | n = db_column_count(&q); |
| 200 | 203 | for(i=0; i<n; i++){ |
| @@ -211,10 +214,12 @@ | ||
| 211 | 214 | }else if( memcmp(zName, "tkt_", 4)==0 && Th_Fetch(zName, &size)==0 ){ |
| 212 | 215 | Th_Store(zName, zVal); |
| 213 | 216 | } |
| 214 | 217 | free(zRevealed); |
| 215 | 218 | } |
| 219 | + Th_Store("tkt_mage", human_readable_age(db_column_double(&q, 2))); | |
| 220 | + Th_Store("tkt_cage", human_readable_age(db_column_double(&q, 3))); | |
| 216 | 221 | } |
| 217 | 222 | db_finalize(&q); |
| 218 | 223 | for(i=0; i<nField; i++){ |
| 219 | 224 | if( Th_Fetch(aField[i].zName, &size)==0 ){ |
| 220 | 225 | Th_Store(aField[i].zName, aField[i].zValue); |
| @@ -769,11 +774,12 @@ | ||
| 769 | 774 | } |
| 770 | 775 | zFullName = db_text(0, |
| 771 | 776 | "SELECT tkt_uuid FROM ticket" |
| 772 | 777 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 773 | 778 | if( g.perm.WrWiki && g.perm.WrTkt ){ |
| 774 | - style_submenu_element("Edit Description", "%R/wikiedit?name=ticket/%T", zFullName); | |
| 779 | + style_submenu_element("Edit Description", | |
| 780 | + "%R/wikiedit?name=ticket/%T", zFullName); | |
| 775 | 781 | } |
| 776 | 782 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br>\n", -1); |
| 777 | 783 | ticket_init(); |
| 778 | 784 | initializeVariablesFromCGI(); |
| 779 | 785 | getAllTicketFields(); |
| 780 | 786 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -190,11 +190,14 @@ | |
| 190 | const char *zName; |
| 191 | Stmt q; |
| 192 | int i, n, size, j; |
| 193 | |
| 194 | zName = PD("name","-none-"); |
| 195 | db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, *" |
| 196 | " FROM ticket WHERE tkt_uuid GLOB '%q*'", |
| 197 | zName); |
| 198 | if( db_step(&q)==SQLITE_ROW ){ |
| 199 | n = db_column_count(&q); |
| 200 | for(i=0; i<n; i++){ |
| @@ -211,10 +214,12 @@ | |
| 211 | }else if( memcmp(zName, "tkt_", 4)==0 && Th_Fetch(zName, &size)==0 ){ |
| 212 | Th_Store(zName, zVal); |
| 213 | } |
| 214 | free(zRevealed); |
| 215 | } |
| 216 | } |
| 217 | db_finalize(&q); |
| 218 | for(i=0; i<nField; i++){ |
| 219 | if( Th_Fetch(aField[i].zName, &size)==0 ){ |
| 220 | Th_Store(aField[i].zName, aField[i].zValue); |
| @@ -769,11 +774,12 @@ | |
| 769 | } |
| 770 | zFullName = db_text(0, |
| 771 | "SELECT tkt_uuid FROM ticket" |
| 772 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 773 | if( g.perm.WrWiki && g.perm.WrTkt ){ |
| 774 | style_submenu_element("Edit Description", "%R/wikiedit?name=ticket/%T", zFullName); |
| 775 | } |
| 776 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br>\n", -1); |
| 777 | ticket_init(); |
| 778 | initializeVariablesFromCGI(); |
| 779 | getAllTicketFields(); |
| 780 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -190,11 +190,14 @@ | |
| 190 | const char *zName; |
| 191 | Stmt q; |
| 192 | int i, n, size, j; |
| 193 | |
| 194 | zName = PD("name","-none-"); |
| 195 | db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, " |
| 196 | "datetime(tkt_ctime,toLocal()) AS tkt_datetime_creation, " |
| 197 | "julianday('now') - tkt_mtime, " |
| 198 | "julianday('now') - tkt_ctime, *" |
| 199 | " FROM ticket WHERE tkt_uuid GLOB '%q*'", |
| 200 | zName); |
| 201 | if( db_step(&q)==SQLITE_ROW ){ |
| 202 | n = db_column_count(&q); |
| 203 | for(i=0; i<n; i++){ |
| @@ -211,10 +214,12 @@ | |
| 214 | }else if( memcmp(zName, "tkt_", 4)==0 && Th_Fetch(zName, &size)==0 ){ |
| 215 | Th_Store(zName, zVal); |
| 216 | } |
| 217 | free(zRevealed); |
| 218 | } |
| 219 | Th_Store("tkt_mage", human_readable_age(db_column_double(&q, 2))); |
| 220 | Th_Store("tkt_cage", human_readable_age(db_column_double(&q, 3))); |
| 221 | } |
| 222 | db_finalize(&q); |
| 223 | for(i=0; i<nField; i++){ |
| 224 | if( Th_Fetch(aField[i].zName, &size)==0 ){ |
| 225 | Th_Store(aField[i].zName, aField[i].zValue); |
| @@ -769,11 +774,12 @@ | |
| 774 | } |
| 775 | zFullName = db_text(0, |
| 776 | "SELECT tkt_uuid FROM ticket" |
| 777 | " WHERE tkt_uuid GLOB '%q*'", zUuid); |
| 778 | if( g.perm.WrWiki && g.perm.WrTkt ){ |
| 779 | style_submenu_element("Edit Description", |
| 780 | "%R/wikiedit?name=ticket/%T", zFullName); |
| 781 | } |
| 782 | if( g.thTrace ) Th_Trace("BEGIN_TKTVIEW<br>\n", -1); |
| 783 | ticket_init(); |
| 784 | initializeVariablesFromCGI(); |
| 785 | getAllTicketFields(); |
| 786 |
+92
-6
| --- src/tktsetup.c | ||
| +++ src/tktsetup.c | ||
| @@ -125,11 +125,11 @@ | ||
| 125 | 125 | if( !g.perm.Setup ){ |
| 126 | 126 | login_needed(0); |
| 127 | 127 | return; |
| 128 | 128 | } |
| 129 | 129 | style_set_current_feature("tktsetup"); |
| 130 | - if( PB("setup") ){ | |
| 130 | + if( P("setup") ){ | |
| 131 | 131 | cgi_redirect("tktsetup"); |
| 132 | 132 | } |
| 133 | 133 | isSubmit = P("submit")!=0; |
| 134 | 134 | z = P("x"); |
| 135 | 135 | if( z==0 ){ |
| @@ -164,10 +164,11 @@ | ||
| 164 | 164 | @ <hr> |
| 165 | 165 | @ <h2>Default %s(zTitle)</h2> |
| 166 | 166 | @ <blockquote><pre> |
| 167 | 167 | @ %h(zDfltValue) |
| 168 | 168 | @ </pre></blockquote> |
| 169 | + style_submenu_element("Back", "%R/tktsetup"); | |
| 169 | 170 | style_finish_page(); |
| 170 | 171 | } |
| 171 | 172 | |
| 172 | 173 | /* |
| 173 | 174 | ** WEBPAGE: tktsetup_tab |
| @@ -523,21 +524,61 @@ | ||
| 523 | 524 | @ <tr><td class="tktDspLabel">Last Modified:</td><td class="tktDspValue"> |
| 524 | 525 | @ <th1> |
| 525 | 526 | @ if {[info exists tkt_datetime]} { |
| 526 | 527 | @ html $tkt_datetime |
| 527 | 528 | @ } |
| 529 | +@ if {[info exists tkt_mage]} { | |
| 530 | +@ html "<br>$tkt_mage" | |
| 531 | +@ } | |
| 528 | 532 | @ </th1> |
| 529 | 533 | @ </td> |
| 534 | +@ <td class="tktDspLabel">Created:</td><td class="tktDspValue"> | |
| 535 | +@ <th1> | |
| 536 | +@ if {[info exists tkt_datetime_creation]} { | |
| 537 | +@ html $tkt_datetime_creation | |
| 538 | +@ } | |
| 539 | +@ if {[info exists tkt_cage]} { | |
| 540 | +@ html "<br>$tkt_cage" | |
| 541 | +@ } | |
| 542 | +@ </th1> | |
| 543 | +@ </td></tr> | |
| 530 | 544 | @ <th1>enable_output [hascap e]</th1> |
| 531 | -@ <td class="tktDspLabel">Contact:</td><td class="tktDspValue"> | |
| 545 | +@ <tr> | |
| 546 | +@ <td class="tktDspLabel">Contact:</td><td class="tktDspValue" colspan="3"> | |
| 532 | 547 | @ $<private_contact> |
| 533 | 548 | @ </td> |
| 549 | +@ </tr> | |
| 534 | 550 | @ <th1>enable_output 1</th1> |
| 535 | -@ </tr> | |
| 536 | 551 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 537 | 552 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 538 | -@ $<foundin> | |
| 553 | +@ <th1> | |
| 554 | +@ set versionlink "" | |
| 555 | +@ set urlfoundin [httpize $foundin] | |
| 556 | +@ set tagpattern {^[-0-9A-Za-z_\\.]+$} | |
| 557 | +@ if [regexp $tagpattern $foundin] { | |
| 558 | +@ query {SELECT count(*) AS match FROM tag | |
| 559 | +@ WHERE tagname=concat('sym-',$foundin)} { | |
| 560 | +@ if {$match} {set versionlink "/timeline?t=$urlfoundin"} | |
| 561 | +@ } | |
| 562 | +@ } | |
| 563 | +@ set hashpattern {^[0-9a-f]+$} | |
| 564 | +@ if [regexp $hashpattern $foundin] { | |
| 565 | +@ set pattern $foundin* | |
| 566 | +@ query {SELECT count(*) AS match FROM blob WHERE uuid GLOB $pattern} { | |
| 567 | +@ if {$match} {set versionlink "/info/$urlfoundin"} | |
| 568 | +@ } | |
| 569 | +@ } | |
| 570 | +@ if {$versionlink eq ""} { | |
| 571 | +@ puts $foundin | |
| 572 | +@ } else { | |
| 573 | +@ html "<a href=\"" | |
| 574 | +@ puts $versionlink | |
| 575 | +@ html "\">" | |
| 576 | +@ puts $foundin | |
| 577 | +@ html "</a>" | |
| 578 | +@ } | |
| 579 | +@ </th1> | |
| 539 | 580 | @ </td></tr> |
| 540 | 581 | @ </table> |
| 541 | 582 | @ |
| 542 | 583 | @ <th1> |
| 543 | 584 | @ wiki_assoc "ticket" $tkt_uuid |
| @@ -567,11 +608,12 @@ | ||
| 567 | 608 | @ FROM ticketchng |
| 568 | 609 | @ WHERE tkt_id=$tkt_id AND length(icomment)>0} { |
| 569 | 610 | @ if {$seenRow} { |
| 570 | 611 | @ html "<hr>\n" |
| 571 | 612 | @ } else { |
| 572 | -@ html "<tr><td class='tktDspLabel' style='text-align:left'>User Comments:</td></tr>\n" | |
| 613 | +@ html "<tr><td class='tktDspLabel' style='text-align:left'>\n" | |
| 614 | +@ html "User Comments:</td></tr>\n" | |
| 573 | 615 | @ html "<tr><td colspan='5' class='tktDspValue'>\n" |
| 574 | 616 | @ set seenRow 1 |
| 575 | 617 | @ } |
| 576 | 618 | @ html "<span class='tktDspCommenter'>" |
| 577 | 619 | @ html "[htmlize $xlogin]" |
| @@ -741,10 +783,52 @@ | ||
| 741 | 783 | @ <input type="submit" name="cancel" value="Cancel"> |
| 742 | 784 | @ </td> |
| 743 | 785 | @ <td>Abandon this edit</td> |
| 744 | 786 | @ </tr> |
| 745 | 787 | @ |
| 788 | +@ <th1> | |
| 789 | +@ set seenRow 0 | |
| 790 | +@ set alwaysPlaintext [info exists plaintext] | |
| 791 | +@ query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin, | |
| 792 | +@ mimetype as xmimetype, icomment AS xcomment, | |
| 793 | +@ username AS xusername | |
| 794 | +@ FROM ticketchng | |
| 795 | +@ WHERE tkt_id=$tkt_id AND length(icomment)>0} { | |
| 796 | +@ if {$seenRow} { | |
| 797 | +@ html "<hr>\n" | |
| 798 | +@ } else { | |
| 799 | +@ html "<tr><td colspan='2'><hr></td></tr>\n" | |
| 800 | +@ html "<tr><td colspan='2' class='tktDspLabel' style='text-align:left'>\n" | |
| 801 | +@ html "Previous User Comments:</td></tr>\n" | |
| 802 | +@ html "<tr><td colspan='2' class='tktDspValue'>\n" | |
| 803 | +@ set seenRow 1 | |
| 804 | +@ } | |
| 805 | +@ html "<span class='tktDspCommenter'>" | |
| 806 | +@ html "[htmlize $xlogin]" | |
| 807 | +@ if {$xlogin ne $xusername && [string length $xusername]>0} { | |
| 808 | +@ html " (claiming to be [htmlize $xusername])" | |
| 809 | +@ } | |
| 810 | +@ html " added on $xdate:" | |
| 811 | +@ html "</span>\n" | |
| 812 | +@ if {$alwaysPlaintext || $xmimetype eq "text/plain"} { | |
| 813 | +@ set r [randhex] | |
| 814 | +@ if {$xmimetype ne "text/plain"} {html "([htmlize $xmimetype])\n"} | |
| 815 | +@ wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n" | |
| 816 | +@ } elseif {$xmimetype eq "text/x-fossil-wiki"} { | |
| 817 | +@ wiki "<p>\n[string trimright $xcomment]\n</p>\n" | |
| 818 | +@ } elseif {$xmimetype eq "text/x-markdown"} { | |
| 819 | +@ html [lindex [markdown $xcomment] 1] | |
| 820 | +@ } elseif {$xmimetype eq "text/html"} { | |
| 821 | +@ wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n" | |
| 822 | +@ } else { | |
| 823 | +@ set r [randhex] | |
| 824 | +@ wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n" | |
| 825 | +@ } | |
| 826 | +@ } | |
| 827 | +@ if {$seenRow} {html "</td></tr>\n"} | |
| 828 | +@ </th1> | |
| 829 | +@ | |
| 746 | 830 | @ </table> |
| 747 | 831 | ; |
| 748 | 832 | |
| 749 | 833 | /* |
| 750 | 834 | ** Return the code used to generate the edit ticket page |
| @@ -839,11 +923,12 @@ | ||
| 839 | 923 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 840 | 924 | @ WHEN status='Tested' THEN '#bde5d6' |
| 841 | 925 | @ WHEN status='Deferred' THEN '#cacae5' |
| 842 | 926 | @ ELSE '#c8c8c8' END AS 'bgcolor', |
| 843 | 927 | @ substr(tkt_uuid,1,10) AS '#', |
| 844 | -@ datetime(tkt_mtime) AS 'mtime', | |
| 928 | +@ datetime(tkt_ctime) AS 'created', | |
| 929 | +@ datetime(tkt_mtime) AS 'modified', | |
| 845 | 930 | @ type, |
| 846 | 931 | @ status, |
| 847 | 932 | @ subsystem, |
| 848 | 933 | @ title, |
| 849 | 934 | @ comment AS '_comments' |
| @@ -973,8 +1058,9 @@ | ||
| 973 | 1058 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 974 | 1059 | @ <input type="submit" name="setup" value="Cancel"> |
| 975 | 1060 | @ </p> |
| 976 | 1061 | @ </div></form> |
| 977 | 1062 | db_end_transaction(0); |
| 1063 | + style_submenu_element("Back", "%R/tktsetup"); | |
| 978 | 1064 | style_finish_page(); |
| 979 | 1065 | |
| 980 | 1066 | } |
| 981 | 1067 |
| --- src/tktsetup.c | |
| +++ src/tktsetup.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | if( !g.perm.Setup ){ |
| 126 | login_needed(0); |
| 127 | return; |
| 128 | } |
| 129 | style_set_current_feature("tktsetup"); |
| 130 | if( PB("setup") ){ |
| 131 | cgi_redirect("tktsetup"); |
| 132 | } |
| 133 | isSubmit = P("submit")!=0; |
| 134 | z = P("x"); |
| 135 | if( z==0 ){ |
| @@ -164,10 +164,11 @@ | |
| 164 | @ <hr> |
| 165 | @ <h2>Default %s(zTitle)</h2> |
| 166 | @ <blockquote><pre> |
| 167 | @ %h(zDfltValue) |
| 168 | @ </pre></blockquote> |
| 169 | style_finish_page(); |
| 170 | } |
| 171 | |
| 172 | /* |
| 173 | ** WEBPAGE: tktsetup_tab |
| @@ -523,21 +524,61 @@ | |
| 523 | @ <tr><td class="tktDspLabel">Last Modified:</td><td class="tktDspValue"> |
| 524 | @ <th1> |
| 525 | @ if {[info exists tkt_datetime]} { |
| 526 | @ html $tkt_datetime |
| 527 | @ } |
| 528 | @ </th1> |
| 529 | @ </td> |
| 530 | @ <th1>enable_output [hascap e]</th1> |
| 531 | @ <td class="tktDspLabel">Contact:</td><td class="tktDspValue"> |
| 532 | @ $<private_contact> |
| 533 | @ </td> |
| 534 | @ <th1>enable_output 1</th1> |
| 535 | @ </tr> |
| 536 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 537 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 538 | @ $<foundin> |
| 539 | @ </td></tr> |
| 540 | @ </table> |
| 541 | @ |
| 542 | @ <th1> |
| 543 | @ wiki_assoc "ticket" $tkt_uuid |
| @@ -567,11 +608,12 @@ | |
| 567 | @ FROM ticketchng |
| 568 | @ WHERE tkt_id=$tkt_id AND length(icomment)>0} { |
| 569 | @ if {$seenRow} { |
| 570 | @ html "<hr>\n" |
| 571 | @ } else { |
| 572 | @ html "<tr><td class='tktDspLabel' style='text-align:left'>User Comments:</td></tr>\n" |
| 573 | @ html "<tr><td colspan='5' class='tktDspValue'>\n" |
| 574 | @ set seenRow 1 |
| 575 | @ } |
| 576 | @ html "<span class='tktDspCommenter'>" |
| 577 | @ html "[htmlize $xlogin]" |
| @@ -741,10 +783,52 @@ | |
| 741 | @ <input type="submit" name="cancel" value="Cancel"> |
| 742 | @ </td> |
| 743 | @ <td>Abandon this edit</td> |
| 744 | @ </tr> |
| 745 | @ |
| 746 | @ </table> |
| 747 | ; |
| 748 | |
| 749 | /* |
| 750 | ** Return the code used to generate the edit ticket page |
| @@ -839,11 +923,12 @@ | |
| 839 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 840 | @ WHEN status='Tested' THEN '#bde5d6' |
| 841 | @ WHEN status='Deferred' THEN '#cacae5' |
| 842 | @ ELSE '#c8c8c8' END AS 'bgcolor', |
| 843 | @ substr(tkt_uuid,1,10) AS '#', |
| 844 | @ datetime(tkt_mtime) AS 'mtime', |
| 845 | @ type, |
| 846 | @ status, |
| 847 | @ subsystem, |
| 848 | @ title, |
| 849 | @ comment AS '_comments' |
| @@ -973,8 +1058,9 @@ | |
| 973 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 974 | @ <input type="submit" name="setup" value="Cancel"> |
| 975 | @ </p> |
| 976 | @ </div></form> |
| 977 | db_end_transaction(0); |
| 978 | style_finish_page(); |
| 979 | |
| 980 | } |
| 981 |
| --- src/tktsetup.c | |
| +++ src/tktsetup.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | if( !g.perm.Setup ){ |
| 126 | login_needed(0); |
| 127 | return; |
| 128 | } |
| 129 | style_set_current_feature("tktsetup"); |
| 130 | if( P("setup") ){ |
| 131 | cgi_redirect("tktsetup"); |
| 132 | } |
| 133 | isSubmit = P("submit")!=0; |
| 134 | z = P("x"); |
| 135 | if( z==0 ){ |
| @@ -164,10 +164,11 @@ | |
| 164 | @ <hr> |
| 165 | @ <h2>Default %s(zTitle)</h2> |
| 166 | @ <blockquote><pre> |
| 167 | @ %h(zDfltValue) |
| 168 | @ </pre></blockquote> |
| 169 | style_submenu_element("Back", "%R/tktsetup"); |
| 170 | style_finish_page(); |
| 171 | } |
| 172 | |
| 173 | /* |
| 174 | ** WEBPAGE: tktsetup_tab |
| @@ -523,21 +524,61 @@ | |
| 524 | @ <tr><td class="tktDspLabel">Last Modified:</td><td class="tktDspValue"> |
| 525 | @ <th1> |
| 526 | @ if {[info exists tkt_datetime]} { |
| 527 | @ html $tkt_datetime |
| 528 | @ } |
| 529 | @ if {[info exists tkt_mage]} { |
| 530 | @ html "<br>$tkt_mage" |
| 531 | @ } |
| 532 | @ </th1> |
| 533 | @ </td> |
| 534 | @ <td class="tktDspLabel">Created:</td><td class="tktDspValue"> |
| 535 | @ <th1> |
| 536 | @ if {[info exists tkt_datetime_creation]} { |
| 537 | @ html $tkt_datetime_creation |
| 538 | @ } |
| 539 | @ if {[info exists tkt_cage]} { |
| 540 | @ html "<br>$tkt_cage" |
| 541 | @ } |
| 542 | @ </th1> |
| 543 | @ </td></tr> |
| 544 | @ <th1>enable_output [hascap e]</th1> |
| 545 | @ <tr> |
| 546 | @ <td class="tktDspLabel">Contact:</td><td class="tktDspValue" colspan="3"> |
| 547 | @ $<private_contact> |
| 548 | @ </td> |
| 549 | @ </tr> |
| 550 | @ <th1>enable_output 1</th1> |
| 551 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 552 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 553 | @ <th1> |
| 554 | @ set versionlink "" |
| 555 | @ set urlfoundin [httpize $foundin] |
| 556 | @ set tagpattern {^[-0-9A-Za-z_\\.]+$} |
| 557 | @ if [regexp $tagpattern $foundin] { |
| 558 | @ query {SELECT count(*) AS match FROM tag |
| 559 | @ WHERE tagname=concat('sym-',$foundin)} { |
| 560 | @ if {$match} {set versionlink "/timeline?t=$urlfoundin"} |
| 561 | @ } |
| 562 | @ } |
| 563 | @ set hashpattern {^[0-9a-f]+$} |
| 564 | @ if [regexp $hashpattern $foundin] { |
| 565 | @ set pattern $foundin* |
| 566 | @ query {SELECT count(*) AS match FROM blob WHERE uuid GLOB $pattern} { |
| 567 | @ if {$match} {set versionlink "/info/$urlfoundin"} |
| 568 | @ } |
| 569 | @ } |
| 570 | @ if {$versionlink eq ""} { |
| 571 | @ puts $foundin |
| 572 | @ } else { |
| 573 | @ html "<a href=\"" |
| 574 | @ puts $versionlink |
| 575 | @ html "\">" |
| 576 | @ puts $foundin |
| 577 | @ html "</a>" |
| 578 | @ } |
| 579 | @ </th1> |
| 580 | @ </td></tr> |
| 581 | @ </table> |
| 582 | @ |
| 583 | @ <th1> |
| 584 | @ wiki_assoc "ticket" $tkt_uuid |
| @@ -567,11 +608,12 @@ | |
| 608 | @ FROM ticketchng |
| 609 | @ WHERE tkt_id=$tkt_id AND length(icomment)>0} { |
| 610 | @ if {$seenRow} { |
| 611 | @ html "<hr>\n" |
| 612 | @ } else { |
| 613 | @ html "<tr><td class='tktDspLabel' style='text-align:left'>\n" |
| 614 | @ html "User Comments:</td></tr>\n" |
| 615 | @ html "<tr><td colspan='5' class='tktDspValue'>\n" |
| 616 | @ set seenRow 1 |
| 617 | @ } |
| 618 | @ html "<span class='tktDspCommenter'>" |
| 619 | @ html "[htmlize $xlogin]" |
| @@ -741,10 +783,52 @@ | |
| 783 | @ <input type="submit" name="cancel" value="Cancel"> |
| 784 | @ </td> |
| 785 | @ <td>Abandon this edit</td> |
| 786 | @ </tr> |
| 787 | @ |
| 788 | @ <th1> |
| 789 | @ set seenRow 0 |
| 790 | @ set alwaysPlaintext [info exists plaintext] |
| 791 | @ query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin, |
| 792 | @ mimetype as xmimetype, icomment AS xcomment, |
| 793 | @ username AS xusername |
| 794 | @ FROM ticketchng |
| 795 | @ WHERE tkt_id=$tkt_id AND length(icomment)>0} { |
| 796 | @ if {$seenRow} { |
| 797 | @ html "<hr>\n" |
| 798 | @ } else { |
| 799 | @ html "<tr><td colspan='2'><hr></td></tr>\n" |
| 800 | @ html "<tr><td colspan='2' class='tktDspLabel' style='text-align:left'>\n" |
| 801 | @ html "Previous User Comments:</td></tr>\n" |
| 802 | @ html "<tr><td colspan='2' class='tktDspValue'>\n" |
| 803 | @ set seenRow 1 |
| 804 | @ } |
| 805 | @ html "<span class='tktDspCommenter'>" |
| 806 | @ html "[htmlize $xlogin]" |
| 807 | @ if {$xlogin ne $xusername && [string length $xusername]>0} { |
| 808 | @ html " (claiming to be [htmlize $xusername])" |
| 809 | @ } |
| 810 | @ html " added on $xdate:" |
| 811 | @ html "</span>\n" |
| 812 | @ if {$alwaysPlaintext || $xmimetype eq "text/plain"} { |
| 813 | @ set r [randhex] |
| 814 | @ if {$xmimetype ne "text/plain"} {html "([htmlize $xmimetype])\n"} |
| 815 | @ wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n" |
| 816 | @ } elseif {$xmimetype eq "text/x-fossil-wiki"} { |
| 817 | @ wiki "<p>\n[string trimright $xcomment]\n</p>\n" |
| 818 | @ } elseif {$xmimetype eq "text/x-markdown"} { |
| 819 | @ html [lindex [markdown $xcomment] 1] |
| 820 | @ } elseif {$xmimetype eq "text/html"} { |
| 821 | @ wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n" |
| 822 | @ } else { |
| 823 | @ set r [randhex] |
| 824 | @ wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n" |
| 825 | @ } |
| 826 | @ } |
| 827 | @ if {$seenRow} {html "</td></tr>\n"} |
| 828 | @ </th1> |
| 829 | @ |
| 830 | @ </table> |
| 831 | ; |
| 832 | |
| 833 | /* |
| 834 | ** Return the code used to generate the edit ticket page |
| @@ -839,11 +923,12 @@ | |
| 923 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 924 | @ WHEN status='Tested' THEN '#bde5d6' |
| 925 | @ WHEN status='Deferred' THEN '#cacae5' |
| 926 | @ ELSE '#c8c8c8' END AS 'bgcolor', |
| 927 | @ substr(tkt_uuid,1,10) AS '#', |
| 928 | @ datetime(tkt_ctime) AS 'created', |
| 929 | @ datetime(tkt_mtime) AS 'modified', |
| 930 | @ type, |
| 931 | @ status, |
| 932 | @ subsystem, |
| 933 | @ title, |
| 934 | @ comment AS '_comments' |
| @@ -973,8 +1058,9 @@ | |
| 1058 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 1059 | @ <input type="submit" name="setup" value="Cancel"> |
| 1060 | @ </p> |
| 1061 | @ </div></form> |
| 1062 | db_end_transaction(0); |
| 1063 | style_submenu_element("Back", "%R/tktsetup"); |
| 1064 | style_finish_page(); |
| 1065 | |
| 1066 | } |
| 1067 |
+92
-6
| --- src/tktsetup.c | ||
| +++ src/tktsetup.c | ||
| @@ -125,11 +125,11 @@ | ||
| 125 | 125 | if( !g.perm.Setup ){ |
| 126 | 126 | login_needed(0); |
| 127 | 127 | return; |
| 128 | 128 | } |
| 129 | 129 | style_set_current_feature("tktsetup"); |
| 130 | - if( PB("setup") ){ | |
| 130 | + if( P("setup") ){ | |
| 131 | 131 | cgi_redirect("tktsetup"); |
| 132 | 132 | } |
| 133 | 133 | isSubmit = P("submit")!=0; |
| 134 | 134 | z = P("x"); |
| 135 | 135 | if( z==0 ){ |
| @@ -164,10 +164,11 @@ | ||
| 164 | 164 | @ <hr> |
| 165 | 165 | @ <h2>Default %s(zTitle)</h2> |
| 166 | 166 | @ <blockquote><pre> |
| 167 | 167 | @ %h(zDfltValue) |
| 168 | 168 | @ </pre></blockquote> |
| 169 | + style_submenu_element("Back", "%R/tktsetup"); | |
| 169 | 170 | style_finish_page(); |
| 170 | 171 | } |
| 171 | 172 | |
| 172 | 173 | /* |
| 173 | 174 | ** WEBPAGE: tktsetup_tab |
| @@ -523,21 +524,61 @@ | ||
| 523 | 524 | @ <tr><td class="tktDspLabel">Last Modified:</td><td class="tktDspValue"> |
| 524 | 525 | @ <th1> |
| 525 | 526 | @ if {[info exists tkt_datetime]} { |
| 526 | 527 | @ html $tkt_datetime |
| 527 | 528 | @ } |
| 529 | +@ if {[info exists tkt_mage]} { | |
| 530 | +@ html "<br>$tkt_mage" | |
| 531 | +@ } | |
| 528 | 532 | @ </th1> |
| 529 | 533 | @ </td> |
| 534 | +@ <td class="tktDspLabel">Created:</td><td class="tktDspValue"> | |
| 535 | +@ <th1> | |
| 536 | +@ if {[info exists tkt_datetime_creation]} { | |
| 537 | +@ html $tkt_datetime_creation | |
| 538 | +@ } | |
| 539 | +@ if {[info exists tkt_cage]} { | |
| 540 | +@ html "<br>$tkt_cage" | |
| 541 | +@ } | |
| 542 | +@ </th1> | |
| 543 | +@ </td></tr> | |
| 530 | 544 | @ <th1>enable_output [hascap e]</th1> |
| 531 | -@ <td class="tktDspLabel">Contact:</td><td class="tktDspValue"> | |
| 545 | +@ <tr> | |
| 546 | +@ <td class="tktDspLabel">Contact:</td><td class="tktDspValue" colspan="3"> | |
| 532 | 547 | @ $<private_contact> |
| 533 | 548 | @ </td> |
| 549 | +@ </tr> | |
| 534 | 550 | @ <th1>enable_output 1</th1> |
| 535 | -@ </tr> | |
| 536 | 551 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 537 | 552 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 538 | -@ $<foundin> | |
| 553 | +@ <th1> | |
| 554 | +@ set versionlink "" | |
| 555 | +@ set urlfoundin [httpize $foundin] | |
| 556 | +@ set tagpattern {^[-0-9A-Za-z_\\.]+$} | |
| 557 | +@ if [regexp $tagpattern $foundin] { | |
| 558 | +@ query {SELECT count(*) AS match FROM tag | |
| 559 | +@ WHERE tagname=concat('sym-',$foundin)} { | |
| 560 | +@ if {$match} {set versionlink "/timeline?t=$urlfoundin"} | |
| 561 | +@ } | |
| 562 | +@ } | |
| 563 | +@ set hashpattern {^[0-9a-f]+$} | |
| 564 | +@ if [regexp $hashpattern $foundin] { | |
| 565 | +@ set pattern $foundin* | |
| 566 | +@ query {SELECT count(*) AS match FROM blob WHERE uuid GLOB $pattern} { | |
| 567 | +@ if {$match} {set versionlink "/info/$urlfoundin"} | |
| 568 | +@ } | |
| 569 | +@ } | |
| 570 | +@ if {$versionlink eq ""} { | |
| 571 | +@ puts $foundin | |
| 572 | +@ } else { | |
| 573 | +@ html "<a href=\"" | |
| 574 | +@ puts $versionlink | |
| 575 | +@ html "\">" | |
| 576 | +@ puts $foundin | |
| 577 | +@ html "</a>" | |
| 578 | +@ } | |
| 579 | +@ </th1> | |
| 539 | 580 | @ </td></tr> |
| 540 | 581 | @ </table> |
| 541 | 582 | @ |
| 542 | 583 | @ <th1> |
| 543 | 584 | @ wiki_assoc "ticket" $tkt_uuid |
| @@ -567,11 +608,12 @@ | ||
| 567 | 608 | @ FROM ticketchng |
| 568 | 609 | @ WHERE tkt_id=$tkt_id AND length(icomment)>0} { |
| 569 | 610 | @ if {$seenRow} { |
| 570 | 611 | @ html "<hr>\n" |
| 571 | 612 | @ } else { |
| 572 | -@ html "<tr><td class='tktDspLabel' style='text-align:left'>User Comments:</td></tr>\n" | |
| 613 | +@ html "<tr><td class='tktDspLabel' style='text-align:left'>\n" | |
| 614 | +@ html "User Comments:</td></tr>\n" | |
| 573 | 615 | @ html "<tr><td colspan='5' class='tktDspValue'>\n" |
| 574 | 616 | @ set seenRow 1 |
| 575 | 617 | @ } |
| 576 | 618 | @ html "<span class='tktDspCommenter'>" |
| 577 | 619 | @ html "[htmlize $xlogin]" |
| @@ -741,10 +783,52 @@ | ||
| 741 | 783 | @ <input type="submit" name="cancel" value="Cancel"> |
| 742 | 784 | @ </td> |
| 743 | 785 | @ <td>Abandon this edit</td> |
| 744 | 786 | @ </tr> |
| 745 | 787 | @ |
| 788 | +@ <th1> | |
| 789 | +@ set seenRow 0 | |
| 790 | +@ set alwaysPlaintext [info exists plaintext] | |
| 791 | +@ query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin, | |
| 792 | +@ mimetype as xmimetype, icomment AS xcomment, | |
| 793 | +@ username AS xusername | |
| 794 | +@ FROM ticketchng | |
| 795 | +@ WHERE tkt_id=$tkt_id AND length(icomment)>0} { | |
| 796 | +@ if {$seenRow} { | |
| 797 | +@ html "<hr>\n" | |
| 798 | +@ } else { | |
| 799 | +@ html "<tr><td colspan='2'><hr></td></tr>\n" | |
| 800 | +@ html "<tr><td colspan='2' class='tktDspLabel' style='text-align:left'>\n" | |
| 801 | +@ html "Previous User Comments:</td></tr>\n" | |
| 802 | +@ html "<tr><td colspan='2' class='tktDspValue'>\n" | |
| 803 | +@ set seenRow 1 | |
| 804 | +@ } | |
| 805 | +@ html "<span class='tktDspCommenter'>" | |
| 806 | +@ html "[htmlize $xlogin]" | |
| 807 | +@ if {$xlogin ne $xusername && [string length $xusername]>0} { | |
| 808 | +@ html " (claiming to be [htmlize $xusername])" | |
| 809 | +@ } | |
| 810 | +@ html " added on $xdate:" | |
| 811 | +@ html "</span>\n" | |
| 812 | +@ if {$alwaysPlaintext || $xmimetype eq "text/plain"} { | |
| 813 | +@ set r [randhex] | |
| 814 | +@ if {$xmimetype ne "text/plain"} {html "([htmlize $xmimetype])\n"} | |
| 815 | +@ wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n" | |
| 816 | +@ } elseif {$xmimetype eq "text/x-fossil-wiki"} { | |
| 817 | +@ wiki "<p>\n[string trimright $xcomment]\n</p>\n" | |
| 818 | +@ } elseif {$xmimetype eq "text/x-markdown"} { | |
| 819 | +@ html [lindex [markdown $xcomment] 1] | |
| 820 | +@ } elseif {$xmimetype eq "text/html"} { | |
| 821 | +@ wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n" | |
| 822 | +@ } else { | |
| 823 | +@ set r [randhex] | |
| 824 | +@ wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n" | |
| 825 | +@ } | |
| 826 | +@ } | |
| 827 | +@ if {$seenRow} {html "</td></tr>\n"} | |
| 828 | +@ </th1> | |
| 829 | +@ | |
| 746 | 830 | @ </table> |
| 747 | 831 | ; |
| 748 | 832 | |
| 749 | 833 | /* |
| 750 | 834 | ** Return the code used to generate the edit ticket page |
| @@ -839,11 +923,12 @@ | ||
| 839 | 923 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 840 | 924 | @ WHEN status='Tested' THEN '#bde5d6' |
| 841 | 925 | @ WHEN status='Deferred' THEN '#cacae5' |
| 842 | 926 | @ ELSE '#c8c8c8' END AS 'bgcolor', |
| 843 | 927 | @ substr(tkt_uuid,1,10) AS '#', |
| 844 | -@ datetime(tkt_mtime) AS 'mtime', | |
| 928 | +@ datetime(tkt_ctime) AS 'created', | |
| 929 | +@ datetime(tkt_mtime) AS 'modified', | |
| 845 | 930 | @ type, |
| 846 | 931 | @ status, |
| 847 | 932 | @ subsystem, |
| 848 | 933 | @ title, |
| 849 | 934 | @ comment AS '_comments' |
| @@ -973,8 +1058,9 @@ | ||
| 973 | 1058 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 974 | 1059 | @ <input type="submit" name="setup" value="Cancel"> |
| 975 | 1060 | @ </p> |
| 976 | 1061 | @ </div></form> |
| 977 | 1062 | db_end_transaction(0); |
| 1063 | + style_submenu_element("Back", "%R/tktsetup"); | |
| 978 | 1064 | style_finish_page(); |
| 979 | 1065 | |
| 980 | 1066 | } |
| 981 | 1067 |
| --- src/tktsetup.c | |
| +++ src/tktsetup.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | if( !g.perm.Setup ){ |
| 126 | login_needed(0); |
| 127 | return; |
| 128 | } |
| 129 | style_set_current_feature("tktsetup"); |
| 130 | if( PB("setup") ){ |
| 131 | cgi_redirect("tktsetup"); |
| 132 | } |
| 133 | isSubmit = P("submit")!=0; |
| 134 | z = P("x"); |
| 135 | if( z==0 ){ |
| @@ -164,10 +164,11 @@ | |
| 164 | @ <hr> |
| 165 | @ <h2>Default %s(zTitle)</h2> |
| 166 | @ <blockquote><pre> |
| 167 | @ %h(zDfltValue) |
| 168 | @ </pre></blockquote> |
| 169 | style_finish_page(); |
| 170 | } |
| 171 | |
| 172 | /* |
| 173 | ** WEBPAGE: tktsetup_tab |
| @@ -523,21 +524,61 @@ | |
| 523 | @ <tr><td class="tktDspLabel">Last Modified:</td><td class="tktDspValue"> |
| 524 | @ <th1> |
| 525 | @ if {[info exists tkt_datetime]} { |
| 526 | @ html $tkt_datetime |
| 527 | @ } |
| 528 | @ </th1> |
| 529 | @ </td> |
| 530 | @ <th1>enable_output [hascap e]</th1> |
| 531 | @ <td class="tktDspLabel">Contact:</td><td class="tktDspValue"> |
| 532 | @ $<private_contact> |
| 533 | @ </td> |
| 534 | @ <th1>enable_output 1</th1> |
| 535 | @ </tr> |
| 536 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 537 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 538 | @ $<foundin> |
| 539 | @ </td></tr> |
| 540 | @ </table> |
| 541 | @ |
| 542 | @ <th1> |
| 543 | @ wiki_assoc "ticket" $tkt_uuid |
| @@ -567,11 +608,12 @@ | |
| 567 | @ FROM ticketchng |
| 568 | @ WHERE tkt_id=$tkt_id AND length(icomment)>0} { |
| 569 | @ if {$seenRow} { |
| 570 | @ html "<hr>\n" |
| 571 | @ } else { |
| 572 | @ html "<tr><td class='tktDspLabel' style='text-align:left'>User Comments:</td></tr>\n" |
| 573 | @ html "<tr><td colspan='5' class='tktDspValue'>\n" |
| 574 | @ set seenRow 1 |
| 575 | @ } |
| 576 | @ html "<span class='tktDspCommenter'>" |
| 577 | @ html "[htmlize $xlogin]" |
| @@ -741,10 +783,52 @@ | |
| 741 | @ <input type="submit" name="cancel" value="Cancel"> |
| 742 | @ </td> |
| 743 | @ <td>Abandon this edit</td> |
| 744 | @ </tr> |
| 745 | @ |
| 746 | @ </table> |
| 747 | ; |
| 748 | |
| 749 | /* |
| 750 | ** Return the code used to generate the edit ticket page |
| @@ -839,11 +923,12 @@ | |
| 839 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 840 | @ WHEN status='Tested' THEN '#bde5d6' |
| 841 | @ WHEN status='Deferred' THEN '#cacae5' |
| 842 | @ ELSE '#c8c8c8' END AS 'bgcolor', |
| 843 | @ substr(tkt_uuid,1,10) AS '#', |
| 844 | @ datetime(tkt_mtime) AS 'mtime', |
| 845 | @ type, |
| 846 | @ status, |
| 847 | @ subsystem, |
| 848 | @ title, |
| 849 | @ comment AS '_comments' |
| @@ -973,8 +1058,9 @@ | |
| 973 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 974 | @ <input type="submit" name="setup" value="Cancel"> |
| 975 | @ </p> |
| 976 | @ </div></form> |
| 977 | db_end_transaction(0); |
| 978 | style_finish_page(); |
| 979 | |
| 980 | } |
| 981 |
| --- src/tktsetup.c | |
| +++ src/tktsetup.c | |
| @@ -125,11 +125,11 @@ | |
| 125 | if( !g.perm.Setup ){ |
| 126 | login_needed(0); |
| 127 | return; |
| 128 | } |
| 129 | style_set_current_feature("tktsetup"); |
| 130 | if( P("setup") ){ |
| 131 | cgi_redirect("tktsetup"); |
| 132 | } |
| 133 | isSubmit = P("submit")!=0; |
| 134 | z = P("x"); |
| 135 | if( z==0 ){ |
| @@ -164,10 +164,11 @@ | |
| 164 | @ <hr> |
| 165 | @ <h2>Default %s(zTitle)</h2> |
| 166 | @ <blockquote><pre> |
| 167 | @ %h(zDfltValue) |
| 168 | @ </pre></blockquote> |
| 169 | style_submenu_element("Back", "%R/tktsetup"); |
| 170 | style_finish_page(); |
| 171 | } |
| 172 | |
| 173 | /* |
| 174 | ** WEBPAGE: tktsetup_tab |
| @@ -523,21 +524,61 @@ | |
| 524 | @ <tr><td class="tktDspLabel">Last Modified:</td><td class="tktDspValue"> |
| 525 | @ <th1> |
| 526 | @ if {[info exists tkt_datetime]} { |
| 527 | @ html $tkt_datetime |
| 528 | @ } |
| 529 | @ if {[info exists tkt_mage]} { |
| 530 | @ html "<br>$tkt_mage" |
| 531 | @ } |
| 532 | @ </th1> |
| 533 | @ </td> |
| 534 | @ <td class="tktDspLabel">Created:</td><td class="tktDspValue"> |
| 535 | @ <th1> |
| 536 | @ if {[info exists tkt_datetime_creation]} { |
| 537 | @ html $tkt_datetime_creation |
| 538 | @ } |
| 539 | @ if {[info exists tkt_cage]} { |
| 540 | @ html "<br>$tkt_cage" |
| 541 | @ } |
| 542 | @ </th1> |
| 543 | @ </td></tr> |
| 544 | @ <th1>enable_output [hascap e]</th1> |
| 545 | @ <tr> |
| 546 | @ <td class="tktDspLabel">Contact:</td><td class="tktDspValue" colspan="3"> |
| 547 | @ $<private_contact> |
| 548 | @ </td> |
| 549 | @ </tr> |
| 550 | @ <th1>enable_output 1</th1> |
| 551 | @ <tr><td class="tktDspLabel">Version Found In:</td> |
| 552 | @ <td colspan="3" valign="top" class="tktDspValue"> |
| 553 | @ <th1> |
| 554 | @ set versionlink "" |
| 555 | @ set urlfoundin [httpize $foundin] |
| 556 | @ set tagpattern {^[-0-9A-Za-z_\\.]+$} |
| 557 | @ if [regexp $tagpattern $foundin] { |
| 558 | @ query {SELECT count(*) AS match FROM tag |
| 559 | @ WHERE tagname=concat('sym-',$foundin)} { |
| 560 | @ if {$match} {set versionlink "/timeline?t=$urlfoundin"} |
| 561 | @ } |
| 562 | @ } |
| 563 | @ set hashpattern {^[0-9a-f]+$} |
| 564 | @ if [regexp $hashpattern $foundin] { |
| 565 | @ set pattern $foundin* |
| 566 | @ query {SELECT count(*) AS match FROM blob WHERE uuid GLOB $pattern} { |
| 567 | @ if {$match} {set versionlink "/info/$urlfoundin"} |
| 568 | @ } |
| 569 | @ } |
| 570 | @ if {$versionlink eq ""} { |
| 571 | @ puts $foundin |
| 572 | @ } else { |
| 573 | @ html "<a href=\"" |
| 574 | @ puts $versionlink |
| 575 | @ html "\">" |
| 576 | @ puts $foundin |
| 577 | @ html "</a>" |
| 578 | @ } |
| 579 | @ </th1> |
| 580 | @ </td></tr> |
| 581 | @ </table> |
| 582 | @ |
| 583 | @ <th1> |
| 584 | @ wiki_assoc "ticket" $tkt_uuid |
| @@ -567,11 +608,12 @@ | |
| 608 | @ FROM ticketchng |
| 609 | @ WHERE tkt_id=$tkt_id AND length(icomment)>0} { |
| 610 | @ if {$seenRow} { |
| 611 | @ html "<hr>\n" |
| 612 | @ } else { |
| 613 | @ html "<tr><td class='tktDspLabel' style='text-align:left'>\n" |
| 614 | @ html "User Comments:</td></tr>\n" |
| 615 | @ html "<tr><td colspan='5' class='tktDspValue'>\n" |
| 616 | @ set seenRow 1 |
| 617 | @ } |
| 618 | @ html "<span class='tktDspCommenter'>" |
| 619 | @ html "[htmlize $xlogin]" |
| @@ -741,10 +783,52 @@ | |
| 783 | @ <input type="submit" name="cancel" value="Cancel"> |
| 784 | @ </td> |
| 785 | @ <td>Abandon this edit</td> |
| 786 | @ </tr> |
| 787 | @ |
| 788 | @ <th1> |
| 789 | @ set seenRow 0 |
| 790 | @ set alwaysPlaintext [info exists plaintext] |
| 791 | @ query {SELECT datetime(tkt_mtime) AS xdate, login AS xlogin, |
| 792 | @ mimetype as xmimetype, icomment AS xcomment, |
| 793 | @ username AS xusername |
| 794 | @ FROM ticketchng |
| 795 | @ WHERE tkt_id=$tkt_id AND length(icomment)>0} { |
| 796 | @ if {$seenRow} { |
| 797 | @ html "<hr>\n" |
| 798 | @ } else { |
| 799 | @ html "<tr><td colspan='2'><hr></td></tr>\n" |
| 800 | @ html "<tr><td colspan='2' class='tktDspLabel' style='text-align:left'>\n" |
| 801 | @ html "Previous User Comments:</td></tr>\n" |
| 802 | @ html "<tr><td colspan='2' class='tktDspValue'>\n" |
| 803 | @ set seenRow 1 |
| 804 | @ } |
| 805 | @ html "<span class='tktDspCommenter'>" |
| 806 | @ html "[htmlize $xlogin]" |
| 807 | @ if {$xlogin ne $xusername && [string length $xusername]>0} { |
| 808 | @ html " (claiming to be [htmlize $xusername])" |
| 809 | @ } |
| 810 | @ html " added on $xdate:" |
| 811 | @ html "</span>\n" |
| 812 | @ if {$alwaysPlaintext || $xmimetype eq "text/plain"} { |
| 813 | @ set r [randhex] |
| 814 | @ if {$xmimetype ne "text/plain"} {html "([htmlize $xmimetype])\n"} |
| 815 | @ wiki "<verbatim-$r>[string trimright $xcomment]</verbatim-$r>\n" |
| 816 | @ } elseif {$xmimetype eq "text/x-fossil-wiki"} { |
| 817 | @ wiki "<p>\n[string trimright $xcomment]\n</p>\n" |
| 818 | @ } elseif {$xmimetype eq "text/x-markdown"} { |
| 819 | @ html [lindex [markdown $xcomment] 1] |
| 820 | @ } elseif {$xmimetype eq "text/html"} { |
| 821 | @ wiki "<p><nowiki>\n[string trimright $xcomment]\n</nowiki>\n" |
| 822 | @ } else { |
| 823 | @ set r [randhex] |
| 824 | @ wiki "<verbatim-$r links>[string trimright $xcomment]</verbatim-$r>\n" |
| 825 | @ } |
| 826 | @ } |
| 827 | @ if {$seenRow} {html "</td></tr>\n"} |
| 828 | @ </th1> |
| 829 | @ |
| 830 | @ </table> |
| 831 | ; |
| 832 | |
| 833 | /* |
| 834 | ** Return the code used to generate the edit ticket page |
| @@ -839,11 +923,12 @@ | |
| 923 | @ WHEN status='Fixed' THEN '#cfe8bd' |
| 924 | @ WHEN status='Tested' THEN '#bde5d6' |
| 925 | @ WHEN status='Deferred' THEN '#cacae5' |
| 926 | @ ELSE '#c8c8c8' END AS 'bgcolor', |
| 927 | @ substr(tkt_uuid,1,10) AS '#', |
| 928 | @ datetime(tkt_ctime) AS 'created', |
| 929 | @ datetime(tkt_mtime) AS 'modified', |
| 930 | @ type, |
| 931 | @ status, |
| 932 | @ subsystem, |
| 933 | @ title, |
| 934 | @ comment AS '_comments' |
| @@ -973,8 +1058,9 @@ | |
| 1058 | @ <input type="submit" name="submit" value="Apply Changes"> |
| 1059 | @ <input type="submit" name="setup" value="Cancel"> |
| 1060 | @ </p> |
| 1061 | @ </div></form> |
| 1062 | db_end_transaction(0); |
| 1063 | style_submenu_element("Back", "%R/tktsetup"); |
| 1064 | style_finish_page(); |
| 1065 | |
| 1066 | } |
| 1067 |
+3
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -124,10 +124,13 @@ | ||
| 124 | 124 | descriptions. |
| 125 | 125 | <li> Added submenu to the 'View Ticket' page, to use it as |
| 126 | 126 | template for a new ticket. |
| 127 | 127 | <li> Added button 'Submit and New' to create multiple tickets |
| 128 | 128 | in a row. |
| 129 | + <li> Link the version field in ticket view to a matching checkin or tag. | |
| 130 | + <li> Show creation time in report and ticket view. | |
| 131 | + <li> Show previous comments in edit ticket as reference. | |
| 129 | 132 | </ol> |
| 130 | 133 | * Added the "hash" query parameter to the |
| 131 | 134 | [/help?cmd=/whatis|/whatis webpage]. |
| 132 | 135 | * Add a "user permissions changes" [/doc/trunk/www/alerts.md|subscription] |
| 133 | 136 | which alerts subscribers when an admin creates a new user or |
| 134 | 137 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -124,10 +124,13 @@ | |
| 124 | descriptions. |
| 125 | <li> Added submenu to the 'View Ticket' page, to use it as |
| 126 | template for a new ticket. |
| 127 | <li> Added button 'Submit and New' to create multiple tickets |
| 128 | in a row. |
| 129 | </ol> |
| 130 | * Added the "hash" query parameter to the |
| 131 | [/help?cmd=/whatis|/whatis webpage]. |
| 132 | * Add a "user permissions changes" [/doc/trunk/www/alerts.md|subscription] |
| 133 | which alerts subscribers when an admin creates a new user or |
| 134 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -124,10 +124,13 @@ | |
| 124 | descriptions. |
| 125 | <li> Added submenu to the 'View Ticket' page, to use it as |
| 126 | template for a new ticket. |
| 127 | <li> Added button 'Submit and New' to create multiple tickets |
| 128 | in a row. |
| 129 | <li> Link the version field in ticket view to a matching checkin or tag. |
| 130 | <li> Show creation time in report and ticket view. |
| 131 | <li> Show previous comments in edit ticket as reference. |
| 132 | </ol> |
| 133 | * Added the "hash" query parameter to the |
| 134 | [/help?cmd=/whatis|/whatis webpage]. |
| 135 | * Add a "user permissions changes" [/doc/trunk/www/alerts.md|subscription] |
| 136 | which alerts subscribers when an admin creates a new user or |
| 137 |
+3
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -124,10 +124,13 @@ | ||
| 124 | 124 | descriptions. |
| 125 | 125 | <li> Added submenu to the 'View Ticket' page, to use it as |
| 126 | 126 | template for a new ticket. |
| 127 | 127 | <li> Added button 'Submit and New' to create multiple tickets |
| 128 | 128 | in a row. |
| 129 | + <li> Link the version field in ticket view to a matching checkin or tag. | |
| 130 | + <li> Show creation time in report and ticket view. | |
| 131 | + <li> Show previous comments in edit ticket as reference. | |
| 129 | 132 | </ol> |
| 130 | 133 | * Added the "hash" query parameter to the |
| 131 | 134 | [/help?cmd=/whatis|/whatis webpage]. |
| 132 | 135 | * Add a "user permissions changes" [/doc/trunk/www/alerts.md|subscription] |
| 133 | 136 | which alerts subscribers when an admin creates a new user or |
| 134 | 137 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -124,10 +124,13 @@ | |
| 124 | descriptions. |
| 125 | <li> Added submenu to the 'View Ticket' page, to use it as |
| 126 | template for a new ticket. |
| 127 | <li> Added button 'Submit and New' to create multiple tickets |
| 128 | in a row. |
| 129 | </ol> |
| 130 | * Added the "hash" query parameter to the |
| 131 | [/help?cmd=/whatis|/whatis webpage]. |
| 132 | * Add a "user permissions changes" [/doc/trunk/www/alerts.md|subscription] |
| 133 | which alerts subscribers when an admin creates a new user or |
| 134 |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -124,10 +124,13 @@ | |
| 124 | descriptions. |
| 125 | <li> Added submenu to the 'View Ticket' page, to use it as |
| 126 | template for a new ticket. |
| 127 | <li> Added button 'Submit and New' to create multiple tickets |
| 128 | in a row. |
| 129 | <li> Link the version field in ticket view to a matching checkin or tag. |
| 130 | <li> Show creation time in report and ticket view. |
| 131 | <li> Show previous comments in edit ticket as reference. |
| 132 | </ol> |
| 133 | * Added the "hash" query parameter to the |
| 134 | [/help?cmd=/whatis|/whatis webpage]. |
| 135 | * Add a "user permissions changes" [/doc/trunk/www/alerts.md|subscription] |
| 136 | which alerts subscribers when an admin creates a new user or |
| 137 |