-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of a non-styled dd/dt template, called for each exception, call one template with a table for all exception, using same styles as params: type and description
- Loading branch information
Showing
2 changed files
with
31 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
<?js | ||
var data = obj; | ||
var exceptions = obj; | ||
var self = this; | ||
?> | ||
<?js if (data.description && data.type && data.type.names) { ?> | ||
<dl> | ||
<dt> | ||
<div class="param-desc"> | ||
<?js= data.description ?> | ||
</div> | ||
</dt> | ||
<dt> | ||
<dl> | ||
<dt> | ||
Type | ||
</dt> | ||
<dd> | ||
<?js= this.partial('type.tmpl', data.type.names) ?> | ||
</dd> | ||
</dl> | ||
</dt> | ||
</dl> | ||
<?js } else { ?> | ||
<div class="param-desc"> | ||
<?js if (data.description) { ?> | ||
<?js= data.description ?> | ||
<?js } else if (data.type && data.type.names) { ?> | ||
<?js= this.partial('type.tmpl', data.type.names) ?> | ||
<?js } ?> | ||
</div> | ||
<?js } ?> | ||
|
||
<table class="params"> | ||
<thead> | ||
<tr> | ||
<th>Type</th> | ||
<th class="last">When</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
||
<?js exceptions.forEach(function(exception) { ?> | ||
<tr> | ||
<td class="type"> | ||
<?js if (exception.type && exception.type.names) {?> | ||
<?js= self.partial('type.tmpl', exception.type.names) ?> | ||
<?js } ?> | ||
</td> | ||
<td class="description last"> | ||
<?js if (exception.description) { ?> | ||
<?js= exception.description ?> | ||
<?js } ?> | ||
</td> | ||
</tr> | ||
<?js }); ?> | ||
|
||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters