Skip to content

Commit

Permalink
fix(source): Hide some elements if source code is disabled
Browse files Browse the repository at this point in the history
fix #185
  • Loading branch information
vogloblinsky committed Jun 12, 2017
1 parent a88023c commit 0e81c15
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 45 deletions.
12 changes: 7 additions & 5 deletions src/templates/partials/block-constructor.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
</td>
</tr>
{{#if constructor.line}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{constructor.line}}}" class="link-to-prism">{{file}}:{{{constructor.line}}}</a></div>
</td>
</tr>
{{#unless disableSourceCode}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{constructor.line}}}" class="link-to-prism">{{file}}:{{{constructor.line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}

{{#or constructor.description constructor.jsdoctags}}
Expand Down
12 changes: 7 additions & 5 deletions src/templates/partials/block-index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
</td>
</tr>
{{#if line}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../file}}:{{{line}}}</a></div>
</td>
</tr>
{{#unless ../disableSourceCode}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../file}}:{{{line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}
{{#if description}}
<tr>
Expand Down
12 changes: 7 additions & 5 deletions src/templates/partials/block-method.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@
{{/if}}

{{#if line}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../file}}:{{{line}}}</a></div>
</td>
</tr>
{{#unless ../disableSourceCode}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../file}}:{{{line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}

{{#or description jsdoctags returnType}}
Expand Down
12 changes: 7 additions & 5 deletions src/templates/partials/block-property.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@
</tr>
{{/if}}
{{#if line}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../file}}:{{{line}}}</a></div>
</td>
</tr>
{{#unless ../disableSourceCode}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../file}}:{{{line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}
{{#if description}}
<tr>
Expand Down
24 changes: 14 additions & 10 deletions src/templates/partials/component-detail.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,13 @@
</td>
</tr>
{{#if line}}
<tr>
<td class="col-md-2" colspan="2">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../component.file}}:{{{line}}}</a></div>
</td>
</tr>
{{#unless ../disableSourceCode}}
<tr>
<td class="col-md-2" colspan="2">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../component.file}}:{{{line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}
</tbody>
</table>
Expand Down Expand Up @@ -254,11 +256,13 @@
</td>
</tr>
{{#if line}}
<tr>
<td class="col-md-2" colspan="2">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../component.file}}:{{{line}}}</a></div>
</td>
</tr>
{{#unless ../disableSourceCode}}
<tr>
<td class="col-md-2" colspan="2">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../component.file}}:{{{line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}
</tbody>
</table>
Expand Down
24 changes: 14 additions & 10 deletions src/templates/partials/directive.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@
</td>
</tr>
{{#if line}}
<tr>
<td class="col-md-2" colspan="2">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../directive.file}}:{{{line}}}</a></div>
</td>
</tr>
{{#unless ../disableSourceCode}}
<tr>
<td class="col-md-2" colspan="2">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../directive.file}}:{{{line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}
</tbody>
</table>
Expand Down Expand Up @@ -145,11 +147,13 @@
</td>
</tr>
{{#if line}}
<tr>
<td class="col-md-2" colspan="2">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../directive.file}}:{{{line}}}</a></div>
</td>
</tr>
{{#unless ../disableSourceCode}}
<tr>
<td class="col-md-2" colspan="2">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../directive.file}}:{{{line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}
</tbody>
</table>
Expand Down
12 changes: 7 additions & 5 deletions src/templates/partials/interface.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@
{{/if}}

{{#if line}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../interface.file}}:{{{line}}}</a></div>
</td>
</tr>
{{#unless ../disableSourceCode}}
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="{{{line}}}" class="link-to-prism">{{../interface.file}}:{{{line}}}</a></div>
</td>
</tr>
{{/unless}}
{{/if}}

{{#if description}}
Expand Down

0 comments on commit 0e81c15

Please sign in to comment.