<?php foreach ($this->lang->all as $language) { ?> <div class="newAlbumLangContainer clearfix"> <div class="row"> <?php echo operations::flag($language) . ' ' . CHtml::label($this->tr("newAlbumName"), 'newAlbumName', array()); ?> <br /> <?php echo CHtml::textField('newAlbumName_' . $language, '', array('class' => 'inputNewAlbum')); ?> </div> <div class="row"> <?php echo operations::flag($language) . ' ' . CHtml::label($this->tr("newAlbumDescription"), 'newAlbumDescription', array()); ?> <br /> <?php echo CHtml::textArea('newAlbumDescription_' . $language, '', array('class' => 'inputNewAlbum cle')); ?> </div> </div> <?php } ?> </div> <div class="tagsNewGallery clearfix"> <div class="row"> <?php echo CHtml::label($this->tr("tags"), 'newAlbumTags', array());
private function publishForLevel() { $baseUrl = Yii::app()->assetManager->publish($this->path->assets); //to register lang for pluploader $lang = $this->conf->pluploadLanguage === 'auto' ? Yii::app()->language : $this->conf->pluploadLanguage; $runtimes = $this->conf->runtimes; //maxim Mb size of file $max_file_size = $this->conf->max_file_size; //generate unique name for uploaded files $unique_names = $this->conf->unique_names; //accepted extensions in file selector from uploader $extensions = str_replace('|', ',', $this->conf->accept); //if unlimited set to 9999 $maxUploadable = $this->conf->max != -1 ? $this->conf->max : 9999; Yii::app()->request->cookies['maxUploadable'] = new CHttpCookie('maxUploadable', $maxUploadable); if (is_dir($this->path->assets)) { // ------------------ uploader Yii::app()->clientScript->registerCoreScript('cookie'); Yii::app()->clientScript->registerCssFile($baseUrl . '/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css'); Yii::app()->clientScript->registerCssFile($baseUrl . '/themes/' . $this->conf->cssTheme . '/cpEditor.css'); if (strpos($runtimes, 'browserplus')) { Yii::app()->clientScript->registerScriptFile($baseUrl . '/plupload/browserplus-min.js', CClientScript::POS_END); } Yii::app()->clientScript->registerScriptFile($baseUrl . '/plupload/plupload.full.js', CClientScript::POS_END); if (file_exists($this->path->assets . '/plupload/i18n/' . $lang . '.js')) { Yii::app()->clientScript->registerScriptFile($baseUrl . '/plupload/i18n/' . $lang . '.js', CClientScript::POS_END); } Yii::app()->clientScript->registerScriptFile($baseUrl . '/plupload/jquery.plupload.queue/jquery.plupload.queue.js', CClientScript::POS_END); // ----------------- end uploader if ($this->conf->useWysiwyg) { Yii::app()->clientScript->registerCssFile($baseUrl . '/cleditor/jquery.cleditor.css'); Yii::app()->clientScript->registerScriptFile($baseUrl . '/cleditor/jquery.cleditor.min.js', CClientScript::POS_END); Yii::app()->clientScript->registerScriptFile($baseUrl . '/cleditor/jquery.cleditor.xhtml.min.js', CClientScript::POS_END); } Yii::app()->clientScript->registerScriptFile($baseUrl . '/jquery.checkbox.min.js', CClientScript::POS_END); Yii::app()->clientScript->registerScriptFile($baseUrl . '/jquery.bteditinplace.min.js', CClientScript::POS_END); Yii::app()->clientScript->registerScriptFile($baseUrl . '/fbgallery.min.js', CClientScript::POS_END); $activeThemeFolder = $this->url->activeThemeFolder; Yii::app()->clientScript->registerScript('startGallery', "startGallery('{$activeThemeFolder}'),putUploader('{$baseUrl}','{$max_file_size}','{$unique_names}','{$extensions}','{$runtimes}')", CClientScript::POS_READY); } else { throw new Exception($this->tr('errFolder')); } $lang = $this->conf->isMultilingual ? operations::flag($this->lang->active) : false; Yii::app()->clientScript->registerScript('editor', "editThumbnailInfo('{$lang}'); removeImages( '" . $this->tr('removeImage') . "', '" . $this->tr('deleteImage') . "', '" . $this->tr('deleteImages') . "', '" . $this->tr('deleteAllImages') . "', '" . $this->tr('ok') . "', '" . $this->tr('cancel') . "', '" . Yii::app()->request->requestUri . "');"); if ($this->levelAccess === 2) { Yii::app()->clientScript->registerCssFile($baseUrl . '/themes/' . $this->conf->cssTheme . '/cpanel.css'); } }