-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomment.blade.php
More file actions
45 lines (45 loc) · 1.61 KB
/
comment.blade.php
File metadata and controls
45 lines (45 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
$emailPosition = strripos($comment['body'], "\r\nOn");
?>
<div class="well">
<div class="media">
<a class="pull-left" href="https://github.com/{{ $comment['user']['login'] }}" target="_blank">
{{ HTML::image($comment['user']['avatar_url'], null, array('class' => 'media-object')) }}
<center>{{ $comment['user']['login'] }}</center>
</a>
<small class="text-primary">
{{ date('F jS, Y \a\t h:ia', strtotime($comment['created_at'])) }}
</small>
@if ($comment['user']['login'] == $activeUser->githubLogin)
<span class="pull-right">
<a href="javascript:void(0);" onClick="editComment('comment_body_{{ $comment['id'] }}');"><i class="fa fa-pencil text-disabled"></i></a>
{{ HTML::linkIcon('/github/delete-comment/'. $githubUser .'/'. $repo .'/'. $issue['number'] .'/'. $comment['id'], 'fa fa-times-circle-o', null, array('class' => 'confirm-remove text-disabled')) }}
</span>
@endif
<div class="media-body">
<!-- <a href="javascript:void(0);" id="comment_body_{{ $comment['id'] }}" data-value="test"> -->
@if ($emailPosition !== false)
{{ $github->api('markdown')->render(nl2br(substr($comment['body'], 0, $emailPosition))) }}
@else
{{ $github->api('markdown')->render(nl2br($comment['body'])) }}
@endif
<!-- </a> -->
</div>
</div>
<br />
<div class="clearfix"></div>
</div>
@section('js')
<script>
$('#comment_body_{{ $comment['id'] }}').editable({
send: 'never',
title: 'Edit Comment',
type: 'textarea',
placement: 'right',
toggle: 'manual',
});
function editComment(commentBody) {
$('#'+ commentBody).editable('toggle');
}
</script>
@stop