Changeset 208

User picture

Author: hemantic

(2009/05/16 05:40) About 3 years ago

Comments template altered

Affected files

Updated apps/frontend/modules/post_comment/templates/_comment.php Download diff

207208
1
<? use_helper('Javascript', 'Text', 'Parse'); ?> 
1
<? use_helper('Javascript', 'Text', 'Parse'); ?> 
2
<div id="comment<? echo $comment->getId() ?>">
2
<div id="comment<? echo $comment->getId() ?>" class="comment">
3
    <? if(!isset($servertime) || !$servertime): ?>
3
4
        <nobr><span id='commenttime<? echo $comment->getId() ?>'><? echo strtotime($comment->getCreatedAt())*1000 ?></span></nobr>
4
<? if(!isset($level)) $level = 0; ?>
5
    <? else: ?>
5
6
        <nobr><? echo $comment->getCreatedAt().' GMT' ?></nobr>
6
    <div class="avatar"><img src="/images/comments.gif" title="<? echo $comment->getCreatedAt().' GMT' ?>" /></div>
7
    <? endif ?>
7
	<div class="txt">
8
    <? echo link_to($comment->getUser()->getUsername().':', 'user/'.$comment->getUser()->getUsername(),'absolute=true') ?>
8
		<? echo auto_link_text(parsetext(nl2br($comment->getComment(ESC_RAW)))) ?>
9
    <? echo auto_link_text(parsetext(nl2br($comment->getComment(ESC_RAW)))) ?>
9
		&mdash
10
    <? if(!isset($level)) $level = 0; ?>
10
		<span><? echo link_to($comment->getUser()->getUsername(), 'user/'.$comment->getUser()->getUsername(),'absolute=true') ?>
11
    <? if(!isset($noreply) || !$noreply): ?>
11
<? if($sf_user->isAuthenticated()): ?>
12
        <? if($sf_user->isAuthenticated()): ?>
12
		</span>
13
            <small>
13
	<? if(!isset($noreply) || !$noreply): ?><? if($sf_user->isAuthenticated()): ?>
14
                <? echo '('.link_to_function(__('ответить'), '$j(".addcomment").hide("fast");if($j("#comment_reply'.$comment->getId().'").is(":visible"))$j("#comment_reply'.$comment->getId().'").hide("fast"); else $j("#comment_reply'.$comment->getId().'").show("fast")').')' ?>
14
		<span class="reply-link">
15
            </small>
15
			<? echo link_to_function(__('ответить↓'), '$j(".addcomment").hide("fast");if($j("#comment_reply'.$comment->getId().'").is(":visible"))$j("#comment_reply'.$comment->getId().'").hide("fast"); else $j("#comment_reply'.$comment->getId().'").show("fast")') ?>
16
            <div id="comment_reply<? echo $comment->getId() ?>" class='addcomment' style="display:none; margin:<? echo  ($level+1)*10?>;">
16
		</span>
17
                <? include_partial('post_comment/addComment', array('post' => $comment->getPost(), 'parent' => $comment)) ?>
17
		<div id="comment_reply<? echo $comment->getId() ?>" class='addcomment'>
18
            </div>
18
			<? include_partial('post_comment/addComment', array('post' => $comment->getPost(), 'parent' => $comment)) ?>
19
        <? endif ?>
19
		</div>
20
    <div id="comment_list<? echo $comment->getId() ?>" style="margin:<? echo  ($level+1)*10?>;">
20
	<? endif ?><? endif ?>
21
        <? include_partial('post_comment/commentList', array('comments' => $comment->getComments(), 'level' => $level+1)) ?>
21
<? endif ?>
22
    </div>
22
	</div>
23
    <? endif ?>
24
</div>
23
</div>
25
<script type="text/javascript">
24
<div id="comment_list<? echo $comment->getId() ?>" style="margin-left:<? echo  ($level+1)*20?>;">
26
    if(typeof $j == 'function')
25
	<? include_partial('post_comment/commentList', array('comments' => $comment->getComments(), 'level' => $level+1)) ?>
27
        $j(document).ready(function()
26
</div>
28
        {
29
            var timeid = '#commenttime<? echo $comment->getId() ?>';
30
            var nowdate = new Date();
31
            nowdate.setTime($j(timeid).text());
32
            $j(timeid).text(nowdate.toLocaleString());
33
        });
34
</script>

Added symfony.bat

Show contents

Updated web/css/Base.css Download diff

207208
214
{
214
{
215
    color: #666;
215
    color: #666;
216
}
216
}
217
218
#comment_list {
219
	padding-top:20px;
220
	display:block;
221
}
222
223
.comment {
224
	padding-left:18px;
225
    overflow:hidden;
226
	margin-bottom:10px;
227
}
228
229
.comment .avatar {
230
	display:block;
231
	float:left;
232
	position:relative;
233
	left:-18px;
234
	margin-right:-15px;
235
}
236
237
.comment span a {
238
	font-size: 11px;
239
	color:#666;
240
}
241
242
.comment span.reply-link a {
243
	color:#999;
244
	text-decoration:none;
245
}
246
247
.addcomment {
248
	margin-top:5px;
249
	display:none;
250
}
251
252
.addcomment textarea {
253
	margin-bottom:5px;
254
}
255
217
.pagination
256
.pagination
218
{
257
{
219
    font-size: 80%;
258
    font-size: 80%;