public function getList() { if (!Yii::app()->user->isGuest) { $list = Notifications::findByAttributes(array("user_id" => Yii::app()->user->id, "is_new" => 1)); $cout = ""; if (sizeof($list) > 0) { $cout .= '<div id="notificationsBlock">'; foreach ($list as $item) { $cout .= '<div class="NBItem"> <div class="NHeader">' . $item->subject . '<div class="floatRight"><a href="#" class="NHide" id="' . $item->id . '">скрыть</a> <a href="#" class="NBdesc">подробнее</a></div></div> <div class="displayNone"> Дата: <font>' . SiteHelper::getDateOnFormat($item->date, "d.m.Y") . '</font><br/> <div class="textAlignLeft"> ' . $item->message . ' </div> </div> </div>'; } $cout .= '</div> <script type="text/javascript"> $( document).ready( function() { $(".NHide").click( function() { $.ajax({ type: "GET", url: "' . SiteHelper::createUrl("/user/default/notificationHide/id") . '/"+this.id, success: function(msg){ if( msg > 0 ) { $( $( "#"+msg )[0].parentNode.parentNode.parentNode ).remove(); if( $( "#notificationsBlock .NBItem" ).length == 0 )$( "#notificationsBlock" ).hide(400); } } }); return false; }) $(".NBhide").click( function() { $.ajax( "' . SiteHelper::createUrl("/user/notifications/show/id") . '/"+this.id ); return false; }) $(".NBdesc").click( function() { var obj = $( this.parentNode.parentNode.parentNode ).find(".displayNone"); if( obj.css("display") == \'none\' ) { obj.show(500, "", function () { $( this ).find(".textAlignLeft").show(300); $( this ).addClass("greyBack"); $( this.parentNode ).find(".NBdesc").text( "кратко" ); }); } else { obj.find(".textAlignLeft").hide(300, \'\', function () { $( this.parentNode ).removeClass("greyBack"); $( this.parentNode ).hide(500); $( this.parentNode.parentNode).find(".NBdesc").text( "подробнее" ); }); } return false; }) }) </script>'; } return $cout; } return ""; }
?> "><?php echo $item->name; ?> </a> <br/><font class="smallGrey"><?php echo $dateFinish >= time() ? $item->status_id->name : Yii::t("user", "не активно"); ?> </font> </td> <td><?php echo $item->type_id->name; ?> </td> <td><?php echo SiteHelper::getDateOnFormat($dateFinish, "d.m.Y"); ?> </td> <td> <a href="#" class="aAction"></a> <div class="itemAction textAlignCenter"> <div> <?php if ($item->active == 1) { ?> <a href="#" class="publishLink" onclick="return ajaxAction( this, '<?php echo SiteHelper::createUrl("/user/firms/setPublish", array("id" => $item->id, "catalog" => "CatalogHotels")); ?> ', '' );"><?php echo Yii::t("user", "Снять с публикации"); ?>
} } ?> <td class="fieldID"><?php echo $item->id; ?> </td> <td><a href="<?php echo SiteHelper::createUrl("/console/comments/edit", array("id" => $item->id)); ?> "><?php echo $item->name; ?> </a></td> <td><?php echo SiteHelper::getDateOnFormat($item->date, "d.m.Y H:i"); ?> </td> <td><?php echo $catalogItemModel->name; ?> </td> <td><?php echo $status; ?> </td> <td class="fieldActions"> <a href="<?php echo SiteHelper::createUrl("/console/comments/edit", array("id" => $item->id)); ?> ">Редактировать</a>
echo SiteHelper::createUrl("/user/firmComments/description", array("id" => $service->id, "fid" => $item->id)); ?> " title="<?php echo Yii::t("page", "Описание акции/скидки"); ?> "><?php echo $service->name; ?> </a><br/> <?php echo SiteHelper::getSubTextOnWorld($service->description, 550); ?> <br/><br/> </td> <td class="textAlignCenter"><?php echo SiteHelper::getDateOnFormat($service->date, "d.m.Y H:i"); ?> </td> <td class="textAlignCenter"><?php echo $service->is_new == 1 ? "<div class=\"readNew\">новое<br/></div>" : ""; ?> <div class="publishStatus"><?php echo $service->active == 1 ? Yii::t("user", "опубликовано") : Yii::t("user", "не Опубликовано"); ?> </div></td> <td class="textAlignCenter"> <a href="#" class="aAction"></a> <div class="itemAction textAlignCenter"> <a href="<?php echo SiteHelper::createUrl("/user/firmComments/description", array("id" => $service->id, "fid" => $item->id)); ?>
if ($comm->user_id) { ?> <?php echo $comm->user_id->name; ?> <br/> <?php echo $comm->user_id->email; ?> <?php } ?> </td> <td> <?php echo SiteHelper::getDateOnFormat($comm->date, "d.m.Y"); ?> </td> <td class="textAlignCenter"><?php echo $comm->is_valid == 0 ? Yii::t("page", "нет") : Yii::t("page", "да"); ?> </td> <td> <a href="<?php echo SiteHelper::createUrl("/user/" . Yii::app()->controller->getId() . "/description", array("id" => $item->id, "comm_id" => $comm->id, "action" => "delComment")); ?> "><?php echo Yii::t("user", "Удалить"); ?> </a> <a href="<?php
<th class="TLFAction"><?php echo Yii::t("page", "статус"); ?> </th> <th></th> </tr> <?php foreach ($trees as $tree) { ?> <tr> <td><?php echo $tree->id; ?> </td> <td><?php echo $tree->date ? SiteHelper::getDateOnFormat("", "d.m.Y", $tree->date) : "-"; ?> </td> <td> <?php echo $tree->garden_id->country->name . "<br/><a href=\"" . SiteHelper::createUrl("/gardens/places", array("id" => $tree->garden_id->id)) . "\" target=\"_blank\" title=\"описания сада\">" . $tree->garden_id->name; ?> </a><br/> <?php echo "<a href=\"" . SiteHelper::createUrl("/gardens/place", array("id" => $tree->place_id->id)) . "\" target=\"_blank\" title=\"описания участка\">" . $tree->place_id->name; ?> , <?php echo "<a href=\"" . SiteHelper::createUrl("/gardens/tree", array("id" => $tree->tree_type->id)) . "\" target=\"_blank\" title=\"описания дерева\">" . $tree->tree_type->name; ?> </a>