node-query/node_modules/jsdoc/templates/default/tmpl/details.tmpl

108 lines
3.5 KiB
Cheetah
Raw Normal View History

2014-10-20 16:56:45 -04:00
<?js
var data = obj;
var self = this;
var defaultObjectClass = '';
2014-10-22 10:11:40 -04:00
// Check if the default value is an object or array; if so, apply code highlighting
if (data.defaultvalue && (data.defaultvaluetype === 'object' || data.defaultvaluetype === 'array')) {
2014-10-20 16:56:45 -04:00
data.defaultvalue = "<pre class=\"prettyprint\"><code>" + data.defaultvalue + "</code></pre>";
defaultObjectClass = ' class="object-value"';
}
?>
<dl class="details">
<?js
var properties = data.properties;
2014-10-22 10:11:40 -04:00
if (properties && properties.length && properties.forEach) {
2014-10-20 16:56:45 -04:00
?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<h5 class="subsection-title">Properties:</h5>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<dl><?js= this.partial('properties.tmpl', properties) ?></dl>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.version) {?>
<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.since) {?>
<dt class="tag-since">Since:</dt>
<dd class="tag-since"><ul class="dummy"><li><?js= since ?></dd>
<?js } ?>
<?js if (data.inherited && data.inherits) { ?>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<?js= this.linkto(data.inherits, this.htmlsafe(data.inherits)) ?>
</li></dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.deprecated) { ?>
<dt class="important tag-deprecated">Deprecated:</dt><?js
if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li><ul></dd><?js }
?>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.author && author.length) {?>
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul><?js author.forEach(function(a) { ?>
<li><?js= self.resolveAuthorLinks(a) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.copyright) {?>
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.license) {?>
<dt class="tag-license">License:</dt>
<dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.defaultvalue) {?>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li<?js= defaultObjectClass ?>><?js= data.defaultvalue ?></li>
</ul></dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
<?js if (data.meta && self.outputSourceFiles) {?>
2014-10-20 16:56:45 -04:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-10-22 10:11:40 -04:00
<?js= self.linkto(meta.shortpath) ?>, <?js= self.linkto(meta.shortpath, 'line ' + meta.lineno, null, 'line' + meta.lineno) ?>
2014-10-20 16:56:45 -04:00
</li></ul></dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.tutorials && tutorials.length) {?>
<dt class="tag-tutorial">Tutorials:</dt>
<dd class="tag-tutorial">
<ul><?js tutorials.forEach(function(t) { ?>
<li><?js= self.tutoriallink(t) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.see && see.length) {?>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul><?js see.forEach(function(s) { ?>
<li><?js= self.linkto(s) ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
2014-10-22 10:11:40 -04:00
2014-10-20 16:56:45 -04:00
<?js if (data.todo && todo.length) {?>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul><?js todo.forEach(function(t) { ?>
<li><?js= t ?></li>
<?js }); ?></ul>
</dd>
<?js } ?>
</dl>