orionjs / orioncms Goto Github PK
View Code? Open in Web Editor NEW[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
Home Page: http://orionjs.org
License: MIT License
[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
Home Page: http://orionjs.org
License: MIT License
Would it be possible to leverage user roles, for instance if you want to assign a role of client , or blogger and give any user within that role default permissions.
alanning:roles
is a great package to use as leverage.
So similar to how you did pages extension you could do roles extension, and have an entity that you can define presets based on a role.
OrionJS looks very promising, but AFAIK there is no easy way to have dictionary definitions on multiple languages. What about a tap:i18n dependency?
Hi all
I just did a meteor update
and tried to reach the admin panel. The following arise when I open mywebsite/admin :
Couldn't find a template named "adminAccountsLogin" or "adminAccountsLogin". Are you sure you defined it?
Any idea what went wrong?
I do like to pre-populate some of the fields with defaults values, with autoform you can do this ({{> afQuickField name="tag" value=valueHelper}}). How do achieve same with Orion? Thanks
I know that this is still young, but I think you would benefit from setting up something like a mailchimp for informing users of release updates. I just pulled your latest updates and was confused as to why my admin user was not longer and admin and saw that there is now an admin/setup (I realize theres not a lot of people actively playing with this as much as I am but big changes like this would be nice to know about). I would be interested in contributing to the newsletter releases as well.
I just added a maps extension for Orionjs , users can now call orion.attribute('map')
and add geo code location as a field.
Used documentation and forked yogiben:autoform-maps
which extends aldeed:autoform
http://screencast.com/t/ZSd85AvdHx
Repository can be found here. https://github.com/rwatts3/orionjs-maps/
There is no mention of what license this is released under. This can be problematic for people in certain (boring) sphere's. Has there been any thought into licensing and if so could you please add a license.md file/something similar.
Cheers,
Yaser
Looked through the API and docs and I may have missed it. What is the best way to add a custom page to the admin panel. For instance if I want to add a button called Analytics. And I want to serve a custom page inside the admin panel that has charts and graphs about the sites analytics.
Maybe even render a custom docs page inside the admin area for new users.
How do you restrict file behavior to the specific user.
For instance entity.notes.personal allows you to only allow personal notes assigned to that user.
I would like to do the same thing for files. If the user didn't create the file I would like them not to be able to delete it.
I am trying to understand the syntax such as entity.posts.personal, entity.posts.?
Is there documentation on the items that can be passed and the best syntax to use ?
Hi all
Just tried to reach the web site (for example http://orion.meteor.com/docs/attributes) but it's not working.
Can you check this please?
Cheers
Hi,
I am using multiple Froala Editors in an entity. Unfortunately when an admin updates the content of one editor the conent in the other editors is removed.
BR
Thanks for starting this project!
How does it compare with actively-maintained open-source Meteor CMSes (which I'm sure would accept PRs):
According to the docs I should be able to create new users through the UI. I don't see this option anywhere.
Please add 'mquandalle:jade', to api.use
Did you use the pages extension to build orion.meteor.com/docs ?
Orion.js depends on useraccounts:bootstrap but I use semantic-ui on frontend and thus would like to use useraccounts:semantic-ui for users to sign up/in. When I add the latter, it conflicts with the bootstrap version. How can I solve it without forking Orion.js and making new package?
What is the alternative to s3 I cannot and would prefer not to use s3 to store files, would rather store them locally.
The old README with screenshots and description of features, was a lot more convincing.
I spun up a fresh meteor app, added your package and all I have is the same old basic meteor starter app. The routing that is supposed to work out of the box doesn't, is the api.addFiles
supposed to build files into the apps root directory? If so that doesn't seem to be working for me.
I also tried cloning parts of this repo to my root meteor directory but couldn't get it to spin up correctly. Is there a meteor starter app that is attached to the cms package I'm not aware of?
Recently updated to orionjs:core and Meteor 1.0.4.1, console returning this now:
Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction?
debug.js:41 Received error from server: Malformed subscription
debug.js:43 For: Object {msg: "sub", id: "PBsrZTQZmiyQzD4vm", name: Object, params: Array[0]}id: "PBsrZTQZmiyQzD4vm"msg: "sub"name: Objectparams: Array[0]__proto__: Object
In conjunction with a previous issue I submitted I would like to know what is the easiest way to run an if within the template to determine if the user is an admin or has permissions to do something.
For instance I would like to say
{{#if isAdmin}} display something that only a user with admin permissions would be able to see, however on the front end. {{/if}}
http://cl.ly/image/381p443H473x
Exception in template helper: TypeError: Cannot read property 'objectKeys' of null
at Object.autoFormFieldNames (http://localhost:3000/packages/aldeed_autoform.js?238705d312ed82aff928668af1316ae1b2d7ed2a:1383:19)
at http://localhost:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:2786:16
at http://localhost:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:1607:16
at http://localhost:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:2834:66
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:3382:12)
at http://localhost:3000/packages/blaze.js?4e49999979a58da0e2265f7bd3f5910f9901b07b:2833:27
at Spacebars.call (http://localhost:3000/packages/spacebars.js?7bafbe05ec09b6bbb6a3b276537e4995ab298a2f:172:18)
at Spacebars.mustacheImpl (http://localhost:3000/packages/spacebars.js?7bafbe05ec09b6bbb6a3b276537e4995ab298a2f:109:25)
at Object.Spacebars.dataMustache (http://localhost:3000/packages/spacebars.js?7bafbe05ec09b6bbb6a3b276537e4995ab298a2f:141:39)
at http://localhost:3000/packages/aldeed_autoform.js?238705d312ed82aff928668af1316ae1b2d7ed2a:6292:22
This is a very promising suite of packages, and i definitely agree with you that the dictionary has huge value as a CMS.
I am setting up a project with orionjs and i found myself cloning both core and styles locally to modify a bit the look and feel.
What are your thoughts on moving views out of core and just have the core package with funcitonality (similar to useraccounts:core) and then have orionjs:bootstrap, orionjs:semantic, orionjs:polymer etc etc
What is triggering this message? Is there something I can do to prevent this error from popping up so frequently? It will confuse the admin's for sure.
What is the correct way and syntax for setting the default field value or the autoValue of the field ?
Hey just wondering if you've played around with spiderable with any of the orion builds, I have tried to strip some of my sites down and resolve the issues (my own fault for not firing up spiderable initially). But having trouble getting it resolve correctly on both my orion sites.
What do you think about the current documentation site?
Would you prefer that the docs is on orion.meteor.com or github?
Similar to how you've done the Logout
button. I believe it would be efficient for a Home
or Site
button to be created in the admin section. Once clicked it will take you to the home page of the site so the user doesn't always have to remove \admin\ from the url to get to the home page.
Any ideas on the best way to implement this?
Would it be possible to allow a check for the admin background image if the definition is defined.
I think allowing the user to change the background image would really be nice , especially since I am planning on building different apps using Orion.
A simple check if {{ dict 'adminBackground' 'http://currentbackground'}} would be nice.
Cool package. I saw a section about Filesystems, but it only showed S3 and no clear description of how to use it for local filesystems. Please add this to the docs or show me an example here.
orionjs:core
and orionjs:styles
to my app that I already developed, it did not crush but /admin was unavailable (error 404). Then I tried to install orion on a fresh app and it worked OK. I noticed that more dependencies were installed that time. Then I ran meteor update
on the 1st app and indeed it added some dependencies that were not added before.can only call onCreateUser once
. I used onCreateUser
function to add some additional fields inside users' profile field. So, I commented the function out , ran meteor again, the app opened OK and /admin was accessible.So, all is solved except inability of onCreateUser
usage. Maybe I can add new fields to users from the orion config? I did not find any clue in http://orion.meteor.com/docs/accounts . Should I add new fields by means of useraccounts-core
package?(it was added as one of dependencies)
More of a UI suggestion to have the default functionality of the table to make the first column also clickable into the edit area instead of only being able to click the edit button on the right (like wordpress)
This message can be seen in the browser console:
[UserAccounts] AccountsTemplates.ensureSignedIn will be deprecated soon, please use the plugin version
see https://github.com/meteor-useraccounts/core/blob/master/Guide.md#content-protection
How to reproduce :
Go on the dictionnary page in the admin area and refresh your browser (tested on Google Chrome).
Error :
Uncaught TypeError: Cannot read property 'hasPermission' of undefined
Complete logs :
Uncaught TypeError: Cannot read property 'hasPermission' of undefinedcommon.js:74 (anonymous function)common.js:73 orion.dictionary.getDefaultCategoryroutes.js:96 Router.route.datacontroller.js:13 bindDatadynamic_template.js:108 DynamicTemplate.datadynamic_template.js:141 (anonymous function)builtins.js:22 (anonymous function)view.js:179 (anonymous function)view.js:414 Blaze._withCurrentViewview.js:178 viewAutoruntracker.js:263 Tracker.Computation._computetracker.js:181 Tracker.Computationtracker.js:454 Tracker.autorunview.js:177 Blaze.View.autorunbuiltins.js:21 (anonymous function)view.js:206 fireCallbackstracker.js:480 Tracker.nonreactiveview.js:203 (anonymous function)view.js:414 Blaze._withCurrentViewview.js:202 Blaze._fireCallbacksview.js:220 Blaze._createViewview.js:224 Blaze._materializeViewmaterializer.js:117 Blaze._DOMMaterializer.def.visitObjectvisitors.js:61 HTML.Visitor.def.visitview.js:242 doMaterializetracker.js:480 Tracker.nonreactiveview.js:240 doRenderview.js:179 (anonymous function)view.js:414 Blaze._withCurrentViewview.js:178 viewAutoruntracker.js:263 Tracker.Computation._computetracker.js:181 Tracker.Computationtracker.js:454 Tracker.autorunview.js:177 Blaze.View.autorunview.js:231 (anonymous function)tracker.js:480 Tracker.nonreactiveview.js:230 Blaze._materializeViewview.js:513 Blaze.renderdynamic_template.js:411 DynamicTemplate.insertrouter_client.js:42 Router.insertrouter_client.js:32 maybeAutoInsertRouter
Error is on comon.js file line 74 :
/**
* Returns the default category of the dictionary
*/
orion.dictionary.getDefaultCategory = function() {
if (!Meteor.userId()) {
return _.first(_.keys(this.categories));
}
var found = null;
_.keys(this.categories).map(function(category) {
// error on this line
if (Meteor.user().hasPermission('dictionary.' + category)) {
found = category
}
})
return found;
};
Is there any documentation or a guide for creating Orionjs extensions, for instances how you created orionjs:pages , orionjs:s3 . etc.
I would like to start contributing by building extensions. Also are extensions the same thing as orion.attribute ?
Hi @nicolaslopezj,
I have enjoyed testing orion and wondered if you have plans to implement routing that is not declared within the code of the app? I.e. the ability to create and remove pages via the admin panel.
Thanks!
I offer an idea to add a function on entities to determine if a property has Read or Write access for the current user. Here is an example for a hypothetical Event entity, which has some public properties, some config properties, and some read-only properties:
checkPropertyAccess: function(propName, accessType) {
accessTypes = [];
configurationProps = ['invitationEmailTemplate', "reminderEmailTemplate"]
readOnlyProps = ['rsvpYesReplies', 'rsvpNoReplies', 'rsvpMaybeReplies']
//grant READ access depending on property and role
if (!configProps.contains(propName) || currentUser.hasRole('ADMIN') || this.eventAdmins.contains(currentUser.id)) {
accessTypes.push('READ')
}
//grant WRITE access if eventAdmin, for all except readOnly props
if (this.eventAdmins.contains(currentUser.id) && !readOnlyProps.contains(propName)) {
accessTypes.push('WRITE')
}
//grant superuser WRITE access to any prop
else if (currentUser.hasRole('ADMIN')) {
accessTypes.push('WRITE')
}
return accessTypes.contains( accessType);
}
Note: this is pseudo-code, I don't know how to access the currentUser or how to define roles, etc.
Would be nice to have a sort of weighting system instead of alphabetical for the sorting of the dictionary navigation items.
Got a small problam after changed the dict fields am using. Now the field's HTML content, which was initially a textarea, displays the HTML code. It's not rendered.
Is there a way to correct this?
Hello.
I am trying this out for my app, my app already has a router and routes configured, so, /admin will fail everytime.
How can I add this properly without messing up the existing app or the admin part?
When doing my own serverside Collection.insert({}) I get this issue because there's problems adding the defaultSchema attributes?
Error: Meteor.userId can only be invoked in method calls. Use this.userId in publish functions.
at Object.Meteor.userId (packages/accounts-base/accounts_server.js:19:1)
at Object.defaultSchema.createdBy.autoValue (packages/orionjs:core/lib/entities/add.js:75:1)
I have a few entities defined and each has its own individual structure for its index table.
This is an entity named 'sports' -
This is another entity named 'events' -
If I select 'sports' first and then switch to 'events' the index table ends up looking like this -
No console error messages are shown.
This only happens when navigating between entities.
Any idea why?
I believe npm/package is auto-generated.
Dictionary entries should be seeded (database prepopulated), I felt. This way, the admin users won't be met with empty fields when first using the admin interface. Having an empty field there meant they'd have to go to the home page, copy the HTML of the field in question, paste it in admin and tweak it from there.
Seeding the defaultValue from the dict_seed helper makes the first-ever edit of a dictionary field smoother for the admins.
This might not be for everybody, and there certainly might be a more elegant solution. A major drawback of this solution is that A) the site needs to be visited in order for the value to be seeded (because dict_seed needs to run for every dictionary entry), and B) that there might be a performance hit when running the template helper.
if Meteor.isClient
Template.registerHelper "dict_seed", (name, seedValue) ->
if orion.dictionary.get(name) is '' and seedValue
dictionary_id = orion.dictionary.collection.findOne()?._id
if dictionary_id
to_set = {}
to_set[name] = seedValue
orion.dictionary.collection.update(dictionary_id, $set: to_set)
log "Reset dictionary definition value for #{name} to seedValue"
orion.dictionary.get(name)
For reference, this is the original dict
helper:
Template.registerHelper('dict', function(name, defaultValue) {
return orion.dictionary.get(name, defaultValue);
});
Hi ! First, thank you for this great project. I was making something similar but switched to yours which is really nice. I'll have some contributions very soon (like in-situ editing for dictionary values).
On the website, the suggested way to subscribe to entities is:
orion.subs.subscribe('posts');
However, that's not how it works, you must do:
orion.subs.subscribe('entity', 'posts');
Instead of having the admin dropdown remain fully in tact when viewing on a mobile device, The dropdown should actually collapse to the hamburger like the native bootstrap navbar does. I'm finding it to be a little difficult to demo Orion to potential mobile users due to the fact that the entities and nav links are always tall.
By doing this we would be able to have full view of the current form that we are working with and easily use the hamburger nav to switch between entities.
Is there a plan to enable relationships with Entities? Like having 1-1, 1-N and N-N relationships between them?
That'd be a very nice step ahead and be very helpful to build more complex data structure.
Hello.
I am trying to setup orion for the users collection, that is a special case if meteor.users exists (accounts package).
Since the AddEntity will internally do Meteor.Collection (and new SimpleSchema), the "error '/users/insert' is already defined" will show up.
It should check if the collection is "users", and if so, use Meteor.users instead of new Mongo.Collection like I do in my app:
var col;
if(collectionName === "users")
col = TSW.Collections[collectionName] = Meteor.users;
else
col = TSW.Collections[collectionName] = new Mongo.Collection(collectionName);
If we use SimpleSchema on our app, it will also cause problems since orion also creates a new SimpleSchema object.
I can for example compromise my design to receive a SimpleSchema object from orion.addEntity, in that case, I can then check, hey do we have an orionOptions object? if so, then addEntity and use the return for our SimpleSchema, if not then just create a new SimpleSchema.
PS: For completeness, here is the code I am using : http://pastebin.com/dFk5nCvj
PS2: Using Mongo.Collection because the docs state it should now be used like that, is suspect Meteor.Collection will be depreciated soon.
Hi all
Am trying to link 2 entities together via it's ID, via a 1-N (one to many) relationship (should be simple).
So I have pages1
and pages2
, and I want page1 to have many page2
linked. So I put in page2
a field parent
and use a select
(via autoform) to link it.
Problem: cannot make it work. First the type of object wasn't accepted. Now this code is the closest I can get, but my meteor app doesn't update/save anything and there are no error message.
Here is the pages1.js and pages2.js entities declaration files :
page1.js
// 1st level pages
orion.addEntity('pages1', {
title: {
type: String,
label: "Titre"
},
content: orion.attribute('froala', {
label: "Contenu"
})
}, {
icon: 'bookmark',
sidebarName: 'Page niveau 1',
pluralName: 'Pages1',
singularName: 'Page1',
tableColumns: [
{ data:'title', title: 'Titre' },
{ data:'content', title: 'Contenu' }
]
});
page2.js
// 2nd level pages
orion.addEntity('pages2', {
title: {
type: String,
label: "Titre"
},
content: orion.attribute('froala', {
label: "Contenu"
}),
image: orion.attribute('file', {
label: 'Image',
optional: true
}),
liens: {
type: [String],
label: "Liens",
optional: true
},
articles: orion.attribute('file', {
label: 'Article',
optional: true
}),
parent: {
type: [Object],
autoform: {
// type: "select2", // FIXME: specifying SELECT2 type makes an error
afFieldInput: {
multiple: true
},
options : function() {
return orion.entities.pages1.collection.find().map(function (obj) {
return {
label: obj.title,
value: obj._id
};
});
},
},
label: 'Parent',
optional: true
}
}, {
icon: 'bookmark',
sidebarName: 'Page niveau 2',
pluralName: 'Pages2',
singularName: 'Page2',
tableColumns: [
{ data:'title', title: 'Titre' },
{ data:'content', title: 'Contenu' }
]
});
Do you have any idea why this ain't working? Maybe a better way to make relationships like this work?
Thanks in advance for your help and advice!
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.