Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Styled the vinfo page |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
cfc7984edead9fa6c1adfb4c9f4c6f86 |
| User & Date: | jnc 2007-09-25 20:21:27.000 |
Context
|
2007-09-25
| ||
| 21:21 | Fixed many uninitialized variable warnings and some potential bug found via -Wall -Werror on gcc. ... (check-in: e63a9fd9d0 user: jnc tags: trunk) | |
| 20:39 | Merge the vinfo CSS patches. ... (check-in: 16551da2e3 user: drh tags: trunk) | |
| 20:21 | Styled the vinfo page ... (check-in: cfc7984ede user: jnc tags: trunk) | |
| 19:32 | Merger w/fossil chat update (5e3f) ... (check-in: e6d1cd9679 user: jnc tags: trunk) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
131 132 133 134 135 136 137 |
const char *zUuid = db_column_text(&q, 1);
const char *zDate = db_column_text(&q, 2);
const char *zUser = db_column_text(&q, 3);
const char *zCom = db_column_text(&q, 4);
cnt++;
if( cnt==1 ){
if( zTitle ){
| | | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
const char *zUuid = db_column_text(&q, 1);
const char *zDate = db_column_text(&q, 2);
const char *zUser = db_column_text(&q, 3);
const char *zCom = db_column_text(&q, 4);
cnt++;
if( cnt==1 ){
if( zTitle ){
@ <div class="section-title">%s(zTitle)</div>
}
@ <ul>
}
@ <li>
hyperlink_to_uuid(zUuid);
@ %s(zCom) (by %s(zUser) on %s(zDate))
if( depth ){
|
| ︙ | ︙ | |||
182 183 184 185 186 187 188 |
const char *zUuid = db_column_text(&q, 1);
const char *zDate = db_column_text(&q, 2);
const char *zUser = db_column_text(&q, 3);
const char *zCom = db_column_text(&q, 4);
cnt++;
if( cnt==1 ){
if( zTitle ){
| | | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
const char *zUuid = db_column_text(&q, 1);
const char *zDate = db_column_text(&q, 2);
const char *zUser = db_column_text(&q, 3);
const char *zCom = db_column_text(&q, 4);
cnt++;
if( cnt==1 ){
if( zTitle ){
@ <div class="section-title">%s(zTitle)</div>
}
@ <ul>
}
@ <li>
hyperlink_to_uuid(zUuid);
@ %s(zCom) (by %s(zUser) on %s(zDate))
if( depth ){
|
| ︙ | ︙ | |||
222 223 224 225 226 227 228 |
while( db_step(&q)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q, 0);
const char *zDate = db_column_text(&q, 1);
const char *zUser = db_column_text(&q, 2);
const char *zCom = db_column_text(&q, 3);
cnt++;
if( cnt==1 ){
| | | 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
while( db_step(&q)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q, 0);
const char *zDate = db_column_text(&q, 1);
const char *zUser = db_column_text(&q, 2);
const char *zCom = db_column_text(&q, 3);
cnt++;
if( cnt==1 ){
@ <div class="section-title">Leaves</div>
@ <ul>
}
@ <li>
hyperlink_to_uuid(zUuid);
@ %s(zCom) (by %s(zUser) on %s(zDate))
}
db_finalize(&q);
|
| ︙ | ︙ | |||
258 259 260 261 262 263 264 |
int srcid = db_column_int(&q, 2);
const char *zUuid = db_column_text(&q, 3);
const char *zValue = db_column_text(&q, 4);
const char *zDate = db_column_text(&q, 5);
int tagtype = db_column_int(&q, 6);
cnt++;
if( cnt==1 ){
| | | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
int srcid = db_column_int(&q, 2);
const char *zUuid = db_column_text(&q, 3);
const char *zValue = db_column_text(&q, 4);
const char *zDate = db_column_text(&q, 5);
int tagtype = db_column_int(&q, 6);
cnt++;
if( cnt==1 ){
@ <div class="section-title">Tags And Properties</div>
@ <ul>
}
@ <li>
@ <b>%h(zTagname)</b>
if( zValue ){
@ = %h(zValue)<i>
}else if( tagtype==0 ){
|
| ︙ | ︙ | |||
298 299 300 301 302 303 304 |
void vinfo_page(void){
Stmt q;
int rid;
int isLeaf;
login_check_credentials();
if( !g.okHistory ){ login_needed(); return; }
| < > > > > | > | > | > > > | | > > | | | < < < > | > > > | | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
void vinfo_page(void){
Stmt q;
int rid;
int isLeaf;
login_check_credentials();
if( !g.okHistory ){ login_needed(); return; }
rid = name_to_rid(g.zExtra);
if( rid==0 ){
style_header("Version Information Error");
@ No such object: %h(g.argv[2])
style_footer();
return;
}
isLeaf = !db_exists("SELECT 1 FROM plink WHERE pid=%d", rid);
db_prepare(&q,
"SELECT uuid, datetime(mtime, 'localtime'), user, comment"
" FROM blob, event"
" WHERE blob.rid=%d"
" AND event.objid=%d",
rid, rid
);
if( db_step(&q)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q, 0);
char *zTitle = mprintf("Version: [%.10s]", zUuid);
style_header(zTitle);
free(zTitle);
/*@ <h2>Version %s(zUuid)</h2>*/
@ <div class="section-title">Overview</div>
@ <p><table class="label-value">
@ <tr><th>Version:</th><td>%s(zUuid)</td></tr>
@ <tr><th>Date:</th><td>%s(db_column_text(&q, 1))</td></tr>
if( g.okSetup ){
@ <tr><th>Record ID:</th><td>%d(rid)</td></tr>
}
@ <tr><th>Original User:</th><td>%s(db_column_text(&q, 2))</td></tr>
@ <tr><th>Original Comment:</th><td>%s(db_column_text(&q, 3))</td></tr>
@ <tr><th>Commands:</th>
@ <td>
@ <a href="%s(g.zBaseURL)/vdiff/%d(rid)">diff</a>
@ | <a href="%s(g.zBaseURL)/zip/%s(zUuid).zip">ZIP archive</a>
@ | <a href="%s(g.zBaseURL)/fview/%d(rid)">manifest</a>
@ </td>
@ </tr>
@ </table></p>
}else{
style_header("Version Information");
}
db_finalize(&q);
showTags(rid);
@ <div class="section-title">Changes</div>
@ <ul>
db_prepare(&q,
"SELECT name, pid, fid"
" FROM mlink, filename"
" WHERE mid=%d"
" AND filename.fnid=mlink.fnid",
rid
|
| ︙ | ︙ |
Changes to src/style.c.
| ︙ | ︙ | |||
293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
@ #style-footer {
@ font-size: 0.8em;
@ margin-top: 12px;
@ padding: 5px 10px 5px 10px;
@ text-align: right;
@ background-color: #414f84;
@ color: white;
@ }
}
}
/*
** WEBPAGE: test_env
*/
| > > > > > > > > > > > > | 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
@ #style-footer {
@ font-size: 0.8em;
@ margin-top: 12px;
@ padding: 5px 10px 5px 10px;
@ text-align: right;
@ background-color: #414f84;
@ color: white;
@ }
@ table.label-value th {
@ text-align: right;
@ vertical-align: top;
@ }
@ div.section-title {
@ margin-bottom: 0px;
@ padding: 1px 1px 1px 1px;
@ font-size: 1.2em;
@ font-weight: bold;
@ background-color: #6a7ec7;
@ color: #0a1e67;
@ }
}
}
/*
** WEBPAGE: test_env
*/
|
| ︙ | ︙ |