mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-29 19:33:20 +01:00
Merge pull request #749 from OpenGeoLabs/markdown_fix
fix markdown bug in resolution text
This commit is contained in:
commit
78348590b0
@ -748,6 +748,10 @@ class Ticket(models.Model):
|
||||
def get_markdown(self):
|
||||
return get_markdown(self.description)
|
||||
|
||||
@property
|
||||
def get_resolution_markdown(self):
|
||||
return get_markdown(self.resolution)
|
||||
|
||||
|
||||
class FollowUpManager(models.Manager):
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
<th colspan='2'>{% trans "Resolution" %}{% ifequal ticket.get_status_display "Resolved" %} <a href='?close'><button type="button" class="btn btn-warning btn-sm">{% trans "Accept and Close" %}</button></a>{% endifequal %}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>{{ ticket.resolution|force_escape|urlizetrunc:50|linebreaksbr }}</td>
|
||||
<td colspan='2'>{{ ticket.get_resolution_markdown|urlizetrunc:50|linebreaksbr }}</td>
|
||||
</tr>{% endif %}
|
||||
<tr>
|
||||
<th>{% trans "Due Date" %}</th>
|
||||
|
@ -269,7 +269,7 @@ def followup_edit(request, ticket_id, followup_id):
|
||||
new_followup.user = followup.user
|
||||
new_followup.save()
|
||||
# get list of old attachments & link them to new_followup
|
||||
attachments = FolllowUpAttachment.objects.filter(followup=followup)
|
||||
attachments = FollowUpAttachment.objects.filter(followup=followup)
|
||||
for attachment in attachments:
|
||||
attachment.followup = new_followup
|
||||
attachment.save()
|
||||
@ -1581,7 +1581,7 @@ def attachment_del(request, ticket_id, attachment_id):
|
||||
if not _is_my_ticket(request.user, ticket):
|
||||
raise PermissionDenied()
|
||||
|
||||
attachment = get_object_or_404(FolllowUpAttachment, id=attachment_id)
|
||||
attachment = get_object_or_404(FollowUpAttachment, id=attachment_id)
|
||||
if request.method == 'POST':
|
||||
attachment.delete()
|
||||
return HttpResponseRedirect(reverse('helpdesk:view', args=[ticket_id]))
|
||||
|
Loading…
Reference in New Issue
Block a user