Fossil SCM

Improved spacing layout on the repolist table.

drh 2025-04-10 12:28 trunk
Commit 3aa5033b359c51364d94cdba9f8dcadff8605c5815bd71f7599ec9ee0a18d235
1 file changed +17 -11
+17 -11
--- src/repolist.c
+++ src/repolist.c
@@ -173,16 +173,16 @@
173173
}else{
174174
Stmt q;
175175
double rNow;
176176
blob_append_sql(&html,
177177
"<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"
184184
"</thead><tbody>\n");
185185
db_prepare(&q, "SELECT pathname"
186186
" FROM sfile ORDER BY pathname COLLATE nocase;");
187187
rNow = db_double(0, "SELECT julianday('now')");
188188
while( db_step(&q)==SQLITE_ROW ){
@@ -242,11 +242,11 @@
242242
if( x.rMTime==0.0 ){
243243
/* This repository has no entry in the "event" table.
244244
** Its age will still be maximum, so data-sortkey will work. */
245245
zAge = mprintf("unknown");
246246
}
247
- blob_append_sql(&html, "<tr><td valign='top'>");
247
+ blob_append_sql(&html, "<tr><td valign='top'><nobr>");
248248
if( !file_ends_with_repository_extension(zName,0) ){
249249
/* The "fossil server DIRECTORY" and "fossil ui DIRECTORY" commands
250250
** do not work for repositories whose names do not end in ".fossil".
251251
** So do not hyperlink those cases. */
252252
blob_append_sql(&html,"%h",zName);
@@ -287,28 +287,34 @@
287287
}else{
288288
blob_append_sql(&html,
289289
"<a href='%R/%T/home' target='_blank'>%h</a>\n",
290290
zUrl, zName);
291291
}
292
+ blob_append_sql(&html,"</nobr>");
292293
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);
294296
fossil_free(x.zProjName);
295297
}else{
296298
blob_append_sql(&html, "<td></td><td></td>\n");
297299
}
298300
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);
300303
fossil_free(x.zProjDesc);
301304
}else{
302305
blob_append_sql(&html, "<td></td><td></td>\n");
303306
}
304307
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",
306310
(int)iAge, zAge);
307311
fossil_free(zAge);
308312
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);
310316
fossil_free(x.zLoginGroup);
311317
}else{
312318
blob_append_sql(&html, "<td></td><td></td></tr>\n");
313319
}
314320
sqlite3_free(zUrl);
315321
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button