@@ -897,11 +894,12 @@
/* Output the separator above each entry in a table which has multiple lines
** per database entry.
*/
if( pState->iNewRow>=0 ){
- @
nCol)> |
+ @
+ @
|
}
/* Output the data for this entry from the database
*/
zBg = pState->iBg>=0 ? azArg[pState->iBg] : 0;
Index: src/tkt.c
==================================================================
--- src/tkt.c
+++ src/tkt.c
@@ -190,11 +190,14 @@
const char *zName;
Stmt q;
int i, n, size, j;
zName = PD("name","-none-");
- db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, *"
+ db_prepare(&q, "SELECT datetime(tkt_mtime,toLocal()) AS tkt_datetime, "
+ "datetime(tkt_ctime,toLocal()) AS tkt_datetime_creation, "
+ "julianday('now') - tkt_mtime, "
+ "julianday('now') - tkt_ctime, *"
" FROM ticket WHERE tkt_uuid GLOB '%q*'",
zName);
if( db_step(&q)==SQLITE_ROW ){
n = db_column_count(&q);
for(i=0; i
\n", -1);
ticket_init();
initializeVariablesFromCGI();
getAllTicketFields();
Index: src/tktsetup.c
==================================================================
--- src/tktsetup.c
+++ src/tktsetup.c
@@ -125,11 +125,11 @@
if( !g.perm.Setup ){
login_needed(0);
return;
}
style_set_current_feature("tktsetup");
- if( PB("setup") ){
+ if( P("setup") ){
cgi_redirect("tktsetup");
}
isSubmit = P("submit")!=0;
z = P("x");
if( z==0 ){
@@ -164,10 +164,11 @@
@
@ Default %s(zTitle)
@
@ %h(zDfltValue)
@
+ style_submenu_element("Back", "%R/tktsetup");
style_finish_page();
}
/*
** WEBPAGE: tktsetup_tab
@@ -493,21 +494,61 @@
@ Last Modified: |
@
@ if {[info exists tkt_datetime]} {
@ html $tkt_datetime
@ }
+@ if {[info exists tkt_mage]} {
+@ html " $tkt_mage"
+@ }
@
@ |
+@ Created: |
+@
+@ if {[info exists tkt_datetime_creation]} {
+@ html $tkt_datetime_creation
+@ }
+@ if {[info exists tkt_cage]} {
+@ html " $tkt_cage"
+@ }
+@
+@ |
@ enable_output [hascap e]
-@ Contact: |
+@ |
+@ Contact: |
@ $
@ |
+@
@ enable_output 1
-@
@ Version Found In: |
@
-@ $
+@
+@ set versionlink ""
+@ set urlfoundin [httpize $foundin]
+@ set tagpattern {^[-0-9A-Za-z_\\.]+$}
+@ if [regexp $tagpattern $foundin] {
+@ query {SELECT count(*) AS match FROM tag
+@ WHERE tagname=concat('sym-',$foundin)} {
+@ if {$match} {set versionlink "/timeline?t=$urlfoundin"}
+@ }
+@ }
+@ set hashpattern {^[0-9a-f]+$}
+@ if [regexp $hashpattern $foundin] {
+@ set pattern $foundin*
+@ query {SELECT count(*) AS match FROM blob WHERE uuid GLOB $pattern} {
+@ if {$match} {set versionlink "/info/$urlfoundin"}
+@ }
+@ }
+@ if {$versionlink eq ""} {
+@ puts $foundin
+@ } else {
+@ html ""
+@ puts $foundin
+@ html ""
+@ }
+@
@ |
@
@
@
@ wiki_assoc "ticket" $tkt_uuid
@@ -537,11 +578,12 @@
@ FROM ticketchng
@ WHERE tkt_id=$tkt_id AND length(icomment)>0} {
@ if {$seenRow} {
@ html "
\n"
@ } else {
-@ html "User Comments: |
\n"
+@ html "\n"
+@ html "User Comments: |
\n"
@ html "\n"
@ set seenRow 1
@ }
@ html " |
@ Abandon this edit |
@
@
+@
+@ set seenRow 0
+@ set alwaysPlaintext [info exists plaintext]
+@ query {SELECT datetime(tkt_mtime) 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} {
+@ if {$seenRow} {
+@ html "
\n"
+@ } else {
+@ html "
|
\n"
+@ html "\n"
+@ html "Previous User Comments: |
\n"
+@ html "\n"
+@ set seenRow 1
+@ }
+@ html "\n"
+@ if {$alwaysPlaintext || $xmimetype eq "text/plain"} {
+@ set r [randhex]
+@ if {$xmimetype ne "text/plain"} {html "([htmlize $xmimetype])\n"}
+@ wiki "[string trimright $xcomment]\n"
+@ } elseif {$xmimetype eq "text/x-fossil-wiki"} {
+@ wiki " \n[string trimright $xcomment]\n \n"
+@ } elseif {$xmimetype eq "text/x-markdown"} {
+@ html [lindex [markdown $xcomment] 1]
+@ } elseif {$xmimetype eq "text/html"} {
+@ wiki "\n[string trimright $xcomment]\n\n"
+@ } else {
+@ set r [randhex]
+@ wiki "[string trimright $xcomment]\n"
+@ }
+@ }
+@ if {$seenRow} {html " |
\n"}
+@
+@
@
;
/*
** Return the code used to generate the edit ticket page
@@ -809,11 +893,12 @@
@ WHEN status='Fixed' THEN '#cfe8bd'
@ WHEN status='Tested' THEN '#bde5d6'
@ WHEN status='Deferred' THEN '#cacae5'
@ ELSE '#c8c8c8' END AS 'bgcolor',
@ substr(tkt_uuid,1,10) AS '#',
-@ datetime(tkt_mtime) AS 'mtime',
+@ datetime(tkt_ctime) AS 'created',
+@ datetime(tkt_mtime) AS 'modified',
@ type,
@ status,
@ subsystem,
@ title,
@ comment AS '_comments'
@@ -943,8 +1028,9 @@
@
@
@
@