Fossil SCM
Styled the vinfo page
Commit
cfc7984edead9fa6c1adfb4c9f4c6f868d1e2c95
Parent
e6d1cd96793dcbf…
2 files changed
+27
-16
+12
+27
-16
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -133,11 +133,11 @@ | ||
| 133 | 133 | const char *zUser = db_column_text(&q, 3); |
| 134 | 134 | const char *zCom = db_column_text(&q, 4); |
| 135 | 135 | cnt++; |
| 136 | 136 | if( cnt==1 ){ |
| 137 | 137 | if( zTitle ){ |
| 138 | - @ <h2>%s(zTitle)</h2> | |
| 138 | + @ <div class="section-title">%s(zTitle)</div> | |
| 139 | 139 | } |
| 140 | 140 | @ <ul> |
| 141 | 141 | } |
| 142 | 142 | @ <li> |
| 143 | 143 | hyperlink_to_uuid(zUuid); |
| @@ -184,11 +184,11 @@ | ||
| 184 | 184 | const char *zUser = db_column_text(&q, 3); |
| 185 | 185 | const char *zCom = db_column_text(&q, 4); |
| 186 | 186 | cnt++; |
| 187 | 187 | if( cnt==1 ){ |
| 188 | 188 | if( zTitle ){ |
| 189 | - @ <h2>%s(zTitle)</h2> | |
| 189 | + @ <div class="section-title">%s(zTitle)</div> | |
| 190 | 190 | } |
| 191 | 191 | @ <ul> |
| 192 | 192 | } |
| 193 | 193 | @ <li> |
| 194 | 194 | hyperlink_to_uuid(zUuid); |
| @@ -224,11 +224,11 @@ | ||
| 224 | 224 | const char *zDate = db_column_text(&q, 1); |
| 225 | 225 | const char *zUser = db_column_text(&q, 2); |
| 226 | 226 | const char *zCom = db_column_text(&q, 3); |
| 227 | 227 | cnt++; |
| 228 | 228 | if( cnt==1 ){ |
| 229 | - @ <h2>Leaves</h2> | |
| 229 | + @ <div class="section-title">Leaves</div> | |
| 230 | 230 | @ <ul> |
| 231 | 231 | } |
| 232 | 232 | @ <li> |
| 233 | 233 | hyperlink_to_uuid(zUuid); |
| 234 | 234 | @ %s(zCom) (by %s(zUser) on %s(zDate)) |
| @@ -260,11 +260,11 @@ | ||
| 260 | 260 | const char *zValue = db_column_text(&q, 4); |
| 261 | 261 | const char *zDate = db_column_text(&q, 5); |
| 262 | 262 | int tagtype = db_column_int(&q, 6); |
| 263 | 263 | cnt++; |
| 264 | 264 | if( cnt==1 ){ |
| 265 | - @ <h2>Tags And Properties</h2> | |
| 265 | + @ <div class="section-title">Tags And Properties</div> | |
| 266 | 266 | @ <ul> |
| 267 | 267 | } |
| 268 | 268 | @ <li> |
| 269 | 269 | @ <b>%h(zTagname)</b> |
| 270 | 270 | if( zValue ){ |
| @@ -300,13 +300,13 @@ | ||
| 300 | 300 | int rid; |
| 301 | 301 | int isLeaf; |
| 302 | 302 | |
| 303 | 303 | login_check_credentials(); |
| 304 | 304 | if( !g.okHistory ){ login_needed(); return; } |
| 305 | - style_header("Version Information"); | |
| 306 | 305 | rid = name_to_rid(g.zExtra); |
| 307 | 306 | if( rid==0 ){ |
| 307 | + style_header("Version Information Error"); | |
| 308 | 308 | @ No such object: %h(g.argv[2]) |
| 309 | 309 | style_footer(); |
| 310 | 310 | return; |
| 311 | 311 | } |
| 312 | 312 | isLeaf = !db_exists("SELECT 1 FROM plink WHERE pid=%d", rid); |
| @@ -317,26 +317,37 @@ | ||
| 317 | 317 | " AND event.objid=%d", |
| 318 | 318 | rid, rid |
| 319 | 319 | ); |
| 320 | 320 | if( db_step(&q)==SQLITE_ROW ){ |
| 321 | 321 | const char *zUuid = db_column_text(&q, 0); |
| 322 | - @ <h2>Version %s(zUuid)</h2> | |
| 323 | - @ <ul> | |
| 324 | - @ <li><b>Date:</b> %s(db_column_text(&q, 1))</li> | |
| 325 | - @ <li><b>Original User:</b> %s(db_column_text(&q, 2))</li> | |
| 326 | - @ <li><b>Original Comment:</b> %s(db_column_text(&q, 3))</li> | |
| 327 | - @ <li><a href="%s(g.zBaseURL)/vdiff/%d(rid)">diff</a></li> | |
| 328 | - @ <li><a href="%s(g.zBaseURL)/zip/%s(zUuid).zip">ZIP archive</a></li> | |
| 329 | - @ <li><a href="%s(g.zBaseURL)/fview/%d(rid)">manifest</a></li> | |
| 322 | + char *zTitle = mprintf("Version: [%.10s]", zUuid); | |
| 323 | + style_header(zTitle); | |
| 324 | + free(zTitle); | |
| 325 | + /*@ <h2>Version %s(zUuid)</h2>*/ | |
| 326 | + @ <div class="section-title">Overview</div> | |
| 327 | + @ <p><table class="label-value"> | |
| 328 | + @ <tr><th>Version:</th><td>%s(zUuid)</td></tr> | |
| 329 | + @ <tr><th>Date:</th><td>%s(db_column_text(&q, 1))</td></tr> | |
| 330 | 330 | if( g.okSetup ){ |
| 331 | - @ <li><b>Record ID:</b> %d(rid)</li> | |
| 331 | + @ <tr><th>Record ID:</th><td>%d(rid)</td></tr> | |
| 332 | 332 | } |
| 333 | - @ </ul> | |
| 333 | + @ <tr><th>Original User:</th><td>%s(db_column_text(&q, 2))</td></tr> | |
| 334 | + @ <tr><th>Original Comment:</th><td>%s(db_column_text(&q, 3))</td></tr> | |
| 335 | + @ <tr><th>Commands:</th> | |
| 336 | + @ <td> | |
| 337 | + @ <a href="%s(g.zBaseURL)/vdiff/%d(rid)">diff</a> | |
| 338 | + @ | <a href="%s(g.zBaseURL)/zip/%s(zUuid).zip">ZIP archive</a> | |
| 339 | + @ | <a href="%s(g.zBaseURL)/fview/%d(rid)">manifest</a> | |
| 340 | + @ </td> | |
| 341 | + @ </tr> | |
| 342 | + @ </table></p> | |
| 343 | + }else{ | |
| 344 | + style_header("Version Information"); | |
| 334 | 345 | } |
| 335 | 346 | db_finalize(&q); |
| 336 | 347 | showTags(rid); |
| 337 | - @ <p><h2>Changes:</h2> | |
| 348 | + @ <div class="section-title">Changes</div> | |
| 338 | 349 | @ <ul> |
| 339 | 350 | db_prepare(&q, |
| 340 | 351 | "SELECT name, pid, fid" |
| 341 | 352 | " FROM mlink, filename" |
| 342 | 353 | " WHERE mid=%d" |
| 343 | 354 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -133,11 +133,11 @@ | |
| 133 | const char *zUser = db_column_text(&q, 3); |
| 134 | const char *zCom = db_column_text(&q, 4); |
| 135 | cnt++; |
| 136 | if( cnt==1 ){ |
| 137 | if( zTitle ){ |
| 138 | @ <h2>%s(zTitle)</h2> |
| 139 | } |
| 140 | @ <ul> |
| 141 | } |
| 142 | @ <li> |
| 143 | hyperlink_to_uuid(zUuid); |
| @@ -184,11 +184,11 @@ | |
| 184 | const char *zUser = db_column_text(&q, 3); |
| 185 | const char *zCom = db_column_text(&q, 4); |
| 186 | cnt++; |
| 187 | if( cnt==1 ){ |
| 188 | if( zTitle ){ |
| 189 | @ <h2>%s(zTitle)</h2> |
| 190 | } |
| 191 | @ <ul> |
| 192 | } |
| 193 | @ <li> |
| 194 | hyperlink_to_uuid(zUuid); |
| @@ -224,11 +224,11 @@ | |
| 224 | const char *zDate = db_column_text(&q, 1); |
| 225 | const char *zUser = db_column_text(&q, 2); |
| 226 | const char *zCom = db_column_text(&q, 3); |
| 227 | cnt++; |
| 228 | if( cnt==1 ){ |
| 229 | @ <h2>Leaves</h2> |
| 230 | @ <ul> |
| 231 | } |
| 232 | @ <li> |
| 233 | hyperlink_to_uuid(zUuid); |
| 234 | @ %s(zCom) (by %s(zUser) on %s(zDate)) |
| @@ -260,11 +260,11 @@ | |
| 260 | const char *zValue = db_column_text(&q, 4); |
| 261 | const char *zDate = db_column_text(&q, 5); |
| 262 | int tagtype = db_column_int(&q, 6); |
| 263 | cnt++; |
| 264 | if( cnt==1 ){ |
| 265 | @ <h2>Tags And Properties</h2> |
| 266 | @ <ul> |
| 267 | } |
| 268 | @ <li> |
| 269 | @ <b>%h(zTagname)</b> |
| 270 | if( zValue ){ |
| @@ -300,13 +300,13 @@ | |
| 300 | int rid; |
| 301 | int isLeaf; |
| 302 | |
| 303 | login_check_credentials(); |
| 304 | if( !g.okHistory ){ login_needed(); return; } |
| 305 | style_header("Version Information"); |
| 306 | rid = name_to_rid(g.zExtra); |
| 307 | if( rid==0 ){ |
| 308 | @ No such object: %h(g.argv[2]) |
| 309 | style_footer(); |
| 310 | return; |
| 311 | } |
| 312 | isLeaf = !db_exists("SELECT 1 FROM plink WHERE pid=%d", rid); |
| @@ -317,26 +317,37 @@ | |
| 317 | " AND event.objid=%d", |
| 318 | rid, rid |
| 319 | ); |
| 320 | if( db_step(&q)==SQLITE_ROW ){ |
| 321 | const char *zUuid = db_column_text(&q, 0); |
| 322 | @ <h2>Version %s(zUuid)</h2> |
| 323 | @ <ul> |
| 324 | @ <li><b>Date:</b> %s(db_column_text(&q, 1))</li> |
| 325 | @ <li><b>Original User:</b> %s(db_column_text(&q, 2))</li> |
| 326 | @ <li><b>Original Comment:</b> %s(db_column_text(&q, 3))</li> |
| 327 | @ <li><a href="%s(g.zBaseURL)/vdiff/%d(rid)">diff</a></li> |
| 328 | @ <li><a href="%s(g.zBaseURL)/zip/%s(zUuid).zip">ZIP archive</a></li> |
| 329 | @ <li><a href="%s(g.zBaseURL)/fview/%d(rid)">manifest</a></li> |
| 330 | if( g.okSetup ){ |
| 331 | @ <li><b>Record ID:</b> %d(rid)</li> |
| 332 | } |
| 333 | @ </ul> |
| 334 | } |
| 335 | db_finalize(&q); |
| 336 | showTags(rid); |
| 337 | @ <p><h2>Changes:</h2> |
| 338 | @ <ul> |
| 339 | db_prepare(&q, |
| 340 | "SELECT name, pid, fid" |
| 341 | " FROM mlink, filename" |
| 342 | " WHERE mid=%d" |
| 343 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -133,11 +133,11 @@ | |
| 133 | const char *zUser = db_column_text(&q, 3); |
| 134 | const char *zCom = db_column_text(&q, 4); |
| 135 | cnt++; |
| 136 | if( cnt==1 ){ |
| 137 | if( zTitle ){ |
| 138 | @ <div class="section-title">%s(zTitle)</div> |
| 139 | } |
| 140 | @ <ul> |
| 141 | } |
| 142 | @ <li> |
| 143 | hyperlink_to_uuid(zUuid); |
| @@ -184,11 +184,11 @@ | |
| 184 | const char *zUser = db_column_text(&q, 3); |
| 185 | const char *zCom = db_column_text(&q, 4); |
| 186 | cnt++; |
| 187 | if( cnt==1 ){ |
| 188 | if( zTitle ){ |
| 189 | @ <div class="section-title">%s(zTitle)</div> |
| 190 | } |
| 191 | @ <ul> |
| 192 | } |
| 193 | @ <li> |
| 194 | hyperlink_to_uuid(zUuid); |
| @@ -224,11 +224,11 @@ | |
| 224 | const char *zDate = db_column_text(&q, 1); |
| 225 | const char *zUser = db_column_text(&q, 2); |
| 226 | const char *zCom = db_column_text(&q, 3); |
| 227 | cnt++; |
| 228 | if( cnt==1 ){ |
| 229 | @ <div class="section-title">Leaves</div> |
| 230 | @ <ul> |
| 231 | } |
| 232 | @ <li> |
| 233 | hyperlink_to_uuid(zUuid); |
| 234 | @ %s(zCom) (by %s(zUser) on %s(zDate)) |
| @@ -260,11 +260,11 @@ | |
| 260 | const char *zValue = db_column_text(&q, 4); |
| 261 | const char *zDate = db_column_text(&q, 5); |
| 262 | int tagtype = db_column_int(&q, 6); |
| 263 | cnt++; |
| 264 | if( cnt==1 ){ |
| 265 | @ <div class="section-title">Tags And Properties</div> |
| 266 | @ <ul> |
| 267 | } |
| 268 | @ <li> |
| 269 | @ <b>%h(zTagname)</b> |
| 270 | if( zValue ){ |
| @@ -300,13 +300,13 @@ | |
| 300 | int rid; |
| 301 | int isLeaf; |
| 302 | |
| 303 | login_check_credentials(); |
| 304 | if( !g.okHistory ){ login_needed(); return; } |
| 305 | rid = name_to_rid(g.zExtra); |
| 306 | if( rid==0 ){ |
| 307 | style_header("Version Information Error"); |
| 308 | @ No such object: %h(g.argv[2]) |
| 309 | style_footer(); |
| 310 | return; |
| 311 | } |
| 312 | isLeaf = !db_exists("SELECT 1 FROM plink WHERE pid=%d", rid); |
| @@ -317,26 +317,37 @@ | |
| 317 | " AND event.objid=%d", |
| 318 | rid, rid |
| 319 | ); |
| 320 | if( db_step(&q)==SQLITE_ROW ){ |
| 321 | const char *zUuid = db_column_text(&q, 0); |
| 322 | char *zTitle = mprintf("Version: [%.10s]", zUuid); |
| 323 | style_header(zTitle); |
| 324 | free(zTitle); |
| 325 | /*@ <h2>Version %s(zUuid)</h2>*/ |
| 326 | @ <div class="section-title">Overview</div> |
| 327 | @ <p><table class="label-value"> |
| 328 | @ <tr><th>Version:</th><td>%s(zUuid)</td></tr> |
| 329 | @ <tr><th>Date:</th><td>%s(db_column_text(&q, 1))</td></tr> |
| 330 | if( g.okSetup ){ |
| 331 | @ <tr><th>Record ID:</th><td>%d(rid)</td></tr> |
| 332 | } |
| 333 | @ <tr><th>Original User:</th><td>%s(db_column_text(&q, 2))</td></tr> |
| 334 | @ <tr><th>Original Comment:</th><td>%s(db_column_text(&q, 3))</td></tr> |
| 335 | @ <tr><th>Commands:</th> |
| 336 | @ <td> |
| 337 | @ <a href="%s(g.zBaseURL)/vdiff/%d(rid)">diff</a> |
| 338 | @ | <a href="%s(g.zBaseURL)/zip/%s(zUuid).zip">ZIP archive</a> |
| 339 | @ | <a href="%s(g.zBaseURL)/fview/%d(rid)">manifest</a> |
| 340 | @ </td> |
| 341 | @ </tr> |
| 342 | @ </table></p> |
| 343 | }else{ |
| 344 | style_header("Version Information"); |
| 345 | } |
| 346 | db_finalize(&q); |
| 347 | showTags(rid); |
| 348 | @ <div class="section-title">Changes</div> |
| 349 | @ <ul> |
| 350 | db_prepare(&q, |
| 351 | "SELECT name, pid, fid" |
| 352 | " FROM mlink, filename" |
| 353 | " WHERE mid=%d" |
| 354 |
+12
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -295,10 +295,22 @@ | ||
| 295 | 295 | @ margin-top: 12px; |
| 296 | 296 | @ padding: 5px 10px 5px 10px; |
| 297 | 297 | @ text-align: right; |
| 298 | 298 | @ background-color: #414f84; |
| 299 | 299 | @ color: white; |
| 300 | + @ } | |
| 301 | + @ table.label-value th { | |
| 302 | + @ text-align: right; | |
| 303 | + @ vertical-align: top; | |
| 304 | + @ } | |
| 305 | + @ div.section-title { | |
| 306 | + @ margin-bottom: 0px; | |
| 307 | + @ padding: 1px 1px 1px 1px; | |
| 308 | + @ font-size: 1.2em; | |
| 309 | + @ font-weight: bold; | |
| 310 | + @ background-color: #6a7ec7; | |
| 311 | + @ color: #0a1e67; | |
| 300 | 312 | @ } |
| 301 | 313 | } |
| 302 | 314 | } |
| 303 | 315 | |
| 304 | 316 | /* |
| 305 | 317 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -295,10 +295,22 @@ | |
| 295 | @ margin-top: 12px; |
| 296 | @ padding: 5px 10px 5px 10px; |
| 297 | @ text-align: right; |
| 298 | @ background-color: #414f84; |
| 299 | @ color: white; |
| 300 | @ } |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | /* |
| 305 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -295,10 +295,22 @@ | |
| 295 | @ margin-top: 12px; |
| 296 | @ padding: 5px 10px 5px 10px; |
| 297 | @ text-align: right; |
| 298 | @ background-color: #414f84; |
| 299 | @ color: white; |
| 300 | @ } |
| 301 | @ table.label-value th { |
| 302 | @ text-align: right; |
| 303 | @ vertical-align: top; |
| 304 | @ } |
| 305 | @ div.section-title { |
| 306 | @ margin-bottom: 0px; |
| 307 | @ padding: 1px 1px 1px 1px; |
| 308 | @ font-size: 1.2em; |
| 309 | @ font-weight: bold; |
| 310 | @ background-color: #6a7ec7; |
| 311 | @ color: #0a1e67; |
| 312 | @ } |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | /* |
| 317 |