Skip to content

Commit 59c9375

Browse files
committed
Fix "Improve this doc" links
1 parent 1135d53 commit 59c9375

File tree

5 files changed

+26
-13
lines changed

5 files changed

+26
-13
lines changed

grails-docs/src/main/groovy/grails/doc/DocPublisher.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ class DocPublisher {
347347
context.set(DocEngine.API_CONTEXT_PATH, vars.resourcesPath)
348348
output.warn "Rendering document file $usageFile.name"
349349
vars.content = engine.render(data, context)
350-
vars.sourcePath = "ref/${section}/$usageFile.name"
350+
vars.sourcePath = "ref/$usageFile.name"
351351
new File("${refDocsDir}/ref/${section}/Usage.html").withWriter(encoding) {out ->
352352
template.make(vars).writeTo(out)
353353
}

grails-docs/src/main/template/css/skin.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ a, a:hover, a:focus, a:active, a:hover, #main .project strong, #table-of-content
140140
vertical-align: middle;
141141
white-space: nowrap;
142142
}
143-
#contribute-btn {
144-
position: absolute;
145-
right: 300px;
146-
top: 100px;
143+
.contribute-btn {
144+
bottom: 40px;
145+
float: right;
146+
position: relative;
147+
right: 0;
147148
}
148149

149-
150150
/*
151151
////////////////////////////////////////////////////////////////////////////////
152152
//

grails-docs/src/main/template/style/guideItem.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,6 @@
6666
<h1>${sectionNumber} ${title.encodeAsHtml()}</h1>
6767

6868
<p><strong>Version:</strong> ${version}</p>
69-
<% if(sourceRepo) { %>
70-
<div id='contribute-btn'>
71-
<button type='button' class='btn btn-default' onclick='window.location.href="${sourceRepo}/guide/${sourcePath}"'>
72-
<i class='fa fa-pencil-square-o'></i> Improve this doc
73-
</button>
74-
</div>
75-
<% } %>
7669
</div>
7770

7871
<% if (sectionToc) { %>

grails-docs/src/main/template/style/referenceItem.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
document.body.className = classes.join(" ");
1414
}
1515
</script>
16+
<style>
17+
.contribute-btn {
18+
bottom: 0px;
19+
}
20+
</style>
1621
</head>
1722

1823
<body class="body" onload="addJsClass();">
@@ -53,6 +58,13 @@
5358
<div id="main" class="reference corner-all">
5459

5560
<span id='toggle-col1' class="toggle">(<a href="#" onclick="localToggle(); return false;">Quick Reference</a>)</span>
61+
<% if(sourceRepo) { %>
62+
<div class='contribute-btn'>
63+
<button type='button' class='btn btn-default' onclick='window.location.href="${sourceRepo}/${sourcePath}"'>
64+
<i class='fa fa-pencil-square-o'></i> Improve this doc
65+
</button>
66+
</div>
67+
<% } %>
5668

5769
${content}
5870
</div>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
<% def hLevel = level == 0 ? 1 : 2 %>
22
<% if (legacyLinks[name]) { %><a name="${legacyLinks[name].encodeAsHtml()}"><!-- Legacy link --></a><% } %>
33
<h$hLevel id="${name.encodeAsHtml()}">${sectionNumber} ${title}</h$hLevel>
4+
<% if(sourceRepo) { %>
5+
<div class='contribute-btn'>
6+
<button type='button' class='btn btn-default' onclick='window.location.href="${sourceRepo}/guide/${sourcePath}"'>
7+
<i class='fa fa-pencil-square-o'></i> Improve this doc
8+
</button>
9+
</div>
10+
<% } %>
11+
412
${content}

0 commit comments

Comments
 (0)