Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Kanso Admin

Quick CRUD interface to your Kanso CouchTypes. Push it to the database you have
your types installed on and it will introspect them.

```
git clone https://github.com/mandric/admin
cd admin
git push <db>
```
9 changes: 5 additions & 4 deletions lib/shows.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

var utils = require('./utils'),
duality_utils = require('duality/utils'),
couchtypes_utils = require('couchtypes/utils'),
db = require('db'),
core = require('duality/core'),
loader = require('./loader'),
Expand Down Expand Up @@ -143,7 +144,7 @@ exports.fieldPairs = function (fields_module, fields, doc, path) {
for (var k in fields) {
if (fields.hasOwnProperty(k)) {
if (fields[k] instanceof fields_module.Field) {
val = duality_utils.getPropertyPath(doc, path.concat([k]));
val = couchtypes_utils.getPropertyPath(doc, path.concat([k]));
if (!fields[k].isEmpty(val) || !fields[k].omit_empty) {
pairs.push({
field: path.concat([k]).join('.'),
Expand All @@ -152,7 +153,7 @@ exports.fieldPairs = function (fields_module, fields, doc, path) {
}
}
else if (fields[k] instanceof fields_module.Embedded) {
val = duality_utils.getPropertyPath(doc, path.concat([k]));
val = couchtypes_utils.getPropertyPath(doc, path.concat([k]));
type = fields[k].type;
display_name = val ? val._id: '';
if (type.display_name) {
Expand All @@ -164,10 +165,10 @@ exports.fieldPairs = function (fields_module, fields, doc, path) {
});
}
else if (fields[k] instanceof fields_module.EmbeddedList) {
var items = duality_utils.getPropertyPath(doc, path.concat([k]));
var items = couchtypes_utils.getPropertyPath(doc, path.concat([k]));
if (items) {
for (var i = 0; i < items.length; i++) {
val = duality_utils.getPropertyPath(doc, path.concat([k, i]));
val = couchtypes_utils.getPropertyPath(doc, path.concat([k, i]));
type = fields[k].type;
display_name = val ? val._id: '';
if (type.display_name) {
Expand Down
2 changes: 1 addition & 1 deletion lib/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
exports.apps = {
map: function (doc) {
var id = doc._id;
if (doc.format === 'kanso') {
if (doc.couchtypes) {
if (id !== '_design/admin' && id.substr(0, 8) === '_design/') {
var name = id.substr(8);
var cap = name.substr(0, 1).toUpperCase() + name.substr(1);
Expand Down
2 changes: 1 addition & 1 deletion packages/attachments/build/add.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var attachments = require('kanso/attachments'),
var attachments = require('kanso-utils/attachments'),
async = require('async');


Expand Down
2 changes: 1 addition & 1 deletion packages/attachments/build/cleanup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var attachments = require('kanso/attachments'),
var attachments = require('kanso-utils/attachments'),
async = require('async');


Expand Down
2 changes: 1 addition & 1 deletion packages/attachments/kanso.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "attachments",
"version": "0.0.8",
"version": "0.0.9",
"categories": ["build-tools"],
"description": "Loads files or directories of files and attaches them to a design doc",
"preprocessors": {
Expand Down
19 changes: 19 additions & 0 deletions packages/attachments/node_modules/async/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions packages/attachments/node_modules/async/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading