incomplete create_hosting_package view
- add staff user view create_hosting_package - add hostingpackages.forms.CreateHostingPackageForm - add hostingpackages.views.CreateHostingPackage - add link for staff users on user_dashboard page - add url pattern - TODO: implement saving the hosting package, update docs
This commit is contained in:
parent
9890248e80
commit
680f091cba
7 changed files with 117 additions and 4 deletions
|
@ -39,7 +39,10 @@
|
|||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="text-info">{% trans "You have no hosting packages yet." %}</p>
|
||||
<p class="text-info">{% if user == object %}{% trans "You have no hosting packages yet." %}{% else %}{% trans "This user has no hosting packages assigned yet." %}{% endif %}</p>
|
||||
{% endif %}
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url "create_hosting_package" user=object.username %}" class="btn btn-primary">{% trans "Add hosting package" %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
1
gnuviechadmin/templates/hostingpackages/base.html
Normal file
1
gnuviechadmin/templates/hostingpackages/base.html
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends "base.html" %}
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "hostingpackages/base.html" %}
|
||||
{% load i18n crispy_forms_tags %}
|
||||
{% block title %}{{ block.super }} - {% blocktrans with full_name=customer.get_full_name %}Add hosting package for Customer {{ full_name }}{% endblocktrans %}{% endblock title %}
|
||||
{% block page_title %}{% blocktrans with full_name=customer.get_full_name %}Add Hosting Package for Customer {{ full_name }}{% endblocktrans %}{% endblock page_title %}
|
||||
{% block content %}
|
||||
{% crispy form %}
|
||||
{% endblock content %}
|
Loading…
Add table
Add a link
Reference in a new issue