예제 #1
0
 /**
  * Updated mediafile by id
  * @param $id
  * @return array
  */
 public function actionUpdate($id)
 {
     $model = Mediafile::findOne($id);
     $message = Module::t('main', 'Changes not saved.');
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         $message = Module::t('main', 'Changes saved!');
     }
     Yii::$app->session->setFlash('mediafileUpdateResult', $message);
     return $this->renderPartial('info', ['model' => $model, 'strictThumb' => null]);
 }
예제 #2
0
}
?>
            <p><?php 
echo Module::t('main', 'Now using next thumbnails presets');
?>
:</p>
            <ul>
                <?php 
foreach ($this->context->module->thumbs as $preset) {
    ?>
                    <li><strong><?php 
    echo $preset['name'];
    ?>
:</strong> <?php 
    echo $preset['size'][0] . ' x ' . $preset['size'][1];
    ?>
</li>
                <?php 
}
?>
            </ul>
            <p><?php 
echo Module::t('main', 'If you change the thumbnails sizes, it is strongly recommended to make resize all thumbnails.');
?>
</p>
            <?php 
echo Html::a(Module::t('main', 'Do resize thumbnails'), ['file/resize'], ['class' => 'btn btn-danger']);
?>
        </div>
    </div>
</div>