Changed: #1315 Adding work i have done so far.
This commit is contained in:
parent
7f77a27119
commit
0cd318bcb8
270 changed files with 53349 additions and 8 deletions
|
@ -206,3 +206,5 @@ code/ryzom/server/src/ryzom_admin_service/ryzom_admin_service
|
||||||
code/ryzom/server/src/ryzom_naming_service/ryzom_naming_service
|
code/ryzom/server/src/ryzom_naming_service/ryzom_naming_service
|
||||||
code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service
|
code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service
|
||||||
code/ryzom/server/src/tick_service/tick_service
|
code/ryzom/server/src/tick_service/tick_service
|
||||||
|
# WebTT temp dir
|
||||||
|
code/ryzom/tools/server/www/webtt/app/tmp
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
*
|
*
|
||||||
* [Note Routing.admin is deprecated in 1.3. Use Routing.prefixes instead]
|
* [Note Routing.admin is deprecated in 1.3. Use Routing.prefixes instead]
|
||||||
*/
|
*/
|
||||||
//Configure::write('Routing.prefixes', array('admin'));
|
Configure::write('Routing.prefixes', array('admin'));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn off all caching application-wide.
|
* Turn off all caching application-wide.
|
||||||
|
@ -201,12 +201,12 @@
|
||||||
/**
|
/**
|
||||||
* A random string used in security hashing methods.
|
* A random string used in security hashing methods.
|
||||||
*/
|
*/
|
||||||
Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
|
Configure::write('Security.salt', '3928c5uM398u4R39m4u8c3m493U49');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A random numeric string (digits only) used to encrypt/decrypt strings.
|
* A random numeric string (digits only) used to encrypt/decrypt strings.
|
||||||
*/
|
*/
|
||||||
Configure::write('Security.cipherSeed', '76859309657453542496749683645');
|
Configure::write('Security.cipherSeed', '849713027853098175087095830289');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply timestamps with the last modified time to static assets (js, css, images).
|
* Apply timestamps with the last modified time to static assets (js, css, images).
|
||||||
|
|
18
code/ryzom/tools/server/www/webtt/app/config/database.php
Normal file
18
code/ryzom/tools/server/www/webtt/app/config/database.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
class DATABASE_CONFIG {
|
||||||
|
|
||||||
|
var $default = array(
|
||||||
|
'driver' => 'mysqli',
|
||||||
|
'persistent' => false,
|
||||||
|
'host' => 'localhost',
|
||||||
|
'login' => 'webtt',
|
||||||
|
'password' => 'webtt77',
|
||||||
|
'database' => 'webtt2',
|
||||||
|
'encoding' => 'y'
|
||||||
|
);
|
||||||
|
var $raw_files = array(
|
||||||
|
'driver' => "",
|
||||||
|
'datasource' => 'raw_files',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
?>
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Application level Controller
|
||||||
|
*
|
||||||
|
* This file is application-wide controller file. You can put all
|
||||||
|
* application-wide controller-related methods here.
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.controller
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a placeholder class.
|
||||||
|
* Create the same file in app/app_controller.php
|
||||||
|
*
|
||||||
|
* Add your application-wide methods in the class below, your controllers
|
||||||
|
* will inherit them.
|
||||||
|
*
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.controller
|
||||||
|
* @link http://book.cakephp.org/view/957/The-App-Controller
|
||||||
|
*/
|
||||||
|
class AppController extends Controller {
|
||||||
|
var $components = array('DebugKit.Toolbar', 'Session');
|
||||||
|
}
|
|
@ -0,0 +1,128 @@
|
||||||
|
<?php
|
||||||
|
class FileIdentifiersController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'FileIdentifiers';
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
$this->FileIdentifier->recursive = 0;
|
||||||
|
$this->set('fileIdentifiers', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid file identifier', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('fileIdentifier', $this->FileIdentifier->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->FileIdentifier->create();
|
||||||
|
if ($this->FileIdentifier->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The file identifier has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The file identifier could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$translationFiles = $this->FileIdentifier->TranslationFile->find('list');
|
||||||
|
$identifiers = $this->FileIdentifier->Identifier->find('list');
|
||||||
|
$this->set(compact('translationFiles', 'identifiers'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid file identifier', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->FileIdentifier->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The file identifier has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The file identifier could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->FileIdentifier->read(null, $id);
|
||||||
|
}
|
||||||
|
$translationFiles = $this->FileIdentifier->TranslationFile->find('list');
|
||||||
|
$identifiers = $this->FileIdentifier->Identifier->find('list');
|
||||||
|
$this->set(compact('translationFiles', 'identifiers'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for file identifier', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->FileIdentifier->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('File identifier deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('File identifier was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
function admin_index() {
|
||||||
|
$this->FileIdentifier->recursive = 0;
|
||||||
|
$this->set('fileIdentifiers', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid file identifier', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('fileIdentifier', $this->FileIdentifier->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->FileIdentifier->create();
|
||||||
|
if ($this->FileIdentifier->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The file identifier has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The file identifier could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$translationFiles = $this->FileIdentifier->TranslationFile->find('list');
|
||||||
|
$identifiers = $this->FileIdentifier->Identifier->find('list');
|
||||||
|
$this->set(compact('translationFiles', 'identifiers'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid file identifier', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->FileIdentifier->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The file identifier has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The file identifier could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->FileIdentifier->read(null, $id);
|
||||||
|
}
|
||||||
|
$translationFiles = $this->FileIdentifier->TranslationFile->find('list');
|
||||||
|
$identifiers = $this->FileIdentifier->Identifier->find('list');
|
||||||
|
$this->set(compact('translationFiles', 'identifiers'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for file identifier', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->FileIdentifier->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('File identifier deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('File identifier was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,124 @@
|
||||||
|
<?php
|
||||||
|
class IdentifiersController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'Identifiers';
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
$this->Identifier->recursive = 0;
|
||||||
|
$this->set('identifiers', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid identifier', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('identifier', $this->Identifier->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Identifier->create();
|
||||||
|
if ($this->Identifier->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The identifier has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The identifier could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$languages = $this->Identifier->Language->find('list');
|
||||||
|
$this->set(compact('languages'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid identifier', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Identifier->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The identifier has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The identifier could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Identifier->read(null, $id);
|
||||||
|
}
|
||||||
|
$languages = $this->Identifier->Language->find('list');
|
||||||
|
$this->set(compact('languages'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for identifier', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Identifier->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Identifier deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Identifier was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
function admin_index() {
|
||||||
|
$this->Identifier->recursive = 0;
|
||||||
|
$this->set('identifiers', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid identifier', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('identifier', $this->Identifier->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Identifier->create();
|
||||||
|
if ($this->Identifier->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The identifier has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The identifier could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$languages = $this->Identifier->Language->find('list');
|
||||||
|
$this->set(compact('languages'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid identifier', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Identifier->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The identifier has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The identifier could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Identifier->read(null, $id);
|
||||||
|
}
|
||||||
|
$languages = $this->Identifier->Language->find('list');
|
||||||
|
$this->set(compact('languages'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for identifier', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Identifier->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Identifier deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Identifier was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,209 @@
|
||||||
|
<?php
|
||||||
|
class ImportedTranslationFilesController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'ImportedTranslationFiles';
|
||||||
|
var $layout = "default_debug";
|
||||||
|
function index() {
|
||||||
|
$this->ImportedTranslationFile->recursive = 0;
|
||||||
|
$this->set('importedTranslationFiles', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid translation file', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('importedTranslationFile', $this->ImportedTranslationFile->read(null, $id));
|
||||||
|
// var_dump($this->ImportedTranslationFile->RawFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_import($filename = null) {
|
||||||
|
// $this->view = "index";
|
||||||
|
App::import("Vendor","UxtParser", array("file" => 'UxtParser.php'));
|
||||||
|
/* if (!$filename) {
|
||||||
|
$this->Session->setFlash(__('Invalid file', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
return 0;
|
||||||
|
}*/
|
||||||
|
$filename="diff/pl_diff_4DEC868A.uxt";
|
||||||
|
$translationFile = $this->ImportedTranslationFile->find('first', array('conditions' => array('ImportedTranslationFile.filename' => $filename)));
|
||||||
|
if ($translationFile)
|
||||||
|
{
|
||||||
|
$this->Session->setFlash(__('Translation file already imported', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// var_dump($file);
|
||||||
|
$parser = new UxtParser();
|
||||||
|
$parsedFile = $parser->parseFile($filename);
|
||||||
|
// var_dump($parsedFile);
|
||||||
|
$arr = explode("_", basename($filename, ".uxt"));
|
||||||
|
// var_dump($arr);
|
||||||
|
$language_id = 1;
|
||||||
|
|
||||||
|
$this->ImportedTranslationFile->create();
|
||||||
|
$data['ImportedTranslationFile']['language_id'] = $language_id;
|
||||||
|
$data['ImportedTranslationFile']['filename'] = $filename;
|
||||||
|
//$this->ImportedTranslationFile->save($data);
|
||||||
|
foreach ($parsedFile as $ent)
|
||||||
|
{
|
||||||
|
$fi_data = array();
|
||||||
|
if ($ent['type'] != "string")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
|
$i_data['language_id'] = $language_id;
|
||||||
|
$i_data['translation_index'] = $ent['index'];
|
||||||
|
$i_data['reference_string'] = $ent['string'];
|
||||||
|
unset($this->ImportedTranslationFile->Language->Identifier->id);
|
||||||
|
$identifier = $this->ImportedTranslationFile->Language->Identifier->find('first',array('conditions' => array('Identifier.identifier' => $ent['identifier'], 'Identifier.language_id' => $language_id)));
|
||||||
|
if ($identifier)
|
||||||
|
{
|
||||||
|
// var_dump($identifier);
|
||||||
|
$i_data['id']=$identifier['Identifier']['id'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$i_data['identifier'] = $ent['identifier'];
|
||||||
|
$i_data['translated'] = false;
|
||||||
|
}
|
||||||
|
var_dump($i_data);
|
||||||
|
$this->ImportedTranslationFile->Language->Identifier->save(array('Identifier' => $i_data));
|
||||||
|
$identifier_id = $this->ImportedTranslationFile->Language->Identifier->id;
|
||||||
|
var_dump($identifier_id);
|
||||||
|
|
||||||
|
unset($this->ImportedTranslationFile->FileIdentifier->id);
|
||||||
|
//TODO - set FileIdentifier['id'] if we import already imported file (imported imported file temporarly disabled)
|
||||||
|
// $identifier = $this->ImportedTranslationFile->FileIdentifier->find('first',array('conditions' => array('FileIdentifier.identifier' => $ent['identifier'], 'FileIdentifier.translation_file_id' => $)));
|
||||||
|
// $data['FileIdentifier']['translation_file_id'] = $this->ImportedTranslationFile->id;
|
||||||
|
if ($ent['diff'])
|
||||||
|
$fi_data['command'] = "DIFF " . mb_strtoupper($ent['diff']);
|
||||||
|
$fi_data['translation_index'] = $ent['index'];
|
||||||
|
// $data['FileIdentifier']['identifier_id'] = ;
|
||||||
|
$fi_data['reference_string'] = $ent['string'];
|
||||||
|
$fi_data['identifier_id'] = $identifier_id;
|
||||||
|
|
||||||
|
// $this->ImportedTranslationFile->FileIdentifier->create();
|
||||||
|
// $this->ImportedTranslationFile->FileIdentifier->save($data);
|
||||||
|
$data['FileIdentifier'][] = $fi_data;
|
||||||
|
// $l_data['Language']['id'] = $language_id;
|
||||||
|
// $l_data['Identifier'][] = $i_data;
|
||||||
|
// $data['Identifier'][] = $i_data;
|
||||||
|
}
|
||||||
|
// var_dump($data);
|
||||||
|
// $this->ImportedTranslationFile->Language->saveAll($l_data);
|
||||||
|
$this->ImportedTranslationFile->saveAll($data);
|
||||||
|
$this->Session->setFlash(__('Translation file imported', true));
|
||||||
|
$this->redirect(array('action' => 'view', $this->ImportedTranslationFile->id));
|
||||||
|
$this->ImportedTranslationFile->recursive = 0;
|
||||||
|
$this->set('importedTranslationFiles', $this->paginate());
|
||||||
|
// $this->render('index');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->ImportedTranslationFile->create();
|
||||||
|
if ($this->ImportedTranslationFile->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The translation file has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The translation file could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$languages = $this->ImportedTranslationFile->Language->find('list');
|
||||||
|
$this->set(compact('languages'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid translation file', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->ImportedTranslationFile->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The translation file has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The translation file could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->ImportedTranslationFile->read(null, $id);
|
||||||
|
}
|
||||||
|
$languages = $this->ImportedTranslationFile->Language->find('list');
|
||||||
|
$this->set(compact('languages'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for translation file', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->ImportedTranslationFile->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Translation file deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Translation file was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
function admin_index() {
|
||||||
|
$this->ImportedTranslationFile->recursive = 0;
|
||||||
|
$this->set('importedTranslationFiles', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid translation file', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('translationFile', $this->ImportedTranslationFile->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->ImportedTranslationFile->create();
|
||||||
|
if ($this->ImportedTranslationFile->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The translation file has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The translation file could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$languages = $this->ImportedTranslationFile->Language->find('list');
|
||||||
|
$this->set(compact('languages'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid translation file', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->ImportedTranslationFile->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The translation file has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The translation file could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->ImportedTranslationFile->read(null, $id);
|
||||||
|
}
|
||||||
|
$languages = $this->ImportedTranslationFile->Language->find('list');
|
||||||
|
$this->set(compact('languages'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for translation file', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->ImportedTranslationFile->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Translation file deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Translation file was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,121 @@
|
||||||
|
<?php
|
||||||
|
class LanguagesController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'Languages';
|
||||||
|
var $layout="new";
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
/* App::import('Vendor', 'DebugKit.FireCake');
|
||||||
|
FireCake::enable();
|
||||||
|
firecake('testestestes');
|
||||||
|
FireCake::dump('test','testsss');*/
|
||||||
|
$this->Language->recursive = 0;
|
||||||
|
$this->set('languages', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('language', $this->Language->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Language->create();
|
||||||
|
if ($this->Language->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The language has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Language->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The language has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Language->read(null, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for language', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Language->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Language deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Language was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
function admin_index() {
|
||||||
|
$this->Language->recursive = 0;
|
||||||
|
$this->set('languages', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('language', $this->Language->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Language->create();
|
||||||
|
if ($this->Language->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The language has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Language->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The language has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Language->read(null, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for language', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Language->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Language deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Language was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,125 @@
|
||||||
|
<?php
|
||||||
|
class LanguagesController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'Languages';
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
$this->Language->recursive = 0;
|
||||||
|
$this->set('languages', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('language', $this->Language->read(null, $id));
|
||||||
|
/* $options = array('Language.id' => $id, 'recursive' => 1,
|
||||||
|
"joins" => array(
|
||||||
|
array('table' => '
|
||||||
|
),
|
||||||
|
);
|
||||||
|
var_dump($this);
|
||||||
|
$this->set('language', $bumz = $this->Language->find('first', $options));
|
||||||
|
var_dump($bumz);*/
|
||||||
|
// $this->set('identifier', $this->Language->TranslationFile->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Language->create();
|
||||||
|
if ($this->Language->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The language has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Language->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The language has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Language->read(null, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for language', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Language->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Language deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Language was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
function admin_index() {
|
||||||
|
$this->Language->recursive = 0;
|
||||||
|
$this->set('languages', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('language', $this->Language->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Language->create();
|
||||||
|
if ($this->Language->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The language has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Language->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The language has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The language could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Language->read(null, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for language', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Language->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Language deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Language was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,154 @@
|
||||||
|
<?php
|
||||||
|
class RawFilesController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'RawFiles';
|
||||||
|
var $helpers = array('Paginator', 'Time', 'Session');
|
||||||
|
var $components = array('Session');
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
$this->RawFile->recursive = 1;
|
||||||
|
// var_dump($this->RawFile->find('count'));
|
||||||
|
// $db =& ConnectionManager::getDataSource($this->RawFile->useDbConfig);
|
||||||
|
// var_dump($db->calculate($this->RawFile, 'count'));
|
||||||
|
$this->set('rawFiles', $this->paginate());
|
||||||
|
// var_dump($this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_index() {
|
||||||
|
$this->index();
|
||||||
|
}
|
||||||
|
|
||||||
|
function listdir($ext = null) {
|
||||||
|
$this->RawFile->recursive = 0;
|
||||||
|
$this->set('rawFiles', $this->paginate(array("ext" => $ext)));
|
||||||
|
// var_dump($this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid raw file', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('rawFile', $this->RawFiles->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_import($dir = null, $filename = null) {
|
||||||
|
// $this->view = "index";
|
||||||
|
// App::import("Vendor","UxtParser", array("file" => 'UxtParser.php'));
|
||||||
|
if (!$filename) {
|
||||||
|
$this->Session->setFlash(__('Invalid file', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (!$this->RawFile->open($dir, $filename))
|
||||||
|
{
|
||||||
|
$this->Session->setFlash(__('Can\'t open file', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
$importedTranslationFileModel = $this->RawFile->ImportedTranslationFile;
|
||||||
|
$languageModel = $importedTranslationFileModel->Language;
|
||||||
|
$identifierModel = $languageModel->Identifier;
|
||||||
|
$fileIdentifierModel = $importedTranslationFileModel->FileIdentifier;
|
||||||
|
|
||||||
|
// $filename="diff/pl_diff_4DEC868A.uxt";
|
||||||
|
$importedTranslationFile = $importedTranslationFileModel->find('first', array('conditions' => array('ImportedTranslationFile.filename' => $dir . DS . $filename)));
|
||||||
|
/* var_dump($translationFile);
|
||||||
|
return 0;*/
|
||||||
|
if ($importedTranslationFile)
|
||||||
|
{
|
||||||
|
$this->Session->setFlash(__('Translation file already imported', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// var_dump($file);
|
||||||
|
// $parser = new UxtParser();
|
||||||
|
$parsedFile = $this->RawFile->parseFile($filename);
|
||||||
|
// var_dump($parsedFile);
|
||||||
|
// $arr = explode("_", basename($filename, ".uxt"));
|
||||||
|
// var_dump($arr);
|
||||||
|
|
||||||
|
// $language_id = 1;
|
||||||
|
$languageCode = $this->RawFile->getLanguageCode($filename);
|
||||||
|
if (!$languageCode)
|
||||||
|
{
|
||||||
|
$this->Session->setFlash(__('Can\'t identify language', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
$language = $importedTranslationFileModel->Language->find('first', array('conditions' => array('code' => $languageCode)));
|
||||||
|
$language_id = $language['Language']['id'];
|
||||||
|
if (!$language_id)
|
||||||
|
{
|
||||||
|
$this->Session->setFlash(__('Can\'t find language in database', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// var_dump($language_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// return 0;
|
||||||
|
|
||||||
|
$importedTranslationFileModel->create();
|
||||||
|
$data['ImportedTranslationFile']['language_id'] = $language_id;
|
||||||
|
$data['ImportedTranslationFile']['filename'] = $dir . DS . $filename;
|
||||||
|
//$this->ImportedTranslationFile->save($data);
|
||||||
|
foreach ($parsedFile as $ent)
|
||||||
|
{
|
||||||
|
$fi_data = array();
|
||||||
|
if ($ent['type'] != "string")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$i_data['language_id'] = $language_id;
|
||||||
|
$i_data['translation_index'] = $ent['index'];
|
||||||
|
$i_data['reference_string'] = $ent['string'];
|
||||||
|
|
||||||
|
unset($identifierModel->id);
|
||||||
|
$identifier = $identifierModel->find('first',array('conditions' => array('Identifier.identifier' => $ent['identifier'], 'Identifier.language_id' => $language_id)));
|
||||||
|
if ($identifier)
|
||||||
|
{
|
||||||
|
// var_dump($identifier);
|
||||||
|
$i_data['id']=$identifier['Identifier']['id'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$i_data['identifier'] = $ent['identifier'];
|
||||||
|
$i_data['translated'] = false;
|
||||||
|
}
|
||||||
|
// var_dump($i_data);
|
||||||
|
$identifierModel->save(array('Identifier' => $i_data));
|
||||||
|
$identifier_id = $identifierModel->id;
|
||||||
|
// var_dump($identifier_id);
|
||||||
|
|
||||||
|
unset($fileIdentifierModel->id);
|
||||||
|
//TODO - set FileIdentifier['id'] if we import already imported file (importing imported file temporarly disabled)
|
||||||
|
// $identifier = $this->ImportedTranslationFile->FileIdentifier->find('first',array('conditions' => array('FileIdentifier.identifier' => $ent['identifier'], 'FileIdentifier.translation_file_id' => $)));
|
||||||
|
// $data['FileIdentifier']['translation_file_id'] = $this->ImportedTranslationFile->id;
|
||||||
|
if ($ent['diff'])
|
||||||
|
$fi_data['command'] = "DIFF " . mb_strtoupper($ent['diff']);
|
||||||
|
$fi_data['translation_index'] = $ent['index'];
|
||||||
|
// $data['FileIdentifier']['identifier_id'] = ;
|
||||||
|
$fi_data['reference_string'] = $ent['string'];
|
||||||
|
$fi_data['identifier_id'] = $identifier_id;
|
||||||
|
|
||||||
|
// $this->ImportedTranslationFile->FileIdentifier->create();
|
||||||
|
// $this->ImportedTranslationFile->FileIdentifier->save($data);
|
||||||
|
$data['FileIdentifier'][] = $fi_data;
|
||||||
|
// $l_data['Language']['id'] = $language_id;
|
||||||
|
// $l_data['Identifier'][] = $i_data;
|
||||||
|
// $data['Identifier'][] = $i_data;
|
||||||
|
}
|
||||||
|
// var_dump($data);
|
||||||
|
// $this->ImportedTranslationFile->Language->saveAll($l_data);
|
||||||
|
$importedTranslationFileModel->saveAll($data);
|
||||||
|
$this->Session->setFlash(__('Translation file imported', true));
|
||||||
|
$this->redirect(array('controller' => 'imported_translation_files', 'action' => 'view', $importedTranslationFileModel->id));
|
||||||
|
// $this->ImportedTranslationFile->recursive = 0;
|
||||||
|
// $this->set('importedTranslationFiles', $this->paginate());
|
||||||
|
// $this->render('index');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,130 @@
|
||||||
|
<?php
|
||||||
|
class TranslationsController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'Translations';
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
$this->Translation->recursive = 0;
|
||||||
|
$this->set('translations', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid translation', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
// $this->recursive=2;
|
||||||
|
$this->set('translation', $bumz = $this->Translation->read(null, $id));
|
||||||
|
// var_dump($bumz);
|
||||||
|
}
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Translation->create();
|
||||||
|
if ($this->Translation->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The translation has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The translation could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$identifiers = $this->Translation->Identifier->find('list');
|
||||||
|
$users = $this->Translation->User->find('list');
|
||||||
|
$this->set(compact('identifiers', 'users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid translation', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Translation->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The translation has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The translation could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Translation->read(null, $id);
|
||||||
|
}
|
||||||
|
$identifiers = $this->Translation->Identifier->find('list');
|
||||||
|
$users = $this->Translation->User->find('list');
|
||||||
|
$this->set(compact('identifiers', 'users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for translation', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Translation->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Translation deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Translation was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
function admin_index() {
|
||||||
|
$this->Translation->recursive = 0;
|
||||||
|
$this->set('translations', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid translation', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('translation', $this->Translation->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Translation->create();
|
||||||
|
if ($this->Translation->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The translation has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The translation could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$identifiers = $this->Translation->Identifier->find('list');
|
||||||
|
$users = $this->Translation->User->find('list');
|
||||||
|
$this->set(compact('identifiers', 'users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid translation', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Translation->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The translation has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The translation could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Translation->read(null, $id);
|
||||||
|
}
|
||||||
|
$identifiers = $this->Translation->Identifier->find('list');
|
||||||
|
$users = $this->Translation->User->find('list');
|
||||||
|
$this->set(compact('identifiers', 'users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for translation', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Translation->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Translation deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Translation was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,116 @@
|
||||||
|
<?php
|
||||||
|
class UsersController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'Users';
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
$this->User->recursive = 0;
|
||||||
|
$this->set('users', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid user', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('user', $this->User->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->User->create();
|
||||||
|
if ($this->User->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The user has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The user could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid user', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->User->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The user has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The user could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->User->read(null, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for user', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->User->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('User deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('User was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
function admin_index() {
|
||||||
|
$this->User->recursive = 0;
|
||||||
|
$this->set('users', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid user', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('user', $this->User->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->User->create();
|
||||||
|
if ($this->User->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The user has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The user could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid user', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->User->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The user has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The user could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->User->read(null, $id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for user', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->User->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('User deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('User was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,128 @@
|
||||||
|
<?php
|
||||||
|
class VotesController extends AppController {
|
||||||
|
|
||||||
|
var $name = 'Votes';
|
||||||
|
|
||||||
|
function index() {
|
||||||
|
$this->Vote->recursive = 0;
|
||||||
|
$this->set('votes', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid vote', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('vote', $this->Vote->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Vote->create();
|
||||||
|
if ($this->Vote->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The vote has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The vote could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$translations = $this->Vote->Translation->find('list');
|
||||||
|
$users = $this->Vote->User->find('list');
|
||||||
|
$this->set(compact('translations', 'users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid vote', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Vote->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The vote has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The vote could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Vote->read(null, $id);
|
||||||
|
}
|
||||||
|
$translations = $this->Vote->Translation->find('list');
|
||||||
|
$users = $this->Vote->User->find('list');
|
||||||
|
$this->set(compact('translations', 'users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for vote', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Vote->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Vote deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Vote was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
function admin_index() {
|
||||||
|
$this->Vote->recursive = 0;
|
||||||
|
$this->set('votes', $this->paginate());
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_view($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid vote', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
$this->set('vote', $this->Vote->read(null, $id));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_add() {
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
$this->Vote->create();
|
||||||
|
if ($this->Vote->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The vote has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The vote could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$translations = $this->Vote->Translation->find('list');
|
||||||
|
$users = $this->Vote->User->find('list');
|
||||||
|
$this->set(compact('translations', 'users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_edit($id = null) {
|
||||||
|
if (!$id && empty($this->data)) {
|
||||||
|
$this->Session->setFlash(__('Invalid vote', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
if (!empty($this->data)) {
|
||||||
|
if ($this->Vote->save($this->data)) {
|
||||||
|
$this->Session->setFlash(__('The vote has been saved', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
} else {
|
||||||
|
$this->Session->setFlash(__('The vote could not be saved. Please, try again.', true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($this->data)) {
|
||||||
|
$this->data = $this->Vote->read(null, $id);
|
||||||
|
}
|
||||||
|
$translations = $this->Vote->Translation->find('list');
|
||||||
|
$users = $this->Vote->User->find('list');
|
||||||
|
$this->set(compact('translations', 'users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function admin_delete($id = null) {
|
||||||
|
if (!$id) {
|
||||||
|
$this->Session->setFlash(__('Invalid id for vote', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
if ($this->Vote->delete($id)) {
|
||||||
|
$this->Session->setFlash(__('Vote deleted', true));
|
||||||
|
$this->redirect(array('action'=>'index'));
|
||||||
|
}
|
||||||
|
$this->Session->setFlash(__('Vote was not deleted', true));
|
||||||
|
$this->redirect(array('action' => 'index'));
|
||||||
|
}
|
||||||
|
}
|
36
code/ryzom/tools/server/www/webtt/app/models/app_model.php
Normal file
36
code/ryzom/tools/server/www/webtt/app/models/app_model.php
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Application model for Cake.
|
||||||
|
*
|
||||||
|
* This file is application-wide model file. You can put all
|
||||||
|
* application-wide model-related methods here.
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.model
|
||||||
|
* @since CakePHP(tm) v 0.2.9
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Application model for Cake.
|
||||||
|
*
|
||||||
|
* This is a placeholder class.
|
||||||
|
* Create the same file in app/app_model.php
|
||||||
|
* Add your application-wide methods to the class, your models will inherit them.
|
||||||
|
*
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.model
|
||||||
|
*/
|
||||||
|
class AppModel extends Model {
|
||||||
|
// var $useDbConfig = 'raw_files';
|
||||||
|
}
|
|
@ -0,0 +1,453 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Comma Separated Values Datasource
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package datasources
|
||||||
|
* @subpackage datasources.models.datasources
|
||||||
|
* @since CakePHP Datasources v 0.3
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*
|
||||||
|
* A CakePHP datasource for interacting with files using comma separated value storage.
|
||||||
|
*
|
||||||
|
* Create a datasource in your config/database.php
|
||||||
|
* public $csvfile = array(
|
||||||
|
* 'datasource' => 'Datasources.CsvSource',
|
||||||
|
* 'path' => '/path/to/file', // Path
|
||||||
|
* 'extension' => 'csv', // File extension
|
||||||
|
* 'readonly' => true, // Mark for read only access
|
||||||
|
* 'recursive' => false // Only false is supported at the moment
|
||||||
|
* );
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!class_exists('Folder')) {
|
||||||
|
App::import('Core', 'Folder');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!class_exists('File')) {
|
||||||
|
App::import('Core', 'File');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CSVSource Datasource
|
||||||
|
*
|
||||||
|
* @package datasources
|
||||||
|
* @subpackage datasources.models.datasources
|
||||||
|
*/
|
||||||
|
class RawFilesSource extends DataSource {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $description = 'File Data Source';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Column delimiter
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $delimiter = ';';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum Columns
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
public $maxCol = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Field Names
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
public $fields = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* File Handle
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
public $handle = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Page to start on
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
public $page = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Limit of records
|
||||||
|
*
|
||||||
|
* @var integer
|
||||||
|
*/
|
||||||
|
public $limit = 99999;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default configuration.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
var $_baseConfig = array(
|
||||||
|
'datasource' => 'raw_files',
|
||||||
|
'path' => '/home/kaczorek/projects/webtt/distfiles/translation',
|
||||||
|
'extension' => 'uxt',
|
||||||
|
'readonly' => true,
|
||||||
|
'recursive' => true);
|
||||||
|
|
||||||
|
protected $_schema = array(
|
||||||
|
'files' => array(
|
||||||
|
'filename' => array(
|
||||||
|
'type' => 'string',
|
||||||
|
'null' => false,
|
||||||
|
'key' => 'primary',
|
||||||
|
'lenght' => 255
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param string $config Configuration array
|
||||||
|
* @param boolean $autoConnect Automatically connect to / open the file
|
||||||
|
*/
|
||||||
|
public function __construct($config = null, $autoConnect = true) {
|
||||||
|
$this->debug = Configure::read('debug') > 0;
|
||||||
|
$this->fullDebug = Configure::read('debug') > 1;
|
||||||
|
parent::__construct($config);
|
||||||
|
if ($autoConnect) {
|
||||||
|
$this->connect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Connects to the mailbox using options in the given configuration array.
|
||||||
|
*
|
||||||
|
* @return boolean True if the file could be opened.
|
||||||
|
*/
|
||||||
|
public function connect() {
|
||||||
|
$this->connected = false;
|
||||||
|
|
||||||
|
if ($this->config['readonly']) {
|
||||||
|
$create = false;
|
||||||
|
$mode = 0;
|
||||||
|
} else {
|
||||||
|
$create = true;
|
||||||
|
$mode = 0777;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->connection =& new Folder($this->config['path'], $create, $mode);
|
||||||
|
if ($this->connection) {
|
||||||
|
$this->handle = array();
|
||||||
|
$this->connected = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->connected;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List available sources
|
||||||
|
*
|
||||||
|
* @return array of available CSV files
|
||||||
|
*/
|
||||||
|
public function listSources() {
|
||||||
|
$this->config['database'] = 'csv';
|
||||||
|
$cache = parent::listSources();
|
||||||
|
if ($cache !== null) {
|
||||||
|
return $cache;
|
||||||
|
}
|
||||||
|
|
||||||
|
$extPattern = '\.' . preg_quote($this->config['extension']);
|
||||||
|
if ($this->config['recursive']) {
|
||||||
|
$list = $this->connection->findRecursive('.*' . $extPattern, true);
|
||||||
|
foreach($list as &$item) {
|
||||||
|
$item = mb_substr($item, mb_strlen($this->config['path'] . DS));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$list = $this->connection->find('.*' . $extPattern, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($list as &$item) {
|
||||||
|
$item = preg_replace('/' . $extPattern . '$/i', '', $item);
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::listSources($list);
|
||||||
|
unset($this->config['database']);
|
||||||
|
return $list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a Model description (metadata) or null if none found.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function describe($model) {
|
||||||
|
$this->__getDescriptionFromFirstLine($model);
|
||||||
|
return $this->fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Description from First Line, and store into class vars
|
||||||
|
*
|
||||||
|
* @param Model $model
|
||||||
|
* @return boolean True, Success
|
||||||
|
*/
|
||||||
|
private function __getDescriptionFromFirstLine($model) {
|
||||||
|
$filename = $model->table . '.' . $this->config['extension'];
|
||||||
|
$handle = fopen($this->config['path'] . DS . $filename, 'r');
|
||||||
|
$line = rtrim(fgets($handle));
|
||||||
|
$data_comma = explode(',', $line);
|
||||||
|
$data_semicolon = explode(';', $line);
|
||||||
|
|
||||||
|
if (count($data_comma) > count($data_semicolon)) {
|
||||||
|
$this->delimiter = ',';
|
||||||
|
$this->fields = $data_comma;
|
||||||
|
$this->maxCol = count($data_comma);
|
||||||
|
} else {
|
||||||
|
$this->delimiter = ';';
|
||||||
|
$this->fields = $data_semicolon;
|
||||||
|
$this->maxCol = count($data_semicolon);
|
||||||
|
}
|
||||||
|
fclose($handle);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Close file handle
|
||||||
|
*
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
public function close() {
|
||||||
|
if ($this->connected) {
|
||||||
|
if ($this->handle) {
|
||||||
|
foreach($this->handle as $h) {
|
||||||
|
@fclose($h);
|
||||||
|
}
|
||||||
|
$this->handle = false;
|
||||||
|
}
|
||||||
|
$this->connected = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function read(&$model, $queryData = array(), $recursive = null) {
|
||||||
|
if ($queryData["conditions"] && $queryData["conditions"]["ext"])
|
||||||
|
$extension = $queryData["conditions"]["ext"];
|
||||||
|
else
|
||||||
|
$extension = $this->config['extension'];
|
||||||
|
|
||||||
|
$extPattern = '\.' . preg_quote($extension);
|
||||||
|
if ($this->config['recursive']) {
|
||||||
|
$list = $this->connection->findRecursive('.*' . $extPattern, true);
|
||||||
|
foreach($list as &$item) {
|
||||||
|
$item = mb_substr($item, mb_strlen($this->connection->realpath($this->config['path']) . DS));
|
||||||
|
}
|
||||||
|
unset($item);
|
||||||
|
} else {
|
||||||
|
$list = $this->connection->find('.*' . $extPattern, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$nlist = array();
|
||||||
|
foreach ($list as $item) {
|
||||||
|
$file = new File($path = $this->config['path'] . DS . $item, false);
|
||||||
|
// var_dump($item);
|
||||||
|
// $item = preg_replace('/' . $extPattern . '$/i', '', $item);
|
||||||
|
$resultSet[] = array(
|
||||||
|
$model->alias => array(
|
||||||
|
'filename' => $item,
|
||||||
|
'size' => $file->size(),
|
||||||
|
'modified' => $file->lastChange(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if ($model->findQueryType === 'count') {
|
||||||
|
return array(array(array('count' => count($resultSet))));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $resultSet;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Read Data
|
||||||
|
*
|
||||||
|
* @param Model $model
|
||||||
|
* @param array $queryData
|
||||||
|
* @param integer $recursive Number of levels of association
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function read_z(&$model, $queryData = array(), $recursive = null) {
|
||||||
|
$config = $this->config;
|
||||||
|
$filename = $config['path'] . DS . $model->table . '.' . $config['extension'];
|
||||||
|
if (!Set::extract($this->handle, $model->table)) {
|
||||||
|
$this->handle[$model->table] = fopen($filename, 'r');
|
||||||
|
} else {
|
||||||
|
fseek($this->handle[$model->table], 0, SEEK_SET) ;
|
||||||
|
}
|
||||||
|
$queryData = $this->__scrubQueryData($queryData);
|
||||||
|
|
||||||
|
if (isset($queryData['limit']) && !empty($queryData['limit'])) {
|
||||||
|
$this->limit = $queryData['limit'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($queryData['page']) && !empty($queryData['page'])) {
|
||||||
|
$this->page = $queryData['page'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($queryData['fields'])) {
|
||||||
|
$fields = $this->fields;
|
||||||
|
$allFields = true;
|
||||||
|
} else {
|
||||||
|
$fields = $queryData['fields'];
|
||||||
|
$allFields = false;
|
||||||
|
$_fieldIndex = array();
|
||||||
|
$index = 0;
|
||||||
|
// generate an index array of all wanted fields
|
||||||
|
foreach($this->fields as $field) {
|
||||||
|
if (in_array($field, $fields)) {
|
||||||
|
$_fieldIndex[] = $index;
|
||||||
|
}
|
||||||
|
$index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$lineCount = 0;
|
||||||
|
$recordCount = 0;
|
||||||
|
$findCount = 0;
|
||||||
|
$resultSet = array();
|
||||||
|
|
||||||
|
// Daten werden aus der Datei in ein Array $data gelesen
|
||||||
|
while (($data = fgetcsv($this->handle[$model->table], 8192, $this->delimiter)) !== FALSE) {
|
||||||
|
if ($lineCount == 0) {
|
||||||
|
$lineCount++;
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
// Skip over records, that are not complete
|
||||||
|
if (count($data) < $this->maxCol) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$record = array();
|
||||||
|
$i = 0;
|
||||||
|
foreach($this->fields as $field) {
|
||||||
|
$record[$model->alias][$field] = $data[$i++];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->__checkConditions($record, $queryData['conditions'], $model)) {
|
||||||
|
// Compute the virtual pagenumber
|
||||||
|
$_page = floor($findCount / $this->limit) + 1;
|
||||||
|
if ($this->page <= $_page) {
|
||||||
|
if (!$allFields) {
|
||||||
|
$record = array();
|
||||||
|
if (count($_fieldIndex) > 0) {
|
||||||
|
foreach($_fieldIndex as $i) {
|
||||||
|
$record[$model->alias][$this->fields[$i]] = $data[$i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$resultSet[] = $record ;
|
||||||
|
$recordCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($record);
|
||||||
|
$findCount++;
|
||||||
|
|
||||||
|
if ($recordCount >= $this->limit) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($model->findQueryType === 'count') {
|
||||||
|
return array(array(array('count' => count($resultSet))));
|
||||||
|
}
|
||||||
|
return $resultSet;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Private helper method to remove query metadata in given data array.
|
||||||
|
*
|
||||||
|
* @param array $data Data
|
||||||
|
* @return array Cleaned Data
|
||||||
|
*/
|
||||||
|
private function __scrubQueryData($data) {
|
||||||
|
foreach (array('conditions', 'fields', 'joins', 'order', /*'limit', 'offset',*/ 'group') as $key) {
|
||||||
|
if (!isset($data[$key]) || empty($data[$key])) {
|
||||||
|
$data[$key] = array();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isset($data['limit']) || empty($data['limit'])) {
|
||||||
|
$data['limit'] = PHP_INT_MAX;
|
||||||
|
}
|
||||||
|
if (!isset($data['offset']) || empty($data['offset'])) {
|
||||||
|
$data['offset'] = 0;
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Private helper method to check conditions.
|
||||||
|
*
|
||||||
|
* @param array $record
|
||||||
|
* @param array $conditions
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
private function __checkConditions($record, $conditions, $model) {
|
||||||
|
$result = true;
|
||||||
|
foreach ($conditions as $name => $value) {
|
||||||
|
$alias = $model->alias;
|
||||||
|
if (strpos($name, '.') !== false) {
|
||||||
|
list($alias, $name) = explode('.', $name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strtolower($name) === 'or') {
|
||||||
|
$cond = $value;
|
||||||
|
$result = false;
|
||||||
|
foreach ($cond as $name => $value) {
|
||||||
|
if (Set::matches($this->__createRule($name, $value), $record[$alias])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!Set::matches($this->__createRule($name, $value), $record[$alias])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Private helper method to crete rule.
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @param string $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function __createRule($name, $value) {
|
||||||
|
if (strpos($name, ' ') !== false) {
|
||||||
|
return array(str_replace(' ', '', $name) . $value);
|
||||||
|
}
|
||||||
|
return array("{$name}={$value}");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calculate
|
||||||
|
*
|
||||||
|
* @param Model $model
|
||||||
|
* @param mixed $func
|
||||||
|
* @param array $params
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function calculate(&$model, $func, $params = array()) {
|
||||||
|
return array('count');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
class FileIdentifier extends AppModel {
|
||||||
|
var $name = 'FileIdentifier';
|
||||||
|
var $displayField = 'command';
|
||||||
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
|
|
||||||
|
var $belongsTo = array(
|
||||||
|
'ImportedTranslationFile' => array(
|
||||||
|
'className' => 'ImportedTranslationFile',
|
||||||
|
'foreignKey' => 'imported_translation_file_id',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
),
|
||||||
|
'Identifier' => array(
|
||||||
|
'className' => 'Identifier',
|
||||||
|
'foreignKey' => 'identifier_id',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
69
code/ryzom/tools/server/www/webtt/app/models/identifier.php
Normal file
69
code/ryzom/tools/server/www/webtt/app/models/identifier.php
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
<?php
|
||||||
|
class Identifier extends AppModel {
|
||||||
|
var $name = 'Identifier';
|
||||||
|
var $displayField = 'identifier';
|
||||||
|
var $actsAs = array('Containable');
|
||||||
|
var $validate = array(
|
||||||
|
'translation_index' => array(
|
||||||
|
'numeric' => array(
|
||||||
|
'rule' => array('numeric'),
|
||||||
|
//'message' => 'Your custom message here',
|
||||||
|
//'allowEmpty' => false,
|
||||||
|
//'required' => false,
|
||||||
|
//'last' => false, // Stop validation after this rule
|
||||||
|
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'identifier' => array(
|
||||||
|
'A_Za_z0_9' => array(
|
||||||
|
'rule' => '/[A-Za-z0-9_@]+/',
|
||||||
|
'message' => 'Identifier must consist only of the following caracteres: "A-Z", "a-z", "0-9", "@" and "_"',
|
||||||
|
//'allowEmpty' => false,
|
||||||
|
//'required' => false,
|
||||||
|
//'last' => false, // Stop validation after this rule
|
||||||
|
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
|
|
||||||
|
var $belongsTo = array(
|
||||||
|
'Language' => array(
|
||||||
|
'className' => 'Language',
|
||||||
|
'foreignKey' => 'language_id',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
var $hasMany = array(
|
||||||
|
'Translation' => array(
|
||||||
|
'className' => 'Translation',
|
||||||
|
'foreignKey' => 'identifier_id',
|
||||||
|
'dependent' => false,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
),
|
||||||
|
'FileIdentifier' => array(
|
||||||
|
'className' => 'FileIdentifier',
|
||||||
|
'foreignKey' => 'identifier_id',
|
||||||
|
'dependent' => false,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?php
|
||||||
|
class ImportedTranslationFile extends AppModel {
|
||||||
|
var $name = 'ImportedTranslationFile';
|
||||||
|
var $displayField = 'filename';
|
||||||
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
|
|
||||||
|
var $actsAs = array('Containable');
|
||||||
|
|
||||||
|
var $belongsTo = array(
|
||||||
|
'Language' => array(
|
||||||
|
'className' => 'Language',
|
||||||
|
'foreignKey' => 'language_id',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
var $hasMany = array(
|
||||||
|
'FileIdentifier' => array(
|
||||||
|
'className' => 'FileIdentifier',
|
||||||
|
'foreignKey' => 'imported_translation_file_id',
|
||||||
|
'dependent' => true,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
var $hasOne = array(
|
||||||
|
'RawFile' => array(
|
||||||
|
'className' => 'RawFile',
|
||||||
|
'foreignKey' => 'filename',
|
||||||
|
'dependand' => false,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
36
code/ryzom/tools/server/www/webtt/app/models/language.php
Normal file
36
code/ryzom/tools/server/www/webtt/app/models/language.php
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
class Language extends AppModel {
|
||||||
|
var $name = 'Language';
|
||||||
|
var $displayField = 'name';
|
||||||
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
|
|
||||||
|
var $hasMany = array(
|
||||||
|
'Identifier' => array(
|
||||||
|
'className' => 'Identifier',
|
||||||
|
'foreignKey' => 'language_id',
|
||||||
|
'dependent' => false,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
),
|
||||||
|
'ImportedTranslationFile' => array(
|
||||||
|
'className' => 'ImportedTranslationFile',
|
||||||
|
'foreignKey' => 'language_id',
|
||||||
|
'dependent' => false,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
67
code/ryzom/tools/server/www/webtt/app/models/raw_file.php
Normal file
67
code/ryzom/tools/server/www/webtt/app/models/raw_file.php
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
<?php
|
||||||
|
class RawFile extends AppModel {
|
||||||
|
var $name = 'RawFile';
|
||||||
|
var $useDbConfig = 'raw_files';
|
||||||
|
var $displayField = 'filename';
|
||||||
|
var $useTable = false;
|
||||||
|
var $primaryKey = 'filename';
|
||||||
|
|
||||||
|
var $_parser;
|
||||||
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
|
|
||||||
|
var $belongsTo = array(
|
||||||
|
'ImportedTranslationFile' => array(
|
||||||
|
'className' => 'ImportedTranslationFile',
|
||||||
|
'foreignKey' => 'filename',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
),
|
||||||
|
);
|
||||||
|
/* var $hasOne = array(
|
||||||
|
'FileIdentifier' => array(
|
||||||
|
'className' => 'FileIdentifier',
|
||||||
|
'foreignKey' => 'translation_file_id',
|
||||||
|
'dependent' => true,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
)
|
||||||
|
);*/
|
||||||
|
|
||||||
|
public function open($dir, $filename)
|
||||||
|
{
|
||||||
|
$ds = $this->getDataSource();
|
||||||
|
$file = new File($filepath = $ds->config['path'] . DS . $dir . DS . $filename, false);
|
||||||
|
if (!$file)
|
||||||
|
return false;
|
||||||
|
if (!$file->readable())
|
||||||
|
return false;
|
||||||
|
// var_dump($filename);
|
||||||
|
$this->_currentFile = $file;
|
||||||
|
return $file;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function parseFile($file)
|
||||||
|
{
|
||||||
|
App::import("Vendor","UxtParser", array("file" => 'UxtParser.php'));
|
||||||
|
$parser = $this->_parser = new UxtParser();
|
||||||
|
if (!$this->_currentFile)
|
||||||
|
return false;
|
||||||
|
$entities = $parser->parseFile($this->_currentFile->read());
|
||||||
|
return $entities;
|
||||||
|
}
|
||||||
|
public function getLanguageCode($filename)
|
||||||
|
{
|
||||||
|
// var_dump($filename);
|
||||||
|
if (preg_match('|^([a-z]{2})_diff_[A-F0-9]{8}\.uxt$|', $filename, $matches))
|
||||||
|
return $matches[1];
|
||||||
|
else if (preg_match('|^([a-z]{2})\.uxt$|', $filename, $matches))
|
||||||
|
return $matches[1];
|
||||||
|
}
|
||||||
|
}
|
40
code/ryzom/tools/server/www/webtt/app/models/translation.php
Normal file
40
code/ryzom/tools/server/www/webtt/app/models/translation.php
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
class Translation extends AppModel {
|
||||||
|
var $name = 'Translation';
|
||||||
|
var $displayField = 'translation_text';
|
||||||
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
|
|
||||||
|
var $belongsTo = array(
|
||||||
|
'Identifier' => array(
|
||||||
|
'className' => 'Identifier',
|
||||||
|
'foreignKey' => 'identifier_id',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
),
|
||||||
|
'User' => array(
|
||||||
|
'className' => 'User',
|
||||||
|
'foreignKey' => 'user_id',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
var $hasMany = array(
|
||||||
|
'Vote' => array(
|
||||||
|
'className' => 'Vote',
|
||||||
|
'foreignKey' => 'translation_id',
|
||||||
|
'dependent' => false,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
36
code/ryzom/tools/server/www/webtt/app/models/user.php
Normal file
36
code/ryzom/tools/server/www/webtt/app/models/user.php
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
class User extends AppModel {
|
||||||
|
var $name = 'User';
|
||||||
|
var $displayField = 'name';
|
||||||
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
|
|
||||||
|
var $hasMany = array(
|
||||||
|
'Translation' => array(
|
||||||
|
'className' => 'Translation',
|
||||||
|
'foreignKey' => 'user_id',
|
||||||
|
'dependent' => false,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
),
|
||||||
|
'Vote' => array(
|
||||||
|
'className' => 'Vote',
|
||||||
|
'foreignKey' => 'user_id',
|
||||||
|
'dependent' => false,
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => '',
|
||||||
|
'limit' => '',
|
||||||
|
'offset' => '',
|
||||||
|
'exclusive' => '',
|
||||||
|
'finderQuery' => '',
|
||||||
|
'counterQuery' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
23
code/ryzom/tools/server/www/webtt/app/models/vote.php
Normal file
23
code/ryzom/tools/server/www/webtt/app/models/vote.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
class Vote extends AppModel {
|
||||||
|
var $name = 'Vote';
|
||||||
|
var $displayField = 'translation_id';
|
||||||
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||||
|
|
||||||
|
var $belongsTo = array(
|
||||||
|
'Translation' => array(
|
||||||
|
'className' => 'Translation',
|
||||||
|
'foreignKey' => 'translation_id',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
),
|
||||||
|
'User' => array(
|
||||||
|
'className' => 'User',
|
||||||
|
'foreignKey' => 'user_id',
|
||||||
|
'conditions' => '',
|
||||||
|
'fields' => '',
|
||||||
|
'order' => ''
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?php
|
||||||
|
/* FileIdentifiers Test cases generated on: 2011-05-31 16:08:10 : 1306850890*/
|
||||||
|
App::import('Controller', 'FileIdentifiers');
|
||||||
|
|
||||||
|
class TestFileIdentifiersController extends FileIdentifiersController {
|
||||||
|
var $autoRender = false;
|
||||||
|
|
||||||
|
function redirect($url, $status = null, $exit = true) {
|
||||||
|
$this->redirectUrl = $url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FileIdentifiersControllerTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.file_identifier', 'app.translation_file', 'app.language', 'app.identifier', 'app.translation', 'app.user', 'app.vote');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->FileIdentifiers =& new TestFileIdentifiersController();
|
||||||
|
$this->FileIdentifiers->constructClasses();
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->FileIdentifiers);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?php
|
||||||
|
/* Identifiers Test cases generated on: 2011-05-31 16:28:53 : 1306852133*/
|
||||||
|
App::import('Controller', 'Identifiers');
|
||||||
|
|
||||||
|
class TestIdentifiersController extends IdentifiersController {
|
||||||
|
var $autoRender = false;
|
||||||
|
|
||||||
|
function redirect($url, $status = null, $exit = true) {
|
||||||
|
$this->redirectUrl = $url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class IdentifiersControllerTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.identifier', 'app.language', 'app.translation_file', 'app.file_identifier', 'app.translation', 'app.user', 'app.vote');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Identifiers =& new TestIdentifiersController();
|
||||||
|
$this->Identifiers->constructClasses();
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Identifiers);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?php
|
||||||
|
/* Languages Test cases generated on: 2011-05-31 15:48:55 : 1306849735*/
|
||||||
|
App::import('Controller', 'Languages');
|
||||||
|
|
||||||
|
class TestLanguagesController extends LanguagesController {
|
||||||
|
var $autoRender = false;
|
||||||
|
|
||||||
|
function redirect($url, $status = null, $exit = true) {
|
||||||
|
$this->redirectUrl = $url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LanguagesControllerTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.language', 'app.identifier', 'app.translation', 'app.user', 'app.vote', 'app.translation_file');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Languages =& new TestLanguagesController();
|
||||||
|
$this->Languages->constructClasses();
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Languages);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?php
|
||||||
|
/* TranslationFiles Test cases generated on: 2011-05-29 20:05:35 : 1306692335*/
|
||||||
|
App::import('Controller', 'TranslationFiles');
|
||||||
|
|
||||||
|
class TestTranslationFilesController extends TranslationFilesController {
|
||||||
|
var $autoRender = false;
|
||||||
|
|
||||||
|
function redirect($url, $status = null, $exit = true) {
|
||||||
|
$this->redirectUrl = $url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TranslationFilesControllerTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.translation_file', 'app.language', 'app.identifier', 'app.translation', 'app.user', 'app.vote');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->TranslationFiles =& new TestTranslationFilesController();
|
||||||
|
$this->TranslationFiles->constructClasses();
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->TranslationFiles);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?php
|
||||||
|
/* Translations Test cases generated on: 2011-05-29 21:10:36 : 1306696236*/
|
||||||
|
App::import('Controller', 'Translations');
|
||||||
|
|
||||||
|
class TestTranslationsController extends TranslationsController {
|
||||||
|
var $autoRender = false;
|
||||||
|
|
||||||
|
function redirect($url, $status = null, $exit = true) {
|
||||||
|
$this->redirectUrl = $url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TranslationsControllerTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.translation', 'app.identifier', 'app.translation_file', 'app.language', 'app.user', 'app.vote');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Translations =& new TestTranslationsController();
|
||||||
|
$this->Translations->constructClasses();
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Translations);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?php
|
||||||
|
/* Users Test cases generated on: 2011-05-29 21:10:58 : 1306696258*/
|
||||||
|
App::import('Controller', 'Users');
|
||||||
|
|
||||||
|
class TestUsersController extends UsersController {
|
||||||
|
var $autoRender = false;
|
||||||
|
|
||||||
|
function redirect($url, $status = null, $exit = true) {
|
||||||
|
$this->redirectUrl = $url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UsersControllerTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.user', 'app.translation', 'app.identifier', 'app.translation_file', 'app.language', 'app.vote');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Users =& new TestUsersController();
|
||||||
|
$this->Users->constructClasses();
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Users);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
<?php
|
||||||
|
/* Votes Test cases generated on: 2011-05-29 21:12:06 : 1306696326*/
|
||||||
|
App::import('Controller', 'Votes');
|
||||||
|
|
||||||
|
class TestVotesController extends VotesController {
|
||||||
|
var $autoRender = false;
|
||||||
|
|
||||||
|
function redirect($url, $status = null, $exit = true) {
|
||||||
|
$this->redirectUrl = $url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class VotesControllerTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.vote', 'app.translation', 'app.identifier', 'app.translation_file', 'app.language', 'app.user');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Votes =& new TestVotesController();
|
||||||
|
$this->Votes->constructClasses();
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Votes);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
function testIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminIndex() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminView() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminEdit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function testAdminDelete() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/* FileIdentifier Test cases generated on: 2011-05-31 16:07:59 : 1306850879*/
|
||||||
|
App::import('Model', 'FileIdentifier');
|
||||||
|
|
||||||
|
class FileIdentifierTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.file_identifier', 'app.translation_file', 'app.language', 'app.identifier', 'app.translation', 'app.user', 'app.vote');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->FileIdentifier =& ClassRegistry::init('FileIdentifier');
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->FileIdentifier);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/* Identifier Test cases generated on: 2011-05-29 19:17:37 : 1306689457*/
|
||||||
|
App::import('Model', 'Identifier');
|
||||||
|
|
||||||
|
class IdentifierTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.identifier', 'app.translation_file', 'app.language', 'app.translation');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Identifier =& ClassRegistry::init('Identifier');
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Identifier);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/* Language Test cases generated on: 2011-05-31 15:48:43 : 1306849723*/
|
||||||
|
App::import('Model', 'Language');
|
||||||
|
|
||||||
|
class LanguageTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.language', 'app.identifier', 'app.translation', 'app.user', 'app.vote', 'app.translation_file');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Language =& ClassRegistry::init('Language');
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Language);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/* Translation Test cases generated on: 2011-05-29 19:19:42 : 1306689582*/
|
||||||
|
App::import('Model', 'Translation');
|
||||||
|
|
||||||
|
class TranslationTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.translation', 'app.identifier', 'app.translation_file', 'app.language', 'app.user', 'app.vote');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Translation =& ClassRegistry::init('Translation');
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Translation);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/* TranslationFile Test cases generated on: 2011-05-29 19:13:14 : 1306689194*/
|
||||||
|
App::import('Model', 'TranslationFile');
|
||||||
|
|
||||||
|
class TranslationFileTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.translation_file', 'app.language', 'app.identifier');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->TranslationFile =& ClassRegistry::init('TranslationFile');
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->TranslationFile);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/* User Test cases generated on: 2011-05-29 19:20:07 : 1306689607*/
|
||||||
|
App::import('Model', 'User');
|
||||||
|
|
||||||
|
class UserTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.user', 'app.translation', 'app.identifier', 'app.translation_file', 'app.language', 'app.vote');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->User =& ClassRegistry::init('User');
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->User);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
/* Vote Test cases generated on: 2011-05-29 21:11:49 : 1306696309*/
|
||||||
|
App::import('Model', 'Vote');
|
||||||
|
|
||||||
|
class VoteTestCase extends CakeTestCase {
|
||||||
|
var $fixtures = array('app.vote', 'app.translation', 'app.identifier', 'app.translation_file', 'app.language', 'app.user');
|
||||||
|
|
||||||
|
function startTest() {
|
||||||
|
$this->Vote =& ClassRegistry::init('Vote');
|
||||||
|
}
|
||||||
|
|
||||||
|
function endTest() {
|
||||||
|
unset($this->Vote);
|
||||||
|
ClassRegistry::flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
31
code/ryzom/tools/server/www/webtt/app/tests/fixtures/file_identifier_fixture.php
vendored
Normal file
31
code/ryzom/tools/server/www/webtt/app/tests/fixtures/file_identifier_fixture.php
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
/* FileIdentifier Fixture generated on: 2011-05-31 16:07:59 : 1306850879 */
|
||||||
|
class FileIdentifierFixture extends CakeTestFixture {
|
||||||
|
var $name = 'FileIdentifier';
|
||||||
|
|
||||||
|
var $fields = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'translation_file_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'command' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'translation_index' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'identifier_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'reference_string' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
|
||||||
|
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MyISAM')
|
||||||
|
);
|
||||||
|
|
||||||
|
var $records = array(
|
||||||
|
array(
|
||||||
|
'id' => 1,
|
||||||
|
'translation_file_id' => 1,
|
||||||
|
'command' => 'Lorem ipsum dolor sit amet',
|
||||||
|
'translation_index' => 1,
|
||||||
|
'identifier_id' => 1,
|
||||||
|
'reference_string' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
|
||||||
|
'created' => '2011-05-31 16:07:59',
|
||||||
|
'modified' => '2011-05-31 16:07:59'
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
31
code/ryzom/tools/server/www/webtt/app/tests/fixtures/identifier_fixture.php
vendored
Normal file
31
code/ryzom/tools/server/www/webtt/app/tests/fixtures/identifier_fixture.php
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
/* Identifier Fixture generated on: 2011-05-29 19:17:37 : 1306689457 */
|
||||||
|
class IdentifierFixture extends CakeTestFixture {
|
||||||
|
var $name = 'Identifier';
|
||||||
|
|
||||||
|
var $fields = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'translation_file_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'translation_index' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'identifier' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'reference_string' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'translated' => array('type' => 'boolean', 'null' => true, 'default' => '0'),
|
||||||
|
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
|
||||||
|
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MyISAM')
|
||||||
|
);
|
||||||
|
|
||||||
|
var $records = array(
|
||||||
|
array(
|
||||||
|
'id' => 1,
|
||||||
|
'translation_file_id' => 1,
|
||||||
|
'translation_index' => 1,
|
||||||
|
'identifier' => 'Lorem ipsum dolor sit amet',
|
||||||
|
'reference_string' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
|
||||||
|
'translated' => 1,
|
||||||
|
'created' => '2011-05-29 19:17:37',
|
||||||
|
'modified' => '2011-05-29 19:17:37'
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
25
code/ryzom/tools/server/www/webtt/app/tests/fixtures/language_fixture.php
vendored
Normal file
25
code/ryzom/tools/server/www/webtt/app/tests/fixtures/language_fixture.php
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/* Language Fixture generated on: 2011-05-31 15:48:42 : 1306849722 */
|
||||||
|
class LanguageFixture extends CakeTestFixture {
|
||||||
|
var $name = 'Language';
|
||||||
|
|
||||||
|
var $fields = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 50, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'code' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 10, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
|
||||||
|
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MyISAM')
|
||||||
|
);
|
||||||
|
|
||||||
|
var $records = array(
|
||||||
|
array(
|
||||||
|
'id' => 1,
|
||||||
|
'name' => 'Lorem ipsum dolor sit amet',
|
||||||
|
'code' => 'Lorem ip',
|
||||||
|
'created' => '2011-05-31 15:48:42',
|
||||||
|
'modified' => '2011-05-31 15:48:42'
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
25
code/ryzom/tools/server/www/webtt/app/tests/fixtures/translation_file_fixture.php
vendored
Normal file
25
code/ryzom/tools/server/www/webtt/app/tests/fixtures/translation_file_fixture.php
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/* TranslationFile Fixture generated on: 2011-05-29 19:13:14 : 1306689194 */
|
||||||
|
class TranslationFileFixture extends CakeTestFixture {
|
||||||
|
var $name = 'TranslationFile';
|
||||||
|
|
||||||
|
var $fields = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'language_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'filename' => array('type' => 'string', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
|
||||||
|
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MyISAM')
|
||||||
|
);
|
||||||
|
|
||||||
|
var $records = array(
|
||||||
|
array(
|
||||||
|
'id' => 1,
|
||||||
|
'language_id' => 1,
|
||||||
|
'filename' => 'Lorem ipsum dolor sit amet',
|
||||||
|
'created' => '2011-05-29 19:13:14',
|
||||||
|
'modified' => '2011-05-29 19:13:14'
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
27
code/ryzom/tools/server/www/webtt/app/tests/fixtures/translation_fixture.php
vendored
Normal file
27
code/ryzom/tools/server/www/webtt/app/tests/fixtures/translation_fixture.php
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
/* Translation Fixture generated on: 2011-05-29 19:19:41 : 1306689581 */
|
||||||
|
class TranslationFixture extends CakeTestFixture {
|
||||||
|
var $name = 'Translation';
|
||||||
|
|
||||||
|
var $fields = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'identifier_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'translation_text' => array('type' => 'text', 'null' => true, 'default' => NULL, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'user_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
|
||||||
|
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MyISAM')
|
||||||
|
);
|
||||||
|
|
||||||
|
var $records = array(
|
||||||
|
array(
|
||||||
|
'id' => 1,
|
||||||
|
'identifier_id' => 1,
|
||||||
|
'translation_text' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
|
||||||
|
'user_id' => 1,
|
||||||
|
'created' => '2011-05-29 19:19:41',
|
||||||
|
'modified' => '2011-05-29 19:19:41'
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
23
code/ryzom/tools/server/www/webtt/app/tests/fixtures/user_fixture.php
vendored
Normal file
23
code/ryzom/tools/server/www/webtt/app/tests/fixtures/user_fixture.php
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
/* User Fixture generated on: 2011-05-29 19:20:07 : 1306689607 */
|
||||||
|
class UserFixture extends CakeTestFixture {
|
||||||
|
var $name = 'User';
|
||||||
|
|
||||||
|
var $fields = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'name' => array('type' => 'string', 'null' => true, 'default' => NULL, 'length' => 100, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
|
||||||
|
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
|
||||||
|
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MyISAM')
|
||||||
|
);
|
||||||
|
|
||||||
|
var $records = array(
|
||||||
|
array(
|
||||||
|
'id' => 1,
|
||||||
|
'name' => 'Lorem ipsum dolor sit amet',
|
||||||
|
'created' => '2011-05-29 19:20:07',
|
||||||
|
'modified' => '2011-05-29 19:20:07'
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
25
code/ryzom/tools/server/www/webtt/app/tests/fixtures/vote_fixture.php
vendored
Normal file
25
code/ryzom/tools/server/www/webtt/app/tests/fixtures/vote_fixture.php
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
/* Vote Fixture generated on: 2011-05-29 21:11:49 : 1306696309 */
|
||||||
|
class VoteFixture extends CakeTestFixture {
|
||||||
|
var $name = 'Vote';
|
||||||
|
|
||||||
|
var $fields = array(
|
||||||
|
'id' => array('type' => 'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
|
||||||
|
'translation_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'user_id' => array('type' => 'integer', 'null' => true, 'default' => NULL, 'length' => 10),
|
||||||
|
'created' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'modified' => array('type' => 'datetime', 'null' => true, 'default' => NULL),
|
||||||
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)),
|
||||||
|
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_general_ci', 'engine' => 'MyISAM')
|
||||||
|
);
|
||||||
|
|
||||||
|
var $records = array(
|
||||||
|
array(
|
||||||
|
'id' => 1,
|
||||||
|
'translation_id' => 1,
|
||||||
|
'user_id' => 1,
|
||||||
|
'created' => '2011-05-29 21:11:49',
|
||||||
|
'modified' => '2011-05-29 21:11:49'
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
180
code/ryzom/tools/server/www/webtt/app/vendors/UxtParser.php
vendored
Normal file
180
code/ryzom/tools/server/www/webtt/app/vendors/UxtParser.php
vendored
Normal file
|
@ -0,0 +1,180 @@
|
||||||
|
<?php
|
||||||
|
class UxtParser
|
||||||
|
{
|
||||||
|
var $pipeline_directory = "/home/kaczorek/projects/webtt/distfiles/translation/";
|
||||||
|
|
||||||
|
function removeComments($str)
|
||||||
|
{
|
||||||
|
/* while (($cstart = mb_strpos($str, "/*", $offset)) !== false)
|
||||||
|
{
|
||||||
|
$cend = mb_strpos();
|
||||||
|
}*/
|
||||||
|
// var_dump($str);
|
||||||
|
//As a pertinent note, there's an issue with this function where parsing any string longer than 94326 characters long will silently return null. So be careful where you use it at.
|
||||||
|
//http://pl.php.net/manual/en/function.preg-replace.php#98843
|
||||||
|
$returnString = preg_replace('!/\*.*?\*/!s', '', $str); // /* .*? */ s
|
||||||
|
// PHP 5.2.0
|
||||||
|
// if (PREG_NO_ERROR !== preg_last_error())
|
||||||
|
if ($returnString === null)
|
||||||
|
{
|
||||||
|
$returnStr = $str;
|
||||||
|
// exception
|
||||||
|
}
|
||||||
|
return $returnString;
|
||||||
|
}
|
||||||
|
|
||||||
|
function removeBOM($str)
|
||||||
|
{
|
||||||
|
// mb_internal_encoding("ISO-8859-2");
|
||||||
|
// var_dump(substr($str, 0, 3));
|
||||||
|
if(($bom = substr($str, 0,3)) == pack("CCC",0xef,0xbb,0xbf))
|
||||||
|
{
|
||||||
|
// var_dump("jest bom");
|
||||||
|
$bla = substr($str, 3);
|
||||||
|
// var_dump($bla);
|
||||||
|
return $bla;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// var_dump($bom);
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseLine($str)
|
||||||
|
{
|
||||||
|
$arr = array();
|
||||||
|
// var_dump(mb_internal_encoding());
|
||||||
|
// mb_internal_encoding("ISO-8859-2");
|
||||||
|
if (mb_substr($str, 0, 2) == "//")
|
||||||
|
{
|
||||||
|
if (mb_substr($str, 0, 7) == "// DIFF")
|
||||||
|
{
|
||||||
|
list($j, $type, $command, $args) = explode(" ", $str);
|
||||||
|
$command = mb_strtolower($command);
|
||||||
|
if ($command == "add" || $command == "changed")
|
||||||
|
$index = intval($args);
|
||||||
|
else
|
||||||
|
unset($type);
|
||||||
|
}
|
||||||
|
/* else if (mb_substr($str, 0, 8) == "// INDEX")
|
||||||
|
{
|
||||||
|
list($j, $type, $index) = explode(" ", $str);
|
||||||
|
// $arr = explode(" ", $str);
|
||||||
|
}*/
|
||||||
|
/* if (!isset($type))
|
||||||
|
{
|
||||||
|
var_dump(isset($type));
|
||||||
|
debug_print_backtrace();
|
||||||
|
}
|
||||||
|
var_dump($type);*/
|
||||||
|
if (isset($type))
|
||||||
|
{
|
||||||
|
$type = mb_strtolower($type);
|
||||||
|
$arr = compact("type","command","index");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!(mb_substr($str, 0, 2) == "//") && mb_strlen($str))
|
||||||
|
{
|
||||||
|
//list($ident, $j
|
||||||
|
$type = "string";
|
||||||
|
$lBracket = mb_strpos($str, "[");
|
||||||
|
$rBracket = mb_strrpos($str, "]");
|
||||||
|
$sStart = $lBracket + 1;
|
||||||
|
$sEnd = $rBracket - ($sStart);
|
||||||
|
$identifier = trim(mb_substr($str, 0, $lBracket));
|
||||||
|
if (!$rBracket)
|
||||||
|
$sEnd = mb_strlen($str);
|
||||||
|
$string = mb_substr($str, $sStart, $sEnd);
|
||||||
|
$string = str_replace(
|
||||||
|
array('\\\\', '\[','\]'),
|
||||||
|
array('\\', '[',']'), // '
|
||||||
|
$string
|
||||||
|
);
|
||||||
|
$arr = compact("type", "identifier", "string");
|
||||||
|
}
|
||||||
|
/* echo "<pre>################################\n";
|
||||||
|
var_dump($str);
|
||||||
|
var_dump($arr);
|
||||||
|
echo "</pre>\n";*/
|
||||||
|
return $arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseFile($file)
|
||||||
|
{
|
||||||
|
$parsedEnt = array();
|
||||||
|
$newEnt = false;
|
||||||
|
$entities = array();
|
||||||
|
|
||||||
|
// $file = file_get_contents($this->pipeline_directory . $file);
|
||||||
|
// var_dump(mb_substr($file, 0,3));
|
||||||
|
// var_dump(substr($file, 0,3));
|
||||||
|
// var_dump($file);
|
||||||
|
$file = $this->removeBOM($file);
|
||||||
|
// var_dump($file);
|
||||||
|
$file = $this->removeComments($file);
|
||||||
|
// var_dump($file);
|
||||||
|
$lines = explode("\n", $file);
|
||||||
|
// echo "<pre>################################\n";
|
||||||
|
foreach ($lines as $line)
|
||||||
|
{
|
||||||
|
$line = rtrim($line);
|
||||||
|
$parsedLine = $this->parseLine($line);
|
||||||
|
|
||||||
|
if (!$parsedLine)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ($parsedLine["type"] == "index")
|
||||||
|
$parsedEnt["index"] = $parsedLine["index"];
|
||||||
|
|
||||||
|
if ($parsedLine["type"] == "string")
|
||||||
|
{
|
||||||
|
/* echo "%%%% parsedEnt %%%%%\n";
|
||||||
|
var_dump($parsedEnt);
|
||||||
|
|
||||||
|
echo "%%%% parsedLine %%%%%\n";
|
||||||
|
var_dump($parsedLine);
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!$parsedLine['identifier'])
|
||||||
|
{
|
||||||
|
// echo "ZLACZENIE \n";
|
||||||
|
$parsedEnt['string'] .= "\n" . $parsedLine['string'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// echo "DODANIE \n";
|
||||||
|
$parsedEnt += $parsedLine;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* echo "%%%% parsedEnt after %%%%%\n";
|
||||||
|
var_dump($parsedEnt);*/
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($parsedLine["type"] == "diff" && $parsedEnt)
|
||||||
|
{
|
||||||
|
$newEnt = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($newEnt)
|
||||||
|
{
|
||||||
|
// var_dump($parsedEnt);
|
||||||
|
$entities[] = $parsedEnt;
|
||||||
|
$parsedEnt =array();
|
||||||
|
$newEnt = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($parsedLine["type"] == "diff")
|
||||||
|
{
|
||||||
|
$parsedEnt["diff"] = $parsedLine["command"];
|
||||||
|
$parsedEnt["index"] = $parsedLine["index"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($parsedEnt)
|
||||||
|
$entities[] = $parsedEnt;
|
||||||
|
/* var_dump($entities);
|
||||||
|
echo "</pre>\n";*/
|
||||||
|
return $entities;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
83
code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/960grid/views/form.ctp
vendored
Normal file
83
code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/960grid/views/form.ctp
vendored
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.console.libs.templates.views
|
||||||
|
* @since CakePHP(tm) v 1.2.0.5234
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<?php //// ACTIONS ?>
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5><?php echo $pluralHumanName; ?></h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<?php if (strpos($action, 'add') === false): ?>
|
||||||
|
<li><?php echo "<?php echo \$this->Html->link(__('Delete', true), array('action' => 'delete', \$this->Form->value('{$modelClass}.{$primaryKey}')), null, sprintf(__('Are you sure you want to delete # %s?', true), \$this->Form->value('{$modelClass}.{$primaryKey}'))); ?>";?></li>
|
||||||
|
<?php endif;?>
|
||||||
|
<li><?php echo "<?php echo \$this->Html->link(sprintf(__('List %s', true), __('{$pluralHumanName}', true)), array('action' => 'index'));?>";?></li>
|
||||||
|
</ul>
|
||||||
|
<?php
|
||||||
|
$done = array();
|
||||||
|
foreach ($associations as $type => $data) {
|
||||||
|
foreach ($data as $alias => $details) {
|
||||||
|
echo "\n\t\t\t<h5>".Inflector::humanize($details['controller'])."</h5>";
|
||||||
|
echo "\n\t\t\t<ul class=\"menu\">\n";
|
||||||
|
if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('List %s', true), __('" . Inflector::humanize($details['controller']) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('New %s', true), __('" . Inflector::humanize(Inflector::underscore($alias)) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
|
||||||
|
$done[] = $details['controller'];
|
||||||
|
}
|
||||||
|
echo "\t\t\t</ul>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
<h2 id="page-heading"><?php echo "<?php printf(__('" . Inflector::humanize($action) . " %s', true), __('{$singularHumanName}', true)); ?>";?></h2>
|
||||||
|
|
||||||
|
<div class="<?php echo $pluralVar;?> form">
|
||||||
|
<?php echo "<?php echo \$this->Form->create('{$modelClass}');?>\n";?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php echo "<?php printf(__('{$singularHumanName} Record', true)); ?>";?></legend>
|
||||||
|
<?php
|
||||||
|
echo "\t<?php\n";
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
if (strpos($action, 'add') !== false && $field == $primaryKey) {
|
||||||
|
continue;
|
||||||
|
} elseif (!in_array($field, array('created', 'modified', 'updated'))) {
|
||||||
|
echo "\t\techo \$this->Form->input('{$field}');\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!empty($associations['hasAndBelongsToMany'])) {
|
||||||
|
foreach ($associations['hasAndBelongsToMany'] as $assocName => $assocData) {
|
||||||
|
echo "\t\techo \$this->Form->input('{$assocName}');\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "\t?>\n";
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php
|
||||||
|
echo "<?php echo \$this->Form->end(__('Submit', true));?>\n";
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
89
code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/960grid/views/home.ctp
vendored
Normal file
89
code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/960grid/views/home.ctp
vendored
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
<div class="grid_16">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$output = "<h2>Sweet, \"" . Inflector::humanize($app) . "\" got Baked by CakePHP!</h2>\n";
|
||||||
|
$output .="
|
||||||
|
<?php
|
||||||
|
if (Configure::read() > 0):
|
||||||
|
Debugger::checkSecurityKeys();
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
if (is_writable(TMP)):
|
||||||
|
echo '<span class=\"notice success\">';
|
||||||
|
__('Your tmp directory is writable.');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class=\"notice\">';
|
||||||
|
__('Your tmp directory is NOT writable.');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
\$settings = Cache::settings();
|
||||||
|
if (!empty(\$settings)):
|
||||||
|
echo '<span class=\"notice success\">';
|
||||||
|
printf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. \$settings['engine'] . 'Engine</em>');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class=\"notice\">';
|
||||||
|
__('Your cache is NOT working. Please check the settings in APP/config/core.php');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
\$filePresent = null;
|
||||||
|
if (file_exists(CONFIGS . 'database.php')):
|
||||||
|
echo '<span class=\"notice success\">';
|
||||||
|
__('Your database configuration file is present.');
|
||||||
|
\$filePresent = true;
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class=\"notice\">';
|
||||||
|
__('Your database configuration file is NOT present.');
|
||||||
|
echo '<br/>';
|
||||||
|
__('Rename config/database.php.default to config/database.php');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
if (!empty(\$filePresent)):
|
||||||
|
if (!class_exists('ConnectionManager')) {
|
||||||
|
require LIBS . 'model' . DS . 'connection_manager.php';
|
||||||
|
}
|
||||||
|
\$db = ConnectionManager::getInstance();
|
||||||
|
\$connected = \$db->getDataSource('default');
|
||||||
|
?>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
if (\$connected->isConnected()):
|
||||||
|
echo '<span class=\"notice success\">';
|
||||||
|
__('Cake is able to connect to the database.');
|
||||||
|
echo '</span>';
|
||||||
|
else:
|
||||||
|
echo '<span class=\"notice\">';
|
||||||
|
__('Cake is NOT able to connect to the database.');
|
||||||
|
echo '</span>';
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</p>\n";
|
||||||
|
$output .= "<?php endif;?>\n";
|
||||||
|
$output .= "<h3><?php __('Editing this Page') ?></h3>\n";
|
||||||
|
$output .= "<p>\n";
|
||||||
|
$output .= "<?php\n";
|
||||||
|
$output .= "\tprintf(__('To change the content of this page, edit: %s\n";
|
||||||
|
$output .= "\t\tTo change its layout, edit: %s\n";
|
||||||
|
$output .= "\t\tYou can also add some CSS styles for your pages at: %s', true),\n";
|
||||||
|
$output .= "\t\tAPP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');\n";
|
||||||
|
$output .= "?>\n";
|
||||||
|
$output .= "</p>\n";
|
||||||
|
?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
126
code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/960grid/views/index.ctp
vendored
Normal file
126
code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/960grid/views/index.ctp
vendored
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.console.libs.templates.views
|
||||||
|
* @since CakePHP(tm) v 1.2.0.5234
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<?php //// ACTIONS ?>
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5><?php echo $pluralHumanName; ?></h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo "<?php echo \$this->Html->link(sprintf(__('New %s', true), __('{$singularHumanName}', true)), array('action' => 'add')); ?>";?></li>
|
||||||
|
</ul>
|
||||||
|
<?php
|
||||||
|
$done = array();
|
||||||
|
foreach ($associations as $type => $data) {
|
||||||
|
foreach ($data as $alias => $details) {
|
||||||
|
echo "\n\t\t\t<h5>".Inflector::humanize($details['controller'])."</h5>";
|
||||||
|
echo "\n\t\t\t<ul class=\"menu\">\n";
|
||||||
|
if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('List %s', true), __('" . Inflector::humanize($details['controller']) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('New %s', true), __('" . Inflector::humanize(Inflector::underscore($alias)) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
|
||||||
|
$done[] = $details['controller'];
|
||||||
|
}
|
||||||
|
echo "\t\t\t</ul>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
<h2 id="page-heading"><?php echo "<?php __('{$pluralHumanName}');?>";?></h2>
|
||||||
|
|
||||||
|
<?php //// TABLE WITH RECORDS ?>
|
||||||
|
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<?php
|
||||||
|
//// TABLE HEADERS
|
||||||
|
echo "<?php \$tableHeaders = \$html->tableHeaders(array(";
|
||||||
|
|
||||||
|
foreach($fields as $field) {
|
||||||
|
echo "\$paginator->sort('{$field}'),";
|
||||||
|
}
|
||||||
|
echo "__('Actions', true),";
|
||||||
|
echo "));\n";
|
||||||
|
|
||||||
|
echo "echo '<thead>'.\$tableHeaders.'</thead>'; ?>\n\n";
|
||||||
|
|
||||||
|
//// TABLE ROWS
|
||||||
|
|
||||||
|
echo "<?php
|
||||||
|
\$i = 0;
|
||||||
|
foreach (\${$pluralVar} as \${$singularVar}):
|
||||||
|
\$class = null;
|
||||||
|
if (\$i++ % 2 == 0) {
|
||||||
|
\$class = ' class=\"altrow\"';
|
||||||
|
}
|
||||||
|
?>\n";
|
||||||
|
echo "\t<tr<?php echo \$class;?>>\n";
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
$isKey = false;
|
||||||
|
if (!empty($associations['belongsTo'])) {
|
||||||
|
foreach ($associations['belongsTo'] as $alias => $details) {
|
||||||
|
if ($field === $details['foreignKey']) {
|
||||||
|
$isKey = true;
|
||||||
|
echo "\t\t<td>\n\t\t\t<?php echo \$this->Html->link(\${$singularVar}['{$alias}']['{$details['displayField']}'], array('controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?>\n\t\t</td>\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($isKey !== true) {
|
||||||
|
echo "\t\t<td><?php echo \${$singularVar}['{$modelClass}']['{$field}']; ?> </td>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "\t\t<td class=\"actions\">\n";
|
||||||
|
echo "\t\t\t<?php echo \$this->Html->link(__('View', true), array('action' => 'view', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
|
||||||
|
echo "\t\t\t<?php echo ' | ' . \$this->Html->link(__('Edit', true), array('action' => 'edit', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
|
||||||
|
echo "\t\t\t<?php echo ' | ' . \$this->Html->link(__('Delete', true), array('action' => 'delete', \${$singularVar}['{$modelClass}']['{$primaryKey}']), null, sprintf(__('Are you sure you want to delete # %s?', true), \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
|
||||||
|
echo "\t\t</td>\n";
|
||||||
|
echo "\t</tr>\n";
|
||||||
|
|
||||||
|
echo "<?php endforeach; ?>\n";
|
||||||
|
|
||||||
|
//// TABLE FOOTER
|
||||||
|
echo "<?php echo '<tfoot class=\'dark\'>'.\$tableHeaders.'</tfoot>'; ?>";
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php //// PAGINATION ?>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?php echo "<?php
|
||||||
|
echo \$this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?>";?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo "\t<?php echo \$this->Paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>\n";?>
|
||||||
|
| <?php echo "\t<?php echo \$this->Paginator->numbers();?>\n"?> |
|
||||||
|
<?php echo "\t<?php echo \$this->Paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>\n";?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
184
code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/960grid/views/view.ctp
vendored
Normal file
184
code/ryzom/tools/server/www/webtt/app/vendors/shells/templates/960grid/views/view.ctp
vendored
Normal file
|
@ -0,0 +1,184 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.console.libs.templates.views
|
||||||
|
* @since CakePHP(tm) v 1.2.0.5234
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<?php //// ACTIONS ?>
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5><?php echo $pluralHumanName; ?></h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<?php
|
||||||
|
echo "\t<li><?php echo \$this->Html->link(sprintf(__('Edit %s', true), __('{$singularHumanName}', true)), array('action' => 'edit', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?> </li>\n";
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('Delete %s', true), __('{$singularHumanName}', true)), array('action' => 'delete', \${$singularVar}['{$modelClass}']['{$primaryKey}']), null, sprintf(__('Are you sure you want to delete # %s?', true), \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?> </li>\n";
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('List %s', true), __('{$pluralHumanName}', true)), array('action' => 'index')); ?> </li>\n";
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('New %s', true), __('{$singularHumanName}', true)), array('action' => 'add')); ?> </li>\n";
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<?php
|
||||||
|
$done = array();
|
||||||
|
foreach ($associations as $type => $data) {
|
||||||
|
foreach ($data as $alias => $details) {
|
||||||
|
echo "\n\t\t\t<h5>".Inflector::humanize($details['controller'])."</h5>";
|
||||||
|
echo "\n\t\t\t<ul class=\"menu\">\n";
|
||||||
|
if ($details['controller'] != $this->name && !in_array($details['controller'], $done)) {
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('List %s', true), __('" . Inflector::humanize($details['controller']) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'index')); ?> </li>\n";
|
||||||
|
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('New %s', true), __('" . Inflector::humanize(Inflector::underscore($alias)) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'add')); ?> </li>\n";
|
||||||
|
$done[] = $details['controller'];
|
||||||
|
}
|
||||||
|
echo "\t\t\t</ul>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<div class="<?php echo $pluralVar;?> view">
|
||||||
|
<h2><?php echo "<?php __('{$singularHumanName}');?>";?></h2>
|
||||||
|
<div class="block">
|
||||||
|
<dl><?php echo "<?php \$i = 0; \$class = ' class=\"altrow\"';?>\n";?>
|
||||||
|
<?php
|
||||||
|
foreach ($fields as $field) {
|
||||||
|
$isKey = false;
|
||||||
|
if (!empty($associations['belongsTo'])) {
|
||||||
|
foreach ($associations['belongsTo'] as $alias => $details) {
|
||||||
|
if ($field === $details['foreignKey']) {
|
||||||
|
$isKey = true;
|
||||||
|
echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('" . Inflector::humanize(Inflector::underscore($alias)) . "'); ?></dt>\n";
|
||||||
|
echo "\t\t<dd<?php if (\$i++ % 2 == 0) echo \$class;?>>\n\t\t\t<?php echo \$this->Html->link(\${$singularVar}['{$alias}']['{$details['displayField']}'], array('controller' => '{$details['controller']}', 'action' => 'view', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?>\n\t\t\t \n\t\t</dd>\n";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($isKey !== true) {
|
||||||
|
echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('" . Inflector::humanize($field) . "'); ?></dt>\n";
|
||||||
|
echo "\t\t<dd<?php if (\$i++ % 2 == 0) echo \$class;?>>\n\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field}']; ?>\n\t\t\t \n\t\t</dd>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if(
|
||||||
|
(!empty($associations['hasOne'])) ||
|
||||||
|
(!empty($associations['hasMany'])) ||
|
||||||
|
(!empty($associations['hasAndBelongsToMany']))
|
||||||
|
) { ?>
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-related-records"><?php echo "<?php echo (__('Related', true)); ?>"; ?></a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="related-records">
|
||||||
|
<?php
|
||||||
|
if (!empty($associations['hasOne'])) :
|
||||||
|
foreach ($associations['hasOne'] as $alias => $details): ?>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php echo "<?php printf(__('Related %s', true), __('" . Inflector::humanize($details['controller']) . "', true));?>";?></h3>
|
||||||
|
<?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])):?>\n";?>
|
||||||
|
<dl><?php echo "\t<?php \$i = 0; \$class = ' class=\"altrow\"';?>\n";?>
|
||||||
|
<?php
|
||||||
|
foreach ($details['fields'] as $field) {
|
||||||
|
echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php __('" . Inflector::humanize($field) . "');?></dt>\n";
|
||||||
|
echo "\t\t<dd<?php if (\$i++ % 2 == 0) echo \$class;?>>\n\t<?php echo \${$singularVar}['{$alias}']['{$field}'];?>\n </dd>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</dl>
|
||||||
|
<?php echo "<?php endif; ?>\n";?>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo "<?php echo \$this->Html->link(sprintf(__('Edit %s', true), __('" . Inflector::humanize(Inflector::underscore($alias)) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?></li>\n";?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
endforeach;
|
||||||
|
endif;
|
||||||
|
if (empty($associations['hasMany'])) {
|
||||||
|
$associations['hasMany'] = array();
|
||||||
|
}
|
||||||
|
if (empty($associations['hasAndBelongsToMany'])) {
|
||||||
|
$associations['hasAndBelongsToMany'] = array();
|
||||||
|
}
|
||||||
|
$relations = array_merge($associations['hasMany'], $associations['hasAndBelongsToMany']);
|
||||||
|
$i = 0;
|
||||||
|
foreach ($relations as $alias => $details):
|
||||||
|
$otherSingularVar = Inflector::variable($alias);
|
||||||
|
$otherPluralHumanName = Inflector::humanize($details['controller']);
|
||||||
|
?>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php echo "<?php printf(__('Related %s', true), __('{$otherPluralHumanName}', true));?>";?></h3>
|
||||||
|
<?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])):?>\n";?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<?php
|
||||||
|
foreach ($details['fields'] as $field) {
|
||||||
|
echo "\t\t<th><?php __('" . Inflector::humanize($field) . "'); ?></th>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<th class="actions"><?php echo "<?php __('Actions');?>";?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<?php
|
||||||
|
echo "\t<?php
|
||||||
|
\$i = 0;
|
||||||
|
foreach (\${$singularVar}['{$alias}'] as \${$otherSingularVar}):
|
||||||
|
\$class = null;
|
||||||
|
if (\$i++ % 2 == 0) {
|
||||||
|
\$class = ' class=\"altrow\"';
|
||||||
|
}
|
||||||
|
?>\n";
|
||||||
|
echo "\t\t<tr<?php echo \$class;?>>\n";
|
||||||
|
|
||||||
|
foreach ($details['fields'] as $field) {
|
||||||
|
echo "\t\t\t<td><?php echo \${$otherSingularVar}['{$field}'];?></td>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "\t\t\t<td class=\"actions\">\n";
|
||||||
|
echo "\t\t\t\t<?php echo \$this->Html->link(__('View', true), array('controller' => '{$details['controller']}', 'action' => 'view', \${$otherSingularVar}['{$details['primaryKey']}'])); ?>\n";
|
||||||
|
echo "\t\t\t\t<?php echo ' | '. \$this->Html->link(__('Edit', true), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$otherSingularVar}['{$details['primaryKey']}'])); ?>\n";
|
||||||
|
echo "\t\t\t\t<?php echo ' | '. \$this->Html->link(__('Delete', true), array('controller' => '{$details['controller']}', 'action' => 'delete', \${$otherSingularVar}['{$details['primaryKey']}']), null, sprintf(__('Are you sure you want to delete # %s?', true), \${$otherSingularVar}['{$details['primaryKey']}'])); ?>\n";
|
||||||
|
echo "\t\t\t</td>\n";
|
||||||
|
echo "\t\t</tr>\n";
|
||||||
|
|
||||||
|
echo "\t<?php endforeach; ?>\n";
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
<?php echo "<?php endif; ?>\n\n";?>
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo "<?php echo \$this->Html->link(sprintf(__('New %s', true), __('" . Inflector::humanize(Inflector::underscore($alias)) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'add'));?>";?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endforeach;?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-left-menu">Admin Menu</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-left-menu">
|
||||||
|
<ul class="section menu">
|
||||||
|
<li>
|
||||||
|
<?php
|
||||||
|
if(($this->params['controller'] == 'dashboards') && ($this->params['action'] == 'admin_index')) {
|
||||||
|
echo $this->Html->link(__('Dashboard', true), array('controller' => 'dashboards', 'action' => 'index', 'admin' => true), array('class' => 'menuitem current'));
|
||||||
|
} else {
|
||||||
|
echo $this->Html->link(__('Dashboard', true), array('controller' => 'dashboards', 'action' => 'index', 'admin' => true), array('class' => 'menuitem'));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<?php
|
||||||
|
if($this->params['controller'] == 'users') {
|
||||||
|
echo $this->Html->link(__('User Management', true), array('controller' => 'users', 'action' => 'index', 'admin' => true), array('class' => 'menuitem current'));
|
||||||
|
} else {
|
||||||
|
echo $this->Html->link(__('User Management', true), array('controller' => 'users', 'action' => 'index', 'admin' => true), array('class' => 'menuitem'));
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="menuitem" href="/admin/users/logout">Logout</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<ul class="nav main">
|
||||||
|
<li>
|
||||||
|
<a href="/admin">Admin</a>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Link 1</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/">Link 2</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin">Admin</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin">Admin 2</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/admin">Admin 3</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="fileIdentifiers form">
|
||||||
|
<?php echo $this->Form->create('FileIdentifier');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Add File Identifier'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('translation_file_id');
|
||||||
|
echo $this->Form->input('command');
|
||||||
|
echo $this->Form->input('translation_index');
|
||||||
|
echo $this->Form->input('identifier_id');
|
||||||
|
echo $this->Form->input('reference_string');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="fileIdentifiers form">
|
||||||
|
<?php echo $this->Form->create('FileIdentifier');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Admin Add File Identifier'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('translation_file_id');
|
||||||
|
echo $this->Form->input('command');
|
||||||
|
echo $this->Form->input('translation_index');
|
||||||
|
echo $this->Form->input('identifier_id');
|
||||||
|
echo $this->Form->input('reference_string');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="fileIdentifiers form">
|
||||||
|
<?php echo $this->Form->create('FileIdentifier');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Admin Edit File Identifier'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('translation_file_id');
|
||||||
|
echo $this->Form->input('command');
|
||||||
|
echo $this->Form->input('translation_index');
|
||||||
|
echo $this->Form->input('identifier_id');
|
||||||
|
echo $this->Form->input('reference_string');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('FileIdentifier.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('FileIdentifier.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,67 @@
|
||||||
|
<div class="fileIdentifiers index">
|
||||||
|
<h2><?php __('File Identifiers');?></h2>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('translation_file_id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('command');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('translation_index');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('identifier_id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('reference_string');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('modified');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($fileIdentifiers as $fileIdentifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['id']; ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($fileIdentifier['TranslationFile']['filename'], array('controller' => 'translation_files', 'action' => 'view', $fileIdentifier['TranslationFile']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['command']; ?> </td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['translation_index']; ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($fileIdentifier['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $fileIdentifier['Identifier']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['reference_string']; ?> </td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['created']; ?> </td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $fileIdentifier['FileIdentifier']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $fileIdentifier['FileIdentifier']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $fileIdentifier['FileIdentifier']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $fileIdentifier['FileIdentifier']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('action' => 'add')); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,58 @@
|
||||||
|
<div class="fileIdentifiers view">
|
||||||
|
<h2><?php __('File Identifier');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translation File'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $this->Html->link($fileIdentifier['TranslationFile']['filename'], array('controller' => 'translation_files', 'action' => 'view', $fileIdentifier['TranslationFile']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Command'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['command']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translation Index'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['translation_index']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Identifier'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $this->Html->link($fileIdentifier['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $fileIdentifier['Identifier']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Reference String'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['reference_string']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('Edit File Identifier', true), array('action' => 'edit', $fileIdentifier['FileIdentifier']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('Delete File Identifier', true), array('action' => 'delete', $fileIdentifier['FileIdentifier']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $fileIdentifier['FileIdentifier']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="fileIdentifiers form">
|
||||||
|
<?php echo $this->Form->create('FileIdentifier');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Edit File Identifier'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('translation_file_id');
|
||||||
|
echo $this->Form->input('command');
|
||||||
|
echo $this->Form->input('translation_index');
|
||||||
|
echo $this->Form->input('identifier_id');
|
||||||
|
echo $this->Form->input('reference_string');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('FileIdentifier.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('FileIdentifier.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,67 @@
|
||||||
|
<div class="fileIdentifiers index">
|
||||||
|
<h2><?php __('File Identifiers');?></h2>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('translation_file_id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('command');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('translation_index');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('identifier_id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('reference_string');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('modified');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($fileIdentifiers as $fileIdentifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['id']; ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($fileIdentifier['TranslationFile']['filename'], array('controller' => 'translation_files', 'action' => 'view', $fileIdentifier['TranslationFile']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['command']; ?> </td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['translation_index']; ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($fileIdentifier['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $fileIdentifier['Identifier']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['reference_string']; ?> </td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['created']; ?> </td>
|
||||||
|
<td><?php echo $fileIdentifier['FileIdentifier']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $fileIdentifier['FileIdentifier']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $fileIdentifier['FileIdentifier']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $fileIdentifier['FileIdentifier']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $fileIdentifier['FileIdentifier']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('action' => 'add')); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,58 @@
|
||||||
|
<div class="fileIdentifiers view">
|
||||||
|
<h2><?php __('File Identifier');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translation File'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $this->Html->link($fileIdentifier['TranslationFile']['filename'], array('controller' => 'translation_files', 'action' => 'view', $fileIdentifier['TranslationFile']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Command'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['command']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translation Index'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['translation_index']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Identifier'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $this->Html->link($fileIdentifier['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $fileIdentifier['Identifier']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Reference String'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['reference_string']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $fileIdentifier['FileIdentifier']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('Edit File Identifier', true), array('action' => 'edit', $fileIdentifier['FileIdentifier']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('Delete File Identifier', true), array('action' => 'delete', $fileIdentifier['FileIdentifier']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $fileIdentifier['FileIdentifier']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="identifiers form">
|
||||||
|
<?php echo $this->Form->create('Identifier');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Add Identifier'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('language_id');
|
||||||
|
echo $this->Form->input('translation_index');
|
||||||
|
echo $this->Form->input('identifier');
|
||||||
|
echo $this->Form->input('reference_string');
|
||||||
|
echo $this->Form->input('translated');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translations', true), array('controller' => 'translations', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="identifiers form">
|
||||||
|
<?php echo $this->Form->create('Identifier');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Admin Add Identifier'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('language_id');
|
||||||
|
echo $this->Form->input('translation_index');
|
||||||
|
echo $this->Form->input('identifier');
|
||||||
|
echo $this->Form->input('reference_string');
|
||||||
|
echo $this->Form->input('translated');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translations', true), array('controller' => 'translations', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="identifiers form">
|
||||||
|
<?php echo $this->Form->create('Identifier');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Admin Edit Identifier'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('language_id');
|
||||||
|
echo $this->Form->input('translation_index');
|
||||||
|
echo $this->Form->input('identifier');
|
||||||
|
echo $this->Form->input('reference_string');
|
||||||
|
echo $this->Form->input('translated');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Identifier.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Identifier.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translations', true), array('controller' => 'translations', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,65 @@
|
||||||
|
<div class="identifiers index">
|
||||||
|
<h2><?php __('Identifiers');?></h2>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('language_id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('translation_index');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('identifier');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('reference_string');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('translated');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('modified');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($identifiers as $identifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $identifier['Identifier']['id']; ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($identifier['Language']['name'], array('controller' => 'languages', 'action' => 'view', $identifier['Language']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $identifier['Identifier']['translation_index']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['identifier']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['reference_string']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['translated']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['created']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $identifier['Identifier']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $identifier['Identifier']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $identifier['Identifier']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifier['Identifier']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('action' => 'add')); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translations', true), array('controller' => 'translations', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,152 @@
|
||||||
|
<div class="identifiers view">
|
||||||
|
<h2><?php __('Identifier');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Language'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $this->Html->link($identifier['Language']['name'], array('controller' => 'languages', 'action' => 'view', $identifier['Language']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translation Index'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['translation_index']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Identifier'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['identifier']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Reference String'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['reference_string']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translated'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['translated']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('Edit Identifier', true), array('action' => 'edit', $identifier['Identifier']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('Delete Identifier', true), array('action' => 'delete', $identifier['Identifier']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifier['Identifier']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translations', true), array('controller' => 'translations', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('controller' => 'file_identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Translations');?></h3>
|
||||||
|
<?php if (!empty($identifier['Translation'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Identifier Id'); ?></th>
|
||||||
|
<th><?php __('Translation Text'); ?></th>
|
||||||
|
<th><?php __('User Id'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($identifier['Translation'] as $translation):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $translation['id'];?></td>
|
||||||
|
<td><?php echo $translation['identifier_id'];?></td>
|
||||||
|
<td><?php echo $translation['translation_text'];?></td>
|
||||||
|
<td><?php echo $translation['user_id'];?></td>
|
||||||
|
<td><?php echo $translation['created'];?></td>
|
||||||
|
<td><?php echo $translation['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'translations', 'action' => 'view', $translation['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('controller' => 'translations', 'action' => 'edit', $translation['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('controller' => 'translations', 'action' => 'delete', $translation['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $translation['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related File Identifiers');?></h3>
|
||||||
|
<?php if (!empty($identifier['FileIdentifier'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Translation File Id'); ?></th>
|
||||||
|
<th><?php __('Command'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier Id'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($identifier['FileIdentifier'] as $fileIdentifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $fileIdentifier['id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['translation_file_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['command'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['identifier_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['created'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'file_identifiers', 'action' => 'view', $fileIdentifier['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('controller' => 'file_identifiers', 'action' => 'edit', $fileIdentifier['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('controller' => 'file_identifiers', 'action' => 'delete', $fileIdentifier['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $fileIdentifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('controller' => 'file_identifiers', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,27 @@
|
||||||
|
<div class="identifiers form">
|
||||||
|
<?php echo $this->Form->create('Identifier');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Edit Identifier'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('language_id');
|
||||||
|
echo $this->Form->input('translation_index');
|
||||||
|
echo $this->Form->input('identifier');
|
||||||
|
echo $this->Form->input('reference_string');
|
||||||
|
echo $this->Form->input('translated');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Identifier.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Identifier.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translations', true), array('controller' => 'translations', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,62 @@
|
||||||
|
<div class="identifiers index">
|
||||||
|
<h2><?php __('Identifiers');?></h2>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('language_id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('translation_index');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('identifier');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('reference_string');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('translated');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('modified');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($identifiers as $identifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $identifier['Identifier']['id']; ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($identifier['Language']['name'], array('controller' => 'languages', 'action' => 'view', $identifier['Language']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $identifier['Identifier']['translation_index']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['identifier']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['reference_string']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['translated']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['created']; ?> </td>
|
||||||
|
<td><?php echo $identifier['Identifier']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $identifier['Identifier']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translations', true), array('controller' => 'translations', 'action' => 'index')); ?> </li>
|
||||||
|
<li style="padding-left: 10px"><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
141
code/ryzom/tools/server/www/webtt/app/views/identifiers/view.ctp
Normal file
141
code/ryzom/tools/server/www/webtt/app/views/identifiers/view.ctp
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
<div class="identifiers view">
|
||||||
|
<h2><?php __('Identifier');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Language'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $this->Html->link($identifier['Language']['name'], array('controller' => 'languages', 'action' => 'view', $identifier['Language']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translation Index'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['translation_index']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Identifier'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['identifier']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Reference String'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['reference_string']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Translated'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['translated']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $identifier['Identifier']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translations', true), array('controller' => 'translations', 'action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Translations');?></h3>
|
||||||
|
<?php if (!empty($identifier['Translation'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Identifier Id'); ?></th>
|
||||||
|
<th><?php __('Translation Text'); ?></th>
|
||||||
|
<th><?php __('User Id'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($identifier['Translation'] as $translation):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $translation['id'];?></td>
|
||||||
|
<td><?php echo $translation['identifier_id'];?></td>
|
||||||
|
<td><?php echo $translation['translation_text'];?></td>
|
||||||
|
<td><?php echo $translation['user_id'];?></td>
|
||||||
|
<td><?php echo $translation['created'];?></td>
|
||||||
|
<td><?php echo $translation['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'translations', 'action' => 'view', $translation['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('controller' => 'translations', 'action' => 'edit', $translation['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('controller' => 'translations', 'action' => 'delete', $translation['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $translation['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation', true), array('controller' => 'translations', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related File Identifiers');?></h3>
|
||||||
|
<?php if (!empty($identifier['FileIdentifier'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Translation File Id'); ?></th>
|
||||||
|
<th><?php __('Command'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier Id'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($identifier['FileIdentifier'] as $fileIdentifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $fileIdentifier['id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['translation_file_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['command'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['identifier_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['created'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'file_identifiers', 'action' => 'view', $fileIdentifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="translationFiles form">
|
||||||
|
<?php echo $this->Form->create('TranslationFile');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Admin Add Translation File'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('language_id');
|
||||||
|
echo $this->Form->input('filename');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('controller' => 'file_identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<div class="translationFiles form">
|
||||||
|
<?php echo $this->Form->create('TranslationFile');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Admin Edit Translation File'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('language_id');
|
||||||
|
echo $this->Form->input('filename');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('TranslationFile.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('TranslationFile.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('controller' => 'file_identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,59 @@
|
||||||
|
<div class="importedTranslationFiles index">
|
||||||
|
<h2><?php __('Imported Translation Files');?></h2>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('language_id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('filename');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('modified');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($importedTranslationFiles as $importedTranslationFile):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $importedTranslationFile['ImportedTranslationFile']['id']; ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($importedTranslationFile['Language']['name'], array('controller' => 'languages', 'action' => 'view', $importedTranslationFile['Language']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $importedTranslationFile['ImportedTranslationFile']['filename']; ?> </td>
|
||||||
|
<td><?php echo $importedTranslationFile['ImportedTranslationFile']['created']; ?> </td>
|
||||||
|
<td><?php echo $importedTranslationFile['ImportedTranslationFile']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $importedTranslationFile['ImportedTranslationFile']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $importedTranslationFile['ImportedTranslationFile']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $importedTranslationFile['ImportedTranslationFile']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $importedTranslationFile['ImportedTranslationFile']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('action' => 'add')); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('controller' => 'file_identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,91 @@
|
||||||
|
<div class="translationFiles view">
|
||||||
|
<h2><?php __('Translation File');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $translationFile['TranslationFile']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Language'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $this->Html->link($translationFile['Language']['name'], array('controller' => 'languages', 'action' => 'view', $translationFile['Language']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Filename'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $translationFile['TranslationFile']['filename']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $translationFile['TranslationFile']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $translationFile['TranslationFile']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('Edit Translation File', true), array('action' => 'edit', $translationFile['TranslationFile']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('Delete Translation File', true), array('action' => 'delete', $translationFile['TranslationFile']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $translationFile['TranslationFile']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('controller' => 'languages', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('controller' => 'file_identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related File Identifiers');?></h3>
|
||||||
|
<?php if (!empty($translationFile['FileIdentifier'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Translation File Id'); ?></th>
|
||||||
|
<th><?php __('Command'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier Id'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($translationFile['FileIdentifier'] as $fileIdentifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $fileIdentifier['id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['translation_file_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['command'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['identifier_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['created'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'file_identifiers', 'action' => 'view', $fileIdentifier['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('controller' => 'file_identifiers', 'action' => 'edit', $fileIdentifier['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('controller' => 'file_identifiers', 'action' => 'delete', $fileIdentifier['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $fileIdentifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New File Identifier', true), array('controller' => 'file_identifiers', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,55 @@
|
||||||
|
<div class="importedTranslationFiles index">
|
||||||
|
<h2><?php __('Imported Translation Files');?></h2>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('language_id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('filename');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('modified');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($importedTranslationFiles as $importedTranslationFile):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $importedTranslationFile['ImportedTranslationFile']['id']; ?> </td>
|
||||||
|
<td>
|
||||||
|
<?php echo $this->Html->link($importedTranslationFile['Language']['name'], array('controller' => 'languages', 'action' => 'view', $importedTranslationFile['Language']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $importedTranslationFile['ImportedTranslationFile']['filename']; ?> </td>
|
||||||
|
<td><?php echo $importedTranslationFile['ImportedTranslationFile']['created']; ?> </td>
|
||||||
|
<td><?php echo $importedTranslationFile['ImportedTranslationFile']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $importedTranslationFile['ImportedTranslationFile']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,122 @@
|
||||||
|
<div class="importedTranslationFiles view">
|
||||||
|
<h2><?php __('Imported Translation File');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $importedTranslationFile['ImportedTranslationFile']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Language'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $this->Html->link($importedTranslationFile['Language']['name'], array('controller' => 'languages', 'action' => 'view', $importedTranslationFile['Language']['id'])); ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Filename'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $importedTranslationFile['ImportedTranslationFile']['filename']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $importedTranslationFile['ImportedTranslationFile']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $importedTranslationFile['ImportedTranslationFile']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List File Identifiers', true), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related File Identifiers');?></h3>
|
||||||
|
<?php if (!empty($importedTranslationFile['FileIdentifier'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Translation File Id'); ?></th>
|
||||||
|
<th><?php __('Command'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier Id'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($importedTranslationFile['FileIdentifier'] as $fileIdentifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $fileIdentifier['id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['imported_translation_file_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['command'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['identifier_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['created'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'file_identifiers', 'action' => 'view', $fileIdentifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<!--<div class="related">
|
||||||
|
<h3><?php __('Related Raw Files');?></h3>
|
||||||
|
<?php if (!empty($importedTranslationFile['RawFile'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Translation File Id'); ?></th>
|
||||||
|
<th><?php __('Command'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier Id'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($importedTranslationFile['FileIdentifier'] as $fileIdentifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $fileIdentifier['id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['imported_translation_file_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['command'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['identifier_id'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['created'];?></td>
|
||||||
|
<td><?php echo $fileIdentifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'file_identifiers', 'action' => 'view', $fileIdentifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
-->
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="languages form">
|
||||||
|
<?php echo $this->Form->create('Language');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Add Language'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('name');
|
||||||
|
echo $this->Form->input('code');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="languages form">
|
||||||
|
<?php echo $this->Form->create('Language');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Admin Add Language'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('name');
|
||||||
|
echo $this->Form->input('code');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<div class="languages form">
|
||||||
|
<?php echo $this->Form->create('Language');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Admin Edit Language'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('name');
|
||||||
|
echo $this->Form->input('code');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Language.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Language.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,57 @@
|
||||||
|
<div class="languages index">
|
||||||
|
<h2><?php __('Languages');?></h2>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('name');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('code');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('modified');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($languages as $language):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $language['Language']['id']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['name']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['code']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['created']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $language['Language']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $language['Language']['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $language['Language']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $language['Language']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('action' => 'add')); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,133 @@
|
||||||
|
<div class="languages view">
|
||||||
|
<h2><?php __('Language');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['name']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Code'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['code']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('Edit Language', true), array('action' => 'edit', $language['Language']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('Delete Language', true), array('action' => 'delete', $language['Language']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $language['Language']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Language', true), array('action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Identifiers');?></h3>
|
||||||
|
<?php if (!empty($language['Identifier'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Language Id'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Translated'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($language['Identifier'] as $identifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $identifier['id'];?></td>
|
||||||
|
<td><?php echo $identifier['language_id'];?></td>
|
||||||
|
<td><?php echo $identifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $identifier['identifier'];?></td>
|
||||||
|
<td><?php echo $identifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $identifier['translated'];?></td>
|
||||||
|
<td><?php echo $identifier['created'];?></td>
|
||||||
|
<td><?php echo $identifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'identifiers', 'action' => 'view', $identifier['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('controller' => 'identifiers', 'action' => 'edit', $identifier['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('controller' => 'identifiers', 'action' => 'delete', $identifier['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Translation Files');?></h3>
|
||||||
|
<?php if (!empty($language['TranslationFile'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Language Id'); ?></th>
|
||||||
|
<th><?php __('Filename'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($language['TranslationFile'] as $translationFile):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $translationFile['id'];?></td>
|
||||||
|
<td><?php echo $translationFile['language_id'];?></td>
|
||||||
|
<td><?php echo $translationFile['filename'];?></td>
|
||||||
|
<td><?php echo $translationFile['created'];?></td>
|
||||||
|
<td><?php echo $translationFile['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'translation_files', 'action' => 'view', $translationFile['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Edit', true), array('controller' => 'translation_files', 'action' => 'edit', $translationFile['id'])); ?>
|
||||||
|
<?php echo $this->Html->link(__('Delete', true), array('controller' => 'translation_files', 'action' => 'delete', $translationFile['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $translationFile['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,24 @@
|
||||||
|
<div class="languages form">
|
||||||
|
<?php echo $this->Form->create('Language');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php __('Edit Language'); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('name');
|
||||||
|
echo $this->Form->input('code');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Language.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Language.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('action' => 'index'));?></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Identifier', true), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(__('New Translation File', true), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,53 @@
|
||||||
|
<div class="languages index">
|
||||||
|
<h2><?php __('Languages');?></h2>
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th><?php echo $this->Paginator->sort('id');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('name');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('code');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('created');?></th>
|
||||||
|
<th><?php echo $this->Paginator->sort('modified');?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($languages as $language):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $language['Language']['id']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['name']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['code']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['created']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $language['Language']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
|
@ -0,0 +1,114 @@
|
||||||
|
<div class="languages view">
|
||||||
|
<h2><?php __('Language');?></h2>
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['name']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Code'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['code']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<h3><?php __('Actions'); ?></h3>
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(__('List Languages', true), array('action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><br></li>
|
||||||
|
<li><?php echo $this->Html->link(__('List Translation Files', true), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Identifiers');?></h3>
|
||||||
|
<?php if (!empty($language['Identifier'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Language Id'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Translated'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($language['Identifier'] as $identifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $identifier['id'];?></td>
|
||||||
|
<td><?php echo $identifier['language_id'];?></td>
|
||||||
|
<td><?php echo $identifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $identifier['identifier'];?></td>
|
||||||
|
<td><?php echo $identifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $identifier['translated'];?></td>
|
||||||
|
<td><?php echo $identifier['created'];?></td>
|
||||||
|
<td><?php echo $identifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'identifiers', 'action' => 'view', $identifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php __('Related Translation Files');?></h3>
|
||||||
|
<?php if (!empty($language['TranslationFile'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Language Id'); ?></th>
|
||||||
|
<th><?php __('Filename'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($language['TranslationFile'] as $translationFile):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $translationFile['id'];?></td>
|
||||||
|
<td><?php echo $translationFile['language_id'];?></td>
|
||||||
|
<td><?php echo $translationFile['filename'];?></td>
|
||||||
|
<td><?php echo $translationFile['created'];?></td>
|
||||||
|
<td><?php echo $translationFile['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'translation_files', 'action' => 'view', $translationFile['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
|
@ -0,0 +1,43 @@
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5>Languages</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('action' => 'index'));?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Identifiers</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Translation Files</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation File', true)), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
<h2 id="page-heading"><?php printf(__('Add %s', true), __('Language', true)); ?></h2>
|
||||||
|
|
||||||
|
<div class="languages form">
|
||||||
|
<?php echo $this->Form->create('Language');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php printf(__('Language Record', true)); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('name');
|
||||||
|
echo $this->Form->input('code');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
|
@ -0,0 +1,43 @@
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5>Languages</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('action' => 'index'));?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Identifiers</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Translation Files</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation File', true)), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
<h2 id="page-heading"><?php printf(__('Admin Add %s', true), __('Language', true)); ?></h2>
|
||||||
|
|
||||||
|
<div class="languages form">
|
||||||
|
<?php echo $this->Form->create('Language');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php printf(__('Language Record', true)); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('name');
|
||||||
|
echo $this->Form->input('code');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
|
@ -0,0 +1,45 @@
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5>Languages</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Language.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Language.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('action' => 'index'));?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Identifiers</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Translation Files</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation File', true)), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
<h2 id="page-heading"><?php printf(__('Admin Edit %s', true), __('Language', true)); ?></h2>
|
||||||
|
|
||||||
|
<div class="languages form">
|
||||||
|
<?php echo $this->Form->create('Language');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php printf(__('Language Record', true)); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('name');
|
||||||
|
echo $this->Form->input('code');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
|
@ -0,0 +1,74 @@
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5>Languages</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Language', true)), array('action' => 'add')); ?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Identifiers</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Translation Files</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Imported Translation Files', true)), array('controller' => 'imported_translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Imported Translation File', true)), array('controller' => 'imported_translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
<h2 id="page-heading"><?php __('Languages');?></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('name'),$paginator->sort('code'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
|
||||||
|
echo '<thead>'.$tableHeaders.'</thead>'; ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($languages as $language):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $language['Language']['id']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['name']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['code']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['created']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $language['Language']['id'])); ?>
|
||||||
|
<?php echo ' | ' . $this->Html->link(__('Edit', true), array('action' => 'edit', $language['Language']['id'])); ?>
|
||||||
|
<?php echo ' | ' . $this->Html->link(__('Delete', true), array('action' => 'delete', $language['Language']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $language['Language']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php echo '<tfoot class=\'dark\'>'.$tableHeaders.'</tfoot>'; ?> </table>
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
|
@ -0,0 +1,172 @@
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5>Languages</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('Edit %s', true), __('Language', true)), array('action' => 'edit', $language['Language']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('Delete %s', true), __('Language', true)), array('action' => 'delete', $language['Language']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $language['Language']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Language', true)), array('action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Identifiers</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Translation Files</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation File', true)), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<div class="languages view">
|
||||||
|
<h2><?php __('Language');?></h2>
|
||||||
|
<div class="block">
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['name']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Code'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['code']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-related-records"><?php echo (__('Related', true)); ?></a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="related-records">
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php printf(__('Related %s', true), __('Identifiers', true));?></h3>
|
||||||
|
<?php if (!empty($language['Identifier'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Language Id'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Translated'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($language['Identifier'] as $identifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $identifier['id'];?></td>
|
||||||
|
<td><?php echo $identifier['language_id'];?></td>
|
||||||
|
<td><?php echo $identifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $identifier['identifier'];?></td>
|
||||||
|
<td><?php echo $identifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $identifier['translated'];?></td>
|
||||||
|
<td><?php echo $identifier['created'];?></td>
|
||||||
|
<td><?php echo $identifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'identifiers', 'action' => 'view', $identifier['id'])); ?>
|
||||||
|
<?php echo ' | '. $this->Html->link(__('Edit', true), array('controller' => 'identifiers', 'action' => 'edit', $identifier['id'])); ?>
|
||||||
|
<?php echo ' | '. $this->Html->link(__('Delete', true), array('controller' => 'identifiers', 'action' => 'delete', $identifier['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php printf(__('Related %s', true), __('Translation Files', true));?></h3>
|
||||||
|
<?php if (!empty($language['TranslationFile'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Language Id'); ?></th>
|
||||||
|
<th><?php __('Filename'); ?></th>
|
||||||
|
<th><?php __('Merged'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($language['TranslationFile'] as $translationFile):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $translationFile['id'];?></td>
|
||||||
|
<td><?php echo $translationFile['language_id'];?></td>
|
||||||
|
<td><?php echo $translationFile['filename'];?></td>
|
||||||
|
<td><?php echo $translationFile['merged'];?></td>
|
||||||
|
<td><?php echo $translationFile['created'];?></td>
|
||||||
|
<td><?php echo $translationFile['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'translation_files', 'action' => 'view', $translationFile['id'])); ?>
|
||||||
|
<?php echo ' | '. $this->Html->link(__('Edit', true), array('controller' => 'translation_files', 'action' => 'edit', $translationFile['id'])); ?>
|
||||||
|
<?php echo ' | '. $this->Html->link(__('Delete', true), array('controller' => 'translation_files', 'action' => 'delete', $translationFile['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $translationFile['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation File', true)), array('controller' => 'translation_files', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
|
@ -0,0 +1,45 @@
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5>Languages</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Language.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Language.id'))); ?></li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('action' => 'index'));?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Identifiers</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Translation Files</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('controller' => 'translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation File', true)), array('controller' => 'translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
<h2 id="page-heading"><?php printf(__('Edit %s', true), __('Language', true)); ?></h2>
|
||||||
|
|
||||||
|
<div class="languages form">
|
||||||
|
<?php echo $this->Form->create('Language');?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php printf(__('Language Record', true)); ?></legend>
|
||||||
|
<?php
|
||||||
|
echo $this->Form->input('id');
|
||||||
|
echo $this->Form->input('name');
|
||||||
|
echo $this->Form->input('code');
|
||||||
|
?>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(__('Submit', true));?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
|
@ -0,0 +1,74 @@
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5>Languages</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Language', true)), array('action' => 'add')); ?></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Identifiers</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Translation Files</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Imported Translation Files', true)), array('controller' => 'imported_translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Imported Translation File', true)), array('controller' => 'imported_translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
<h2 id="page-heading"><?php __('Languages');?></h2>
|
||||||
|
|
||||||
|
|
||||||
|
<table cellpadding="0" cellspacing="0">
|
||||||
|
<?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('name'),$paginator->sort('code'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
|
||||||
|
echo '<thead>'.$tableHeaders.'</thead>'; ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($languages as $language):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $language['Language']['id']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['name']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['code']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['created']; ?> </td>
|
||||||
|
<td><?php echo $language['Language']['modified']; ?> </td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $language['Language']['id'])); ?>
|
||||||
|
<?php echo ' | ' . $this->Html->link(__('Edit', true), array('action' => 'edit', $language['Language']['id'])); ?>
|
||||||
|
<?php echo ' | ' . $this->Html->link(__('Delete', true), array('action' => 'delete', $language['Language']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $language['Language']['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php echo '<tfoot class=\'dark\'>'.$tableHeaders.'</tfoot>'; ?> </table>
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?php
|
||||||
|
echo $this->Paginator->counter(array(
|
||||||
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
||||||
|
));
|
||||||
|
?> </p>
|
||||||
|
|
||||||
|
<div class="paging">
|
||||||
|
<?php echo $this->Paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||||
|
| <?php echo $this->Paginator->numbers();?>
|
||||||
|
|
|
||||||
|
<?php echo $this->Paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
172
code/ryzom/tools/server/www/webtt/app/views/languages/view.ctp
Normal file
172
code/ryzom/tools/server/www/webtt/app/views/languages/view.ctp
Normal file
|
@ -0,0 +1,172 @@
|
||||||
|
<div class="grid_4">
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-admin-actions">Actions</a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="admin-actions">
|
||||||
|
<h5>Languages</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('Edit %s', true), __('Language', true)), array('action' => 'edit', $language['Language']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('Delete %s', true), __('Language', true)), array('action' => 'delete', $language['Language']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $language['Language']['id'])); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Language', true)), array('action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Identifiers</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<h5>Translation Files</h5>
|
||||||
|
<ul class="menu">
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('controller' => 'imported_translation_files', 'action' => 'index')); ?> </li>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation File', true)), array('controller' => 'imported_translation_files', 'action' => 'add')); ?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid_12">
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<div class="languages view">
|
||||||
|
<h2><?php __('Language');?></h2>
|
||||||
|
<div class="block">
|
||||||
|
<dl><?php $i = 0; $class = ' class="altrow"';?>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['id']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['name']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Code'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['code']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Created'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['created']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modified'); ?></dt>
|
||||||
|
<dd<?php if ($i++ % 2 == 0) echo $class;?>>
|
||||||
|
<?php echo $language['Language']['modified']; ?>
|
||||||
|
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="box">
|
||||||
|
<h2>
|
||||||
|
<a href="#" id="toggle-related-records"><?php echo (__('Related', true)); ?></a>
|
||||||
|
</h2>
|
||||||
|
<div class="block" id="related-records">
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php printf(__('Related %s', true), __('Identifiers', true));?></h3>
|
||||||
|
<?php if (!empty($language['Identifier'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Language Id'); ?></th>
|
||||||
|
<th><?php __('Translation Index'); ?></th>
|
||||||
|
<th><?php __('Identifier'); ?></th>
|
||||||
|
<th><?php __('Reference String'); ?></th>
|
||||||
|
<th><?php __('Translated'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($language['Identifier'] as $identifier):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $identifier['id'];?></td>
|
||||||
|
<td><?php echo $identifier['language_id'];?></td>
|
||||||
|
<td><?php echo $identifier['translation_index'];?></td>
|
||||||
|
<td><?php echo $identifier['identifier'];?></td>
|
||||||
|
<td><?php echo $identifier['reference_string'];?></td>
|
||||||
|
<td><?php echo $identifier['translated'];?></td>
|
||||||
|
<td><?php echo $identifier['created'];?></td>
|
||||||
|
<td><?php echo $identifier['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'identifiers', 'action' => 'view', $identifier['id'])); ?>
|
||||||
|
<?php echo ' | '. $this->Html->link(__('Edit', true), array('controller' => 'identifiers', 'action' => 'edit', $identifier['id'])); ?>
|
||||||
|
<?php echo ' | '. $this->Html->link(__('Delete', true), array('controller' => 'identifiers', 'action' => 'delete', $identifier['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifier['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier', true)), array('controller' => 'identifiers', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="related">
|
||||||
|
<h3><?php printf(__('Related %s', true), __('Imported Translation Files', true));?></h3>
|
||||||
|
<?php if (!empty($language['ImportedTranslationFile'])):?>
|
||||||
|
<table cellpadding = "0" cellspacing = "0">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th><?php __('Id'); ?></th>
|
||||||
|
<th><?php __('Language Id'); ?></th>
|
||||||
|
<th><?php __('Filename'); ?></th>
|
||||||
|
<th><?php __('Merged'); ?></th>
|
||||||
|
<th><?php __('Created'); ?></th>
|
||||||
|
<th><?php __('Modified'); ?></th>
|
||||||
|
<th class="actions"><?php __('Actions');?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
foreach ($language['ImportedTranslationFile'] as $importedTranslationFile):
|
||||||
|
$class = null;
|
||||||
|
if ($i++ % 2 == 0) {
|
||||||
|
$class = ' class="altrow"';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<tr<?php echo $class;?>>
|
||||||
|
<td><?php echo $importedTranslationFile['id'];?></td>
|
||||||
|
<td><?php echo $importedTranslationFile['language_id'];?></td>
|
||||||
|
<td><?php echo $importedTranslationFile['filename'];?></td>
|
||||||
|
<td><?php echo $importedTranslationFile['merged'];?></td>
|
||||||
|
<td><?php echo $importedTranslationFile['created'];?></td>
|
||||||
|
<td><?php echo $importedTranslationFile['modified'];?></td>
|
||||||
|
<td class="actions">
|
||||||
|
<?php echo $this->Html->link(__('View', true), array('controller' => 'imported_translation_files', 'action' => 'view', $importedTranslationFile['id'])); ?>
|
||||||
|
<?php echo ' | '. $this->Html->link(__('Edit', true), array('controller' => 'imported_translation_files', 'action' => 'edit', $importedTranslationFile['id'])); ?>
|
||||||
|
<?php echo ' | '. $this->Html->link(__('Delete', true), array('controller' => 'imported_translation_files', 'action' => 'delete', $importedTranslationFile['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $importedTranslationFile['id'])); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<ul>
|
||||||
|
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Imported Translation File', true)), array('controller' => 'imported_translation_files', 'action' => 'add'));?> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<?php echo $this->Html->charset(); ?>
|
||||||
|
<title>
|
||||||
|
<?php __('Administration'); ?> -
|
||||||
|
<?php echo $title_for_layout; ?>
|
||||||
|
</title>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->meta('icon');
|
||||||
|
//echo $this->Html->css('cake.generic');
|
||||||
|
echo $this->Html->css(array('reset', 'text', 'grid', 'layout', 'nav'));
|
||||||
|
echo '<!--[if IE 6]>'.$this->Html->css('ie6').'<![endif]-->';
|
||||||
|
echo '<!--[if IE 7]>'.$this->Html->css('ie').'<![endif]-->';
|
||||||
|
echo $this->Html->script(array('jquery-1.3.2.min.js', 'jquery-ui.js', 'jquery-fluid16.js'));
|
||||||
|
echo $scripts_for_layout;
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container_16">
|
||||||
|
<div class="grid_16">
|
||||||
|
<h1 id="branding">
|
||||||
|
<a href="/admin">Administration</a>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<div class="grid_16">
|
||||||
|
<?php echo $this->element('admin/main_menu'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clear" style="height: 10px; width: 100%;"></div>
|
||||||
|
|
||||||
|
<?php echo $this->Session->flash(); ?>
|
||||||
|
|
||||||
|
<?php echo $content_for_layout; ?>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
<?php echo $this->element('sql_dump'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.view.templates.layouts
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<?php echo $this->Html->charset(); ?>
|
||||||
|
<title>
|
||||||
|
<?php __('Ryzom Core: Web Translation Tool :: '); ?>
|
||||||
|
<?php echo $title_for_layout; ?>
|
||||||
|
</title>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->meta('icon');
|
||||||
|
|
||||||
|
echo $this->Html->css('cake.generic');
|
||||||
|
|
||||||
|
echo $scripts_for_layout;
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<div id="header">
|
||||||
|
<h1><?php echo $this->Html->link(__('Ryzom Core: Web Translation Tool', true), 'http://webtt.openlink.pl'); ?></h1>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<?php echo $this->Session->flash(); ?>
|
||||||
|
|
||||||
|
<?php echo $content_for_layout; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
<?php echo $this->Html->link(
|
||||||
|
$this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework', true), 'border' => '0')),
|
||||||
|
'http://www.cakephp.org/',
|
||||||
|
array('target' => '_blank', 'escape' => false)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php //echo $this->element('sql_dump'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.view.templates.layouts
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<?php echo $this->Html->charset(); ?>
|
||||||
|
<title>
|
||||||
|
<?php __('Ryzom Core: Web Translation Tool :: '); ?>
|
||||||
|
<?php echo $title_for_layout; ?>
|
||||||
|
</title>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->meta('icon');
|
||||||
|
|
||||||
|
echo $this->Html->css('cake.generic');
|
||||||
|
|
||||||
|
echo $scripts_for_layout;
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<div id="header">
|
||||||
|
<h1><?php echo $this->Html->link(__('Ryzom Core: Web Translation Tool', true), 'http://dev.ryzom.com'); ?></h1>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<?php echo $this->Session->flash(); ?>
|
||||||
|
|
||||||
|
<?php echo $content_for_layout; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
<?php echo $this->Html->link(
|
||||||
|
$this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework', true), 'border' => '0')),
|
||||||
|
'http://www.cakephp.org/',
|
||||||
|
array('target' => '_blank', 'escape' => false)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php echo $this->element('sql_dump'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.view.templates.layouts
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<?php echo $this->Html->charset(); ?>
|
||||||
|
<title>
|
||||||
|
<?php __('Ryzom Core: Web Translation Tool :: '); ?>
|
||||||
|
<?php echo $title_for_layout; ?>
|
||||||
|
</title>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->meta('icon');
|
||||||
|
|
||||||
|
echo $this->Html->css('cake.generic');
|
||||||
|
|
||||||
|
echo $scripts_for_layout;
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container">
|
||||||
|
<div id="header">
|
||||||
|
<h1><?php echo $this->Html->link(__('Ryzom Core: Web Translation Tool', true), 'http://webtt.openlink.pl'); ?></h1>
|
||||||
|
</div>
|
||||||
|
<div id="content">
|
||||||
|
|
||||||
|
<?php echo $this->Session->flash(); ?>
|
||||||
|
|
||||||
|
<?php echo $content_for_layout; ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="footer">
|
||||||
|
<?php echo $this->Html->link(
|
||||||
|
$this->Html->image('cake.power.gif', array('alt'=> __('CakePHP: the rapid development php framework', true), 'border' => '0')),
|
||||||
|
'http://www.cakephp.org/',
|
||||||
|
array('target' => '_blank', 'escape' => false)
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php echo $this->element('sql_dump'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
38
code/ryzom/tools/server/www/webtt/app/views/layouts/new.ctp
Normal file
38
code/ryzom/tools/server/www/webtt/app/views/layouts/new.ctp
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<?php echo $this->Html->charset(); ?>
|
||||||
|
<title><?php echo $title_for_layout; ?></title>
|
||||||
|
<?php
|
||||||
|
echo $this->Html->meta('icon');
|
||||||
|
//echo $this->Html->css('cake.generic');
|
||||||
|
echo $this->Html->css(array('reset', 'text', 'grid', 'layout', 'nav'));
|
||||||
|
echo '<!--[if IE 6]>'.$this->Html->css('ie6').'<![endif]-->';
|
||||||
|
echo '<!--[if IE 7]>'.$this->Html->css('ie').'<![endif]-->';
|
||||||
|
echo $this->Html->script(array('jquery-1.3.2.min.js', 'jquery-ui.js', 'jquery-fluid16.js'));
|
||||||
|
echo $scripts_for_layout;
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container_16">
|
||||||
|
<div class="grid_16">
|
||||||
|
<h1 id="branding">
|
||||||
|
<a href="/">Site</a>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<div class="grid_16">
|
||||||
|
<?php // Possible menu here ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clear" style="height: 10px; width: 100%;"></div>
|
||||||
|
|
||||||
|
<?php echo $this->Session->flash(); ?>
|
||||||
|
|
||||||
|
<?php echo $content_for_layout; ?>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
<?php echo $this->element('sql_dump'); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
23
code/ryzom/tools/server/www/webtt/app/views/pages/home.ctp
Normal file
23
code/ryzom/tools/server/www/webtt/app/views/pages/home.ctp
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PHP versions 4 and 5
|
||||||
|
*
|
||||||
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
*
|
||||||
|
* Licensed under The MIT License
|
||||||
|
* Redistributions of files must retain the above copyright notice.
|
||||||
|
*
|
||||||
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
|
* @link http://cakephp.org CakePHP(tm) Project
|
||||||
|
* @package cake
|
||||||
|
* @subpackage cake.cake.libs.view.templates.pages
|
||||||
|
* @since CakePHP(tm) v 0.10.0.1076
|
||||||
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<h3><?php __('Languages'); ?></h3>
|
||||||
|
<p>
|
||||||
|
<?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?>
|
||||||
|
</p>
|
|
@ -0,0 +1 @@
|
||||||
|
index.ctp
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue