catalogue
Version:
A Mongoose Based Data Viewer
1 lines • 12.3 kB
JavaScript
exports["404.html"]=function(e){var n=(e.extensions,"");return n+="404 Page Not Found"},exports["document.html"]=function(e,n,d){var o=(e.extensions,"");return o+='<div id="header">\n <img src="/assets/images/logo.png" class="logo">\n \n <div class="menu-icon">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n</div>\n\n<div id="subheader">\n <a href="/model/',o+=d.e(d.url_encode("undefined"!=typeof n.model?"undefined"!=typeof n.model?n.model:"":"undefined"!=typeof model?model:"")),o+='" class="title">\n <img src="/assets/images/icon-back.png" class="icon">\n ',o+=d.e(d.title("undefined"!=typeof n.model?"undefined"!=typeof n.model?n.model:"":"undefined"!=typeof model?model:"")),o+='\n </a>\n <div class="actions">\n <input id="save" type="button" class="btn" value="Save"/>\n <input id="delete" type="button" class="btn" value="Delete"/> \n </div>\n</div>\n\n<div id="document-view">\n <textarea id="doc"></textarea>\n</div>\n \n'},exports["model.html"]=function(e,n,d){var o=(e.extensions,"");return o+='<div id="model-container">\n <div id="header">\n <img src="/assets/images/logo.png" class="logo">\n <div class="menu-icon">\n <div class="line"></div>\n <div class="line"></div>\n <div class="line"></div>\n </div>\n </div>\n\n <div id="results-container">\n ...\n </div>\n \n <div id="footer">\n <a href="/model/',o+=d.e("undefined"!=typeof n.model?"undefined"!=typeof n.model?n.model:"":"undefined"!=typeof model?model:""),o+='/document/new" class="btn-add">\n <img src="/assets/images/icon-add.png" class="icon">\n </a>\n\n <span id="model-pagination">\n <a class="btn-arrow">←</a>\n <span id="model-results-label"></span>\n <a class="btn-arrow">→</a>\n </span>\n\n <a id="view-options">Options</a>\n\n </div>\n \n <div id="options-modal" class="modal-overlay">\n <div class="modal-window">\n <form id="model-options-form">\n <div class="modal-titlebar">\n <div class="title">Options</div>\n <div class="actions">\n <a id="close-modal" class="ui btn first margin-right">\n <img src="/assets/images/icon-close.png" class="icon">\n </a>\n </div>\n </div>\n <div class="modal-container">\n <div class="modal-padding">\n <table width="100%">\n\n <!-- Filter -->\n <tr>\n <td width="90px">\n <div class="label">Filter</div>\n </td>\n <td>\n <textarea name="filter" width="100%"></textarea>\n </td>\n </tr>\n \n <!-- Select -->\n <tr>\n <td>\n <div class="label">Select</div>\n </td>\n <td>\n <input name="select" type="text">\n </td>\n </tr>\n\n <!-- Sort -->\n <tr>\n <td>\n <div class="label">Sort</div>\n </td>\n <td>\n <input name="sort" type="text">\n </td>\n </tr>\n\n <!-- Limit -->\n <tr>\n <td>\n <div class="label">Limit</div>\n </td>\n <td>\n <select name="limit" width="100%">\n <option value="10">10</option>\n <option value="25">25</option>\n <option value="50">50</option>\n <option value="100">100</option>\n </select>\n </td>\n </tr>\n\n <!-- Populate -->\n <tr>\n <td>\n <div class="label">Populate</div>\n </td>\n <td>\n <textarea name="populate" width="100%"></textarea>\n </td>\n </tr>\n </table>\n </div>\n </div>\n <div class="modal-toolbar">\n <input type="submit" value="Save" class="btn-submit">\n </div>\n </div>\n </form>\n </div>\n</div>\n'},exports["partials/model.link.html"]=function(e,n,d){var o=(e.extensions,"");return o+='<a href="/model/',o+=d.e(d.url_encode("undefined"!=typeof n.model?"undefined"!=typeof n.model?n.model:"":"undefined"!=typeof model?model:"")),o+='">',o+=d.e("undefined"!=typeof n.model?"undefined"!=typeof n.model?n.model:"":"undefined"!=typeof model?model:""),o+="</a>"},exports["partials/model.results.html"]=function(e,n,d,o){var i=(e.extensions,"");return i+='<table id="model-docs-table" class="model-table" width="100%">\n <thead>\n <tr>\n ',function(){var e="undefined"!=typeof n.fields?"undefined"!=typeof n.fields?n.fields:"":"undefined"!=typeof fields?fields:"",t=o.isArray(e)?e.length:o.keys(e).length;e&&(n.___loopcache={loop:n.loop,field:n.field,__k:n.__k},n.loop={first:!1,index:1,index0:0,revindex:t,revindex0:t-1,length:t,last:!1},o.each(e,function(e,o){n.field=e,n.__k=o,n.loop.key=o,n.loop.first=0===n.loop.index0,n.loop.last=0===n.loop.revindex0,i+="\n <th>\n ",i+=d.e("undefined"!=typeof n.field&&void 0!==n.field.name?"undefined"!=typeof n.field&&void 0!==n.field.name?n.field.name:"":"undefined"!=typeof e&&void 0!==e.name?e.name:""),i+="\n ",("undefined"!=typeof n.field&&void 0!==n.field.populated?"undefined"!=typeof n.field&&void 0!==n.field.populated?n.field.populated:"":"undefined"!=typeof e&&void 0!==e.populated?e.populated:"")&&(i+=" (POPULATED) "),i+="\n </th>\n ",n.loop.index+=1,n.loop.index0+=1,n.loop.revindex-=1,n.loop.revindex0-=1}),n.loop=n.___loopcache.loop,n.field=n.___loopcache.field,n.__k=n.___loopcache.__k)}(),i+="\n </tr>\n </thead>\n\n <tbody>\n ",("undefined"!=typeof n.documents&&void 0!==n.documents.length?"undefined"!=typeof n.documents&&void 0!==n.documents.length?n.documents.length:"":"undefined"!=typeof documents&&void 0!==documents.length?documents.length:"")?(i+="\n ",function(){var e="undefined"!=typeof n.documents?"undefined"!=typeof n.documents?n.documents:"":"undefined"!=typeof documents?documents:"",t=o.isArray(e)?e.length:o.keys(e).length;e&&(n.___loopcache={loop:n.loop,row:n.row,__k:n.__k},n.loop={first:!1,index:1,index0:0,revindex:t,revindex0:t-1,length:t,last:!1},o.each(e,function(e,t){n.row=e,n.__k=t,n.loop.key=t,n.loop.first=0===n.loop.index0,n.loop.last=0===n.loop.revindex0,i+='\n <tr data-id="',i+=d.e("undefined"!=typeof n.row&&void 0!==n.row._id?"undefined"!=typeof n.row&&void 0!==n.row._id?n.row._id:"":"undefined"!=typeof e&&void 0!==e._id?e._id:""),i+='">\n ',function(){var t="undefined"!=typeof n.fields?"undefined"!=typeof n.fields?n.fields:"":"undefined"!=typeof fields?fields:"",l=o.isArray(t)?t.length:o.keys(t).length;t&&(n.___loopcache={loop:n.loop,field:n.field,__k:n.__k},n.loop={first:!1,index:1,index0:0,revindex:l,revindex0:l-1,length:l,last:!1},o.each(t,function(o,t){n.field=o,n.__k=t,n.loop.key=t,n.loop.first=0===n.loop.index0,n.loop.last=0===n.loop.revindex0,i+='\n <td>\n <div class="cell-wrap">\n ',("undefined"!=typeof n.field&&void 0!==n.field.ref?"undefined"!=typeof n.field&&void 0!==n.field.ref?n.field.ref:"":"undefined"!=typeof o&&void 0!==o.ref?o.ref:"")?(i+="\n ",("undefined"!=typeof n.field&&void 0!==n.field.populated?"undefined"!=typeof n.field&&void 0!==n.field.populated?n.field.populated:"":"undefined"!=typeof o&&void 0!==o.populated?o.populated:"")?(i+='\n <a href="/model/',i+=d.e(d.url_encode("undefined"!=typeof n.field&&void 0!==n.field.ref?"undefined"!=typeof n.field&&void 0!==n.field.ref?n.field.ref:"":"undefined"!=typeof o&&void 0!==o.ref?o.ref:"")),i+="/document/",i+=d.e(d.jsonpath(d.jsonpath("undefined"!=typeof n.row?"undefined"!=typeof n.row?n.row:"":"undefined"!=typeof e?e:"","undefined"!=typeof n.field&&void 0!==n.field.name?"undefined"!=typeof n.field&&void 0!==n.field.name?n.field.name:"":"undefined"!=typeof o&&void 0!==o.name?o.name:""),"_id")),i+='">\n ',i+=d.e(d.json_encode(d.jsonpath("undefined"!=typeof n.row?"undefined"!=typeof n.row?n.row:"":"undefined"!=typeof e?e:"","undefined"!=typeof n.field&&void 0!==n.field.name?"undefined"!=typeof n.field&&void 0!==n.field.name?n.field.name:"":"undefined"!=typeof o&&void 0!==o.name?o.name:""))),i+='\n <img src="/assets/images/icon-add.png" class="icon">\n </a>\n '):(i+='\n <a href="/model/',i+=d.e(d.url_encode("undefined"!=typeof n.field&&void 0!==n.field.ref?"undefined"!=typeof n.field&&void 0!==n.field.ref?n.field.ref:"":"undefined"!=typeof o&&void 0!==o.ref?o.ref:"")),i+="/document/",i+=d.e(d.jsonpath("undefined"!=typeof n.row?"undefined"!=typeof n.row?n.row:"":"undefined"!=typeof e?e:"","undefined"!=typeof n.field&&void 0!==n.field.name?"undefined"!=typeof n.field&&void 0!==n.field.name?n.field.name:"":"undefined"!=typeof o&&void 0!==o.name?o.name:"")),i+='">\n ',i+=d.e(d.jsonpath("undefined"!=typeof n.row?"undefined"!=typeof n.row?n.row:"":"undefined"!=typeof e?e:"","undefined"!=typeof n.field&&void 0!==n.field.name?"undefined"!=typeof n.field&&void 0!==n.field.name?n.field.name:"":"undefined"!=typeof o&&void 0!==o.name?o.name:"")),i+='\n <img src="/assets/images/icon-go.png" class="icon">\n </a>\n '),i+="\n "):"Date"==("undefined"!=typeof n.field&&void 0!==n.field.type?"undefined"!=typeof n.field&&void 0!==n.field.type?n.field.type:"":"undefined"!=typeof o&&void 0!==o.type?o.type:"")?(i+="\n ",i+=d.e(d.date(d.jsonpath("undefined"!=typeof n.row?"undefined"!=typeof n.row?n.row:"":"undefined"!=typeof e?e:"","undefined"!=typeof n.field&&void 0!==n.field.name?"undefined"!=typeof n.field&&void 0!==n.field.name?n.field.name:"":"undefined"!=typeof o&&void 0!==o.name?o.name:""),"Y-m-d H:i:s")),i+="\n "):(i+="\n ",i+=d.e(d.jsonpath("undefined"!=typeof n.row?"undefined"!=typeof n.row?n.row:"":"undefined"!=typeof e?e:"","undefined"!=typeof n.field&&void 0!==n.field.name?"undefined"!=typeof n.field&&void 0!==n.field.name?n.field.name:"":"undefined"!=typeof o&&void 0!==o.name?o.name:"")),i+="\n "),i+="\n </div>\n </td>\n ",n.loop.index+=1,n.loop.index0+=1,n.loop.revindex-=1,n.loop.revindex0-=1}),n.loop=n.___loopcache.loop,n.field=n.___loopcache.field,n.__k=n.___loopcache.__k)}(),i+="\n </tr>\n ",n.loop.index+=1,n.loop.index0+=1,n.loop.revindex-=1,n.loop.revindex0-=1}),n.loop=n.___loopcache.loop,n.row=n.___loopcache.row,n.__k=n.___loopcache.__k)}(),i+="\n "):(i+='\n <tr>\n <td colspan="',i+=d.e("undefined"!=typeof n.fields&&void 0!==n.fields.length?"undefined"!=typeof n.fields&&void 0!==n.fields.length?n.fields.length:"":"undefined"!=typeof fields&&void 0!==fields.length?fields.length:""),i+='">\n No results found\n </td>\n </tr>\n '),i+="\n </tbody>\n</table>\n"};