add new view CustomerHostingPackageList
- create view hostingpackages.views.CustomerHostingPackageList to display a specific customer's hosting packages - add docstring to view AllCustomerHostingPackageList - add URL pattern 'hosting_packages' to hostingpackages.urls - restructure hostingpackages URL patterns to remove useless parts - add template hostingpackages/customerhostingpackage_list.html - change links in template base.html to link to 'hosting_packages'
This commit is contained in:
parent
3f07ddb062
commit
2d4282194f
4 changed files with 92 additions and 7 deletions
|
@ -41,13 +41,20 @@
|
|||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{% url "dashboard" %}">gnuviechadmin</a>
|
||||
<a class="navbar-brand" href="{% if user.is_authenticated %}{% url 'customer_dashboard' slug=user.username %}{% else %}{% url 'dashboard' %}{% endif %}" title="{% trans "Dashboard" %}">gnuviechadmin</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="{% if user.is_authenticated %}{% url 'customer_dashboard' slug=user.username %}{% else %}{% url 'dashboard' %}{% endif %}">{% trans "Dashboard" %}</a></li>
|
||||
{% if user.is_staff %}
|
||||
<li><a href="{% url 'all_hosting_packages' %}">{% trans "All hosting packages" %}</a></li>
|
||||
<li class="dropdown{% if active_item == 'hostingpackage' %} active{% endif %}">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">{% trans "Hosting" %} <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="{% url 'hosting_packages' user=user.username %}">{% trans "Your hosting packages" %}</a></li>
|
||||
<li><a href="{% url 'all_hosting_packages' %}">{% trans "All hosting packages" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% else %}
|
||||
<li{% if active_item == 'hostingpackage' %} class="active"{% endif %}><a href="{% url 'hosting_packages' user=user.username %}">{% trans "Hosting" %}</a></li>
|
||||
{% endif %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="glyphicon glyphicon-link"></i> {% trans "Links" %} <span class="caret"></span></a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue