<div> <?php $this->widget('CTreeView', array('data' => $arrTrees, 'animated' => 'fast', 'htmlOptions' => array('class' => 'jlb_treeview treeview'))); ?> </div> <script> var box = window.parent.getDialog(); box.dialog("option", { title: "<?php echo NewsModule::t('Manage News Categories'); ?> ", width: 500, height: 400, minWidth: 500, minHeight: 400, buttons: { "<?php echo NewsModule::t('Create New Category'); ?> ": function() { window.parent.showDialog("<?php echo $this->createAbsoluteUrl('/news/manage_categories/create'); ?> "); } } }); </script>
<?php $this->menu = array(array('label' => NewsModule::t('Add news'), 'url' => array('create')), array('label' => NewsModule::t('Edit news'), 'url' => array('update', 'id' => $model->id)), array('label' => tt('Delete news', 'news'), 'url' => '#', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => tt('Are you sure you want to delete this item?')))); $this->renderPartial('//modules/news/views/view', array('model' => $model));
private function __getDataTreeChilds($childrens, $moving = null) { $arrTrees = array(); $length = count($childrens); foreach ($childrens as $index => $child) { $strChildId = $child['item']->id; $linkUp = $index == 0 ? '' : '<a title="' . NewsModule::t('Move Up') . '" href="' . $this->createAbsoluteUrl('/news/manage_categories/moveup', array('id' => $strChildId)) . '"><img src="' . $this->__baseScriptUrl . '/uparrow.png" /></a>'; $linkDown = $index == $length - 1 ? '<span style="display:inline-block;width:16px"></span>' : '<a title="' . NewsModule::t('Move Down') . '" href="' . $this->createAbsoluteUrl('/news/manage_categories/movedown', array('id' => $strChildId)) . '"><img src="' . $this->__baseScriptUrl . '/downarrow.png" /></a>'; $linkUpdate = '<a title="' . NewsModule::t('Update') . '" href="' . $this->createAbsoluteUrl('/news/manage_categories/update', array('id' => $strChildId)) . '"><img src="' . $this->__baseScriptUrl . '/update.png" /></a>'; $linkDelete = '<a title="' . NewsModule::t('Delete') . '" onClick="if (!confirm(\'' . NewsModule::t('Are you sure you want to delete?') . '\')) return false;" href="' . $this->createAbsoluteUrl('/news/manage_categories/delete', array('id' => $strChildId)) . '"><img src="' . $this->__baseScriptUrl . '/delete.png" /></a>'; $title = $moving == $strChildId ? '<span style="color:#ff0000;">' . $child['item']->name . '</span>' : $child['item']->name; $row['text'] = $title . '<span style="float:right;">' . $linkUp . $linkDown . $linkUpdate . $linkDelete . '</span>'; $row['children'] = $this->__getDataTreeChilds($child['children'], $moving); $arrTrees[] = $row; } return $arrTrees; }
<?php $this->pageTitle = Yii::app()->name . ' - ' . NewsModule::t('Manage news'); $this->menu = array(array('label' => NewsModule::t('Add news'), 'url' => array('create'))); $this->adminTitle = NewsModule::t('Manage news'); ?> <?php $this->widget('CustomGridView', array('id' => 'news-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'afterAjaxUpdate' => 'function(){$("a[rel=\'tooltip\']").tooltip(); $("div.tooltip-arrow").remove(); $("div.tooltip-inner").remove();}', 'columns' => array(array('class' => 'CCheckBoxColumn', 'id' => 'itemsSelected', 'selectableRows' => '2', 'htmlOptions' => array('class' => 'center')), array('header' => tc('Name'), 'name' => 'title_' . Yii::app()->language, 'type' => 'raw', 'value' => 'CHtml::link(CHtml::encode($data->getStrByLang("title")), $data->url)'), array('name' => 'dateCreated', 'type' => 'raw', 'filter' => false, 'htmlOptions' => array('style' => 'width:130px;')), array('class' => 'bootstrap.widgets.TbButtonColumn', 'deleteConfirmation' => tc('Are you sure you want to delete this item?'), 'viewButtonUrl' => '$data->url')))); $this->renderPartial('//site/admin-select-items', array('url' => '/news/backend/main/itemsSelected', 'id' => 'news-grid', 'model' => $model, 'options' => array('delete' => Yii::t('common', 'Delete'))));
$this->endWidget(); ?> </div><!-- form --> <script> var box = window.parent.getDialog(); box.dialog("option", { title: "<?php echo $model->isNewRecord ? NewsModule::t('Create New Category') : NewsModule::t('Update Category') . ' (' . CHtml::encode($model->name) . ')'; ?> ", width: 500, height: 500, minWidth: 500, minHeight: 500, buttons: { "<?php echo NewsModule::t('Manage Categories'); ?> ": function() { window.parent.showDialog("<?php echo $this->createAbsoluteUrl('/news/manage_categories/admin'); ?> "); }, "<?php echo $model->isNewRecord ? NewsModule::t('Create') : NewsModule::t('Save'); ?> ": function() { $('#category-form').submit(); } } }); </script>
<?php $this->pageTitle .= ' - ' . NewsModule::t('News') . ' - ' . CHtml::encode($model->getStrByLang('title')); $this->breadcrumbs = array(NewsModule::t('News') => array('/news/main/index'), truncateText(CHtml::encode($model->getStrByLang('title')), 10)); ?> <!--<h1 class="title highlight-left-right"> <span><?php echo CHtml::encode($model->getStrByLang('title')); ?> </span> </h1>--> <!-- One article page --> <section class="container-full"> <div class="one-article"> <h2><?php echo CHtml::encode($model->getStrByLang('title')); ?> </h2> <div class="clearfix"> <span class="pull-left"><?php echo $model->dateCreatedLong; ?> </span> <span class="pull-right">Автор: <a href="">Сергей Есенин</a></span> </div>
echo '</div>'; echo '<div class="clear"> </div>'; } foreach ($items as $item) { echo '<div class="news-items">'; echo '<p><font class="date">' . $item->pubDate . '</font></p>'; //echo CHtml::link($item->title, $item->getUrl(), array('class'=>'title')); echo '<p><font class="title">' . $item->title . '</font></p>'; echo '<p class="desc">'; echo $item->description; echo '</p>'; echo '<p>'; echo CHtml::link(NewsModule::t('Read more »'), $item->link); echo '</p>'; echo '</div>'; if ($item->is_show == 0) { $item->is_show = 1; $item->update('is_show'); } } } if (!$items) { echo NewsModule::t('News list is empty.'); } if ($pages) { echo '<div class="clear"> </div>'; echo '<div class="pagination">'; $this->widget('itemPaginator', array('pages' => $pages, 'header' => '', 'showHidden' => true)); echo '</div>'; echo '<div class="clear"> </div>'; }
<div class="h_module_products_category_tree"> <?php echo $categories; ?> </div> <?php if (!Yii::app()->user->isGuest && Yii::app()->user->superuser == 1) { ?> <div class="h-admin-manage"> <a class="h-dialog-link" href="<?php echo Yii::app()->createAbsoluteUrl('/news/manage_categories/admin'); ?> "><?php echo NewsModule::t('Manage Categories'); ?> </a> </div> <?php }
<?php $this->pageTitle = Yii::app()->name . ' - ' . NewsModule::t('Edit news'); $this->menu = array(array('label' => tt('Manage news'), 'url' => array('admin')), array('label' => NewsModule::t('Add news'), 'url' => array('create')), array('label' => tt('Delete news', 'news'), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => tc('Are you sure you want to delete this item?')))); $this->adminTitle = NewsModule::t('Edit news') . ': <i>' . CHtml::encode($model->title) . '</i>'; ?> <?php echo $this->renderPartial('/backend/_form', array('model' => $model));
<div class="carousel-inner"> <div class="active item"> <img src="/themes/atlas/temp/images/slides/slide-10.png"> </div> <div class="item"> <img src="/themes/atlas/temp/images/slides/slide-4.png"> </div> </div> </div> </section> <!--<h1 class="title highlight-left-right"> <span> <?php echo NewsModule::t('News'); ?> </span> </h1>--> <!-- News --> <section class="container-full"> <div id="news"> <div id="filter-nav" class="filter-options"> <button class="btn btn-filter active" data-group="all">Все новости</button> <button class="btn btn-filter" data-group="market-property">Рынок недвижимости</button> <button class="btn btn-filter" data-group="around-world">Вокруг света</button> <button class="btn btn-filter" data-group="moscow-region">Москва и область</button> <button class="btn btn-filter" data-group="questions">Вопросы права</button> </div>
<?php echo NewsModule::t('No results found.'); if (!Yii::app()->user->isGuest && Yii::app()->user->superuser == 1) { ?> <div> <a class="h-dialog-link" href="<?php echo Yii::app()->createAbsoluteUrl('/news/manage_items/admin', array('category' => isset($_GET['category']) ? $_GET['category'] : '')); ?> "><?php echo NewsModule::t('Manage News Items'); ?> </a> </div> <?php }
<?php $this->pageTitle = Yii::app()->name . ' - ' . NewsModule::t('Add news'); $this->menu = array(array('label' => tt('Manage news'), 'url' => array('admin'))); $this->adminTitle = NewsModule::t('Add news'); ?> <?php echo $this->renderPartial('/backend/_form', array('model' => $model));
<?php $this->pageTitle .= ' - ' . NewsModule::t('News') . ' - ' . CHtml::encode($model->getStrByLang('title')); $this->breadcrumbs = array(NewsModule::t('News') => array('/news/main/index'), truncateText(CHtml::encode($model->getStrByLang('title')), 10)); ?> <h2><?php echo CHtml::encode($model->getStrByLang('title')); ?> </h2> <span class="date"><?php echo NewsModule::t('Created on') . ' ' . $model->dateCreated; ?> </span> <?php if ($model->image) { ?> <?php $src = $model->image->getFullThumbLink(); ?> <?php if ($src) { ?> <div class="clear"></div> <div class="news-image"> <?php echo CHtml::link(CHtml::image($src, $model->getStrByLang('title')), $model->image->fullHref(), array('class' => 'fancy')); ?> </div> <div class="clear"></div>
<div> <?php $this->widget('zii.widgets.grid.CGridView', array('id' => 'news-item-grid', 'dataProvider' => $model->search(), 'columns' => array('id', 'title', 'short_content', array('class' => 'CButtonColumn', 'template' => '{update}{delete}', 'buttons' => array('update' => array('url' => 'Yii::app()->createAbsoluteUrl("/news/manage_items/update",array("id"=>$data->primaryKey,"category"=>isset($_GET["category"])?$_GET["category"]:""))')))))); ?> </div> <script> var box = window.parent.getDialog(); box.dialog("option", { title: "<?php echo NewsModule::t('Manage News Items') . (isset($_GET['category']) && $_GET['category'] ? " (Of a Category)" : " (All News)"); ?> ", width: 500, height: 360, minWidth: 500, minHeight: 360, buttons: { "<?php echo NewsModule::t('Create New News'); ?> ": function() { window.parent.showDialog("<?php echo $this->createAbsoluteUrl('/news/manage_items/create', array('category' => isset($_GET['category']) ? $_GET['category'] : '')); ?> "); } } }); </script>