734
735
736
737
738
739
740
741
742
743
744
745
746
747
|
@ <input type="submit" name="setdflt" value="Set">
}else{
@ (Selected)
seenDefault = 1;
}
if( pAltSkin==&aBuiltinSkin[i] && iSkinSource!=SKIN_FROM_SETTING ){
@ (Override)
}
@ </form></td></tr>
}
if( zOverride ){
@ <tr><td> <td colspan="3">
@ <p>Note: Built-in skin "%h(zOverride)" is currently being used because of
switch( iSkinSource ){
|
>
|
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
|
@ <input type="submit" name="setdflt" value="Set">
}else{
@ (Selected)
seenDefault = 1;
}
if( pAltSkin==&aBuiltinSkin[i] && iSkinSource!=SKIN_FROM_SETTING ){
@ (Override)
zOverride = z;
}
@ </form></td></tr>
}
if( zOverride ){
@ <tr><td> <td colspan="3">
@ <p>Note: Built-in skin "%h(zOverride)" is currently being used because of
switch( iSkinSource ){
|
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
|
** Show a list of all of the built-in skins, plus the responsitory skin,
** and provide the user with an opportunity to change to any of them.
*/
void skins_page(void){
int i;
char *zBase = fossil_strdup(g.zTop);
size_t nBase = strlen(zBase);
if( iDraftSkin && sqlite3_strglob("*/draft?", zBase)==0 ){
nBase -= 7;
zBase[nBase] = 0;
}else if( pAltSkin ){
char *zPattern = mprintf("*/skn_%s", pAltSkin->zLabel);
if( sqlite3_strglob(zPattern, zBase)==0 ){
nBase -= strlen(zPattern)-1;
zBase[nBase] = 0;
}
fossil_free(zPattern);
}
login_check_credentials();
style_header("Skins");
if( iDraftSkin || nSkinRank<=1 ){
@ <p class="warning">Warning:
if( iDraftSkin>0 ){
@ you are using a draft skin,
}else{
@ this fossil instance was started with a hard-coded skin
@ value
}
@ which supercedes any option selected below. A skin selected
@ below will be recorded in your
@ "%z(href("%R/fdscookie"))fossil_display_settings</a>" cookie
@ but will not be used so long as the site has a
@ higher-priority skin in place.
@ </p>
}
@ <p>The following skins are available for this repository:</p>
@ <ul>
if( pAltSkin==0 && zAltSkinDir==0 && iDraftSkin==0 ){
@ <li> Custom skin for this repository ← <i>Currently in use</i>
}else{
@ <li> %z(href("%R/skins?skin="))Custom skin for this repository</a>
}
for(i=0; i<count(aBuiltinSkin); i++){
if( pAltSkin==&aBuiltinSkin[i] ){
@ <li> %h(aBuiltinSkin[i].zDesc) ← <i>Currently in use</i>
}else{
char *zUrl = href("%R/skins?skin=%T", aBuiltinSkin[i].zLabel);
@ <li> %z(zUrl)%h(aBuiltinSkin[i].zDesc)</a>
}
|
>
<
<
<
<
<
<
|
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
|
** Show a list of all of the built-in skins, plus the responsitory skin,
** and provide the user with an opportunity to change to any of them.
*/
void skins_page(void){
int i;
char *zBase = fossil_strdup(g.zTop);
size_t nBase = strlen(zBase);
login_check_credentials();
if( iDraftSkin && sqlite3_strglob("*/draft?", zBase)==0 ){
nBase -= 7;
zBase[nBase] = 0;
}else if( pAltSkin ){
char *zPattern = mprintf("*/skn_%s", pAltSkin->zLabel);
if( sqlite3_strglob(zPattern, zBase)==0 ){
nBase -= strlen(zPattern)-1;
zBase[nBase] = 0;
}
fossil_free(zPattern);
}
style_header("Skins");
if( iDraftSkin || nSkinRank<=1 ){
@ <p class="warning">Warning:
if( iDraftSkin>0 ){
@ you are using a draft skin,
}else{
@ this fossil instance was started with a hard-coded skin
@ value
}
@ which supercedes any option selected below. A skin selected
@ below will be recorded in your
@ "%z(href("%R/fdscookie"))fossil_display_settings</a>" cookie
@ but will not be used so long as the site has a
@ higher-priority skin in place.
@ </p>
}
@ <p>The following skins are available for this repository:</p>
@ <ul>
for(i=0; i<count(aBuiltinSkin); i++){
if( pAltSkin==&aBuiltinSkin[i] ){
@ <li> %h(aBuiltinSkin[i].zDesc) ← <i>Currently in use</i>
}else{
char *zUrl = href("%R/skins?skin=%T", aBuiltinSkin[i].zLabel);
@ <li> %z(zUrl)%h(aBuiltinSkin[i].zDesc)</a>
}
|
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
|
@ the "skin" property in the
@ "%z(href("%R/fdscookie"))fossil_display_settings</a>" cookie.
break;
case SKIN_FROM_SETTING:
@ the "default-skin" setting on the repository.
break;
}
}
style_finish_page();
fossil_free(zBase);
}
|
>
>
>
>
>
>
>
>
>
>
>
|
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
|
@ the "skin" property in the
@ "%z(href("%R/fdscookie"))fossil_display_settings</a>" cookie.
break;
case SKIN_FROM_SETTING:
@ the "default-skin" setting on the repository.
break;
}
}
if( iSkinSource==SKIN_FROM_COOKIE || iSkinSource==SKIN_FROM_QPARAM ){
@ <ul>
@ <li> %z(href("%R/skins?skin="))<i>Let Fossil choose \
@ which skin to use</i></a>
@ </ul>
}
style_finish_page();
if( P("skin")!=0 ){
sqlite3_uint64 x;
sqlite3_randomness(sizeof(x), &x);
cgi_redirectf("%R/skins/%llx", x);
}
fossil_free(zBase);
}
|