Skip to content

Commit

Permalink
Issue meteor#3916: Add links to GitHub source code to docs
Browse files Browse the repository at this point in the history
PR meteor#3934

[stubailo: some improvements]
  • Loading branch information
zyzo authored and Sashko Stubailo committed Apr 2, 2015
1 parent 9fe2f4b commit a68ff30
Show file tree
Hide file tree
Showing 5 changed files with 409 additions and 9 deletions.
15 changes: 12 additions & 3 deletions docs/client/api-box.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
<template name="apiBoxTitle">
<h3 id="{{id}}" class="api-title">
<div class="locus">
{{locus}}
</div>

<a class="name selflink" href="{{link}}">{{{name}}}</a>
{{#if locus}}
<span class="locus">{{locus}}</span>

{{#if fullApi}}
{{#if filepath}}
<a class="src-code" href="https://github.com/meteor/meteor/blob/master/packages/{{filepath}}#L{{lineno}}" target="_blank">
{{filepath}}, line {{lineno}}
</a>
{{/if}}
{{/if}}
</h3>
</template>

<template name="autoApiBox">
{{#with apiData this}}
<div class="api {{bare}} new-api-box">
{{> apiBoxTitle name=signature locus=locus id=id}}
{{> apiBoxTitle name=signature locus=locus id=id filepath=filepath lineno=lineno}}

<div class="desc">
{{#markdown}}{{summary}}{{/markdown}}
Expand Down
3 changes: 3 additions & 0 deletions docs/client/api-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ Template.autoApiBox.helpers({
return _.reject(this.params, function (param) {
return param.name === "options";
});
},
fullApi: function () {
return Session.get("fullApi");
}
});

Expand Down
Loading

0 comments on commit a68ff30

Please sign in to comment.