mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-28 01:28:51 +01:00
Fix templates for knowledgebase
This commit is contained in:
parent
7c64a01e6f
commit
0c61f65060
@ -10,35 +10,34 @@
|
||||
{% block helpdesk_body %}
|
||||
<h2>{% trans 'Knowledgebase Category' %}:{% blocktrans with category.title as kbcat %}{{ kbcat }}{% endblocktrans %}</h2>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="well well-sm">
|
||||
<h4>{% blocktrans with category.title as kbcat %}You are viewing all items in the {{ kbcat }} category.{% endblocktrans %}</h4>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
{% blocktrans with category.title as kbcat %}You are viewing all items in the {{ kbcat }} category.{% endblocktrans %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>{{ category.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% for item in items %}
|
||||
{% cycle 'one' 'two' 'three' as itemnumperrow silent %}
|
||||
{% ifequal itemnumperrow 'one' %}<div class="row">{% endifequal %}
|
||||
<div class="col-lg-3">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h4>{{ item.title }}</h4>
|
||||
{% ifequal itemnumperrow 'one' %}<div class="card-deck">{% endifequal %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ item.title }}</h5>
|
||||
<p class="card-text">{{ item.question }}</p>
|
||||
<p class="card-text">
|
||||
<p>
|
||||
{% blocktrans with item.get_absolute_url as url %}View <a href='{{ url }}'>Answer <i class="fa fa-arrow-right"></i></a>{% endblocktrans %}
|
||||
</p>
|
||||
<div class="well well-sm">
|
||||
<p>{% trans 'Rating' %}: {{ item.score }}</p>
|
||||
<p>{% trans 'Last Update' %}: {{ item.last_updated|naturaltime }}</p>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>{{ item.question }}</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<p>
|
||||
{% blocktrans with item.get_absolute_url as url %}View <a href='{{ url }}'>Answer <i class="fa fa-arrow-right"></i></a>{% endblocktrans %}
|
||||
</p>
|
||||
<div class="well well-sm">
|
||||
<p>{% trans 'Rating' %}: {{ item.score }}</p>
|
||||
<p>{% trans 'Last Update' %}: {{ item.last_updated|naturaltime }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% ifequal itemnumperrow 'three' %}</div>{% endifequal %}
|
||||
{% endfor %}
|
||||
|
||||
|
@ -16,20 +16,14 @@
|
||||
|
||||
{% for category in kb_categories %}
|
||||
{% cycle 'one' 'two' 'three' as catnumperrow silent %}
|
||||
{% if catnumperrow == 'one' %}<div class="row">{% endif %}
|
||||
<div class="col-lg-4">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3>{{ category.title }}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>{{ category.description }}</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<a href='{{ category.get_absolute_url }}'>{% trans 'View articles' %}<i class="fa fa-arrow-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{% if catnumperrow == 'one' %}<div class="card-deck">{% endif %}
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ category.title }}</h5>
|
||||
<p class="card-text">{{ category.description }}</p>
|
||||
<p class="card-text"><small class="text-muted"><a href='{{ category.get_absolute_url }}'>{% trans 'View articles' %}<i class="fa fa-arrow-right"></i></a></small></p>
|
||||
</div>
|
||||
</div>
|
||||
{% if catnumperrow == 'three' %}</div>{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
@ -13,35 +13,34 @@
|
||||
{% block helpdesk_body %}
|
||||
<h2>{% trans 'Knowledgebase' %}:{% blocktrans with item.title as item %}{{ item }}{% endblocktrans %}</h2>
|
||||
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h4>{{ item.question }}</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>{{ item.answer|markdown }}</p>
|
||||
</div>
|
||||
<div class="panel-footer">
|
||||
<div class="row">
|
||||
<div class="col-lg-2">
|
||||
<p>{% trans "Did you find this article useful?" %}</p>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<a href='vote/?vote=up'><button type="button" class="btn btn-success btn-circle btn-xl"><i class="fa fa-thumbs-up fa-lg"></i></button></a>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<a href='vote/?vote=down'><button type="button" class="btn btn-danger btn-circle btn-xl"><i class="fa fa-thumbs-down fa-lg"></i></button></a>
|
||||
</div>
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-question-circle"></i>
|
||||
{{ item.question }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>{{ item.answer|markdown }}</p>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col-lg-2">
|
||||
<p>{% trans "Did you find this article useful?" %}</p>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<a href='vote/?vote=up'><button type="button" class="btn btn-success btn-circle btn-xl"><i class="fa fa-thumbs-up fa-lg"></i></button></a>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<a href='vote/?vote=down'><button type="button" class="btn btn-danger btn-circle btn-xl"><i class="fa fa-thumbs-down fa-lg"></i></button></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
<p>{% trans "The results of voting by other readers of this article are below:" %}</p>
|
||||
<ul>
|
||||
</div>
|
||||
<div class="col-lg-10">
|
||||
<p>{% trans "The results of voting by other readers of this article are below:" %}</p>
|
||||
<ul>
|
||||
<li>{% blocktrans with item.recommendations as recommendations %}Recommendations: {{ recommendations }}{% endblocktrans %}</li>
|
||||
<li>{% blocktrans with item.votes as votes %}Votes: {{ votes }}{% endblocktrans %}</li>
|
||||
<li>{% blocktrans with item.score as score %}Overall Rating: {{ score }}{% endblocktrans %}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user