@@ -356,8 +356,8 @@ func (pw *PageWriter) Done() {
356
356
if pw .Info .RootPath == r .u {
357
357
name = "<b>" + name + "</b>"
358
358
}
359
- roots += fmt .Sprintf (" <li><a href=\" %s?ui\" >%s</a>\n " ,
360
- pw .Info .BaseURL + "/" + r .u + "</li>" , name )
359
+ roots += fmt .Sprintf (" <li><a href=\" %s?ui\" >%s</a></li> \n " ,
360
+ pw .Info .BaseURL + "/" + r .u , name )
361
361
}
362
362
363
363
if pw .Info .RootPath == "" {
@@ -527,17 +527,19 @@ func (pw *PageWriter) Done() {
527
527
structuretext = "Show structure"
528
528
}
529
529
if pw .Info .ResourceUID != "" && pw .Info .What == "Entity" {
530
- structureButton = fmt .Sprintf (`
531
- <div><button id=structure onclick='structureswitch=!structureswitch ; apply()' style="font-weight:bold">%s</button></div>
530
+ structureButton = fmt .Sprintf (`<div>
531
+ <button id=structure onclick='structureswitch=!structureswitch ; apply()' style="font-weight:bold">%s</button>
532
+ </div>
532
533
` , structuretext )
533
534
}
534
535
535
536
apply = `
536
- <hr style="width:100%% ; margin-top:15px ; margin-bottom:15px">
537
- <div style="display:ruby">
538
- <button onclick="apply()" style="font-weight:bold">Apply</button>` +
539
- structureButton + `
540
- </div>`
537
+ ` + structureButton
538
+ }
539
+
540
+ applyBtn := ""
541
+ if options != "" || filters != "" || inlines != "" {
542
+ applyBtn = "<button id=applyBtn onclick='apply()'>Apply</button>"
541
543
}
542
544
543
545
pw .OldWriter .Write ([]byte (fmt .Sprintf (`<html>
@@ -592,6 +594,7 @@ func (pw *PageWriter) Done() {
592
594
display: flex ;
593
595
flex-direction: column ;
594
596
align-items: start ;
597
+ margin-top: -15 ;
595
598
}
596
599
#buttonBar {
597
600
background-color: lightsteelblue;
@@ -602,8 +605,17 @@ func (pw *PageWriter) Done() {
602
605
}
603
606
#structure {
604
607
display: inline ;
608
+ margin-top: 10px ;
605
609
margin-bottom: 10px ;
606
610
}
611
+
612
+ #applyBtn {
613
+ font-weight: bold ;
614
+ align-self: end ;
615
+ position: relative ;
616
+ top: 20 ;
617
+ }
618
+
607
619
#commit {
608
620
background-color: lightsteelblue ;
609
621
font-size: 12px ;
@@ -727,6 +739,7 @@ func (pw *PageWriter) Done() {
727
739
<hr>
728
740
` + roots + `
729
741
<div id=buttonList>
742
+ ` + applyBtn + `
730
743
` + options + `
731
744
` + filters + `
732
745
` + inlines + `
@@ -1171,16 +1184,11 @@ func HTTPGet(info *RequestInfo) error {
1171
1184
return SerializeQuery (info , nil , "Registry" , info .Filters )
1172
1185
}
1173
1186
1174
- // Might need to check other flags, but if we're exporting, it makes
1175
- // no sense to show just the resource contents
1176
- if info .HasFlag ("export" ) {
1177
- info .ShowStructure = true
1178
- }
1179
-
1180
1187
// 'metaInBody' tells us whether xReg metadata should be in the http
1181
1188
// response body or not (meaning, the hasDoc doc)
1182
1189
metaInBody := (info .ResourceModel == nil ) ||
1183
1190
(info .ResourceModel .GetHasDocument () == false || info .ShowStructure ||
1191
+ info .HasFlag ("export" ) ||
1184
1192
(len (info .Parts ) == 5 && info .Parts [4 ] == "meta" ))
1185
1193
1186
1194
// Return the Resource's document
0 commit comments