Commit cd4fa99c authored by Tony Tam's avatar Tony Tam
Browse files

added resource description

parent bc932401
......@@ -1033,8 +1033,13 @@ function program4(depth0,data) {
templates['resource'] = template(function (Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression;
var buffer = "", stack1, options, functionType="function", escapeExpression=this.escapeExpression, self=this, blockHelperMissing=helpers.blockHelperMissing;
function program1(depth0,data) {
return " : ";
}
buffer += "<div class='heading'>\n <h2>\n <a href='#!/";
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
......@@ -1048,7 +1053,16 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
buffer += escapeExpression(stack1)
+ "</a>\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
+ "</a> ";
options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data};
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, options); }
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if (!helpers.description) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
if(stack1 || stack1 === 0) { buffer += stack1; }
if (stack1 = helpers.description) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = depth0.description; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
if(stack1 || stack1 === 0) { buffer += stack1; }
buffer += "\n </h2>\n <ul class='options'>\n <li>\n <a href='#!/";
if (stack1 = helpers.name) { stack1 = stack1.call(depth0, {hash:{},data:data}); }
else { stack1 = depth0.name; stack1 = typeof stack1 === functionType ? stack1.apply(depth0) : stack1; }
buffer += escapeExpression(stack1)
......@@ -1421,6 +1435,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
ResourceView.prototype.render = function() {
var operation, _i, _len, _ref;
console.log(this.model.description);
$(this.el).html(Handlebars.templates.resource(this.model));
this.number = 0;
_ref = this.model.operationsArray;
......
This diff is collapsed.
......@@ -2,6 +2,7 @@ class ResourceView extends Backbone.View
initialize: ->
render: ->
console.log @model.description
$(@el).html(Handlebars.templates.resource(@model))
@number = 0
......
<div class='heading'>
<h2>
<a href='#!/{{name}}' onclick="Docs.toggleEndpointListForResource('{{name}}');">{{name}}</a>
<a href='#!/{{name}}' onclick="Docs.toggleEndpointListForResource('{{name}}');">{{name}}</a> {{#description}} : {{/description}}{{{description}}}
</h2>
<ul class='options'>
<li>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment