Skip to content

Commit

Permalink
Merge pull request #1172 from jorge-leon/fix-public-view-and-context-…
Browse files Browse the repository at this point in the history
…help-urls

FIX: replace hardcoded urls with Django generated ones. Fixes #1171
  • Loading branch information
uhurusurfa committed Apr 24, 2024
2 parents 1ddb2a2 + c723873 commit dba8a88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion helpdesk/templates/helpdesk/my_tickets.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ <h2>{% trans "My Tickets" %}</h2>
data.results.forEach(function(ticket) {
$('#ticketsTable tbody').append(`
<tr>
<td><a href="/view/?ticket=${ticket.id}&email=${ticket.submitter}&key=${ticket.secret_key}">${ticket.title}</a></td>
<td>
<a href='{% url "helpdesk:public_view" %}?ticket=${ticket.id}&email=${ticket.submitter}&key=${ticket.secret_key}'>${ticket.title}</a>
</td>
<td>${ticket.queue.title}</td>
<td>${ticket.status}</td>
<td>${ticket.created}</td>
Expand Down
5 changes: 4 additions & 1 deletion helpdesk/templates/helpdesk/public_view_ticket.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ <h3>{% trans "Follow-Ups" %}</h3>

<dt><label for='commentBox'>{% trans "Comment / Resolution" %}</label></dt>
<dd><textarea rows='8' cols='70' name='comment' id='commentBox'></textarea></dd>
<dd class='form_help_text'>{% trans "You can insert ticket and queue details in your message. For more information, see the <a href='../../help/context/'>context help page</a>." %}</dd>
{% url "helpdesk:help_context" as context_help_url %}
{% blocktrans %}
<dd class='form_help_text'>You can insert ticket and queue details in your message. For more information, see the <a href='{{ context_help_url }}'>context help page</a>.</dd>
{% endblocktrans %}

{% if not ticket.can_be_resolved %}<dd>{% trans "This ticket cannot be resolved or closed until the tickets it depends on are resolved." %}</dd>{% endif %}
{% if ticket.status == 1 %}
Expand Down
5 changes: 4 additions & 1 deletion helpdesk/templates/helpdesk/ticket.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ <h5 class="mb-1">{{ followup.title|num_to_link }}</h5>

<dt><label for='commentBox'>{% trans "Comment / Resolution" %}</label></dt>
<dd><textarea rows='8' cols='70' name='comment' id='commentBox'></textarea></dd>
<dd class='form_help_text'>{% trans "You can insert ticket and queue details in your message. For more information, see the <a href='../../help/context/'>context help page</a>." %}</dd>
{% url "helpdesk:help_context" as context_help_url %}
{% blocktrans %}
<dd class='form_help_text'>You can insert ticket and queue details in your message. For more information, see the <a href='{{ context_help_url }}'>context help page</a>.</dd>
{% endblocktrans %}

<dt><label>{% trans "New Status" %}</label></dt>
{% if not ticket.can_be_resolved %}<dd>{% trans "This ticket cannot be resolved or closed until the tickets it depends on are resolved." %}</dd>{% endif %}
Expand Down

0 comments on commit dba8a88

Please sign in to comment.