Skip to content

Commit

Permalink
Merge pull request #824 from FrozenNode/dev
Browse files Browse the repository at this point in the history
Merging 5.0.0 into master
  • Loading branch information
janhartigan committed Feb 27, 2015
2 parents f2af853 + dd55479 commit 71b4101
Show file tree
Hide file tree
Showing 25 changed files with 595 additions and 436 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
Expand All @@ -13,6 +12,6 @@ branches:

before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev
- php composer.phar install

script: phpunit
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

### 5.0.0
- Upgraded to Laravel 5
- New translations (az)

### 4.16.5
- Bugfix: Another strange old bug where multiple search fields would do a where and instead of a where or

Expand Down
78 changes: 39 additions & 39 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
{
"name": "frozennode/administrator",
"description": "A database interface package for Laravel",
"homepage": "http://administrator.frozennode.com",
"keywords": ["administrator", "admin", "database", "laravel-administrator", "laravel", "cms"],
"license": "MIT",
"authors": [
{
"name": "Jan Hartigan",
"email": "[email protected]"
}
],
"support": {
"issues": "https://github.com/FrozenNode/Laravel-Administrator/issues"
},
"require": {
"php": ">=5.3.0",
"laravel/framework": "4.*",
"ckeditor/ckeditor": "4.*"
},
"require-dev": {
"mockery/mockery": "~0.9"
},
"autoload": {
"classmap": [
"src/controllers"
],
"psr-0": {
"Frozennode\\Administrator": "src/"
}
},
"scripts": {
"post-update-cmd": [
"if [ -d \"public/js/ckeditor/\" ] \nthen \nrm -R public/js/ckeditor/ \nfi ",
"if [ -d \"vendor/ckeditor/ckeditor/\" ] \nthen \nmv vendor/ckeditor/ckeditor/ public/js/ \nfi",
"if [ -d \"vendor/ckeditor/\" ] \nthen \nrm -R vendor/ckeditor/ \nfi"
]
},
"minimum-stability": "dev"
}
"name": "frozennode/administrator",
"description": "A database interface package for Laravel",
"homepage": "http://administrator.frozennode.com",
"keywords": ["administrator", "admin", "database", "laravel-administrator", "laravel", "cms"],
"license": "MIT",
"authors": [
{
"name": "Jan Hartigan",
"email": "[email protected]"
}
],
"support": {
"issues": "https://github.com/FrozenNode/Laravel-Administrator/issues"
},
"require": {
"php": ">=5.4.0",
"laravel/framework": "5.*",
"ckeditor/ckeditor": "4.*"
},
"require-dev": {
"mockery/mockery": "~0.9"
},
"autoload": {
"classmap": [
"src/controllers"
],
"psr-0": {
"Frozennode\\Administrator": "src/"
}
},
"scripts": {
"post-update-cmd": [
"if [ -d \"public/js/ckeditor/\" ] \nthen \nrm -R public/js/ckeditor/ \nfi ",
"if [ -d \"vendor/ckeditor/ckeditor/\" ] \nthen \nmv vendor/ckeditor/ckeditor/ public/js/ \nfi",
"if [ -d \"vendor/ckeditor/\" ] \nthen \nrm -R vendor/ckeditor/ \nfi"
]
},
"minimum-stability": "dev"
}
53 changes: 35 additions & 18 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Installation

- [Composer](#composer)
- [Laravel 4](#laravel-4)
- [Laravel 3](#laravel-3)
- [Assets](#assets)
- [Administrator Config](#administrator-config)
Expand All @@ -10,31 +11,47 @@
<a name="composer"></a>
## Composer

To install Administrator as a Composer package to be used with Laravel 4, simply add administrator to your composer.json `require` key:
To install Administrator as a Composer package to be used with Laravel 5, simply add this to your composer.json:

"require": {
"laravel/framework": "4.0.*",
"frozennode/administrator": "dev-master"
}
```json
"frozennode/administrator": "5.*"
```

..and run `composer update`. Once it's installed, you can register the service provider in `app/config/app.php` in the `providers` array:
..and run `composer update`. Once it's installed, you can register the service provider in `config/app.php` in the `providers` array:

'providers' => array(
'Frozennode\Administrator\AdministratorServiceProvider',
)
```php
'providers' => [
'Frozennode\Administrator\AdministratorServiceProvider',
]
```

Then publish Administrator's assets with `php artisan vendor:publish`. This will add the file `config/administrator.php`. This [config file](http://administrator.frozennode.com/docs/configuration) is the primary way you interact with Administrator. This command will also publish all of the assets, views, and translation files.


<a name="laravel-4"></a>
## Laravel 4

If you want to use Administrator with Laravel 4, you need to resolve to Administrator 4:

```json
"frozennode/administrator": "4.*"
```

Then publish the config file with `php artisan config:publish frozennode/administrator`. This will add the file `app/config/packages/frozennode/administrator/administrator.php`.

Then finally you need to publish the package's assets with the `php artisan asset:publish frozennode/administrator` command.

<a name="laravel-3"></a>
## Laravel 3

Since Administrator has switched over to Composer, you can no longer use `php artisan bundle:install administrator` or `php artisan bundle:upgrade administrator`. If you want to use Administrator with Laravel 3, you must switch to the [3.3.2 branch](https://github.com/FrozenNode/Laravel-Administrator/tree/3.3.2), download it, and add it in the `/bundles/administrator` directory.

After you've installed Administrator in the bundles directory, add this to your bundles.php file:
Since Administrator has switched over to Composer, you can no longer use `php artisan bundle:install administrator` or `php artisan bundle:upgrade administrator`. If you want to use Administrator with Laravel 3, you must switch to the [3.3.2 branch](https://github.com/FrozenNode/Laravel-Administrator/tree/3.3.2), download it, and add it in the `/bundles/administrator` directory and add this to your bundles.php file:

'administrator' => array(
'handles' => 'admin', //this determines what URI this bundle will use
'auto' => true,
),
```php
'administrator' => array(
'handles' => 'admin', //this determines what URI this bundle will use
'auto' => true,
),
```

<a name="assets"></a>
## Assets
Expand All @@ -51,11 +68,11 @@ It is best to publish the assets whenever Administrator updates. Instead of doin
],
"post-install-cmd": [
"php artisan optimize",
"php artisan asset:publish frozennode/administrator"
"php artisan vendor:publish --tag=public --force"
],
"post-update-cmd": [
"php artisan optimize",
"php artisan asset:publish frozennode/administrator"
"php artisan vendor:publish --tag=public --force"
]
},

Expand Down
2 changes: 1 addition & 1 deletion docs/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ There are no special exceptions in the model config files...so you can localize

Administrator currently supports the following languages:

> ar bg ca da de en es eu fi fr hr hu it ja nb nl pl pt pt-BR ru se si sk sr tr uk vi zh-CN zh-TW
> ar az bg ca da de en es eu fi fr hr hu it ja nb nl pl pt pt-BR ru se si sk sr tr uk vi zh-CN zh-TW
If you don't see the language you want, [contributing a new language is crazy easy](#contributing)!

Expand Down
27 changes: 14 additions & 13 deletions public/js/knockout/custom-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,11 +547,11 @@
editor = editors[options.id];
else
{
$element.ckeditor({
$element.ckeditor({
language : language,
readOnly : !adminData.edit_fields[context.field_name].editable
});

editor = $element.ckeditorGet();
editors[options.id] = editor;
}
Expand Down Expand Up @@ -583,15 +583,15 @@
}

//handle destroying an editor (based on what jQuery plugin does)
ko.utils.domNodeDisposal.addDisposeCallback(element, function (test) {
var editor = editors[options.id];

if (editor)
{
editor.destroy();
delete editors[options.id];
}
});
ko.utils.domNodeDisposal.addDisposeCallback(element, function (test) {
var editor = editors[options.id];

if (editor)
{
editor.destroy();
delete editors[options.id];
}
});
},
update: function (element, valueAccessor, allBindingsAccessor, context)
{
Expand Down Expand Up @@ -630,7 +630,7 @@
* The markdown binding is attached to the field next a markdown textarea
*/
ko.bindingHandlers.markdown = {
update: function (element, valueAccessor, allBindingsAccessor, context)
update: function (element, valueAccessor, allBindingsAccessor, context)
{
//handle programmatic updates to the observable
var value = ko.utils.unwrapObservable(valueAccessor());
Expand Down Expand Up @@ -688,7 +688,8 @@
url: options.upload_url,
flash_swf_url: asset_url + 'js/plupload/js/plupload.flash.swf',
silverlight_xap_url: asset_url + 'js/plupload/js/plupload.silverlight.xap',
filters: filters
filters: filters,
multipart_params: {"_token" : window.csrf}
});

viewModel[cacheName].init();
Expand Down
60 changes: 23 additions & 37 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,39 @@ Administrator is an administrative interface builder for [Laravel](http://larave

- **Author:** Jan Hartigan
- **Website:** [http://frozennode.com](http://administrator.frozennode.com/)
- **Version:** 4.16.5
- **Version:** 5.0.0

[![Build Status](https://travis-ci.org/FrozenNode/Laravel-Administrator.png?branch=master)](https://travis-ci.org/FrozenNode/Laravel-Administrator)

<img src="https://raw.github.com/FrozenNode/Laravel-Administrator/master/examples/images/overview.jpg" />

## Composer

To install Administrator as a Composer package to be used with Laravel 4, simply add this to your composer.json:
To install Administrator as a Composer package to be used with Laravel 5, simply add this to your composer.json:

```json
"frozennode/administrator": "dev-master"
"frozennode/administrator": "5.*"
```

..and run `composer update`. Once it's installed, you can register the service provider in `app/config/app.php` in the `providers` array:
..and run `composer update`. Once it's installed, you can register the service provider in `config/app.php` in the `providers` array:

```php
'providers' => array(
'Frozennode\Administrator\AdministratorServiceProvider',
)
'providers' => [
'Frozennode\Administrator\AdministratorServiceProvider',
]
```

Then publish the config file with `php artisan config:publish frozennode/administrator`. This will add the file `app/config/packages/frozennode/administrator/administrator.php`. This [config file](http://administrator.frozennode.com/docs/configuration) is the primary way you interact with Administrator.
Then publish Administrator's assets with `php artisan vendor:publish`. This will add the file `config/administrator.php`. This [config file](http://administrator.frozennode.com/docs/configuration) is the primary way you interact with Administrator. This command will also publish all of the assets, views, and translation files.

### Laravel 4

If you want to use Administrator with Laravel 4, you need to resolve to Administrator 4:

```json
"frozennode/administrator": "4.*"
```

Then publish the config file with `php artisan config:publish frozennode/administrator`. This will add the file `app/config/packages/frozennode/administrator/administrator.php`.

Then finally you need to publish the package's assets with the `php artisan asset:publish frozennode/administrator` command.

Expand All @@ -36,8 +46,8 @@ Since Administrator has switched over to Composer, you can no longer use `php ar

```php
'administrator' => array(
'handles' => 'admin', //this determines what URI this bundle will use
'auto' => true,
'handles' => 'admin', //this determines what URI this bundle will use
'auto' => true,
),
```

Expand All @@ -53,30 +63,6 @@ Administrator is released under the MIT License. See the LICENSE file for detail

## Recent Changelog

### 4.16.5
- Bugfix: Another strange old bug where multiple search fields would do a where and instead of a where or

### 4.16.4
- Bugfix: Strange old bug when using only a setter field on a model

### 4.16.3
- Bugfix: Adding validateString back into Admin validator to avoid issues with old versions of Laravel

### 4.16.2
- Bugfix: New Illuminate validateString method did the same thing as the Administrator method of the same name

### 4.16.1
- Bugfix: Previous update broke temporary upload paths

### 4.16.0
- It's now possible to use the raw value of a file/image field to help with storing files on remote servers.

### 4.15.0
- New uneditable states for color, password, enum, and wysiwyg fields for when the editable option resolves to false
- New translations (sk)
- Bugfix: Editable fields are now also verified on the back end
- Bugfix: Setting a string image length would fail uploads
- Bugfix: Basic validation for relationship fields wasn't working
- Bugfix: "Characters left" text was sitting unnecessarily outside the "editable" conditional
- Bugfix: Some missing image-related translations
- Bugfix: Editable option wasn't working for some fields
### 5.0.0
- Upgraded to Laravel 5
- New translations (az)
Loading

0 comments on commit 71b4101

Please sign in to comment.