Changed: #1315 Added files forgotten to track.

This commit is contained in:
kerozcak 2011-07-20 12:21:20 +02:00
parent fe24308696
commit 15c74a1f95
66 changed files with 3594 additions and 827 deletions

View file

@ -0,0 +1,143 @@
<?php
class CommentsController extends AppController {
var $name = 'Comments';
function index() {
$this->Comment->recursive = 0;
$this->set('comments', $this->paginate());
}
function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid comment', true));
$this->redirect(array('action' => 'index'));
}
$this->set('comment', $this->Comment->read(null, $id));
}
function add() {
if (!empty($this->data)) {
$this->Comment->create();
if ($this->Comment->save($this->data)) {
$this->Session->setFlash(__('The comment has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The comment could not be saved. Please, try again.', true));
}
}
if (empty($this->passedArgs['identifier_id']))
{
$this->Session->setFlash(__('You need to choose identifier to comment', true));
$this->redirect(array('controller' => 'identifiers', 'action' => 'index'));
}
else
{
$identifier_id = $this->passedArgs['identifier_id'];
$this->set('identifier', $identifier = $this->Comment->Identifier->read(null, $identifier_id));
// $this->data['Translation.identifier_id'] = $identifier_id;
}
// $translations = $this->Comment->Translation->find('list');
$identifiers = $this->Comment->Identifier->find('list');
$users = $this->Comment->User->find('list');
$this->set(compact('translations', 'identifiers', 'users'));
}
function edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Invalid comment', true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->Comment->save($this->data)) {
$this->Session->setFlash(__('The comment has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The comment could not be saved. Please, try again.', true));
}
}
if (empty($this->data)) {
$this->data = $this->Comment->read(null, $id);
}
$translations = $this->Comment->Translation->find('list');
$identifiers = $this->Comment->Identifier->find('list');
$users = $this->Comment->User->find('list');
$this->set(compact('translations', 'identifiers', 'users'));
}
function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid id for comment', true));
$this->redirect(array('action'=>'index'));
}
if ($this->Comment->delete($id)) {
$this->Session->setFlash(__('Comment deleted', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Comment was not deleted', true));
$this->redirect(array('action' => 'index'));
}
function admin_index() {
$this->Comment->recursive = 0;
$this->set('comments', $this->paginate());
}
function admin_view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid comment', true));
$this->redirect(array('action' => 'index'));
}
$this->set('comment', $this->Comment->read(null, $id));
}
function admin_add() {
if (!empty($this->data)) {
$this->Comment->create();
if ($this->Comment->save($this->data)) {
$this->Session->setFlash(__('The comment has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The comment could not be saved. Please, try again.', true));
}
}
$translations = $this->Comment->Translation->find('list');
$identifiers = $this->Comment->Identifier->find('list');
$users = $this->Comment->User->find('list');
$this->set(compact('translations', 'identifiers', 'users'));
}
function admin_edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Invalid comment', true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->Comment->save($this->data)) {
$this->Session->setFlash(__('The comment has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The comment could not be saved. Please, try again.', true));
}
}
if (empty($this->data)) {
$this->data = $this->Comment->read(null, $id);
}
$translations = $this->Comment->Translation->find('list');
$identifiers = $this->Comment->Identifier->find('list');
$users = $this->Comment->User->find('list');
$this->set(compact('translations', 'identifiers', 'users'));
}
function admin_delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid id for comment', true));
$this->redirect(array('action'=>'index'));
}
if ($this->Comment->delete($id)) {
$this->Session->setFlash(__('Comment deleted', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Comment was not deleted', true));
$this->redirect(array('action' => 'index'));
}
}

View file

@ -0,0 +1,167 @@
<?php
class PathResolverComponent extends Object {
function getAssociationsTree($model)
{
$names = array();
foreach ($model->belongsTo as $childModel => $junk)
{
$names[] = $this->getAssociationsTree($model->{$childModel});
}
return array($model->alias => $names);
}
function node_path ($node_name, $tree) {
foreach ($tree as $name => $val) {
if ($name == $node_name) return $name;
foreach ($val as $subtree) {
$ret = $this->node_path($node_name, $subtree);
if ($ret != '') return "$name => $ret";
}
}
}
function findModelPath_old2($name, $assocTree, $path = null)
{
// debug($name, $assocTree, $path);
// debug($name);
// debug($assocTree);
// debug($path);
foreach ($assocTree as $model => $childs)
{
if (!isset($path))
$path = array($model => "");
if ($model == $name)
{
// $newPath[$childModel] = $path;
// debug($childModel);
return array($model => $model);
// return $model;
}
foreach ($childs as $childModelArray => $subTree)
{
// debug(array($childModel => $newAssocTree));
// debug_print_backtrace();
// if ($ret = $this->findModelPath($name, $subTree, $newPath))
if ($ret = $this->findModelPath($name, $subTree))
{
echo "## model: "; var_dump($model);
echo "## key subTree: "; var_dump(key($subTree));
echo "## ret:\n"; var_dump($ret);
// var_dump(array(key($subTree) => $ret));
// return array(key($subTree) => $ret);
// return array($model => key($subTree));
// return array($model => $ret);
return array($model => $ret);
}
}
}
// return $path;
}
function t($i)
{
return str_repeat("\t",$i);
}
function getAssociationsGraph($name, $assocTree)
{
static $graph = array();
foreach ($assocTree as $model => $childs)
{
if ($model == $name)
return true;
foreach ($childs as $childModelArray)
{
foreach ($childModelArray as $childModel => $newAssocTree)
{
if ($ret = $this->getAssociationsGraph($name, array($childModel => $newAssocTree)))
{
$graph[$childModel][] = $model;
// var_dump($graph);
}
}
}
}
// var_dump($graph);
return $graph;
}
function findModelPath($name, $assocTree, $path = null)
{
// debug($name, $assocTree, $path);
// debug($name);
// debug($assocTree);
// debug($path);
foreach ($assocTree as $model => $childs)
{
if (!isset($path))
$path = array($model => "");
foreach ($childs as $childModelArray)
{
foreach ($childModelArray as $childModel => $newAssocTree)
{
// debug(array($childModel => $newAssocTree));
// debug_print_backtrace();
$newPath[$childModel] = $path;
if ($name == $childModel)
{
// debug($childModel);
return $newPath;
}
else
{
if ($ret = $this->findModelPath($name, array($childModel => $newAssocTree), $newPath))
return $ret;
}
}
}
}
// return $path;
}
function printPath($model)
{
if (!isset($model->belongsTo))
return null;
$assocTree = $this->getAssociationsTree($model);
$path = $this->findModelPath('Language', $assocTree);
// $path = $this->findModelPath('User', $assocTree);
// var_dump($path);
// return 0;
$text = null;
while ($path)
{
$model = key($path);
/* foreach ($path as $model => $childs)
{
$controller = Inflector::pluralize(Inflector::underscore($model));
}
$path = $childs;*/
$controller = Inflector::pluralize(Inflector::underscore($model));
$path = $path[$model];
$new_path[$controller] = $new_path;
var_dump($new_path);
$text .= " => " . $controller;
}
return $text;
}
function beforeRender($controller)
{
if (!isset($controller->{$controller->modelClass}))
return 0;
$model = $controller->{$controller->modelClass};
if (!isset($model->belongsTo))
return 0;
$assocTree = $this->getAssociationsTree($model);
// var_dump($assocTree);
$path = $this->findModelPath('Language', $assocTree);
if (!$path)
$path = array('Language' => array());
// var_dump($path);
$controller->set('assocPath', $path);
}
}
?>

View file

@ -0,0 +1,124 @@
<?php
class IdentifierColumnsController extends AppController {
var $name = 'IdentifierColumns';
function index() {
$this->IdentifierColumn->recursive = 0;
$this->set('identifierColumns', $this->paginate());
}
function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid identifier column', true));
$this->redirect(array('action' => 'index'));
}
$this->set('identifierColumn', $this->IdentifierColumn->read(null, $id));
}
function add() {
if (!empty($this->data)) {
$this->IdentifierColumn->create();
if ($this->IdentifierColumn->save($this->data)) {
$this->Session->setFlash(__('The identifier column has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The identifier column could not be saved. Please, try again.', true));
}
}
$identifiers = $this->IdentifierColumn->Identifier->find('list');
$this->set(compact('identifiers'));
}
function edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Invalid identifier column', true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->IdentifierColumn->save($this->data)) {
$this->Session->setFlash(__('The identifier column has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The identifier column could not be saved. Please, try again.', true));
}
}
if (empty($this->data)) {
$this->data = $this->IdentifierColumn->read(null, $id);
}
$identifiers = $this->IdentifierColumn->Identifier->find('list');
$this->set(compact('identifiers'));
}
function delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid id for identifier column', true));
$this->redirect(array('action'=>'index'));
}
if ($this->IdentifierColumn->delete($id)) {
$this->Session->setFlash(__('Identifier column deleted', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Identifier column was not deleted', true));
$this->redirect(array('action' => 'index'));
}
function admin_index() {
$this->IdentifierColumn->recursive = 0;
$this->set('identifierColumns', $this->paginate());
}
function admin_view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid identifier column', true));
$this->redirect(array('action' => 'index'));
}
$this->set('identifierColumn', $this->IdentifierColumn->read(null, $id));
}
function admin_add() {
if (!empty($this->data)) {
$this->IdentifierColumn->create();
if ($this->IdentifierColumn->save($this->data)) {
$this->Session->setFlash(__('The identifier column has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The identifier column could not be saved. Please, try again.', true));
}
}
$identifiers = $this->IdentifierColumn->Identifier->find('list');
$this->set(compact('identifiers'));
}
function admin_edit($id = null) {
if (!$id && empty($this->data)) {
$this->Session->setFlash(__('Invalid identifier column', true));
$this->redirect(array('action' => 'index'));
}
if (!empty($this->data)) {
if ($this->IdentifierColumn->save($this->data)) {
$this->Session->setFlash(__('The identifier column has been saved', true));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The identifier column could not be saved. Please, try again.', true));
}
}
if (empty($this->data)) {
$this->data = $this->IdentifierColumn->read(null, $id);
}
$identifiers = $this->IdentifierColumn->Identifier->find('list');
$this->set(compact('identifiers'));
}
function admin_delete($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid id for identifier column', true));
$this->redirect(array('action'=>'index'));
}
if ($this->IdentifierColumn->delete($id)) {
$this->Session->setFlash(__('Identifier column deleted', true));
$this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('Identifier column was not deleted', true));
$this->redirect(array('action' => 'index'));
}
}

View file

@ -0,0 +1,121 @@
<?php
/**
* Static content controller.
*
* This file will render views from views/pages/
*
* 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)
*/
/**
* Static content controller
*
* Override this controller by placing a copy in controllers directory of an application
*
* @package cake
* @subpackage cake.cake.libs.controller
* @link http://book.cakephp.org/view/958/The-Pages-Controller
*/
class PagesController extends AppController {
/**
* Controller name
*
* @var string
* @access public
*/
var $name = 'Pages';
/**
* Default helper
*
* @var array
* @access public
*/
var $helpers = array('Html', 'Session');
/**
* This controller does not use a model
*
* @var array
* @access public
*/
var $uses = array();
/**
* Displays a view
*
* @param mixed What page to display
* @access public
*/
function display() {
$path = func_get_args();
$count = count($path);
if (!$count) {
$this->redirect('/');
}
$page = $subpage = $title_for_layout = null;
if (!empty($path[0])) {
$page = $path[0];
}
if (!empty($path[1])) {
$subpage = $path[1];
}
if (!empty($path[$count - 1])) {
$title_for_layout = Inflector::humanize($path[$count - 1]);
}
$this->set(compact('page', 'subpage', 'title_for_layout'));
$this->render(implode('/', $path));
}
function admin_display() {
$path = func_get_args();
/* if (isset($this->params['admin']))
array_shift($path);*/
//var_dump($path);
if (!isset($path[0]) || $path[0] != 'admin') {
//This adds admin to the beginning of the path so the pages controller will look in the 'admin' folder in pages directory
$path = array_merge((array)'admin', $path);
}
// var_dump($path);
$count = count($path);
if (!$count) {
$this->redirect('/');
}
$page = $subpage = $title_for_layout = null;
if (!empty($path[0])) {
$page = $path[0];
}
if (!empty($path[1])) {
$subpage = $path[1];
}
if (!empty($path[$count - 1])) {
$title_for_layout = Inflector::humanize($path[$count - 1]);
}
$this->set(compact('page', 'subpage', 'title_for_layout'));
$this->render(implode('/', $path));
}
function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow(array('display'));
}
}

View file

@ -0,0 +1,128 @@
<?php
class TranslationFilesController extends AppController {
var $name = 'TranslationFiles';
function index() {
$this->TranslationFile->recursive = 0;
$conditions = null;
if (isset($this->passedArgs['language_id']) && $language_id = $this->passedArgs['language_id'])
$conditions = array('TranslationFile.language_id' => $language_id);
$this->set('translationFiles', $this->paginate($conditions));
}
function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid translation file', true));
$this->redirect(array('action' => 'index'));
}
$this->set('translationFile', $this->TranslationFile->read(null, $id));
}
function add() {
if (!empty($this->data)) {
$this->TranslationFile->create();
if ($this->TranslationFile->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->TranslationFile->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->TranslationFile->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->TranslationFile->read(null, $id);
}
$languages = $this->TranslationFile->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->TranslationFile->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->TranslationFile->recursive = 0;
$this->set('translationFiles', $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->TranslationFile->read(null, $id));
}
function admin_add() {
if (!empty($this->data)) {
$this->TranslationFile->create();
if ($this->TranslationFile->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->TranslationFile->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->TranslationFile->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->TranslationFile->read(null, $id);
}
$languages = $this->TranslationFile->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->TranslationFile->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'));
}
}

View file

@ -0,0 +1,32 @@
<?php
class Comment extends AppModel {
var $name = 'Comment';
var $displayField = 'id';
var $scaffoldActions = array("add" => "fk");
//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' => ''
),*/
'Identifier' => array(
'className' => 'Identifier',
'foreignKey' => 'identifier_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}

View file

@ -0,0 +1,35 @@
<?php
class IdentifierColumn extends AppModel {
var $name = 'IdentifierColumn';
var $displayField = 'column_name';
var $scaffoldForbiddenActions = array("add", "admin_add", "edit", "admin_edit", "delete", "admin_delete");
//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' => ''
)
);
var $hasMany = array(
'Translation' => array(
'className' => 'Translation',
'foreignKey' => 'identifier_column_id',
'dependent' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
);
}

View file

@ -0,0 +1,49 @@
<?php
class TranslationFile extends AppModel {
var $name = 'TranslationFile';
var $displayField = 'filename_template';
var $scaffoldForbiddenActions = array("add", "admin_add", "edit", "admin_edit", "delete", "admin_delete");
//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(
'ImportedTranslationFile' => array(
'className' => 'ImportedTranslationFile',
'foreignKey' => 'translation_file_id',
'dependent' => false,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
'Identifier' => array(
'className' => 'Identifier',
'foreignKey' => 'translation_file_id',
'dependent' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
),
);
}

View file

@ -1,66 +0,0 @@
<?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() {
}
}

View file

@ -1,66 +0,0 @@
<?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() {
}
}

View file

@ -1,66 +0,0 @@
<?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() {
}
}

View file

@ -1,66 +0,0 @@
<?php
/* TranslationFiles Test cases generated on: 2011-07-04 15:19:54 : 1309785594*/
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', 'app.comment', 'app.file_identifier', 'app.imported_translation_file', 'app.raw_file');
function startTest() {
$this->TranslationFiles =& new TestTranslationFilesController();
$this->TranslationFiles->constructClasses();
}
function endTest() {
unset($this->TranslationFiles);
ClassRegistry::flush();
}
function testIndex() {
}
function testView() {
}
function testAdd() {
}
function testEdit() {
}
function testDelete() {
}
function testAdminIndex() {
}
function testAdminView() {
}
function testAdminAdd() {
}
function testAdminEdit() {
}
function testAdminDelete() {
}
}

View file

@ -1,66 +0,0 @@
<?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() {
}
}

View file

@ -1,66 +0,0 @@
<?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() {
}
}

View file

@ -1,66 +0,0 @@
<?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() {
}
}

View file

@ -1,17 +0,0 @@
<?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();
}
}

View file

@ -1,17 +0,0 @@
<?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();
}
}

View file

@ -1,17 +0,0 @@
<?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();
}
}

View file

@ -1,17 +0,0 @@
<?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();
}
}

View file

@ -1,17 +0,0 @@
<?php
/* TranslationFile Test cases generated on: 2011-07-04 13:04:17 : 1309777457*/
App::import('Model', 'TranslationFile');
class TranslationFileTestCase extends CakeTestCase {
var $fixtures = array('app.translation_file', 'app.language', 'app.identifier', 'app.translation', 'app.user', 'app.vote', 'app.comment', 'app.file_identifier', 'app.imported_translation_file', 'app.raw_file');
function startTest() {
$this->TranslationFile =& ClassRegistry::init('TranslationFile');
}
function endTest() {
unset($this->TranslationFile);
ClassRegistry::flush();
}
}

View file

@ -1,17 +0,0 @@
<?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();
}
}

View file

@ -1,17 +0,0 @@
<?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();
}
}

View file

@ -1,31 +0,0 @@
<?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'
),
);
}

View file

@ -1,31 +0,0 @@
<?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'
),
);
}

View file

@ -1,25 +0,0 @@
<?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'
),
);
}

View file

@ -1,25 +0,0 @@
<?php
/* TranslationFile Fixture generated on: 2011-07-04 13:04:11 : 1309777451 */
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_template' => 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_template' => 'Lorem ipsum dolor sit amet',
'created' => '2011-07-04 13:04:11',
'modified' => '2011-07-04 13:04:11'
),
);
}

View file

@ -1,27 +0,0 @@
<?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'
),
);
}

View file

@ -1,23 +0,0 @@
<?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'
),
);
}

View file

@ -1,25 +0,0 @@
<?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'
),
);
}

View file

View file

@ -0,0 +1,288 @@
<?php
class PhraseParser
{
var $debug = false;
function removeComments($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
ini_set('pcre.backtrack_limit', 10000000);
//$returnString = preg_replace('!/\*.*?\*/!s', '', $str); // /* .*? */ s
// added [^/] because there was //******* in translation file
$returnString = preg_replace('![^/]/\*.*?\*/!s', '', $str); // /* .*? */ s
// PHP 5.2.0
// if (PREG_NO_ERROR !== preg_last_error())
if ($returnString === null)
{
$returnStr = $str;
var_dump("PREG ERROR");
// exception
}
return $returnString;
}
function removeBOM($str)
{
if(($bom = substr($str, 0,3)) == pack("CCC",0xef,0xbb,0xbf))
{
$bla = substr($str, 3);
return $bla;
}
else
{
return $str;
}
}
function addBOM($str)
{
if(($bom = substr($str, 0,3)) != pack("CCC",0xef,0xbb,0xbf))
return pack("CCC",0xef,0xbb,0xbf) . $str;
else
return $str;
}
function parseLine($str)
{
$arr = array();
if (mb_substr($str, 0, 2) == "//")
{
if (mb_substr($str, 0, 7) == "// DIFF")
{
$tmp = explode(" ", $str);
$type = 'diff';
$command = mb_strtolower($tmp[2]);
$args = isset($tmp[3]) ? $tmp[3] : null;
if ($command == "add" || $command == "changed")
{
if (isset($args))
$index = intval($args);
else
$index = null;
$command = mb_substr($str, 3);
}
else
unset($type);
}
else if (mb_substr($str, 0, 8) == "// INDEX")
{
list($j, $type, $index) = explode(" ", $str);
$type = "internal_index";
}
else if (mb_substr($str, 0, 13) == "// HASH_VALUE")
{
list($j, $type, $hash_value) = explode(" ", $str);
$type = "hash_value";
}
/* 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","hash_value");
}
}
else if (!(mb_substr($str, 0, 2) == "//") && mb_strlen($str))
{
$type = "string";
$string = "";
$identifier = "";
$arguments = "";
$body = "";
if (preg_match('|^([0-9A-Za-z@_]*) \((.*?)\).*$|', $str, $matches))
{
$identifier = $matches[1];
$arguments = $matches[2];
}
else if ($str == "{")
$body = "begin";
else if ($str == "}")
$body = "end";
else
{
$string = $str;
}
$arr = compact("type", "identifier", "arguments", "string", "body");
}
/* echo "<pre>################################\n";
var_dump($str);
var_dump($arr);
echo "</pre>\n";*/
return $arr;
}
function addEnt(&$parsedEnt, &$entities, &$newEnt)
{
if ($this->debug)
{
echo "\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
echo "\t%%%% newEnt %%%%%%%%% newEnt %%%%%%%%% newEnt %%%%%%%%% newEnt %%%%%\n";
echo "\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n";
var_dump($parsedEnt);
}
if (!isset($parsedEnt["diff"]) && !isset($parsedEnt["index"]))
$parsedEnt["index"] = $parsedEnt["internal_index"];
$parsedEnt["type"] = "phrase";
$entities[] = $parsedEnt;
$parsedEnt =array();
$newEnt = false;
}
function parseFile($file)
{
$parsedEnt = array();
$newEnt = false;
$prevStringLine = false;
$entities = array();
$file = $this->removeBOM($file);
// var_dump($file);
$file = $this->removeComments($file);
// var_dump($file);
$lines = explode("\n", $file);
if ($this->debug)
{
echo "<pre>\n\n";
}
$line_no=1;
foreach ($lines as $line)
{
if ($this->debug)
{
echo "\n\t#################### LINE NUMBER " . $line_no++ . "\n\n";
var_dump($line);
}
$line = rtrim($line, "\r\n");
$parsedLine = $this->parseLine($line);
if ($this->debug)
{
echo "%%%% parsedLine\n";
var_dump($parsedLine);
echo "\n";
echo "%%%% prevStringLine\n";
var_dump($prevStringLine);
echo "\n";
}
if (!$parsedLine)
continue;
// if line start with diff (diff files) or hash_value (translated files) and before was line with translation, then we start new ent
if ($prevStringLine && (
($parsedLine["type"] == "diff" && $parsedEnt) || ($parsedLine["type"] == "hash_value" && $parsedEnt)
))
{
/* echo "%%%% prevStringLine %%%%%\n";
var_dump($parsedEnt);*/
$newEnt = true;
}
if ($newEnt)
{
$this->addEnt($parsedEnt, $entities, $newEnt);
}
if ($parsedLine["type"] == "internal_index")
$parsedEnt["internal_index"] = $parsedLine["index"];
if ($parsedLine["type"] == "string")
{
$prevStringLine = true;
if ($parsedLine["body"] == "begin" || $parsedLine["body"] == "end")
continue;
if ($this->debug)
{
echo "%%%% parsedEnt before %%%%%\n";
var_dump($parsedEnt);
// echo "%%%% parsedLine %%%%%\n";
// var_dump($parsedLine);
}
if (!$parsedLine['identifier'])
{
if ($this->debug) echo "%%%% parsedEnt ZLACZENIE \n";
if ($this->debug && !isset($parsedEnt['string']))
{
echo "!isset parsedEnt['string']\n";
var_dump($line);
var_dump($parsedEnt);
var_dump($parsedLine);
}
$parsedEnt['string'] .= $parsedLine['string'] . "\n";
}
else
{
if ($this->debug) echo "DODANIE \n";
$parsedEnt += $parsedLine;
// $parsedEnt['string'] .= "\n";
}
if ($this->debug)
{
echo "%%%% parsedEnt after %%%%%\n";
var_dump($parsedEnt);
}
}
else
$prevStringLine = false;
if ($parsedLine["type"] == "diff")
{
$parsedEnt["diff"] = $parsedEnt["command"] = $parsedLine["command"];
$parsedEnt["index"] = $parsedLine["index"];
}
}
if ($parsedEnt)
{
$this->addEnt($parsedEnt, $entities, $newEnt);
}
if ($this->debug)
{
echo "<pre>";
var_dump($entities);
echo "</pre>\n";
}
return $entities;
}
function CRLF($s)
{
$s = str_replace("\r\n", "\n", $s);
$s = str_replace("\n", "\r\n", $s);
return $s;
}
function buildFile($entities)
{
$content = '// DIFF_VERSION 2' . "\n";
foreach ($entities as $ent)
{
if (isset($ent['command']))
$content .= '// ' . $ent['command'] . "\n";
if (isset($ent['hash_value']))
$content .= '// HASH_VALUE ' . $ent['hash_value'];
/* if (isset($ent['command']))
$content .= '// INDEX ' . $ent['internal_index'] . "\n";
else
$content .= '// INDEX ' . $ent['index'] . "\n";*/
$content .= $ent['identifier'] . ' (' . $ent['arguments'] . ')' . "\n" . '{' . "\n" . $ent['string'] . "\n" . '}' . "\n";
$content .= "\n";
}
return $this->addBOM($this->CRLF($content));
}
}
?>

View file

@ -0,0 +1,183 @@
<?php
class SheetParser
{
var $debug = false;
function parseLine($str)
{
$arr = str_getcsv($line, "\t");
return $arr;
}
function parseFile($file)
{
$parsedEnt = array();
$newEnt = false;
$prevStringLine = false;
$entities = array();
$diffFile = false;
$file = mb_convert_encoding($file, 'UTF-8', 'UTF-16');
// $file = $this->removeBOM($file);
// $file = $this->removeComments($file);
$lines = explode("\n", $file);
if ($this->debug)
{
echo "<pre>\n\n";
}
$line_no=1;
foreach ($lines as $line)
{
if ($this->debug)
{
echo "\n\t#################### LINE NUMBER " . $line_no . "\n\n";
}
// var_dump($line);
$line = rtrim($line,"\r\n");
/* var_dump(setlocale(LC_ALL,NULL));
var_dump(setlocale(LC_ALL,'pl_PL.UTF-8'));*/
// Need to set UTF-8 locale to get str_getcsv to work with UTF-8 cyryllic
setlocale(LC_ALL,'pl_PL.UTF-8')
$parsedLine = $this->parseLine($line);
if (!$line || mb_strpos($line, "DIFF NOT") === 0 || mb_strpos($line, "REMOVE THE") === 0)
continue;
if ($line_no == 1)
{
$parsedEnt["type"] = "sheet_description";
if ($parsedLine[0] == "DIFF_CMD")
$diffFile = true;
$parsedEnt["sheet_id_column"] = $parsedLine[2];
}
else
{
if ($diffFile)
{
$parsedEnt["diff"] = $parsedEnt["command"] = rtrim($parsedLine[0]);
$parsedEnt["hash_value"] = $parsedLine[1];
$parsedEnt["identifier"] = $parsedLine[2];
}
else
{
$parsedEnt["hash_value"] = $parsedLine[0];
$parsedEnt["identifier"] = $parsedLine[1];
}
$parsedEnt["type"] = "sheet";
}
if ($diffFile)
$columns = array_slice($parsedLine, 3);
else
$columns = array_slice($parsedLine, 2);
if (!isset($columnsCount))
$columnsCount = count($columns);
$parsedEnt["columns"] = $columns;
if ($this->debug)
{
echo "%%%% parsedEnt %%%%%\n";
var_dump($parsedEnt);
}
/* if ($parsedLine["type"] == "internal_index")
$parsedEnt["internal_index"] = $parsedLine["index"];
if ($parsedLine["type"] == "diff")
{
$parsedEnt["diff"] = $parsedLine["command"];
$parsedEnt["index"] = $parsedLine["index"];
}*/
$newEnt = true;
if ($newEnt)
{
if ($this->debug && 0)
{
echo "\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n";
echo "\t%%%% newEnt %%%%%%%%% newEnt %%%%%%%%% newEnt %%%%%%%%% newEnt %%%%%\n";
echo "\t%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n";
var_dump($parsedEnt);
}
/* if (!isset($parsedEnt["diff"]) && !isset($parsedEnt["index"]))
$parsedEnt["index"] = $parsedEnt["internal_index"];*/
$entities[] = $parsedEnt;
$parsedEnt =array();
$newEnt = false;
}
$line_no++;
}
if ($this->debug && 0)
{
echo "<pre>";
var_dump($entities);
echo "</pre>\n";
}
return $entities;
}
function CRLF($s)
{
$s = str_replace("\r\n", "\n", $s);
$s = str_replace("\n", "\r\n", $s);
return $s;
}
function addBOM($str)
{
if(($bom = substr($str, 0,3)) != pack("CCC",0xef,0xbb,0xbf))
return pack("CCC",0xef,0xbb,0xbf) . $str;
else
return $str;
}
function buildFile($entities)
{
$content = '';
foreach ($entities as $ent)
{
if ($ent['type'] == 'sheet_description')
{
$_columns = $ent['columns'];
$_sheet_id_column = $ent['sheet_id_column'];
if (isset($ent['diff']))
{
$content .= 'DIFF_CMD' . "\t" . '*HASH_VALUE' . "\t" . $_sheet_id_column . "\t";
foreach ($ent['columns'] as $value)
{
$content .= $value . "\t";
}
$content = mb_substr($content, 0, -1);
$content .= "\n";
}
continue;
}
if (isset($ent['command']))
$content .= $ent['command'] . "\t";
if (isset($ent['hash_value']))
$content .= $ent['hash_value'] . "\t";
else
$content .= '_0000000000000000' . "\t";
$content .= $ent['identifier'] . "\t";
foreach ($ent['columns'] as $value)
{
$content .= $value . "\t";
}
$content = mb_substr($content, 0, -1);
$content .= "\n";
}
return mb_convert_encoding($this->addBOM($this->CRLF($content)), 'UTF-16LE', 'UTF-8');
// return mb_convert_encoding($this->CRLF($content), 'UTF-16LE', 'UTF-8');
}
}
?>

View file

@ -1,5 +1,5 @@
<?php <?php
class UxtParser class StringParser
{ {
var $pipeline_directory = "/home/kaczorek/projects/webtt/distfiles/translation/"; var $pipeline_directory = "/home/kaczorek/projects/webtt/distfiles/translation/";
var $debug = false; var $debug = false;
@ -46,6 +46,14 @@ class UxtParser
} }
} }
function addBOM($str)
{
if(($bom = substr($str, 0,3)) != pack("CCC",0xef,0xbb,0xbf))
return pack("CCC",0xef,0xbb,0xbf) . $str;
else
return $str;
}
function parseLine($str) function parseLine($str)
{ {
$arr = array(); $arr = array();
@ -58,7 +66,10 @@ class UxtParser
list($j, $type, $command, $args) = explode(" ", $str); list($j, $type, $command, $args) = explode(" ", $str);
$command = mb_strtolower($command); $command = mb_strtolower($command);
if ($command == "add" || $command == "changed") if ($command == "add" || $command == "changed")
{
$index = intval($args); $index = intval($args);
$command = mb_substr($str, 3);
}
else else
unset($type); unset($type);
} }
@ -140,7 +151,9 @@ class UxtParser
} }
// var_dump($line); // var_dump($line);
$line = rtrim($line); // $line = rtrim($line);
// $line = str_replace(array("\r\n","\n","\r"), '', $line);
$line = rtrim($line, "\r\n");
$parsedLine = $this->parseLine($line); $parsedLine = $this->parseLine($line);
if ($this->debug) if ($this->debug)
@ -231,7 +244,7 @@ class UxtParser
if ($parsedLine["type"] == "diff") if ($parsedLine["type"] == "diff")
{ {
$parsedEnt["diff"] = $parsedLine["command"]; $parsedEnt["diff"] = $parsedEnt["command"] = $parsedLine["command"];
$parsedEnt["index"] = $parsedLine["index"]; $parsedEnt["index"] = $parsedLine["index"];
} }
} }
@ -251,5 +264,33 @@ class UxtParser
} }
return $entities; return $entities;
} }
function CRLF($s)
{
$s = str_replace("\r\n", "\n", $s);
$s = str_replace("\n", "\r\n", $s);
return $s;
}
function buildFile($entities)
{
$content = '';
foreach ($entities as $ent)
{
if (isset($ent['command']))
$content .= '// ' . $ent['command'] . "\n";
if (isset($ent['hash_value']))
$content .= '// HASH_VALUE ' . $ent['hash_value'];
/* if (isset($ent['command']))
$content .= '// INDEX ' . $ent['internal_index'] . "\n";
else*/
if (!isset($ent['command']))
$content .= '// INDEX ' . $ent['index'] . "\n";
$content .= $ent['identifier'] . "\t" . '[' . $ent['string'] . ']' . "\n";
$content .= "\n";
}
return $this->addBOM($this->CRLF($content));
}
} }
?> ?>

View file

@ -0,0 +1,106 @@
<?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)
*
* WebTT bake template based on 960grid template
* http://bakery.cakephp.org/articles/tom_m/2010/05/26/960-fluid-grid-system-bake-templates
*
*/
?>
<div class="grid_3">
<div class="box menubox">
<?php //// ACTIONS ?>
<h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo "<?php echo __('" . $pluralHumanName . "', true); ?>"; ?></h5>
<ul class="menu">
<?php if (strpos($action, 'add') === false): ?><?php
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "delete", $scaffoldForbiddenActions))) {
echo "\t\t\t"; ?><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
} ?>
<?php endif;?><?php
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "index", $scaffoldForbiddenActions))) {
echo "\t\t\t"; ?><li><?php echo "<?php echo \$this->Html->link(sprintf(__('List %s', true), __('{$pluralHumanName}', true)), array('action' => 'index'));?>";?></li><?php
} ?>
</ul>
<?php
$done = array();
foreach ($associations as $type => $data)
{
foreach ($data as $alias => $details)
{
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "index", $details['scaffoldForbiddenActions'])))
{
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)) {
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "index", $details['scaffoldForbiddenActions'])))
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";
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "add", $details['scaffoldForbiddenActions'])))
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>
<div class="grid_13">
<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>
<?php if (strpos($action, 'add') === false): ?>
<legend><?php echo "<?php printf(__('{$singularHumanName} # %s', true), \$this->Form->value('{$modelClass}.{$primaryKey}')); ?>";?></legend>
<?php else:;?>
<legend><?php echo "<?php printf(__('{$singularHumanName}', true)); ?>";?></legend>
<?php endif;?>
<?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 "<div class=\"box\">\n";
echo "<?php echo \$this->Form->end(__('Submit', true));?>\n";
echo "</div>";
?>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,112 @@
<?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 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*
* WebTT bake template based on 960grid template
* http://bakery.cakephp.org/articles/tom_m/2010/05/26/960-fluid-grid-system-bake-templates
*
*/
?>
<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>

View file

@ -0,0 +1,132 @@
<?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 0.10.0.1076
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
?>
<div class="grid_3">
<div class="box menubox">
<h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo "<?php echo __('" . $pluralHumanName . "', true); ?>"; ?></h5>
<ul class="menu">
<?php
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "index", $scaffoldForbiddenActions)))
echo "\t<li><?php echo \$this->Html->link(sprintf(__('List %s', true), __('{$pluralHumanName}', true)), array('action' => 'index')); ?> </li>\n";
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "add", $scaffoldForbiddenActions)))
echo "\t<li><?php echo \$this->Html->link(sprintf(__('New %s', true), __('{$singularHumanName}', true)), array('action' => 'add')); ?> </li>\n";
?>
</ul><?php echo "\n";
$done = array();
foreach ($associations as $_type => $_data)
{
foreach ($_data as $alias => $details)
{
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "index", $details['scaffoldForbiddenActions'])))
{
echo "\t\t\t\t<h5><?php echo __('" . Inflector::humanize($details['controller']) . "', true); ?></h5>\n";
echo "\t\t\t\t<ul class=\"menu\">\n";
if ($details['controller'] != $this->name && !in_array($details['controller'], $done))
{
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "index", $details['scaffoldForbiddenActions'])))
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";
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "add", $details['scaffoldForbiddenActions'])))
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\t</ul>\n";
}
}
}
?>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php echo "<?php __('{$pluralHumanName}');?>";?></h2>
<table cellpadding="0" cellspacing="0"><?php
//// TABLE HEADERS
echo "\t\t<?php \$tableHeaders = \$html->tableHeaders(array(";
foreach($fields as $field) {
echo "\$paginator->sort('{$field}'),";
}
echo "__('Actions', true),";
echo "));\n";
echo "\t\techo '<thead>'.\$tableHeaders.'</thead>'; ?>\n\n";
//// TABLE ROWS
echo "\t\t<?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'] && $field !== $primaryKey) {
$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";
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "view", $scaffoldForbiddenActions)))
echo "\t\t\t<?php echo \$this->Html->link(__('View', true), array('action' => 'view', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "edit", $scaffoldForbiddenActions)))
echo "\t\t\t<?php echo ' | ' . \$this->Html->link(__('Edit', true), array('action' => 'edit', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n";
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "delete", $scaffoldForbiddenActions)))
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 "\t<?php endforeach; ?>\n";
//// TABLE FOOTER
echo "\t<?php echo '<tfoot class=\'dark\'>'.\$tableHeaders.'</tfoot>'; ?>\n";
?>
</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 "<?php echo \$this->Paginator->numbers();?>"?> |
<?php echo "\t<?php echo \$this->Paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>\n";?>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,229 @@
<?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_3">
<div class="box menubox"><?php
//// ACTIONS ?>
<h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo "<?php echo __('" . $pluralHumanName . "', true); ?>"; ?></h5>
<ul class="menu">
<?php
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "edit", $scaffoldForbiddenActions)))
echo "\t<li><?php echo \$this->Html->link(sprintf(__('Edit %s', true), __('{$singularHumanName}', true)), array('action' => 'edit', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?> </li>\n";
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "delete", $scaffoldForbiddenActions)))
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";
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "index", $scaffoldForbiddenActions)))
echo "\t\t\t\t<li><?php echo \$this->Html->link(sprintf(__('List %s', true), __('{$pluralHumanName}', true)), array('action' => 'index')); ?> </li>\n";
if (empty($scaffoldForbiddenActions) || (!empty($scaffoldForbiddenActions) && !in_array($scaffoldPrefix . "add", $scaffoldForbiddenActions)))
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)
{
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "index", $details['scaffoldForbiddenActions'])))
{
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";
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "add", $details['scaffoldForbiddenActions'])))
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>
<div class="grid_13">
<div class="box">
<div class="<?php echo $pluralVar;?> view">
<h2><?php echo "<?php __('{$singularHumanName}');?>";?></h2>
<div class="block">
<div class="dl">
<?php echo "<?php \$i = 1; \$class = ' altrow';?>\n";?>
<?php
foreach ($fields as $field) {
$isKey = false;
if (!empty($associations['belongsTo'])) {
foreach ($associations['belongsTo'] as $alias => $details) {
if ($field === $details['foreignKey'] && $field !== $primaryKey) {
$isKey = true;
echo "\t\t\t\t<div class=\"dt<?php if (\$i % 2 == 0) echo \$class;?>\"><?php __('" . Inflector::humanize(Inflector::underscore($alias)) . "'); ?></div>\n";
echo "\t\t\t\t<div class=\"dd<?php if (\$i % 2 == 0) echo \$class;?>\">\n\t\t\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\t</div>\n";
break;
}
}
}
if ($isKey !== true) {
echo "\t\t\t\t<div class=\"dt<?php if (\$i == 1) echo \" dh\"; else if (\$i % 2 == 0) echo \$class;?>\"><?php __('" . Inflector::humanize($field) . "'); ?></div>\n";
echo "\t\t\t\t<div class=\"dd<?php if (\$i == 1) echo \" dh\"; else if (\$i % 2 == 0) echo \$class;?>\">\n\t\t\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field}']; ?>\n\t\t\t\t</div>\n";
}
echo "\t\t\t\t<?php \$i++; ?>\n";
echo "\t\t\t\t<div style=\"clear: both\"></div>\n\n";
}
?>
</div>
</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">
<!-- RELATED --><?php echo "\n";
if (!empty($associations['hasOne'])) :
foreach ($associations['hasOne'] as $alias => $details): ?>
<!-- <?php echo $alias; ?> -->
<div class="related">
<h3><?php echo "<?php printf(__('Related %s (%s)', true), __('" . Inflector::humanize($details['controller']) . "', true), __('" . Inflector::humanize(Inflector::underscore($alias)) . "', true));?>";?></h3>
<?php echo "<?php if (!empty(\${$singularVar}['{$alias}']['{$details['primaryKey']}'])):?>\n";?>
<div class="dl">
<?php
echo "<?php \$i = 0; \$class = ' class=\"altrow\"';?>\n";?><?php echo "\n";
foreach ($details['fields'] as $field) {
echo "\t\t\t\t\t<div class=\"dt<?php if (\$i % 2 == 0) echo \$class;?>\"><?php __('" . Inflector::humanize($field) . "');?></div>\n";
echo "\t\t\t\t\t<div class=\"dd<?php if (\$i++ % 2 == 0) echo \$class;?>\">\n";
echo "\t\t\t\t\t\t<?php echo \${$singularVar}['{$alias}']['{$field}'];?>\n\t\t\t\t\t</div>\n";
echo "\t\t\t\t\t<div style=\"clear: both\"></div>\n";
}
?>
</div>
<?php echo "<?php endif; ?>\n";?>
<div class="actions">
<ul>
<?php echo "<?php if (!empty(\${$singularVar}['{$alias}']['{$details['primaryKey']}'])):?>\n";
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "add", $details['scaffoldForbiddenActions']))) {
?>
<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><? echo "\n";
}
?>
<?php echo "<?php endif; ?>\n";?>
</ul>
</div>
</div><?php
echo "\n";
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):
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "index", $details['scaffoldForbiddenActions']))):
$otherSingularVar = Inflector::variable($alias);
$otherPluralHumanName = Inflector::humanize($details['controller']);
?>
<!-- <?php echo $alias; ?> -->
<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 echo "\n";
foreach ($details['fields'] as $field) {
echo "\t\t\t\t\t\t<th><?php __('" . Inflector::humanize($field) . "'); ?></th>\n";
}
?>
<th class="actions"><?php echo "<?php __('Actions');?>";?></th>
</tr>
</thead>
<?php
echo "<?php
\$i = 0;
foreach (\${$singularVar}['{$alias}'] as \${$otherSingularVar}):
\$class = null;
if (\$i++ % 2 == 0) {
\$class = ' class=\"altrow\"';
}
?>\n";
echo "\t\t\t\t<tr<?php echo \$class;?>>\n";
foreach ($details['fields'] as $field) {
echo "\t\t\t\t\t<td><?php echo \${$otherSingularVar}['{$field}'];?></td>\n";
}
echo "\t\t\t\t\t<td class=\"actions\">\n";
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "view", $details['scaffoldForbiddenActions'])))
echo "\t\t\t\t\t\t<?php echo \$this->Html->link(__('View', true), array('controller' => '{$details['controller']}', 'action' => 'view', \${$otherSingularVar}['{$details['primaryKey']}'])); ?>\n";
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "edit", $details['scaffoldForbiddenActions'])))
echo "\t\t\t\t\t\t<?php echo ' | '. \$this->Html->link(__('Edit', true), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$otherSingularVar}['{$details['primaryKey']}'])); ?>\n";
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "delete", $details['scaffoldForbiddenActions'])))
echo "\t\t\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\t\t</td>\n";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t\t<?php endforeach; ?>\n";
?>
</table>
<?php echo "<?php endif; ?>\n\n";?>
<div class="actions">
<ul><?php echo "\n";
if (empty($details['scaffoldForbiddenActions']) || (!empty($details['scaffoldForbiddenActions']) && !in_array($scaffoldPrefix . "add", $details['scaffoldForbiddenActions']))) {
?>
<li><?php
echo "<?php echo \$this->Html->link(sprintf(__('New %s', true), __('" . Inflector::humanize(Inflector::underscore($alias)) . "', true)), array('controller' => '{$details['controller']}', 'action' => 'add'";
if (isset($details['scaffoldActions'][$scaffoldPrefix . "add"]) && $details['scaffoldActions'][$scaffoldPrefix . "add"] == "fk")
echo ", '{$details['foreignKey']}' => \${$singularVar}['{$modelClass}']['{$primaryKey}']";
echo "));?>";
?></li><? echo "\n";
}
?>
</ul>
</div>
</div><?php
echo "\n";
endif;
endforeach; ?>
<!-- /RELATED -->
</div>
</div>
<?php } ?>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,118 @@
<div class="grid_3">
<div class="box menubox">
<h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Comments', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', 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>
</ul>
<h5>Users</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php printf(__('Add %s', true), __('Comment', true)); ?></h2>
<div class="comments form">
<?php echo $this->Form->create('Comment');?>
<fieldset>
<legend><?php printf(__('Comment', true)); ?></legend>
<?php
// echo $this->Form->input('translation_id');
echo $this->Form->hidden('identifier_id', array('default' => $identifier['Identifier']['id']));
// TODO: change user_id for authorized user
echo $this->Form->hidden('user_id', array('default' => 1));
echo $this->Form->input('comment');
?>
</fieldset>
<div class="box">
<?php echo $this->Form->end(__('Submit', true));?>
</div> </div>
<div class="box">
<div class="identifiers view">
<h2><?php __('Identifier');?></h2>
<div class="block">
<div class="dl">
<?php $i = 1; $class = ' altrow';?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Id'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifier['Identifier']['id']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('Language'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($identifier['Language']['name'], array('controller' => 'languages', 'action' => 'view', $identifier['Language']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Translation Index'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifier['Identifier']['translation_index']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Identifier'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifier['Identifier']['identifier']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Arguments'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifier['Identifier']['arguments']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Reference String'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifier['Identifier']['reference_string']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Translated'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifier['Identifier']['translated']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Created'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifier['Identifier']['created']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Modified'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifier['Identifier']['modified']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>

View file

@ -5,9 +5,9 @@
</h2> </h2>
<div class="inbox"> <div class="inbox">
<div class="block" id="admin-actions"> <div class="block" id="admin-actions">
<h5><?php echo __('Users', true); ?></h5> <h5><?php echo __('Comments', true); ?></h5>
<ul class="menu"> <ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('action' => 'index'));?></li> </ul> <li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', true)), array('action' => 'index'));?></li> </ul>
<h5>Translations</h5> <h5>Translations</h5>
<ul class="menu"> <ul class="menu">
@ -15,10 +15,15 @@
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li> <li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul> </ul>
<h5>Votes</h5> <h5>Identifiers</h5>
<ul class="menu"> <ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Votes', true)), array('controller' => 'votes', 'action' => 'index')); ?> </li> <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), __('Vote', true)), array('controller' => 'votes', 'action' => 'add')); ?> </li> </ul>
<h5>Users</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('User', true)), array('controller' => 'users', 'action' => 'add')); ?> </li>
</ul> </ul>
</div> </div>
</div> </div>
@ -26,18 +31,22 @@
</div> </div>
<div class="grid_13"> <div class="grid_13">
<h2 id="page-heading"><?php printf(__('Add %s', true), __('User', true)); ?></h2> <h2 id="page-heading"><?php printf(__('Admin Add %s', true), __('Comment', true)); ?></h2>
<div class="users form"> <div class="comments form">
<?php echo $this->Form->create('User');?> <?php echo $this->Form->create('Comment');?>
<fieldset> <fieldset>
<legend><?php printf(__('User', true)); ?></legend> <legend><?php printf(__('Comment', true)); ?></legend>
<?php <?php
echo $this->Form->input('name'); echo $this->Form->input('translation_id');
echo $this->Form->input('identifier_id');
echo $this->Form->input('user_id');
echo $this->Form->input('comment');
?> ?>
</fieldset> </fieldset>
<?php echo $this->Form->end(__('Submit', true));?> <div class="box">
</div> <?php echo $this->Form->end(__('Submit', true));?>
</div> </div>
</div> </div>
<div class="clear"></div> <div class="clear"></div>

View file

@ -0,0 +1,53 @@
<div class="grid_3">
<div class="box menubox">
<h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Comments', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Comment.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Comment.id'))); ?></li> <li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', true)), array('action' => 'index'));?></li> </ul>
<h5>Translations</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', '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>
</ul>
<h5>Users</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('User', true)), array('controller' => 'users', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php printf(__('Admin Edit %s', true), __('Comment', true)); ?></h2>
<div class="comments form">
<?php echo $this->Form->create('Comment');?>
<fieldset>
<legend><?php printf(__('Comment # %s', true), $this->Form->value('Comment.id')); ?></legend>
<?php
echo $this->Form->input('id');
echo $this->Form->input('translation_id');
echo $this->Form->input('identifier_id');
echo $this->Form->input('user_id');
echo $this->Form->input('comment');
?>
</fieldset>
<div class="box">
<?php echo $this->Form->end(__('Submit', true));?>
</div> </div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,81 @@
<div class="grid_3">
<div class="box menubox">
<h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Comments', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', true)), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Comment', true)), array('action' => 'add')); ?> </li>
</ul>
<h5><?php echo __('Translations', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul>
<h5><?php echo __('Identifiers', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
</ul>
<h5><?php echo __('Users', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('User', true)), array('controller' => 'users', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php __('Comments');?></h2>
<table cellpadding="0" cellspacing="0"> <?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('translation_id'),$paginator->sort('identifier_id'),$paginator->sort('user_id'),$paginator->sort('comment'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
echo '<thead>'.$tableHeaders.'</thead>'; ?>
<?php
$i = 0;
foreach ($comments as $comment):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $comment['Comment']['id']; ?></td>
<td>
<?php echo $this->Html->link($comment['Translation']['translation_text'], array('controller' => 'translations', 'action' => 'view', $comment['Translation']['id'])); ?>
</td>
<td>
<?php echo $this->Html->link($comment['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $comment['Identifier']['id'])); ?>
</td>
<td>
<?php echo $this->Html->link($comment['User']['name'], array('controller' => 'users', 'action' => 'view', $comment['User']['id'])); ?>
</td>
<td><?php echo $comment['Comment']['comment']; ?></td>
<td><?php echo $comment['Comment']['created']; ?></td>
<td><?php echo $comment['Comment']['modified']; ?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $comment['Comment']['id'])); ?>
<?php echo ' | ' . $this->Html->link(__('Edit', true), array('action' => 'edit', $comment['Comment']['id'])); ?>
<?php echo ' | ' . $this->Html->link(__('Delete', true), array('action' => 'delete', $comment['Comment']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $comment['Comment']['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>

View file

@ -0,0 +1,97 @@
<div class="grid_3">
<div class="box menubox"> <h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Comments', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('Edit %s', true), __('Comment', true)), array('action' => 'edit', $comment['Comment']['id'])); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('Delete %s', true), __('Comment', true)), array('action' => 'delete', $comment['Comment']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $comment['Comment']['id'])); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', true)), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Comment', true)), array('action' => 'add')); ?> </li>
</ul>
<h5>Translations</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', '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>
</ul>
<h5>Users</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('User', true)), array('controller' => 'users', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<div class="box">
<div class="comments view">
<h2><?php __('Comment');?></h2>
<div class="block">
<div class="dl">
<?php $i = 1; $class = ' altrow';?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Id'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $comment['Comment']['id']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('Translation'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($comment['Translation']['translation_text'], array('controller' => 'translations', 'action' => 'view', $comment['Translation']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('Identifier'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($comment['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $comment['Identifier']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('User'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($comment['User']['name'], array('controller' => 'users', 'action' => 'view', $comment['User']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Comment'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $comment['Comment']['comment']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Created'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $comment['Comment']['created']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Modified'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $comment['Comment']['modified']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,51 @@
<div class="grid_3">
<div class="box menubox">
<h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Comments', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Comment.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Comment.id'))); ?></li> <li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', true)), array('action' => 'index'));?></li> </ul>
<h5>Translations</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', '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>
</ul>
<h5>Users</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php printf(__('Edit %s', true), __('Comment', true)); ?></h2>
<div class="comments form">
<?php echo $this->Form->create('Comment');?>
<fieldset>
<legend><?php printf(__('Comment # %s', true), $this->Form->value('Comment.id')); ?></legend>
<?php
echo $this->Form->input('id');
echo $this->Form->input('translation_id');
echo $this->Form->input('identifier_id');
echo $this->Form->input('user_id');
echo $this->Form->input('comment');
?>
</fieldset>
<div class="box">
<?php echo $this->Form->end(__('Submit', true));?>
</div> </div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,72 @@
<div class="grid_3">
<div class="box menubox">
<h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Comments', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', true)), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Comment', true)), array('action' => 'add')); ?> </li>
</ul>
<h5><?php echo __('Identifiers', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
</ul>
<h5><?php echo __('Users', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php __('Comments');?></h2>
<table cellpadding="0" cellspacing="0"> <?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('identifier_id'),$paginator->sort('user_id'),$paginator->sort('comment'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
echo '<thead>'.$tableHeaders.'</thead>'; ?>
<?php
$i = 0;
foreach ($comments as $comment):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $comment['Comment']['id']; ?></td>
<td>
<?php echo $this->Html->link($comment['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $comment['Identifier']['id'])); ?>
</td>
<td>
<?php echo $this->Html->link($comment['User']['name'], array('controller' => 'users', 'action' => 'view', $comment['User']['id'])); ?>
</td>
<td><?php echo $comment['Comment']['comment']; ?></td>
<td><?php echo $comment['Comment']['created']; ?></td>
<td><?php echo $comment['Comment']['modified']; ?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $comment['Comment']['id'])); ?>
<?php echo ' | ' . $this->Html->link(__('Edit', true), array('action' => 'edit', $comment['Comment']['id'])); ?>
<?php echo ' | ' . $this->Html->link(__('Delete', true), array('action' => 'delete', $comment['Comment']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $comment['Comment']['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>

View file

@ -0,0 +1,84 @@
<div class="grid_3">
<div class="box menubox"> <h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Comments', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('Edit %s', true), __('Comment', true)), array('action' => 'edit', $comment['Comment']['id'])); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('Delete %s', true), __('Comment', true)), array('action' => 'delete', $comment['Comment']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $comment['Comment']['id'])); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', true)), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Comment', 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>
</ul>
<h5>Users</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<div class="box">
<div class="comments view">
<h2><?php __('Comment');?></h2>
<div class="block">
<div class="dl">
<?php $i = 1; $class = ' altrow';?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Id'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $comment['Comment']['id']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('Identifier'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($comment['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $comment['Identifier']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('User'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($comment['User']['name'], array('controller' => 'users', 'action' => 'view', $comment['User']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Comment'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $comment['Comment']['comment']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Created'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $comment['Comment']['created']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Modified'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $comment['Comment']['modified']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
</div>
</div>
</div>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,9 @@
Hello <?php echo $user['User']['name']; ?>,
Thank you for registering to WebTT!
Your password is: <?php echo $user['User']['passwd']; echo "\n"; ?>
<?php
$url = $this->Html->url(array('controller' => 'users', 'action' => 'confirm', $user['User']['confirm_hash']));
$completeUrl = 'http://' . $serverName . $url;
?>
Go to this link to confirm you account: <?php echo $this->Html->link(__('Confirm', true), $completeUrl); ?>

View file

@ -0,0 +1,9 @@
Hello <?php echo $user['User']['name']; echo "\n"; ?>,
Thank you for registering to WebTT!
Your password is: <?php echo $user['User']['passwd']; echo "\n"; ?>
<?php
$url = $this->Html->url(array('controller' => 'users', 'action' => 'confirm', $user['User']['confirm_hash']));
$completeUrl = 'http://' . $serverName . $url;
?>
Go to this link to confirm you account: <?php echo $completeUrl; ?>

View file

@ -0,0 +1,71 @@
<div class="grid_3">
<div class="box menubox">
<h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Identifier Columns', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifier Columns', true)), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier Column', true)), array('action' => 'add')); ?> </li>
</ul>
<h5><?php echo __('Identifiers', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
</ul>
<h5><?php echo __('Translations', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php __('Identifier Columns');?></h2>
<table cellpadding="0" cellspacing="0"> <?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('identifier_id'),$paginator->sort('column_name'),$paginator->sort('reference_string'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
echo '<thead>'.$tableHeaders.'</thead>'; ?>
<?php
$i = 0;
foreach ($identifierColumns as $identifierColumn):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $identifierColumn['IdentifierColumn']['id']; ?></td>
<td>
<?php echo $this->Html->link($identifierColumn['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $identifierColumn['Identifier']['id'])); ?>
</td>
<td><?php echo $identifierColumn['IdentifierColumn']['column_name']; ?></td>
<td><?php echo $identifierColumn['IdentifierColumn']['reference_string']; ?></td>
<td><?php echo $identifierColumn['IdentifierColumn']['created']; ?></td>
<td><?php echo $identifierColumn['IdentifierColumn']['modified']; ?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $identifierColumn['IdentifierColumn']['id'])); ?>
<?php echo ' | ' . $this->Html->link(__('Edit', true), array('action' => 'edit', $identifierColumn['IdentifierColumn']['id'])); ?>
<?php echo ' | ' . $this->Html->link(__('Delete', true), array('action' => 'delete', $identifierColumn['IdentifierColumn']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifierColumn['IdentifierColumn']['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>

View file

@ -0,0 +1,146 @@
<div class="grid_3">
<div class="box menubox"> <h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Identifier Columns', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('Edit %s', true), __('Identifier Column', true)), array('action' => 'edit', $identifierColumn['IdentifierColumn']['id'])); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('Delete %s', true), __('Identifier Column', true)), array('action' => 'delete', $identifierColumn['IdentifierColumn']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifierColumn['IdentifierColumn']['id'])); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifier Columns', true)), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier Column', 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>
</ul>
<h5>Translations</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<div class="box">
<div class="identifierColumns view">
<h2><?php __('Identifier Column');?></h2>
<div class="block">
<div class="dl">
<?php $i = 1; $class = ' altrow';?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Id'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['id']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('Identifier'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($identifierColumn['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $identifierColumn['Identifier']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Column Name'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['column_name']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Reference String'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['reference_string']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Created'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['created']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Modified'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['modified']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
</div>
</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">
<!-- RELATED -->
<!-- Translation -->
<div class="related">
<h3><?php printf(__('Related %s', true), __('Translations', true));?></h3>
<?php if (!empty($identifierColumn['Translation'])):?>
<table cellpadding = "0" cellspacing = "0">
<thead>
<tr>
<th><?php __('Id'); ?></th>
<th><?php __('Identifier Id'); ?></th>
<th><?php __('Identifier Column Id'); ?></th>
<th><?php __('Translation Text'); ?></th>
<th><?php __('User Id'); ?></th>
<th><?php __('Best'); ?></th>
<th><?php __('Created'); ?></th>
<th><?php __('Modified'); ?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
</thead>
<?php
$i = 0;
foreach ($identifierColumn['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['identifier_column_id'];?></td>
<td><?php echo $translation['translation_text'];?></td>
<td><?php echo $translation['user_id'];?></td>
<td><?php echo $translation['best'];?></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(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add'));?></li>
</ul>
</div>
</div>
<!-- /RELATED -->
</div>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,71 @@
<div class="grid_3">
<div class="box menubox">
<h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Identifier Columns', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifier Columns', true)), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier Column', true)), array('action' => 'add')); ?> </li>
</ul>
<h5><?php echo __('Identifiers', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
</ul>
<h5><?php echo __('Translations', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php __('Identifier Columns');?></h2>
<table cellpadding="0" cellspacing="0"> <?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('identifier_id'),$paginator->sort('column_name'),$paginator->sort('reference_string'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
echo '<thead>'.$tableHeaders.'</thead>'; ?>
<?php
$i = 0;
foreach ($identifierColumns as $identifierColumn):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $identifierColumn['IdentifierColumn']['id']; ?></td>
<td>
<?php echo $this->Html->link($identifierColumn['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $identifierColumn['Identifier']['id'])); ?>
</td>
<td><?php echo $identifierColumn['IdentifierColumn']['column_name']; ?></td>
<td><?php echo $identifierColumn['IdentifierColumn']['reference_string']; ?></td>
<td><?php echo $identifierColumn['IdentifierColumn']['created']; ?></td>
<td><?php echo $identifierColumn['IdentifierColumn']['modified']; ?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $identifierColumn['IdentifierColumn']['id'])); ?>
<?php echo ' | ' . $this->Html->link(__('Edit', true), array('action' => 'edit', $identifierColumn['IdentifierColumn']['id'])); ?>
<?php echo ' | ' . $this->Html->link(__('Delete', true), array('action' => 'delete', $identifierColumn['IdentifierColumn']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifierColumn['IdentifierColumn']['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>

View file

@ -0,0 +1,146 @@
<div class="grid_3">
<div class="box menubox"> <h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Identifier Columns', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('Edit %s', true), __('Identifier Column', true)), array('action' => 'edit', $identifierColumn['IdentifierColumn']['id'])); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('Delete %s', true), __('Identifier Column', true)), array('action' => 'delete', $identifierColumn['IdentifierColumn']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $identifierColumn['IdentifierColumn']['id'])); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifier Columns', true)), array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Identifier Column', 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>
</ul>
<h5>Translations</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<div class="box">
<div class="identifierColumns view">
<h2><?php __('Identifier Column');?></h2>
<div class="block">
<div class="dl">
<?php $i = 1; $class = ' altrow';?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Id'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['id']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('Identifier'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($identifierColumn['Identifier']['identifier'], array('controller' => 'identifiers', 'action' => 'view', $identifierColumn['Identifier']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Column Name'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['column_name']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Reference String'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['reference_string']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Created'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['created']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Modified'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $identifierColumn['IdentifierColumn']['modified']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
</div>
</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">
<!-- RELATED -->
<!-- Translation -->
<div class="related">
<h3><?php printf(__('Related %s', true), __('Translations', true));?></h3>
<?php if (!empty($identifierColumn['Translation'])):?>
<table cellpadding = "0" cellspacing = "0">
<thead>
<tr>
<th><?php __('Id'); ?></th>
<th><?php __('Identifier Id'); ?></th>
<th><?php __('Identifier Column Id'); ?></th>
<th><?php __('Translation Text'); ?></th>
<th><?php __('User Id'); ?></th>
<th><?php __('Best'); ?></th>
<th><?php __('Created'); ?></th>
<th><?php __('Modified'); ?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
</thead>
<?php
$i = 0;
foreach ($identifierColumn['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['identifier_column_id'];?></td>
<td><?php echo $translation['translation_text'];?></td>
<td><?php echo $translation['user_id'];?></td>
<td><?php echo $translation['best'];?></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(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add', 'identifier_column_id' => $identifierColumn['IdentifierColumn']['id']));?></li>
</ul>
</div>
</div>
<!-- /RELATED -->
</div>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<?php echo $content_for_layout; ?>
</body>
</html>

View file

@ -0,0 +1 @@
<?php echo $content_for_layout; ?>

View file

@ -0,0 +1,103 @@
<?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)
*/
?>
<div class="grid_8">
<h2 id="page-heading"><?php __('Translation Collaboration'); ?></h3>
<div class="box menubox"><div class="inbox">
<div id="admin-actions" class="block">
<h5><?php __('Languages'); ?></h3>
<ul class="menu">
<li>
<?php echo $this->Html->link(__('List Languages', true), array('controller' => 'languages', 'action' => 'index')); ?>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Language', true)), array('controller' => 'languages', 'action' => 'add')); ?> </li>
</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>
</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>
</ul>
<h5>Translations</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul>
<h5>Comments</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Comments', true)), array('controller' => 'comments', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Comment', true)), array('controller' => 'comments', 'action' => 'add')); ?> </li>
</ul>
<h5>Votes</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Votes', true)), array('controller' => 'votes', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Vote', true)), array('controller' => 'votes', 'action' => 'add')); ?> </li>
</ul>
<h5>Users</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('controller' => 'users', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('User', true)), array('controller' => 'users', 'action' => 'add')); ?> </li>
</ul>
</div>
</div></div>
</div>
<!--<div class="grid_4">
<h2 id="page-heading"><?php __('Both'); ?></h3>
<div class="box menubox"><div class="inbox">
<div id="admin-actions" class="block">
</div>
</div></div>
</div>-->
<div class="grid_8">
<h2 id="page-heading"><?php __('Translation Pipeline'); ?></h3>
<div class="box menubox"><div class="inbox">
<div id="admin-actions" class="block">
<h5>Imported 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>
</ul>
<h5>File Identifiers</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('File Identifiers', true)), array('controller' => 'file_identifiers', 'action' => 'index')); ?> </li>
</ul>
<h5>Raw Files</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Raw Files', true)), array('controller' => 'raw_files', 'action' => 'index')); ?> </li>
</ul>
</div>
</div></div>
</div>

View file

@ -0,0 +1,65 @@
<div class="grid_3">
<div class="box menubox">
<h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox"><div class="block" id="admin-actions">
<h5>Raw Files</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Raw Files', true)), array('action' => 'index')); ?> </li>
</ul>
<h5>Imported 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>
</ul>
</div></div>
</div>
</div>
<div class="grid_13">
<div class="box">
<div class="rawFiles view">
<h2><?php __('Raw File');?></h2>
<div class="block">
<div class="dl">
<?php $i = 1; $class = ' altrow';?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Filename'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $rawFile['RawFile']['filename']; ?>
&nbsp;
</div>
<?php $i++; ?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Size'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $rawFile['RawFile']['size']; ?>
&nbsp;
</div>
<?php $i++; ?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Modified'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Time->nice($rawFile['RawFile']['modified']); ?>
&nbsp;
</div>
<?php $i++; ?>
</div>
</div>
</div>
</div>
<div class="box">
<h2>
<a href="#" id="toggle-related-records"><?php echo (__('File Content', true)); ?></a>
</h2>
<div class="block" id="related-records">
<div class="related">
<textarea style="width: 100%; height: 300px" readonly>
<?php echo htmlentities($fileContent, ENT_COMPAT, "UTF-8"); ?>
</textarea>
</div>
</div>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,71 @@
<div class="grid_3">
<div class="box menubox">
<h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Translation Files', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('action' => 'index')); ?> </li>
</ul>
<h5><?php echo __('Languages', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('controller' => 'languages', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Language', true)), array('controller' => 'languages', 'action' => 'add')); ?> </li>
</ul>
<h5><?php echo __('Imported Translation Files', true); ?></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>
</ul>
<h5><?php echo __('Identifiers', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php __('Translation Files');?></h2>
<table cellpadding="0" cellspacing="0"> <?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('language_id'),$paginator->sort('filename_template'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
echo '<thead>'.$tableHeaders.'</thead>'; ?>
<?php
$i = 0;
foreach ($translationFiles as $translationFile):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $translationFile['TranslationFile']['id']; ?></td>
<td>
<?php echo $this->Html->link($translationFile['Language']['name'], array('controller' => 'languages', 'action' => 'view', $translationFile['Language']['id'])); ?>
</td>
<td><?php echo $translationFile['TranslationFile']['filename_template']; ?></td>
<td><?php echo $translationFile['TranslationFile']['created']; ?></td>
<td><?php echo $translationFile['TranslationFile']['modified']; ?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $translationFile['TranslationFile']['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>

View file

@ -0,0 +1,190 @@
<div class="grid_3">
<div class="box menubox"> <h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Translation Files', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('action' => 'index')); ?> </li>
</ul>
<h5>Languages</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('controller' => 'languages', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Language', true)), array('controller' => 'languages', 'action' => 'add')); ?> </li>
</ul>
<h5>Imported 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>
</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>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<div class="box">
<div class="translationFiles view">
<h2><?php __('Translation File');?></h2>
<div class="block">
<div class="dl">
<?php $i = 1; $class = ' altrow';?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Id'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $translationFile['TranslationFile']['id']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('Language'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($translationFile['Language']['name'], array('controller' => 'languages', 'action' => 'view', $translationFile['Language']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Filename Template'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $translationFile['TranslationFile']['filename_template']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Created'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $translationFile['TranslationFile']['created']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Modified'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $translationFile['TranslationFile']['modified']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
</div>
</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">
<!-- RELATED -->
<!-- ImportedTranslationFile -->
<div class="related">
<h3><?php printf(__('Related %s', true), __('Imported Translation Files', true));?></h3>
<?php if (!empty($translationFile['ImportedTranslationFile'])):?>
<table cellpadding = "0" cellspacing = "0">
<thead>
<tr>
<th><?php __('Id'); ?></th>
<th><?php __('Language Id'); ?></th>
<th><?php __('Translation File Id'); ?></th>
<th><?php __('Filename'); ?></th>
<th><?php __('Merged'); ?></th>
<th><?php __('File Last Modified Date'); ?></th>
<th><?php __('Created'); ?></th>
<th><?php __('Modified'); ?></th>
<th class="actions"><?php __('Actions');?></th>
</tr>
</thead>
<?php
$i = 0;
foreach ($translationFile['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['translation_file_id'];?></td>
<td><?php echo $importedTranslationFile['filename'];?></td>
<td><?php echo $importedTranslationFile['merged'];?></td>
<td><?php echo $importedTranslationFile['file_last_modified_date'];?></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'])); ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
<div class="actions">
<ul>
</ul>
</div>
</div>
<!-- Identifier -->
<div class="related">
<h3><?php printf(__('Related %s', true), __('Identifiers', true));?></h3>
<?php if (!empty($translationFile['Identifier'])):?>
<table cellpadding = "0" cellspacing = "0">
<thead>
<tr>
<th><?php __('Id'); ?></th>
<th><?php __('Language Id'); ?></th>
<th><?php __('Translation File Id'); ?></th>
<th><?php __('Translation Index'); ?></th>
<th><?php __('Identifier'); ?></th>
<th><?php __('Arguments'); ?></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 ($translationFile['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_file_id'];?></td>
<td><?php echo $identifier['translation_index'];?></td>
<td><?php echo $identifier['identifier'];?></td>
<td><?php echo $identifier['arguments'];?></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 class="actions">
<ul>
</ul>
</div>
</div>
<!-- /RELATED -->
</div>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,67 @@
<div class="grid_3">
<div class="box menubox">
<h2><a href="#" id="toggle-admin-actions">Actions</a></h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Translation Files', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('action' => 'index')); ?> </li>
</ul>
<h5><?php echo __('Languages', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('controller' => 'languages', 'action' => 'index')); ?> </li>
</ul>
<h5><?php echo __('Identifiers', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Identifiers', true)), array('controller' => 'identifiers', 'action' => 'index')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php __('Translation Files');?></h2>
<table cellpadding="0" cellspacing="0"> <?php $tableHeaders = $html->tableHeaders(array($paginator->sort('id'),$paginator->sort('language_id'),$paginator->sort('filename_template'),$paginator->sort('created'),$paginator->sort('modified'),__('Actions', true),));
echo '<thead>'.$tableHeaders.'</thead>'; ?>
<?php
$i = 0;
foreach ($translationFiles as $translationFile):
$class = null;
if ($i++ % 2 == 0) {
$class = ' class="altrow"';
}
?>
<tr<?php echo $class;?>>
<td><?php echo $translationFile['TranslationFile']['id']; ?></td>
<td>
<?php echo $this->Html->link($translationFile['Language']['name'], array('controller' => 'languages', 'action' => 'view', $translationFile['Language']['id'])); ?>
</td>
<td><?php echo $translationFile['TranslationFile']['filename_template']; ?></td>
<td><?php echo $translationFile['TranslationFile']['created']; ?></td>
<td><?php echo $translationFile['TranslationFile']['modified']; ?></td>
<td class="actions">
<?php echo $this->Html->link(__('View', true), array('action' => 'view', $translationFile['TranslationFile']['id'])); ?>
| <?php echo $this->Html->link(__('List Identifiers', true), array('controller' => 'identifiers', 'action' => 'index', 'translation_file_id' => $translationFile['TranslationFile']['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>

View file

@ -0,0 +1,136 @@
<div class="grid_3">
<div class="box menubox"> <h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Translation Files', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translation Files', true)), array('action' => 'index')); ?> </li>
</ul>
<h5>Languages</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Languages', true)), array('controller' => 'languages', '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>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<div class="box">
<div class="translationFiles view">
<h2><?php __('Translation File');?></h2>
<div class="block">
<div class="dl">
<?php $i = 1; $class = ' altrow';?>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Id'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $translationFile['TranslationFile']['id']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i % 2 == 0) echo $class;?>"><?php __('Language'); ?></div>
<div class="dd<?php if ($i % 2 == 0) echo $class;?>">
<?php echo $this->Html->link($translationFile['Language']['name'], array('controller' => 'languages', 'action' => 'view', $translationFile['Language']['id'])); ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Filename Template'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $translationFile['TranslationFile']['filename_template']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Created'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $translationFile['TranslationFile']['created']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
<div class="dt<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>"><?php __('Modified'); ?></div>
<div class="dd<?php if ($i == 1) echo " dh"; else if ($i % 2 == 0) echo $class;?>">
<?php echo $translationFile['TranslationFile']['modified']; ?>
</div>
<?php $i++; ?>
<div style="clear: both"></div>
</div>
</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">
<!-- RELATED -->
<!-- Identifier -->
<div class="related">
<h3><?php printf(__('Related %s', true), __('Identifiers', true));?></h3>
<?php if (!empty($translationFile['Identifier'])):?>
<table cellpadding = "0" cellspacing = "0">
<thead>
<tr>
<th><?php __('Id'); ?></th>
<th><?php __('Language Id'); ?></th>
<th><?php __('Translation File Id'); ?></th>
<th><?php __('Translation Index'); ?></th>
<th><?php __('Identifier'); ?></th>
<th><?php __('Arguments'); ?></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 ($translationFile['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_file_id'];?></td>
<td><?php echo $identifier['translation_index'];?></td>
<td><?php echo $identifier['identifier'];?></td>
<td><?php echo $identifier['arguments'];?></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 class="actions">
<ul>
</ul>
</div>
</div>
<!-- /RELATED -->
</div>
</div>
</div>
<div class="clear"></div>

View file

@ -1,44 +0,0 @@
<div class="grid_3">
<div class="box menubox">
<h2>
<a href="#" id="toggle-admin-actions">Actions</a>
</h2>
<div class="inbox">
<div class="block" id="admin-actions">
<h5><?php echo __('Users', true); ?></h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Users', true)), array('action' => 'index'));?></li> </ul>
<h5>Translations</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Translations', true)), array('controller' => 'translations', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Translation', true)), array('controller' => 'translations', 'action' => 'add')); ?> </li>
</ul>
<h5>Votes</h5>
<ul class="menu">
<li><?php echo $this->Html->link(sprintf(__('List %s', true), __('Votes', true)), array('controller' => 'votes', 'action' => 'index')); ?> </li>
<li><?php echo $this->Html->link(sprintf(__('New %s', true), __('Vote', true)), array('controller' => 'votes', 'action' => 'add')); ?> </li>
</ul>
</div>
</div>
</div>
</div>
<div class="grid_13">
<h2 id="page-heading"><?php printf(__('Edit %s', true), __('User', true)); ?></h2>
<div class="users form">
<?php echo $this->Form->create('User');?>
<fieldset>
<legend><?php printf(__('User # %s', true), $this->Form->value('User.id')); ?></legend>
<?php
echo $this->Form->input('id');
echo $this->Form->input('name');
?>
</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
</div>
<div class="clear"></div>

View file

@ -0,0 +1,10 @@
<?php
echo $this->Session->flash('auth');
echo $this->Form->create('User', array('action' => 'login'));
echo $this->Form->inputs(array(
'legend' => __('Login', true),
'username',
'password'
));
echo $this->Form->end('Login');
?>

View file

@ -0,0 +1,14 @@
<?php
echo $this->Session->flash('email');
echo $this->Session->flash('auth');
echo $this->Form->create('User', array('action' => 'register'));
echo $this->Form->inputs(array(
'legend' => __('Register', true),
'username',
'name',
'email',
'passwd',
));
echo $this->Form->end('Register');
?>

View file

@ -0,0 +1,9 @@
.importedTranslationFiles div.dt, .importedTranslationFiles label {
width: 15em;
}
.identifiers div.dt, .identifiers labek {
width: 13em;
}
.fileIdentifiers div.dt, .fileIdentifiers label {
width: 17em;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B