Skip to content

Commit 729e77e

Browse files
committed
Different notification resend modal for each reply
1 parent 120e229 commit 729e77e

3 files changed

Lines changed: 8 additions & 12 deletions

File tree

src/Views/tickets/partials/comments/list.blade.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@
8484
<div class="card-body">
8585
<div class="row">
8686
<div class="{{ $setting->grab('ticket_attachments_feature') && $comment->attachments->count() > 0 ? 'col-sm-7' : 'col-sm-12' }}"><div id="jquery_comment_edit_{{$comment->id}}" class="summernote-text-wrapper"> {!! $comment->html !!} </div>
87-
@if ($u->currentLevel() > 1 && $u->canManageTicket($ticket->id))
88-
@include('panichd::tickets.partials.comments.modal_edit')
89-
@endif
9087
</div>
9188
@if($setting->grab('ticket_attachments_feature') && $comment->attachments->count() > 0)
9289
<div class="col-sm-5 attached_list">
@@ -98,9 +95,11 @@
9895
</div>
9996
@if ($u->currentLevel() > 1 && $u->canManageTicket($ticket->id))
10097
@if ($comment->type=='note')
101-
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#comment-modal-edit-{{$comment->id}}">{{ trans('panichd::lang.btn-edit') }}</button>
98+
@include('panichd::tickets.partials.comments.modal_edit')
99+
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#comment-modal-edit-{{$comment->id}}">{{ trans('panichd::lang.btn-edit') }}</button>
102100
@elseif($comment->type=='reply')
103-
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#email-resend-modal" data-id="{{$comment->id}}" data-owner="{{$ticket->user->name}}">{{ trans('panichd::lang.show-ticket-email-resend') }}</button>
101+
@include('panichd::tickets.partials.comments.modal_resend_emails')
102+
<button type="button" class="btn btn-default btn-sm" data-toggle="modal" data-target="#email-resend-modal-{{$comment->id}}">{{ trans('panichd::lang.show-ticket-email-resend') }}</button>
104103
@endif
105104

106105
@endif
@@ -121,6 +120,5 @@
121120
])
122121
!!}
123122
{!! CollectiveForm::close() !!}
124-
@include('panichd::tickets.partials.comments.modal_resend_emails')
125123
@include('panichd::tickets.partials.comments.modal_delete')
126124
@endif

src/Views/tickets/partials/comments/modal_resend_emails.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<div class="modal fade jquery_panel_hightlight" id="email-resend-modal" tabindex="-1" role="dialog" >
1+
<div id="email-resend-modal-{{$comment->id}}" class="modal fade jquery_panel_hightlight notification-resend-modal" tabindex="-1" role="dialog" >
22
<div class="modal-dialog model-lg" role="document">
3-
<div class="modal-content">
3+
<div class="modal-content">
44
{!! CollectiveForm::open(['method' => 'POST', 'route' => $setting->grab('main_route').'-notification.resend']) !!}
55
{!! CollectiveForm::hidden('comment_id', $comment->id, ['id'=>'comment_id']) !!}
66
<div class="modal-header">
@@ -30,4 +30,4 @@
3030
{!! CollectiveForm::close() !!}
3131
</div>
3232
</div>
33-
</div>
33+
</div>

src/Views/tickets/partials/comments/scripts.blade.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,8 @@
8888
8989
9090
// Comment (reply) notifications resend modal
91-
$( "#email-resend-modal" ).on('show.bs.modal', function (e) {
91+
$( ".notification-resend-modal" ).on('show.bs.modal', function (e) {
9292
var button = $(e.relatedTarget);
93-
$(this).find('#owner').text($(button).attr('data-owner'));
94-
$(this).find('#comment_id').val($(button).attr('data-id'))
9593
});
9694
});
9795
</script>

0 commit comments

Comments
 (0)