Commit Graph

70 Commits

Author SHA1 Message Date
Hannah Wolfe
4ed73edc62 fixes #202 - urls contain reserved chars
- further updates to the slugging function to check for certain words
- TODO: handle duplicates #221
2013-06-25 22:27:38 +01:00
Hannah Wolfe
7993cc22ab fixes #202 - urls contain reserved chars
- added all reserved chars and \ to the list of chars which get filtered out
- added documentation
2013-06-25 19:07:19 +01:00
cobbspur
376cf647e5 closes #197 & closes #196 pagination wiring and helper
- adds routes for homepage pagination
- adds helper function to compile template file for pagination
- adds next and prev to post for next and previous page
- adds handlebars template for pagination
2013-06-25 16:13:19 +01:00
Hannah Wolfe
ba810fb0bb issue #58 - removing the iiwf
Function wrapper and use strict pragma removed from all node files
2013-06-25 13:46:50 +01:00
Jacob Gable
2b7d0f054d Import and Export UI
Added a basic UI and implementation for importing and exporting data.
Hooked up the routes and tested importing and exporting a version 001
file.

Slipped in the TemplateView in base.js but didn't end up using it.  I
think it will encapsulate common logic for template views pretty well.

Should close #175.
2013-06-23 16:06:57 -05:00
Gabor Javorszky
e40eb12a51 Fix forge returning null on empty fetch
Closes #184. It got broken because of a9c4a5409e
2013-06-22 13:43:01 +01:00
Hannah Wolfe
d15f1f8961 closes #101 - data model updates
Further changes to the data model to ensure created_by, author_id and updated_by are all set to user 1
Updated settings such that the default type is always 'general', and changed the types in the fixtures to be slightly more useful
Added additional assertions to tests to cover more assumptions about data
2013-06-17 23:59:08 +01:00
Hannah Wolfe
50eb91fe51 issue #165 - reloading settings
- ghost.js - split the settings loading out of ghost.init, so that we have a function for loading / reloading settings
- api.js - implemented a new requestHandler, the cachedSettingsRequestHandler which handles all aspects of local caching for settings when making requests
- app.js - updated the settings api routes to use the new cached request handler
2013-06-17 23:24:05 +01:00
Hannah Wolfe
f58c8eb6c3 Merge pull request #163 from jgable/exportData
Data import and export
2013-06-17 01:19:48 -07:00
Hannah Wolfe
0d5b6e8915 Added consistent error handling throughout the models 2013-06-16 22:36:28 +01:00
ErisDS
17c8c02eae closes #117 - published order
Fixes the knex query so that posts are correctly returned in the order of published_at, desc
2013-06-16 12:21:49 +01:00
Tim Griesser
fad7087cd1 Setting published_at when post changes to published status 2013-06-15 19:24:27 -04:00
Jacob Gable
0c4ccc284b Data import and export 2013-06-15 20:52:32 +00:00
Hannah Wolfe
b816225dca Merge pull request #159 from jgable/fixRequireTree
Error check and default set for require-tree.
2013-06-15 08:48:51 -07:00
Jacob Gable
b4b8be2bb8 Error check and default set for require-tree. 2013-06-15 09:22:50 -05:00
Tim Griesser
a5b9274bb5 adding uuid's for the posts, users, settings 2013-06-15 10:16:20 -04:00
Gabor Javorszky
b0b11573f6 Restricting Admin user creation
Solves #138.
* Removed user and user_roles from fixture
* Restricted user creation to one user. That user is id 1, is admin
* Changed tests so they accommodate for this fact
* Can not create new user (fails on test, flashes on signup)
2013-06-15 10:10:26 +01:00
Hannah Wolfe
320bb311bc Merge pull request #131 from javorszky/iss82-2
Registration no longer hangs on duplicate emails
2013-06-11 04:41:22 -07:00
Gabor Javorszky
e0caddeee7 Registration no longer hangs on duplicate emails
There was a return missing. This closes #82 again.
2013-06-10 21:26:20 +01:00
Hannah Wolfe
b3775feba0 Merge branch 'pr/119'
Conflicts:
	core/admin/assets/js/router.js
	core/admin/views/default.hbs
	core/admin/views/settings.hbs
	core/shared/data/fixtures/001.js
2013-06-09 21:41:07 +01:00
Gabor Javorszky
e271c6402f Directory scanning on contents/themes and plugins
This implements #106.
* Added require-tree which is based off of @ricardobeat's module. Fully async.
* I've moved active theme and active directory to settings from config as well.
* Modified settings.hbs and settings.js to display the raw json under Settings/Appearance
2013-06-09 20:17:54 +01:00
Jacob Gable
1effc4e772 Implement a permissable interface on models
Added checks to the canThis process for a `permissable()` function
that would allow Models to override the permissions process.
2013-06-08 18:39:24 -05:00
Ricardo Tomasi
e2b3c40a34 Migrate settings page to Backbone 2013-06-08 19:36:54 -03:00
Ricardo Tomasi
c82e5976cc Changes to Settings Model
- add email default setting to fixture
- make settings a single model
- create UNIQUE index on setting keys
2013-06-08 19:24:21 -03:00
Hannah Wolfe
aa659d29b6 JSLint updates - function spacing consistency
- updating grunt-jslint to the latest version
- fixing up function spacing
2013-06-06 21:38:12 +01:00
Hannah Wolfe
60d90967e1 issue 101 - updating the data model
Added & removed many properties as required & fixed tests
Updated & also cleaned up the fixtures, inc images
Added order by published to the findPage query
2013-06-06 21:36:17 +01:00
Jacob Gable
e6f7c706cb Permissions / ACL
- Created Role model
- Created Permission model
- Linked Users->Roles with a belongsToMany relationship
- Linked Permissions to Users and Roles with a belongsToMany relationship
- Created permissions helper with functions for initializing and
  checking permissions (canThis)
- Unit tests for lots of things
2013-06-06 08:15:10 +01:00
Tim Griesser
e5ce70e175 Added models & collections for various pieces
Saving post as draft, or publishing
Added HBS parser for some client tmpls
Parsing paginated posts
Added grunt watch for hbs parsing on updates
2013-06-03 00:56:57 -04:00
Tim Griesser
b7064185d4 server half of #83, posts are draft by default, browse shows published by default 2013-06-01 15:42:11 -04:00
Tim Griesser
c55a96083a server side half of #83 2013-06-01 15:30:42 -04:00
Tim Griesser
983c171fb0 simplifying the model structure, again 2013-06-01 11:14:05 -04:00
ErisDS
185eee2a6b Implementing backbone for the blog / content view
closes #64 - adds a full example of using backbone on the frontend
remembered to squash this one!
2013-05-31 06:58:20 +01:00
Jacob Gable
a8bf3c962f Ghost.init()
- Modified jsonDataProvider to return promises for findAll and save
- Move the dataProvider initialization into the Ghost.init() function.
- Created basic unit test
2013-05-30 23:39:02 +01:00
Gabor Javorszky
ce5e757672 moved config into init function 2013-05-30 23:39:02 +01:00
Gabor Javorszky
e7c0d13f7c #73: Remap app.locals done 2013-05-30 23:39:02 +01:00
ErisDS
237af40f2e Revert "Merge branch 'fat-models' of github.com:tgriesser/Ghost into tgriesser-fat-models"
This reverts commit 611e6a49ef, reversing
changes made to a89dc1d123.
2013-05-30 23:34:53 +01:00
Tim Griesser
7cbbb3af4e lint fixes & bcrypt-nodejs 2013-05-29 21:58:59 -04:00
Tim Griesser
091790a525 merging with master 2013-05-29 18:26:10 -04:00
Gabor Javorszky
8ffa03f775 Duplicate user, error handling, password in fixture 2013-05-27 23:04:09 -05:00
Jacob Gable
c699121049 Add ghostNav helper and filter for themes; closes #47 2013-05-27 22:59:01 -05:00
Tim Griesser
a204a96cda a bit of organizing/simplifying/fattening the models 2013-05-27 13:30:03 -04:00
Hannah Wolfe
f4368a2744 Merge pull request #76 from tgriesser/pagination
Pagination
2013-05-27 10:27:38 -07:00
Gabor Javorszky
18166337b8 Replaced bcrypt with bcrypt-nodejs 2013-05-27 17:38:53 +01:00
Tim Griesser
e9696fcec2 basic pagination, with tests 2013-05-27 11:24:06 -04:00
Tim Griesser
4d0b2ee0c4 Merge branch 'master' into pagination
* master:
  done handler in final then, to ensure errors in last block are reported
  missing a done or two
  using grunt validate for npm test, fixing random jslint errors
  using promises correctly in tests
  adding mocha, getting npm test working
2013-05-27 10:11:55 -04:00
Tim Griesser
000e4e6a00 beginning of pagination api 2013-05-26 20:49:38 -04:00
Tim Griesser
4a318e9a6a using grunt validate for npm test, fixing random jslint errors 2013-05-26 20:15:46 -04:00
Tim Griesser
724592ec5f cleaning up args, allowing opts to be passed to the various bookshelf calls 2013-05-26 20:04:22 -04:00
Hannah Wolfe
5b63fcf399 Merge pull request #72 from jgable/errorHandlers
Error handlers and tests
2013-05-26 12:37:49 -07:00
ErisDS
e23381d17b Fixing JSLint and the Mocha api tests 2013-05-26 20:25:17 +01:00