Fossil SCM
Improved spacing layout on the repolist table.
Commit
3aa5033b359c51364d94cdba9f8dcadff8605c5815bd71f7599ec9ee0a18d235
Parent
e69720eae3cf0b4…
1 file changed
+17
-11
+17
-11
| --- src/repolist.c | ||
| +++ src/repolist.c | ||
| @@ -173,16 +173,16 @@ | ||
| 173 | 173 | }else{ |
| 174 | 174 | Stmt q; |
| 175 | 175 | double rNow; |
| 176 | 176 | blob_append_sql(&html, |
| 177 | 177 | "<table border='0' class='sortable' data-init-sort='1'" |
| 178 | - " data-column-types='txtxtxkxt'><thead>\n" | |
| 179 | - "<tr><th>Filename<th width='20'>" | |
| 180 | - "<th>Project Name<th width='20'>" | |
| 181 | - "<th>Project Description<th width='20'>" | |
| 182 | - "<th>Last Modified<th width='20'>" | |
| 183 | - "<th>Login Group</tr>\n" | |
| 178 | + " data-column-types='txtxtxkxt' cellspacing='0' cellpadding='0'><thead>\n" | |
| 179 | + "<tr><th>Filename<th width='7'>" | |
| 180 | + "<th width='25%%'>Project Name<th width='10'>" | |
| 181 | + "<th width='25%%'>Project Description<th width='5'>" | |
| 182 | + "<th><nobr>Last Modified</nobr><th width='1'>" | |
| 183 | + "<th><nobr>Login Group</nobr></tr>\n" | |
| 184 | 184 | "</thead><tbody>\n"); |
| 185 | 185 | db_prepare(&q, "SELECT pathname" |
| 186 | 186 | " FROM sfile ORDER BY pathname COLLATE nocase;"); |
| 187 | 187 | rNow = db_double(0, "SELECT julianday('now')"); |
| 188 | 188 | while( db_step(&q)==SQLITE_ROW ){ |
| @@ -242,11 +242,11 @@ | ||
| 242 | 242 | if( x.rMTime==0.0 ){ |
| 243 | 243 | /* This repository has no entry in the "event" table. |
| 244 | 244 | ** Its age will still be maximum, so data-sortkey will work. */ |
| 245 | 245 | zAge = mprintf("unknown"); |
| 246 | 246 | } |
| 247 | - blob_append_sql(&html, "<tr><td valign='top'>"); | |
| 247 | + blob_append_sql(&html, "<tr><td valign='top'><nobr>"); | |
| 248 | 248 | if( !file_ends_with_repository_extension(zName,0) ){ |
| 249 | 249 | /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands |
| 250 | 250 | ** do not work for repositories whose names do not end in ".fossil". |
| 251 | 251 | ** So do not hyperlink those cases. */ |
| 252 | 252 | blob_append_sql(&html,"%h",zName); |
| @@ -287,28 +287,34 @@ | ||
| 287 | 287 | }else{ |
| 288 | 288 | blob_append_sql(&html, |
| 289 | 289 | "<a href='%R/%T/home' target='_blank'>%h</a>\n", |
| 290 | 290 | zUrl, zName); |
| 291 | 291 | } |
| 292 | + blob_append_sql(&html,"</nobr>"); | |
| 292 | 293 | if( x.zProjName ){ |
| 293 | - blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName); | |
| 294 | + blob_append_sql(&html, "<td></td><td valign='top'>%h</td>\n", | |
| 295 | + x.zProjName); | |
| 294 | 296 | fossil_free(x.zProjName); |
| 295 | 297 | }else{ |
| 296 | 298 | blob_append_sql(&html, "<td></td><td></td>\n"); |
| 297 | 299 | } |
| 298 | 300 | if( x.zProjDesc ){ |
| 299 | - blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjDesc); | |
| 301 | + blob_append_sql(&html, "<td></td><td valign='top'>%h</td>\n", | |
| 302 | + x.zProjDesc); | |
| 300 | 303 | fossil_free(x.zProjDesc); |
| 301 | 304 | }else{ |
| 302 | 305 | blob_append_sql(&html, "<td></td><td></td>\n"); |
| 303 | 306 | } |
| 304 | 307 | blob_append_sql(&html, |
| 305 | - "<td></td><td data-sortkey='%08x'>%h</td>\n", | |
| 308 | + "<td></td><td data-sortkey='%08x' align='center' valign='top'>" | |
| 309 | + "<nobr>%h</nobr></td>\n", | |
| 306 | 310 | (int)iAge, zAge); |
| 307 | 311 | fossil_free(zAge); |
| 308 | 312 | if( x.zLoginGroup ){ |
| 309 | - blob_append_sql(&html, "<td></td><td>%h</td></tr>\n", x.zLoginGroup); | |
| 313 | + blob_append_sql(&html, "<td></td><td valign='top'>" | |
| 314 | + "<nobr>%h</nobr></td></tr>\n", | |
| 315 | + x.zLoginGroup); | |
| 310 | 316 | fossil_free(x.zLoginGroup); |
| 311 | 317 | }else{ |
| 312 | 318 | blob_append_sql(&html, "<td></td><td></td></tr>\n"); |
| 313 | 319 | } |
| 314 | 320 | sqlite3_free(zUrl); |
| 315 | 321 |
| --- src/repolist.c | |
| +++ src/repolist.c | |
| @@ -173,16 +173,16 @@ | |
| 173 | }else{ |
| 174 | Stmt q; |
| 175 | double rNow; |
| 176 | blob_append_sql(&html, |
| 177 | "<table border='0' class='sortable' data-init-sort='1'" |
| 178 | " data-column-types='txtxtxkxt'><thead>\n" |
| 179 | "<tr><th>Filename<th width='20'>" |
| 180 | "<th>Project Name<th width='20'>" |
| 181 | "<th>Project Description<th width='20'>" |
| 182 | "<th>Last Modified<th width='20'>" |
| 183 | "<th>Login Group</tr>\n" |
| 184 | "</thead><tbody>\n"); |
| 185 | db_prepare(&q, "SELECT pathname" |
| 186 | " FROM sfile ORDER BY pathname COLLATE nocase;"); |
| 187 | rNow = db_double(0, "SELECT julianday('now')"); |
| 188 | while( db_step(&q)==SQLITE_ROW ){ |
| @@ -242,11 +242,11 @@ | |
| 242 | if( x.rMTime==0.0 ){ |
| 243 | /* This repository has no entry in the "event" table. |
| 244 | ** Its age will still be maximum, so data-sortkey will work. */ |
| 245 | zAge = mprintf("unknown"); |
| 246 | } |
| 247 | blob_append_sql(&html, "<tr><td valign='top'>"); |
| 248 | if( !file_ends_with_repository_extension(zName,0) ){ |
| 249 | /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands |
| 250 | ** do not work for repositories whose names do not end in ".fossil". |
| 251 | ** So do not hyperlink those cases. */ |
| 252 | blob_append_sql(&html,"%h",zName); |
| @@ -287,28 +287,34 @@ | |
| 287 | }else{ |
| 288 | blob_append_sql(&html, |
| 289 | "<a href='%R/%T/home' target='_blank'>%h</a>\n", |
| 290 | zUrl, zName); |
| 291 | } |
| 292 | if( x.zProjName ){ |
| 293 | blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjName); |
| 294 | fossil_free(x.zProjName); |
| 295 | }else{ |
| 296 | blob_append_sql(&html, "<td></td><td></td>\n"); |
| 297 | } |
| 298 | if( x.zProjDesc ){ |
| 299 | blob_append_sql(&html, "<td></td><td>%h</td>\n", x.zProjDesc); |
| 300 | fossil_free(x.zProjDesc); |
| 301 | }else{ |
| 302 | blob_append_sql(&html, "<td></td><td></td>\n"); |
| 303 | } |
| 304 | blob_append_sql(&html, |
| 305 | "<td></td><td data-sortkey='%08x'>%h</td>\n", |
| 306 | (int)iAge, zAge); |
| 307 | fossil_free(zAge); |
| 308 | if( x.zLoginGroup ){ |
| 309 | blob_append_sql(&html, "<td></td><td>%h</td></tr>\n", x.zLoginGroup); |
| 310 | fossil_free(x.zLoginGroup); |
| 311 | }else{ |
| 312 | blob_append_sql(&html, "<td></td><td></td></tr>\n"); |
| 313 | } |
| 314 | sqlite3_free(zUrl); |
| 315 |
| --- src/repolist.c | |
| +++ src/repolist.c | |
| @@ -173,16 +173,16 @@ | |
| 173 | }else{ |
| 174 | Stmt q; |
| 175 | double rNow; |
| 176 | blob_append_sql(&html, |
| 177 | "<table border='0' class='sortable' data-init-sort='1'" |
| 178 | " data-column-types='txtxtxkxt' cellspacing='0' cellpadding='0'><thead>\n" |
| 179 | "<tr><th>Filename<th width='7'>" |
| 180 | "<th width='25%%'>Project Name<th width='10'>" |
| 181 | "<th width='25%%'>Project Description<th width='5'>" |
| 182 | "<th><nobr>Last Modified</nobr><th width='1'>" |
| 183 | "<th><nobr>Login Group</nobr></tr>\n" |
| 184 | "</thead><tbody>\n"); |
| 185 | db_prepare(&q, "SELECT pathname" |
| 186 | " FROM sfile ORDER BY pathname COLLATE nocase;"); |
| 187 | rNow = db_double(0, "SELECT julianday('now')"); |
| 188 | while( db_step(&q)==SQLITE_ROW ){ |
| @@ -242,11 +242,11 @@ | |
| 242 | if( x.rMTime==0.0 ){ |
| 243 | /* This repository has no entry in the "event" table. |
| 244 | ** Its age will still be maximum, so data-sortkey will work. */ |
| 245 | zAge = mprintf("unknown"); |
| 246 | } |
| 247 | blob_append_sql(&html, "<tr><td valign='top'><nobr>"); |
| 248 | if( !file_ends_with_repository_extension(zName,0) ){ |
| 249 | /* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands |
| 250 | ** do not work for repositories whose names do not end in ".fossil". |
| 251 | ** So do not hyperlink those cases. */ |
| 252 | blob_append_sql(&html,"%h",zName); |
| @@ -287,28 +287,34 @@ | |
| 287 | }else{ |
| 288 | blob_append_sql(&html, |
| 289 | "<a href='%R/%T/home' target='_blank'>%h</a>\n", |
| 290 | zUrl, zName); |
| 291 | } |
| 292 | blob_append_sql(&html,"</nobr>"); |
| 293 | if( x.zProjName ){ |
| 294 | blob_append_sql(&html, "<td></td><td valign='top'>%h</td>\n", |
| 295 | x.zProjName); |
| 296 | fossil_free(x.zProjName); |
| 297 | }else{ |
| 298 | blob_append_sql(&html, "<td></td><td></td>\n"); |
| 299 | } |
| 300 | if( x.zProjDesc ){ |
| 301 | blob_append_sql(&html, "<td></td><td valign='top'>%h</td>\n", |
| 302 | x.zProjDesc); |
| 303 | fossil_free(x.zProjDesc); |
| 304 | }else{ |
| 305 | blob_append_sql(&html, "<td></td><td></td>\n"); |
| 306 | } |
| 307 | blob_append_sql(&html, |
| 308 | "<td></td><td data-sortkey='%08x' align='center' valign='top'>" |
| 309 | "<nobr>%h</nobr></td>\n", |
| 310 | (int)iAge, zAge); |
| 311 | fossil_free(zAge); |
| 312 | if( x.zLoginGroup ){ |
| 313 | blob_append_sql(&html, "<td></td><td valign='top'>" |
| 314 | "<nobr>%h</nobr></td></tr>\n", |
| 315 | x.zLoginGroup); |
| 316 | fossil_free(x.zLoginGroup); |
| 317 | }else{ |
| 318 | blob_append_sql(&html, "<td></td><td></td></tr>\n"); |
| 319 | } |
| 320 | sqlite3_free(zUrl); |
| 321 |