added translation and image proxy
This commit is contained in:
1 parent
f7b2d01a13
commit
b648779ba3
35 files changed
+573
-11
No files matched your search
@@ -24,6 +24,7 @@ $this->widget('zii.widgets.CMenu',array(
|
||||
array('label' => 'Manage Channel in Article', 'url' => array('channelArticleRelation/admin')),
|
||||
array('label' => 'Journal', 'url' => array('journal/admin')),
|
||||
array('label' => 'Manage Article in Journal', 'url' => array('articleJournalRelation/admin')),
|
||||
array('label' => 'Translation', 'url' => array('translation/admin')),
|
||||
),
|
||||
));
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/* @var $this TranslationController */
|
||||
/* @var $model Translation */
|
||||
/* @var $form CActiveForm */
|
||||
?>
|
||||
|
||||
<div class="form">
|
||||
|
||||
<?php $form=$this->beginWidget('CActiveForm', array(
|
||||
'id'=>'translation-form',
|
||||
// Please note: When you enable ajax validation, make sure the corresponding
|
||||
// controller action is handling ajax validation correctly.
|
||||
// There is a call to performAjaxValidation() commented in generated controller code.
|
||||
// See class documentation of CActiveForm for details on this.
|
||||
'enableAjaxValidation'=>false,
|
||||
)); ?>
|
||||
|
||||
<p class="note">Fields with <span class="required">*</span> are required.</p>
|
||||
|
||||
<?php echo $form->errorSummary($model); ?>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->labelEx($model,'name'); ?>
|
||||
<?php echo $form->textArea($model,'name',array('rows'=>6, 'cols'=>50)); ?>
|
||||
<?php echo $form->error($model,'name'); ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->labelEx($model,'textEn'); ?>
|
||||
<?php echo $form->textArea($model,'textEn',array('rows'=>6, 'cols'=>50)); ?>
|
||||
<?php echo $form->error($model,'textEn'); ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->labelEx($model,'textRu'); ?>
|
||||
<?php echo $form->textArea($model,'textRu',array('rows'=>6, 'cols'=>50)); ?>
|
||||
<?php echo $form->error($model,'textRu'); ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->labelEx($model,'textZh'); ?>
|
||||
<?php echo $form->textArea($model,'textZh',array('rows'=>6, 'cols'=>50)); ?>
|
||||
<?php echo $form->error($model,'textZh'); ?>
|
||||
</div>
|
||||
|
||||
<div class="row buttons">
|
||||
<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
|
||||
</div>
|
||||
|
||||
<?php $this->endWidget(); ?>
|
||||
|
||||
</div><!-- form -->
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/* @var $this TranslationController */
|
||||
/* @var $model Translation */
|
||||
/* @var $form CActiveForm */
|
||||
?>
|
||||
|
||||
<div class="wide form">
|
||||
|
||||
<?php $form=$this->beginWidget('CActiveForm', array(
|
||||
'action'=>Yii::app()->createUrl($this->route),
|
||||
'method'=>'get',
|
||||
)); ?>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->label($model,'id'); ?>
|
||||
<?php echo $form->textField($model,'id'); ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->label($model,'name'); ?>
|
||||
<?php echo $form->textArea($model,'name',array('rows'=>6, 'cols'=>50)); ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->label($model,'textEn'); ?>
|
||||
<?php echo $form->textArea($model,'textEn',array('rows'=>6, 'cols'=>50)); ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->label($model,'textRu'); ?>
|
||||
<?php echo $form->textArea($model,'textRu',array('rows'=>6, 'cols'=>50)); ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<?php echo $form->label($model,'textZh'); ?>
|
||||
<?php echo $form->textArea($model,'textZh',array('rows'=>6, 'cols'=>50)); ?>
|
||||
</div>
|
||||
|
||||
<div class="row buttons">
|
||||
<?php echo CHtml::submitButton('Search'); ?>
|
||||
</div>
|
||||
|
||||
<?php $this->endWidget(); ?>
|
||||
|
||||
</div><!-- search-form -->
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/* @var $this TranslationController */
|
||||
/* @var $data Translation */
|
||||
?>
|
||||
|
||||
<div class="view">
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
|
||||
<?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('name')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->name); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('textEn')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->textEn); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('textRu')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->textRu); ?>
|
||||
<br />
|
||||
|
||||
<b><?php echo CHtml::encode($data->getAttributeLabel('textZh')); ?>:</b>
|
||||
<?php echo CHtml::encode($data->textZh); ?>
|
||||
<br />
|
||||
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/* @var $this TranslationController */
|
||||
/* @var $model Translation */
|
||||
|
||||
$this->breadcrumbs=array(
|
||||
'Translations'=>array('index'),
|
||||
'Manage',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List Translation', 'url'=>array('index')),
|
||||
array('label'=>'Create Translation', 'url'=>array('create')),
|
||||
);
|
||||
|
||||
Yii::app()->clientScript->registerScript('search', "
|
||||
$('.search-button').click(function(){
|
||||
$('.search-form').toggle();
|
||||
return false;
|
||||
});
|
||||
$('.search-form form').submit(function(){
|
||||
$('#translation-grid').yiiGridView('update', {
|
||||
data: $(this).serialize()
|
||||
});
|
||||
return false;
|
||||
});
|
||||
");
|
||||
?>
|
||||
|
||||
<h1>Manage Translations</h1>
|
||||
|
||||
<p>
|
||||
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b>
|
||||
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
|
||||
</p>
|
||||
|
||||
<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
|
||||
<div class="search-form" style="display:none">
|
||||
<?php $this->renderPartial('_search',array(
|
||||
'model'=>$model,
|
||||
)); ?>
|
||||
</div><!-- search-form -->
|
||||
|
||||
<?php $this->widget('zii.widgets.grid.CGridView', array(
|
||||
'id'=>'translation-grid',
|
||||
'dataProvider'=>$model->search(),
|
||||
'filter'=>$model,
|
||||
'columns'=>array(
|
||||
'id',
|
||||
'name',
|
||||
'textEn',
|
||||
'textRu',
|
||||
'textZh',
|
||||
array(
|
||||
'class'=>'CButtonColumn',
|
||||
),
|
||||
),
|
||||
)); ?>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/* @var $this TranslationController */
|
||||
/* @var $model Translation */
|
||||
|
||||
$this->breadcrumbs=array(
|
||||
'Translations'=>array('index'),
|
||||
'Create',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List Translation', 'url'=>array('index')),
|
||||
array('label'=>'Manage Translation', 'url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>Create Translation</h1>
|
||||
|
||||
<?php $this->renderPartial('_form', array('model'=>$model)); ?>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/* @var $this TranslationController */
|
||||
/* @var $dataProvider CActiveDataProvider */
|
||||
|
||||
$this->breadcrumbs=array(
|
||||
'Translations',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'Create Translation', 'url'=>array('create')),
|
||||
array('label'=>'Manage Translation', 'url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>Translations</h1>
|
||||
|
||||
<?php $this->widget('zii.widgets.CListView', array(
|
||||
'dataProvider'=>$dataProvider,
|
||||
'itemView'=>'_view',
|
||||
)); ?>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* @var $this TranslationController */
|
||||
/* @var $model Translation */
|
||||
|
||||
$this->breadcrumbs=array(
|
||||
'Translations'=>array('index'),
|
||||
$model->name=>array('view','id'=>$model->id),
|
||||
'Update',
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List Translation', 'url'=>array('index')),
|
||||
array('label'=>'Create Translation', 'url'=>array('create')),
|
||||
array('label'=>'View Translation', 'url'=>array('view', 'id'=>$model->id)),
|
||||
array('label'=>'Manage Translation', 'url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>Update Translation <?php echo $model->id; ?></h1>
|
||||
|
||||
<?php $this->renderPartial('_form', array('model'=>$model)); ?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/* @var $this TranslationController */
|
||||
/* @var $model Translation */
|
||||
|
||||
$this->breadcrumbs=array(
|
||||
'Translations'=>array('index'),
|
||||
$model->name,
|
||||
);
|
||||
|
||||
$this->menu=array(
|
||||
array('label'=>'List Translation', 'url'=>array('index')),
|
||||
array('label'=>'Create Translation', 'url'=>array('create')),
|
||||
array('label'=>'Update Translation', 'url'=>array('update', 'id'=>$model->id)),
|
||||
array('label'=>'Delete Translation', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
|
||||
array('label'=>'Manage Translation', 'url'=>array('admin')),
|
||||
);
|
||||
?>
|
||||
|
||||
<h1>View Translation #<?php echo $model->id; ?></h1>
|
||||
|
||||
<?php $this->widget('zii.widgets.CDetailView', array(
|
||||
'data'=>$model,
|
||||
'attributes'=>array(
|
||||
'id',
|
||||
'name',
|
||||
'textEn',
|
||||
'textRu',
|
||||
'textZh',
|
||||
),
|
||||
)); ?>
|
||||
Reference in new issue
Block a user