%PDF- %PDF-
Direktori : /home/bitrix/www/bitrix/templates/UB/components/bitrix/forum.topic.reviews/ajax/ |
Current File : //home/bitrix/www/bitrix/templates/UB/components/bitrix/forum.topic.reviews/ajax/template.php |
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); // ************************* Input params*************************************************************** if (LANGUAGE_ID == 'ru'): $path = str_replace(array("\\", "//"), "/", dirname(__FILE__)."/ru/script.php"); include($path); endif; if (!empty($arResult["MESSAGES"])): ?> <? $iCount = 0; foreach ($arResult["MESSAGES"] as $res): $iCount++; $author = getUserMeta($res["AUTHOR_ID"]); $profile = getUserProfile($res["AUTHOR_ID"]); ?> <br/> <table cellspacing="0" border="0" class="reviews-post-table <?=($iCount == 1 ? "reviews-post-first " : "")?><? ?><?=($iCount == count($arResult["MESSAGES"]) ? "reviews-post-last " : "")?><? ?><?=($iCount%2 == 1 ? "reviews-post-odd " : "reviews-post-even ")?><? ?><?=(($res["APPROVED"] == 'Y') ? "" : "reviews-post-hidden") ?>" id="message<?=$res["ID"]?>"> <tbody><tr> <td class="rpt_ava" > <div class="col-new"> <div class="portfolio-item"> <a href="<?=$profile['LINK']?>" class="portfolio-item-link"><img src="<?=$author['AVATAR']?>"></a> <div class="clearfix"></div> </div> </div> </td> <td class="rpt_first"> <?if ($arParams["SHOW_RATING"] == "Y") {?> <div class="review-rating rating_vote_graphic"> <? $arRatingParams = Array( "ENTITY_TYPE_ID" => "FORUM_POST", "ENTITY_ID" => $res["ID"], "OWNER_ID" => $res["AUTHOR_ID"], "PATH_TO_USER_PROFILE" => "/user/#USER_ID#/" ); if (!isset($res['RATING'])) $res['RATING'] = array( "USER_VOTE" => 0, "USER_HAS_VOTED" => 'N', "TOTAL_VOTES" => 0, "TOTAL_POSITIVE_VOTES" => 0, "TOTAL_NEGATIVE_VOTES" => 0, "TOTAL_VALUE" => 0 ); $arRatingParams = array_merge($arRatingParams, $res['RATING']); $GLOBALS["APPLICATION"]->IncludeComponent( "bitrix:rating.vote", $arParams["RATING_TYPE"], $arRatingParams, $component, array("HIDE_ICONS" => "Y")); ?> </div> <? } ?> <div> <a name="message<?=$res["ID"]?>"></a><b><a href="<?=$profile['LINK']?>"><?=$author['NAME']?></a></b> <br/><span class='message-post-date'><?=FormatDate('d.m.Y H:i', strtotime($res["POST_DATE"]))?></span> </div> </td> <td class="rpt_comment"> <div class="testimonial item"><div class="testimonials-arrow"></div> <div class="testimonial-content" id="message_text_<?=$res["ID"]?>"> <?=$res["~POST_MESSAGE_TEXT"]?> </div> <? foreach ($res["FILES"] as $arFile): ?><div class="reviews-message-img"><? ?><?$GLOBALS["APPLICATION"]->IncludeComponent( "bitrix:forum.interface", "show_file", Array( "FILE" => $arFile, "WIDTH" => $arResult["PARSER"]->image_params["width"], "HEIGHT" => $arResult["PARSER"]->image_params["height"], "CONVERT" => "N", "FAMILY" => "FORUM", "SINGLE" => "Y", "RETURN" => "N", "SHOW_LINK" => "Y"), null, array("HIDE_ICONS" => "Y")); ?></div><? endforeach; ?> <? if ($arResult["SHOW_POST_FORM"] == "Y") { ?> <div class="reviews-post-reply-buttons"><noindex> <? if ($arResult["PANELS"]["MODERATE"] == "Y") { ?> <span class="separator"></span> <a rel="nofollow" href="<?=$res["URL"]["MODERATE"]?>" class="reviews-button-small" <? if ($arParams['AJAX_POST'] == 'Y') { ?>onclick="return replyActionComment(this, 'MODERATE');"<? } ?>><?=GetMessage((($res["APPROVED"] == 'Y') ? "F_HIDE" : "F_SHOW"))?></a> <? } ?> <? if ($arResult["PANELS"]["DELETE"] == "Y") { ?> <span class="separator"></span> <a rel="nofollow" href="<?=$res["URL"]["DELETE"]?>" class="reviews-button-small" <? if ($arParams['AJAX_POST'] == 'Y') { ?>onclick="return replyActionComment(this, 'DEL');"<? } ?>><?=GetMessage("F_DELETE")?></a> <? } ?> <? if ($arParams["SHOW_RATING"] == "Y") { ?> <span class="rating_vote_text"> <span class="separator"></span> <? $arRatingParams = Array( "ENTITY_TYPE_ID" => "FORUM_POST", "ENTITY_ID" => $res["ID"], "OWNER_ID" => $res["AUTHOR_ID"], "PATH_TO_USER_PROFILE" => "/user/#USER_ID#/" ); if (!isset($res['RATING'])) $res['RATING'] = array( "USER_VOTE" => 0, "USER_HAS_VOTED" => 'N', "TOTAL_VOTES" => 0, "TOTAL_POSITIVE_VOTES" => 0, "TOTAL_NEGATIVE_VOTES" => 0, "TOTAL_VALUE" => 0 ); $arRatingParams = array_merge($arRatingParams, $res['RATING']); $GLOBALS["APPLICATION"]->IncludeComponent( "bitrix:rating.vote", $arParams["RATING_TYPE"], $arRatingParams, $component, array("HIDE_ICONS" => "Y")); ?> </span> <? } ?> </noindex></div> <? } ?> </div> </div> </td></tr> </tbody> </table> <? endforeach; endif; if (strlen($arResult["NAV_STRING"]) > 0 && $arResult["NAV_RESULT"]->NavPageCount > 1 && $arResult["NAV_RESULT"]->NavPageNomer < $arResult["NAV_RESULT"]->NavPageCount): ?> <div style="float:right"><br/> <a class="btn-small btn-color btn-pad" href="javascript:void(0);" onclick="loadPrevComments(this,<?=$arResult["NAV_RESULT"]->NavPageNomer+1;?>,<?=$arResult["NAV_RESULT"]->NavPageSize;?>,<?=$arParams['FORUM_ID']?>,<?=$arResult['ELEMENT']['PRODUCT']['ID']?>)"><?=GetMessage("SEE_PREVIOUS_COMMENTS")?></a> </div> <? endif; ?>