diff --git a/helpdesk/migrations/0010_auto_20190620_0817.py b/helpdesk/migrations/0010_auto_20190620_0817.py new file mode 100644 index 0000000000000000000000000000000000000000..a3b4ec7a3bf9d569f003e5e6b7708d11a013d019 --- /dev/null +++ b/helpdesk/migrations/0010_auto_20190620_0817.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1.8 on 2019-06-20 06:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('helpdesk', '0009_auto_20190317_0917'), + ] + + operations = [ + migrations.AlterField( + model_name='queue', + name='description', + field=models.TextField(help_text='You can use plain text, Markdown or reStructuredText; see our <a href="/markup/help/" target="_blank">markup help</a> pages.'), + ), + migrations.AlterField( + model_name='ticket', + name='description', + field=models.TextField(help_text='You can use plain text, Markdown or reStructuredText; see our <a href="/markup/help/" target="_blank">markup help</a> pages.'), + ), + ] diff --git a/helpdesk/models.py b/helpdesk/models.py index f220a85b2ce5e84a457fb4b0b22d3d855f87a8f9..31a04016138c56939d07faa422e9874c6e9c48a7 100644 --- a/helpdesk/models.py +++ b/helpdesk/models.py @@ -34,7 +34,9 @@ class Queue(models.Model): """ name = models.CharField(max_length=64) slug = models.SlugField(allow_unicode=True, unique=True) - description = models.TextField() + description = models.TextField( + help_text=('You can use plain text, Markdown or reStructuredText; see our ' + '<a href="/markup/help/" target="_blank">markup help</a> pages.')) managing_group = models.ForeignKey('auth.Group', on_delete=models.CASCADE, related_name='managed_queues') response_groups = models.ManyToManyField('auth.Group') @@ -99,11 +101,8 @@ class Ticket(models.Model): 'seems most appropriate for your issue')) title = models.CharField(max_length=64, default='') description = models.TextField( - help_text=( - 'You can use ReStructuredText, see a ' - '<a href="https://devguide.python.org/documenting/#restructuredtext-primer" ' - 'target="_blank">primer on python.org</a>') - ) + help_text=('You can use plain text, Markdown or reStructuredText; see our ' + '<a href="/markup/help/" target="_blank">markup help</a> pages.')) publicly_visible = models.BooleanField( default=False, help_text=('Do you agree with this Ticket being made publicly visible ' diff --git a/helpdesk/templates/helpdesk/followup_form.html b/helpdesk/templates/helpdesk/followup_form.html index 0f31707e50ca2e0e370530ad49b2c2a54d57d2fa..68aa84c61aeee3f305c4da8d88f795217e8bdbdd 100644 --- a/helpdesk/templates/helpdesk/followup_form.html +++ b/helpdesk/templates/helpdesk/followup_form.html @@ -1,7 +1,6 @@ {% extends 'helpdesk/base.html' %} {% load bootstrap %} -{% load restructuredtext %} {% block breadcrumb_items %} diff --git a/helpdesk/templates/helpdesk/helpdesk.html b/helpdesk/templates/helpdesk/helpdesk.html index 44f5821abc4e28d4c42350da0cf51fe8959ed2da..6b9e6ef62671a0a59d58d89a1c00cd328c469ccd 100644 --- a/helpdesk/templates/helpdesk/helpdesk.html +++ b/helpdesk/templates/helpdesk/helpdesk.html @@ -1,8 +1,6 @@ {% extends 'helpdesk/base.html' %} {% load bootstrap %} -{% load restructuredtext %} - {% block breadcrumb_items %} {{ block.super }} diff --git a/helpdesk/templates/helpdesk/queue_card.html b/helpdesk/templates/helpdesk/queue_card.html index 3ae3cce7e2b18378e05bba088101b5f9da537e1a..f9ecfc1748bb24cecd9f778290ea76d40bdcbe26 100644 --- a/helpdesk/templates/helpdesk/queue_card.html +++ b/helpdesk/templates/helpdesk/queue_card.html @@ -1,5 +1,5 @@ {% load bootstrap %} -{% load restructuredtext %} +{% load automarkup %} <div class="card"> <div class="card-header"> @@ -9,7 +9,7 @@ </div> </div> <div class="card-body"> - {{ queue.description|restructuredtext }} + {{ queue.description|automarkup }} {% if queue.sub_queues.all|length > 0 %} <hr/> <p>Sub-Queues:</p> diff --git a/helpdesk/templates/helpdesk/queue_confirm_delete.html b/helpdesk/templates/helpdesk/queue_confirm_delete.html index b0b3a12b0fbd28858eb5933bee4ba234811c2091..8084179097718b4b5515ee96d7b5ec9aa1c35605 100644 --- a/helpdesk/templates/helpdesk/queue_confirm_delete.html +++ b/helpdesk/templates/helpdesk/queue_confirm_delete.html @@ -1,7 +1,7 @@ {% extends 'helpdesk/base.html' %} {% load bootstrap %} -{% load restructuredtext %} +{% load automarkup %} {% block pagetitle %}: Delete Queue{% endblock pagetitle %} @@ -11,7 +11,7 @@ <h1 class="highlight">Delete Queue {{ object.name }}</h1> <h3 class="highlight">Description</h3> - {{ object.description|restructuredtext }} + {{ object.description|automarkup }} <h3 class="highlight">Tickets</h3> {% include 'helpdesk/tickets_table.html' with queue=object %} diff --git a/helpdesk/templates/helpdesk/queue_detail.html b/helpdesk/templates/helpdesk/queue_detail.html index 53206de02e8654e4ccd55eac5e5c41efe40bb37e..0e9e6ed75a374fa0f998ed67e21bd8392d5d4892 100644 --- a/helpdesk/templates/helpdesk/queue_detail.html +++ b/helpdesk/templates/helpdesk/queue_detail.html @@ -2,7 +2,7 @@ {% load bootstrap %} {% load guardian_tags %} -{% load restructuredtext %} +{% load automarkup %} {% block breadcrumb_items %} {{ block.super }} @@ -85,7 +85,7 @@ {% endif %} <h3 class="highlight">Description</h3> - {{ queue.description|restructuredtext }} + {{ queue.description|automarkup }} <h3 class="highlight">Tickets in this Queue</h3> {% include 'helpdesk/tickets_table.html' with tickets=queue.tickets.all %} diff --git a/helpdesk/templates/helpdesk/ticket_confirm_delete.html b/helpdesk/templates/helpdesk/ticket_confirm_delete.html index 04fff1513d7db55bce5f64fb7087d568fd001802..ba7859bacaa65c183790ed4cc76b7c10ee82c19e 100644 --- a/helpdesk/templates/helpdesk/ticket_confirm_delete.html +++ b/helpdesk/templates/helpdesk/ticket_confirm_delete.html @@ -1,7 +1,6 @@ {% extends 'helpdesk/base.html' %} {% load bootstrap %} -{% load restructuredtext %} {% block pagetitle %}: Delete Ticket{% endblock pagetitle %} diff --git a/helpdesk/templates/helpdesk/ticket_detail.html b/helpdesk/templates/helpdesk/ticket_detail.html index 7703fc31819d91e0a8523c16de01755fb128b4a9..dba275b99749d59fc40a425b2dad579182ae337a 100644 --- a/helpdesk/templates/helpdesk/ticket_detail.html +++ b/helpdesk/templates/helpdesk/ticket_detail.html @@ -2,7 +2,6 @@ {% load bootstrap %} {% load guardian_tags %} -{% load restructuredtext %} {% block breadcrumb_items %} {{ block.super }}