File tree 3 files changed +10
-1
lines changed
3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,8 @@ <h4 ng-show="method.returns">Returns</h4>
147
147
< h4 ng-show ="method.example "> Example</ h4 >
148
148
< div docs-example ng-repeat-end
149
149
ng-show ="method.example " ng-bind-html ="method.example "> </ div >
150
+ < div class ="view-code-link "> View the code
151
+ < a href ="https://github.com/GoogleCloudPlatform/gcloud-node/blob/{{version}}/lib/{{module ? module + '/' : ''}}{{class}}.js{{method.lineNumLink}} "> on GitHub</ a > .</ div >
150
152
< hr ng-if ="$index < methods.length - 1 ">
151
153
</ article >
152
154
</ article >
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ angular
135
135
if ( alias && alias . string . indexOf ( 'module:' ) !== 0 ) {
136
136
alias = alias . string ;
137
137
} else {
138
- alias = false
138
+ alias = false ;
139
139
}
140
140
141
141
return {
@@ -149,6 +149,8 @@ angular
149
149
} ) ,
150
150
description : $sce . trustAsHtml (
151
151
formatHtml ( detectLinks ( detectModules ( obj . description . full ) ) ) ) ,
152
+ lineNum : obj . codeStart ,
153
+ lineNumLink : obj . codeStart ? '#L' + obj . codeStart : '' ,
152
154
params : obj . tags . filter ( function ( tag ) {
153
155
return tag . type === 'param' ;
154
156
} )
@@ -334,6 +336,7 @@ angular
334
336
$scope . activeUrl = '#' + $location . path ( ) ;
335
337
$scope . singleMethod = methods . singleMethod ;
336
338
$scope . module = $routeParams . module ;
339
+ $scope . class = $routeParams . class || 'index' ;
337
340
$scope . methods = methods ;
338
341
$scope . version = $routeParams . version ;
339
342
$scope . versions = versions ;
Original file line number Diff line number Diff line change @@ -732,6 +732,10 @@ ul {
732
732
background : # F8F8F8 ;
733
733
}
734
734
735
+ .view-code-link {
736
+ color : # 888 ;
737
+ }
738
+
735
739
/*
736
740
Page Title
737
741
*/
You can’t perform that action at this time.
0 commit comments