| ︙ | | | ︙ | |
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
|
if( ex ){
@ <p><span class="generalError">There is already another skin
@ named "%h(zNewName)". Choose a different name.</span></p>
}
@ <form action="%R/setup_skin_admin" method="post"><div>
@ <table border="0"><tr>
@ <tr><td align="right">Current name:<td align="left"><b>%h(zOldName)</b>
@ <tr><td align="right">New name:<td align="left">
@ <input type="text" size="35" name="newname" value="%h(zNewName)">
@ <tr><td><td>
@ <input type="hidden" name="sn" value="%h(zOldName)">
@ <input type="submit" name="rename" value="Rename">
@ <input type="submit" name="canren" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
|
|
|
|
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
|
if( ex ){
@ <p><span class="generalError">There is already another skin
@ named "%h(zNewName)". Choose a different name.</span></p>
}
@ <form action="%R/setup_skin_admin" method="post"><div>
@ <table border="0"><tr>
@ <tr><td align="right">Current name:<td align="left"><b>%h(zOldName)</b>
@ <tr><td align="right"><label for="newname">New name:</label><td align="left">
@ <input type="text" size="35" id="newname" name="newname" value="%h(zNewName)">
@ <tr><td><td>
@ <input type="hidden" name="sn" value="%h(zOldName)">
@ <input type="submit" name="rename" value="Rename">
@ <input type="submit" name="canren" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
|
| ︙ | | | ︙ | |
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
|
style_header("Save Current Skin");
if( ex ){
@ <p><span class="generalError">There is already another skin
@ named "%h(zNewName)". Choose a different name.</span></p>
}
@ <form action="%R/setup_skin_admin" method="post"><div>
@ <table border="0"><tr>
@ <tr><td align="right">Name for this skin:<td align="left">
@ <input type="text" size="35" name="svname" value="%h(zNewName)">
@ <tr><td><td>
@ <input type="submit" name="save" value="Save">
@ <input type="submit" name="cansave" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
style_finish_page();
|
|
|
|
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
|
style_header("Save Current Skin");
if( ex ){
@ <p><span class="generalError">There is already another skin
@ named "%h(zNewName)". Choose a different name.</span></p>
}
@ <form action="%R/setup_skin_admin" method="post"><div>
@ <table border="0"><tr>
@ <tr><td align="right"><label for="svname">Name for this skin:</label><td align="left">
@ <input type="text" size="35" id="svname" name="svname" value="%h(zNewName)">
@ <tr><td><td>
@ <input type="submit" name="save" value="Save">
@ <input type="submit" name="cansave" value="Cancel">
@ </table>
login_insert_csrf_secret();
@ </div></form>
style_finish_page();
|
| ︙ | | | ︙ | |
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
|
} cssDefaultList[];
/*
** WEBPAGE: setup_skinedit
**
** Edit aspects of a skin determined by the w= query parameter.
** Requires Admin or Setup privileges.
**
** w=NUM -- 0=CSS, 1=footer, 2=header, 3=details, 4=js
** sk=NUM -- the draft skin number
*/
void setup_skinedit(void){
static const struct sSkinAddr {
const char *zFile;
const char *zTitle;
|
<
|
772
773
774
775
776
777
778
779
780
781
782
783
784
785
|
} cssDefaultList[];
/*
** WEBPAGE: setup_skinedit
**
** Edit aspects of a skin determined by the w= query parameter.
** Requires Admin or Setup privileges.
** w=NUM -- 0=CSS, 1=footer, 2=header, 3=details, 4=js
** sk=NUM -- the draft skin number
*/
void setup_skinedit(void){
static const struct sSkinAddr {
const char *zFile;
const char *zTitle;
|
| ︙ | | | ︙ | |
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
|
style_submenu_element(aSkinAttr[j].zSubmenu,
"%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
}
@ <form action="%R/setup_skinedit" method="post"><div>
login_insert_csrf_secret();
@ <input type='hidden' name='w' value='%d(ii)'>
@ <input type='hidden' name='sk' value='%d(iSkin)'>
@ <h2>Edit %s(zTitle):</h2>
if( P("submit") && cgi_csrf_safe(0) && (zOrig==0 || strcmp(zOrig,zContent)!=0) ){
db_set_mprintf(zContent, 0, "draft%d-%s",iSkin,zFile);
}
@ <textarea name="%s(zFile)" rows="10" cols="80">\
@ %h(zContent)</textarea>
@ <br />
@ <input type="submit" name="submit" value="Apply Changes" />
if( isRevert ){
@ ← Press to complete reversion to "%s(zBasis)"
}else if( fossil_strcmp(zContent,zDflt)!=0 ){
@ <input type="submit" name="revert" value='Revert To "%s(zBasis)"' />
}
@ <hr />
@ Baseline: \
skin_emit_skin_selector("basis", zBasis, zDraft);
@ <input type="submit" name="diff" value="Unified Diff" />
@ <input type="submit" name="sbsdiff" value="Side-by-Side Diff" />
if( P("diff")!=0 || P("sbsdiff")!=0 ){
Blob from, to, out;
DiffConfig DCfg;
construct_diff_flags(1, &DCfg);
DCfg.diffFlags |= DIFF_STRIP_EOLCR;
|
|
|
|
>
|
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
|
style_submenu_element(aSkinAttr[j].zSubmenu,
"%R/setup_skinedit?w=%d&basis=%h&sk=%d",j,zBasis,iSkin);
}
@ <form action="%R/setup_skinedit" method="post"><div>
login_insert_csrf_secret();
@ <input type='hidden' name='w' value='%d(ii)'>
@ <input type='hidden' name='sk' value='%d(iSkin)'>
@ <h2><label for="%s(zFile)">Edit %s(zTitle):</label></h2>
if( P("submit") && cgi_csrf_safe(0) && (zOrig==0 || strcmp(zOrig,zContent)!=0) ){
db_set_mprintf(zContent, 0, "draft%d-%s",iSkin,zFile);
}
@ <textarea id="%s(zFile)" name="%s(zFile)" rows="10" cols="80">\
@ %h(zContent)</textarea>
@ <br />
@ <input type="submit" name="submit" value="Apply Changes" />
if( isRevert ){
@ ← Press to complete reversion to "%s(zBasis)"
}else if( fossil_strcmp(zContent,zDflt)!=0 ){
@ <input type="submit" name="revert" value='Revert To "%s(zBasis)"' />
}
@ <hr />
@ <label>Baseline: \
skin_emit_skin_selector("basis", zBasis, zDraft);
@ </label>
@ <input type="submit" name="diff" value="Unified Diff" />
@ <input type="submit" name="sbsdiff" value="Side-by-Side Diff" />
if( P("diff")!=0 || P("sbsdiff")!=0 ){
Blob from, to, out;
DiffConfig DCfg;
construct_diff_flags(1, &DCfg);
DCfg.diffFlags |= DIFF_STRIP_EOLCR;
|
| ︙ | | | ︙ | |
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
|
@
@ <p>The main skin of Fossil cannot be edited directly. Instead,
@ edits are made to one of nine draft skins. A draft skin can then
@ be published to become the default skin.
@ Nine separate drafts are available to facilitate A/B testing.</p>
@
@ <form method='POST' action='%R/setup_skin#step2' id='f01'>
@ <p class='skinInput'>Draft skin to edit:
@ <select size='1' name='sk' id='skStep1'>
for(i=1; i<=9; i++){
if( i==iSkin ){
@ <option value='%d(i)' selected>draft%d(i)</option>
}else{
@ <option value='%d(i)'>draft%d(i)</option>
}
}
@ </select>
@ </p>
@
@ <a name='step2'></a>
@ <h1>Step 2: Authenticate</h1>
@
if( isSetup ){
@ <p>As an administrator, you can make any edits you like to this or
@ any other skin. You can also authorize other users to edit this
@ skin. Any user whose login name matches the comma-separated list
@ of GLOB expressions below is given special permission to edit
@ the draft%d(iSkin) skin:
@
@ <form method='POST' action='%R/setup_skin#step2' id='f02'>
@ <p class='skinInput'>
@ <input type='hidden' name='sk' value='%d(iSkin)'>
@ Authorized editors for skin draft%d(iSkin):
@ <input type='text' name='editors' value='%h(zAllowedEditors)'\
@ width='40'>
@ <input type='submit' name='submit2' value='Change'>
@ </p>
@ </form>
}else if( isEditor ){
@ <p>You are authorized to make changes to the draft%d(iSkin) skin.
@ Continue to the <a href='#step3'>next step</a>.</p>
}else{
|
|
|
|
|
|
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
|
@
@ <p>The main skin of Fossil cannot be edited directly. Instead,
@ edits are made to one of nine draft skins. A draft skin can then
@ be published to become the default skin.
@ Nine separate drafts are available to facilitate A/B testing.</p>
@
@ <form method='POST' action='%R/setup_skin#step2' id='f01'>
@ <p class='skinInput'><label>Draft skin to edit:
@ <select size='1' name='sk' id='skStep1'>
for(i=1; i<=9; i++){
if( i==iSkin ){
@ <option value='%d(i)' selected>draft%d(i)</option>
}else{
@ <option value='%d(i)'>draft%d(i)</option>
}
}
@ </select></label>
@ </p>
@
@ <a name='step2'></a>
@ <h1>Step 2: Authenticate</h1>
@
if( isSetup ){
@ <p>As an administrator, you can make any edits you like to this or
@ any other skin. You can also authorize other users to edit this
@ skin. Any user whose login name matches the comma-separated list
@ of GLOB expressions below is given special permission to edit
@ the draft%d(iSkin) skin:
@
@ <form method='POST' action='%R/setup_skin#step2' id='f02'>
@ <p class='skinInput'>
@ <input type='hidden' name='sk' value='%d(iSkin)'>
@ <label>Authorized editors for skin draft%d(iSkin):
@ <input type='text' name='editors' value='%h(zAllowedEditors)'\
@ width='40'></label>
@ <input type='submit' name='submit2' value='Change'>
@ </p>
@ </form>
}else if( isEditor ){
@ <p>You are authorized to make changes to the draft%d(iSkin) skin.
@ Continue to the <a href='#step3'>next step</a>.</p>
}else{
|
| ︙ | | | ︙ | |
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
|
}else{
@ <p>Initialize the draft%d(iSkin) skin to one of the built-in skins
@ or a preexisting skin, to use as a baseline.</p>
@
@ <form method='POST' action='%R/setup_skin#step4' id='f03'>
@ <p class='skinInput'>
@ <input type='hidden' name='sk' value='%d(iSkin)'>
@ Initialize skin <b>draft%d(iSkin)</b> using
skin_emit_skin_selector("initskin", "current", 0);
@ <input type='submit' name='init3' value='Go'>
@ </p>
@ </form>
}
@
@ <a name='step4'></a>
@ <h1>Step 4: Make Edits</h1>
@
|
|
|
|
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
|
}else{
@ <p>Initialize the draft%d(iSkin) skin to one of the built-in skins
@ or a preexisting skin, to use as a baseline.</p>
@
@ <form method='POST' action='%R/setup_skin#step4' id='f03'>
@ <p class='skinInput'>
@ <input type='hidden' name='sk' value='%d(iSkin)'>
@ <label>Initialize skin <b>draft%d(iSkin)</b> using
skin_emit_skin_selector("initskin", "current", 0);
@ </label><input type='submit' name='init3' value='Go'>
@ </p>
@ </form>
}
@
@ <a name='step4'></a>
@ <h1>Step 4: Make Edits</h1>
@
|
| ︙ | | | ︙ | |
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
|
@ <p>When the draft%d(iSkin) skin is ready for production use,
@ make it the default skin by clicking the acknowledgements and
@ pressing the button below:</p>
@
@ <form method='POST' action='%R/setup_skin#step7'>
@ <p class='skinInput'>
@ <input type='hidden' name='sk' value='%d(iSkin)'>
@ <input type='checkbox' name='pub7ck1' value='yes'>\
@ Skin draft%d(iSkin) has been tested and found ready for production.<br>
@ <input type='checkbox' name='pub7ck2' value='yes'>\
@ The current skin should be overwritten with draft%d(iSkin).<br>
@ <input type='submit' name='pub7' value='Publish Draft%d(iSkin)'>
@ </p></form>
@
@ <p>You will probably need to press Reload on your browser after
@ publishing the new skin.</p>
}
@
|
|
|
|
|
|
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
|
@ <p>When the draft%d(iSkin) skin is ready for production use,
@ make it the default skin by clicking the acknowledgements and
@ pressing the button below:</p>
@
@ <form method='POST' action='%R/setup_skin#step7'>
@ <p class='skinInput'>
@ <input type='hidden' name='sk' value='%d(iSkin)'>
@ <label><input type='checkbox' name='pub7ck1' value='yes'>\
@ Skin draft%d(iSkin) has been tested and found ready for production.</label><br>
@ <label><input type='checkbox' name='pub7ck2' value='yes'>\
@ The current skin should be overwritten with draft%d(iSkin).</label><br>
@ <input type='submit' name='pub7' value='Publish Draft%d(iSkin)'>
@ </p></form>
@
@ <p>You will probably need to press Reload on your browser after
@ publishing the new skin.</p>
}
@
|
| ︙ | | | ︙ | |