Skip to content

Commit

Permalink
Merge pull request #436 from FrozenNode/dev
Browse files Browse the repository at this point in the history
Merge 4.9.0 into master
  • Loading branch information
janhartigan committed Jan 4, 2014
2 parents 7d17e35 + 50bc220 commit 5d52c21
Show file tree
Hide file tree
Showing 12 changed files with 201 additions and 36 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

### 4.9.0
- Laravel 4.1 support
- New translations (ja, pt)
- Bugfix: There was a PSR-0 filename/classname disagreement in on of the relatively unused classes (Fields\Relationships\HasOne)

### 4.8.0
- Anonymous functions can now be passed for custom action title, confirmation, and messages options
- It is now possible to return a redirect from custom actions
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"require": {
"php": ">=5.3.0",
"laravel/framework": ">=4.0.0"
"laravel/framework": "4.*"
},
"require-dev": {
"mockery/mockery": "0.8.0"
Expand Down
16 changes: 5 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Administrator is an administrative interface builder for [Laravel](http://larave

- **Author:** Jan Hartigan
- **Website:** [http://frozennode.com](http://frozennode.com)
- **Version:** 4.8.0
- **Version:** 4.9.0

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

Expand Down Expand Up @@ -53,13 +53,7 @@ Administrator is released under the MIT License. See the LICENSE file for detail

## Changelog

### 4.8.0
- Anonymous functions can now be passed for custom action title, confirmation, and messages options
- It is now possible to return a redirect from custom actions
- Selecting an item now scrolls the browser to the top of the page
- It is now possible to return accessor values into the edit form
- Default values can now be set for edit fields
- Bugfix: Custom dashboards no longer include unnecessary js files
- Bugfix: Updated to latest jQuery timepicker addon to fix some legacy jQuery UI bugs
- Bugfix: The detach() method is now used to remove related items instead of delete()
- Bugfix: The bool filter field wasn't properly grabbing results
### 4.9.0
- Laravel 4.1 support
- New translations (ja, pt)
- Bugfix: There was a PSR-0 filename/classname disagreement in on of the relatively unused classes (Fields\Relationships\HasOne)
44 changes: 26 additions & 18 deletions src/Frozennode/Administrator/AdministratorServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@ public function boot()
//set the locale
$this->setLocale();

//define a constant that the rest of the package can use to conditionally use pieces of Laravel 4.1.x vs. 4.0.x
$this->app['administrator.4.1'] = version_compare(\Illuminate\Foundation\Application::VERSION, '4.1') > -1;

//set up an alias for the base laravel controller to accommodate >=4.1 and <4.1
if ($this->app['administrator.4.1'])
class_alias('Illuminate\Routing\Controller', 'AdministratorBaseController');
else
class_alias('Illuminate\Routing\Controllers\Controller', 'AdministratorBaseController');

//include our filters, view composers, and routes
include __DIR__.'/../../filters.php';
include __DIR__.'/../../viewComposers.php';
include __DIR__.'/../../routes.php';

$this->app['events']->fire('administrator.ready');
}

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//the admin validator
$this->app['admin_validator'] = $this->app->share(function($app)
{
Expand Down Expand Up @@ -91,23 +115,6 @@ public function boot()
{
return new Menu($app->make('config'), $app->make('admin_config_factory'));
});

//include our filters, view composers, and routes
include __DIR__.'/../../filters.php';
include __DIR__.'/../../viewComposers.php';
include __DIR__.'/../../routes.php';

$this->app['events']->fire('administrator.ready');
}

/**
* Register the service provider.
*
* @return void
*/
public function register()
{

}

/**
Expand All @@ -117,7 +124,8 @@ public function register()
*/
public function provides()
{
return array();
return array('admin_validator', 'admin_config_factory', 'admin_field_factory', 'admin_datatable', 'admin_column_factory',
'admin_action_factory', 'admin_menu');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Frozennode/Administrator/Fields/Relationships/HasOne.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Frozennode\Administrator\Fields\Relationships;

class HasMany extends HasOneOrMany {
class HasOne extends HasOneOrMany {

}
}
2 changes: 1 addition & 1 deletion src/controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Config;
use Illuminate\Routing\Controllers\Controller;
use AdministratorBaseController as Controller;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Request;
Expand Down
2 changes: 1 addition & 1 deletion src/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:

> ca da de en es eu fr hu it nl pl pt-BR ru sr tr zh-CN
> ca da de en es eu fr hu it ja nl pl pt pt-BR ru sr tr zh-CN
If you don't see the language you want, [contributing a new language is crazy easy](#contributing)!

Expand Down
4 changes: 2 additions & 2 deletions src/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
//validate_model filter
Route::filter('validate_model', function($route, $request)
{
$modelName = $route->getParameter('model');
$modelName = App::make('administrator.4.1') ? $route->parameter('model') : $route->getParameter('model');

App::singleton('itemconfig', function($app) use ($modelName)
{
Expand All @@ -47,7 +47,7 @@
//validate_settings filter
Route::filter('validate_settings', function($route, $request)
{
$settingsName = $route->getParameter('settings');
$settingsName = App::make('administrator.4.1') ? $route->parameter('settings') : $route->getParameter('settings');

App::singleton('itemconfig', function($app) use ($settingsName)
{
Expand Down
55 changes: 55 additions & 0 deletions src/lang/ja/administrator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php

return array(

/*
|--------------------------------------------------------------------------
| Administrator Language Lines
|--------------------------------------------------------------------------
|
| ja - Japanese
|
*/

'dashboard' => 'ダッシュボード',
'edit' => '編集',
'filters' => '絞り込み',
'loading' => '読み込み中...',
'createnew' => '新規作成',
'new' => '新規',
'viewitem' => ':single を表示',
'id' => 'ID',
'uploadimage' => '画像のアップロード',
'imageuploading' => '画像をアップロード中',
'uploadfile' => 'ファイルをアップロード',
'fileuploading' => 'ファイルをアップロード中',
'none' => 'なし',
'all' => 'すべて',
'itemsperpage' => 'アイテム/ページ',
'noresults' => '該当なし',
'backtosite' => 'サイトに戻る',
'logout' => 'ログアウト',

'previous' => '前へ',
'next' => '次へ',

'close' => '閉じる',
'delete' => '削除',
'save' => '保存',
'create' => '作成',
'cancel' => 'キャンセル',

'active' => 'お待ちください...',
'success' => '成功!',
'error' => '操作の実行中にエラーが発生しました',

'valid_columns' => "有効な 'columns' 配列を各モデルの設定で指定してください",
'valid_title' => "有効な title と single 名を各モデルの設定で指定してください",
'valid_model' => "有効な 'model' オプションを各モデルの設定で指定してください",
'valid_edit' => "有効な 'edit_fields' 配列を各モデルの設定で指定してください",
'valid_menu' => "有効な 'menu' オプションを administrator.php の設定で指定してください",
'valid_config_path' => "有効な 'model_config_path' オプションを administrator.php の設定で指定してください。このディレクトリは存在していてかつ読取可能にしてください。",
'not_eloquent' => " は Eloquent モデルではありません",
'storage_path_permissions' => "設定ページを作成するにはストレージパスを書き込み可能にしてください",
'valid_home_page' => "有効なメニューアイテムを設定ファイルの home_page オプションで指定してください。",
);
24 changes: 24 additions & 0 deletions src/lang/ja/knockout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

return array(

/*
|--------------------------------------------------------------------------
| Administrator Language Lines for knockout
|--------------------------------------------------------------------------
|
| ja - Japanese
|
*/

'delete_active_item' => '本当にこのアイテムを削除してもよろしいですか? この操作は元に戻せません。',
'saving' => '保存中...',
'saved' => 'アイテムを保存しました。',
'deleting' => '削除中...',
'deleted' => 'アイテムを削除しました',
'character_left' => ' 文字残り',
'characters_left' => ' 文字残り',
'no_results' => '該当する項目がありません',
'select_options' => 'オプションを選択',

);
56 changes: 56 additions & 0 deletions src/lang/pt/administrator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

return array(

/*
|--------------------------------------------------------------------------
| Administrator Language Lines
|--------------------------------------------------------------------------
|
| pt - Portuguese
|
*/

'dashboard' => 'Painel',
'edit' => 'Editar',
'filters' => 'Filtros',
'loading' => 'A carregar...',
'createnew' => 'Criar novo',
'new' => 'Novo',
'viewitem' => 'Visualizar :single',
'id' => 'ID',
'uploadimage' => 'Carregar imagem',
'imageuploading' => 'A carregar imagem',
'uploadfile' => 'Carregar arquivo',
'fileuploading' => 'Carregar arquivo',
'none' => 'Nenhum',
'all' => 'Todos',
'itemsperpage' => 'itens por página',
'noresults' => 'Sem Resultados',
'backtosite' => 'Voltar para o Site',
'logout' => 'Sair',

'previous' => 'anterior',
'next' => 'próximo',

'close' => 'Fechar',
'delete' => 'Remover',
'save' => 'Guardar',
'create' => 'Criar',
'cancel' => 'Cancelar',

'active' => 'Um momento...',
'success' => 'Sucesso!',
'error' => 'Ocorreu um erro a executar esta ação.',

'valid_columns' => "Precisa de fornecer um array válido em 'columns' em cada configuração dos models.",
'valid_title' => "Precisa de fornecer um título e nome singular em cada configuração dos models",
'valid_model' => "Precisa de fornecer uma opção válida em 'model' para cada configuração de models",
'valid_edit' => "Precisa de fornecer uma opção válida em 'edit_fields' para cada configuração de models",
'valid_menu' => "Precisa de fornecer uma opção válida em 'menu' no arquivo de configuração administrator.php",
'valid_config_path' => "Opção inválida em 'model_config_path' no arquivo de configuração administrator.php. O diretório precisa existir e ter permissão de leitura.",
'not_eloquent' => " não é um model Eloquent",
'storage_path_permissions' => "O caminho para o storage precisa ter permissão de escrita.",
'valid_home_page' => "Precisa de fornecer um item de menu válido na opção 'home_page'.",
);

23 changes: 23 additions & 0 deletions src/lang/pt/knockout.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

return array(

/*
|--------------------------------------------------------------------------
| Administrator Language Lines for knockout
|--------------------------------------------------------------------------
|
| pt - Portuguese
|
*/

'delete_active_item' => 'Tem certeza que deseja apagar este item? Este processo não é reversível.',
'saving' => 'A guardar...',
'saved' => 'Item guardado.',
'deleting' => 'A remover...',
'deleted' => 'Item removido.',
'character_left' => ' caracter a faltar',
'characters_left' => ' caracteres a faltar',
'no_results' => 'Nenhum resultado encontrado',
'select_options' => 'Selecione uma opção',
);

0 comments on commit 5d52c21

Please sign in to comment.