Git Product home page Git Product logo

ctrl's Introduction

ctrl CMS

A node.js CMS application that is a great starting point for most web-base projects

More information can be found in the wiki

Installation

Create the ctrl app:

 git clone git://github.com/serby/ctrl.git

Install dependencies:

 npm install

Updating

If you pull a new version, always install any new packages.

git pull origin master
npm install

If you switch node versions or you are having problems after pulling try and rebuild.

npm rebuild

Usage

Starting ctrl

 node app

Then goto http://localhost:3021/admin in a browser and follow the instructions.

Contributions

All contributions to this project are welcome. Your pull request is much more likely to be accepted if you follow our style-guide.

Linting

Please run the linter and fix any errors before committing.

make lint

The .jslintrc that should be used can be found in the project root.

Author

Paul Serby follow me on twitter

Licence

Licenced under the New BSD License

ctrl's People

Contributors

bengourley avatar evlun avatar iamsmith avatar jackbrewer avatar robnoake avatar tomgco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctrl's Issues

If field is required but not shown on update, validation fails when updating

For example (not realistic mind):

Car:

  • Make (Required, shown on create and update)
  • Model (Not required, shown on create and update)
  • Registration (Required, shown on create, not on update)

Upon creation of a car, everything is fine. When editing the car, the 'Registration' field does not show, however when saving changes, control states that 'Registration is required', although it already exists in the data.

Don't think this a major issue, as I doubt there are many (if any) use cases for this scenario.

Feature Request: Cookie options

There should be a mechanism to set cookie options for express from inside properties.js

The most common use case for this will be to set the cookie's domain in the event the app needs to respond to requests on multiple subdomains.

404 on bundle index when using generic bundle

To replicate on Unix/Mac:

git clone git://github.com/serby/control control-404-error-example
cd control-404-error-example
npm install
git clone git://github.com/domudall/control-404-error-example bundles/vegetable

Add vegetable to server.js, then start control with node app

Index page returns 404, however all other routes are rendered correctly (going through the process of creation via the new vegetable page).

Tried debugging route defined in genericAdminRoutes.js but to no avail.

The admin form width can be restrictive

It would be nice if you could collapse the admin sidebar and make the form area wider when editing body content.

Have a look at the /admin/article/new on the clock site and you'll see I've has to limit the number of options on the rich-text toolbar to allow it to fix.

Upload system duplicates pre-uploaded files

Using the asset manager with the same files produces duplicates in the data directory. More of a feature request, feel free to shoot me down if you don't feel it's necessary.

Password reset journey crash

Just went to have a look at the password reset journey, got this:

/Users/bengourley/Projects/control/bundles/administrator/lib/administratorModel.js:98
    return crypto.createHash('sha1').update(str).digest('hex');
           ^
ReferenceError: crypto is not defined
    at hashAdminState (/Users/bengourley/Projects/control/bundles/administrator/lib/administratorModel.js:98:12)
    at EventEmitter.requestPasswordChange (/Users/bengourley/Projects/control/bundles/administrator/lib/administratorModel.js:102:16)
    at /Users/bengourley/Projects/control/bundles/admin/controller.js:106:45
    at /Users/bengourley/Projects/control/lib/utils/mongodbCrudDelegate.js:213:9
    at /Users/bengourley/Projects/control/lib/utils/mongodbCrudDelegate.js:189:9
    at /Users/bengourley/Projects/control/node_modules/mongodb/lib/mongodb/cursor.js:129:9
    at /Users/bengourley/Projects/control/node_modules/mongodb/lib/mongodb/cursor.js:171:11
    at /Users/bengourley/Projects/control/node_modules/mongodb/lib/mongodb/cursor.js:463:35
    at Cursor.close (/Users/bengourley/Projects/control/node_modules/mongodb/lib/mongodb/cursor.js:682:5)
    at Cursor.nextObject (/Users/bengourley/Projects/control/node_modules/mongodb/lib/mongodb/cursor.js:463:17)

Upgrading to Stylus 0.23.0 breaks versionPath helper

With stylus 0.22.0 using the versionPath helper produces the following css:

background-image: url("/images/admin/content/0.0.1/logo-control.png")

After the upgrade to stylus 0.23.0 the following css is produced:

background-image: 'url("/images/admin/content/0.0.1/logo-control.png")'

This breaks the functionality of the helper and produces unexpected results.

Article Bundle: Route is greedy

The route in the article bundle is really vague:

app.get('/:section/:article', ...)

This means that any bundles added after it can't have routes in the form /foo/bar.

e.g:

bundled.addBundles(__dirname + '/bundles/', [
  ...
  'article',
  'pageAdmin',
]);

My 'pageAdmin' bundle wants /admin/page, but this won't be reached because the article bundle preceded it (and takes precedence).

It's easy to resolve–just change the order, but could this be a problem further down the line? Is there a better solution?

Feature Request: Default Settings and Remembered Filters

I believe Control should allow modules to have default ordering and have the ability to remember (per admin) their chosen ordering settings.

e.g. On adoption programme CMS you have to click date created table heading twice each time you navigate to new users. Like Atrox CMS it would be good to store admin preferences.

generic: no check to see if first field is hidden before assuming it to be title

When creating viewSchema using generic, there is no check to see if the first field is hidden or in list before assuming it should be used as title field.

Example:

var viewSchema = generic.createViewSchema({
  groups: [{
    name: 'My broken view',
    description: 'This view is broken unless I explicitly set the title property',
    properties: {
      _id: {
        form: true,
        type: 'hidden'
      },
      name: {
        list: true,
        view: true,
        createForm: true,
        updateForm: true
      }
    }]
});
// ...remainder of code...

More form styles are needed to set the size of textareas

Sometimes you need to say that a textarea is: shortest, short, tall, tallest or smallest, small, big, bigest. I have been added these styles on projects that need them, but it would be good to have a more considered set of modifiers in control.

MongoDbCrudDelegate does not verify updates have succeeded

The update function implies that no error equals success and reports that back to the caller and the logger. It is possible that the returnedEntity will be null on callback, which means no document was found for update. If this occurs the update function should return an error stating the requested document was not found.

I will send across a pull request shortly.

Crash after creating first admin user

After the first administrator is created through /admin/setup, the application crashes with the following error:

Error: TypeError: undefined is not a function
    at Array.<anonymous> (/opt/projects/control/node_modules/mongodb/lib/mongodb/connection/server.js:168:49)
    at EventEmitter._tickCallback (node.js:126:26)

Output of npm list:

[email protected] /opt/projects/control
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
└─┬ [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├── [email protected]
  │ └── [email protected]
  ├── [email protected]
  └── [email protected]

Can't put stylus files in bundles' public route

The Stylus middleware can't deal with multiple paths, nor when the requested url doesn't match the file's path.

We could farm out most of the stuff from stylus.middleware and make our own middleware.

Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.