musician add webapps/websites on menu

This commit is contained in:
Jorge Pastor 2024-04-29 21:01:51 +02:00
parent 4688605bc6
commit 6ff6a75eda
3 changed files with 11 additions and 5 deletions

View file

@ -14,11 +14,13 @@ class CustomContextMixin(ContextMixin):
context = super().get_context_data(**kwargs)
# generate services menu items
services_menu = [
{'icon': 'globe-europe', 'pattern_name': 'musician:dashboard', 'title': _('Domains & websites')},
{'icon': 'globe-europe', 'pattern_name': 'musician:dashboard', 'title': _('Domains')},
{'icon': 'envelope', 'pattern_name': 'musician:address-list', 'title': _('Mails')},
{'icon': 'mail-bulk', 'pattern_name': 'musician:mailing-lists', 'title': _('Mailing lists')},
{'icon': 'database', 'pattern_name': 'musician:database-list', 'title': _('Databases')},
{'icon': 'fire', 'pattern_name': 'musician:saas-list', 'title': _('SaaS')},
{'icon': 'globe', 'pattern_name': 'musician:website-list', 'title': _('Websites')},
{'icon': 'folder', 'pattern_name': 'musician:webapp-list', 'title': _('Webapps'), 'indent': True},
]
context.update({
'services_menu': services_menu,

View file

@ -46,7 +46,11 @@
{# <!-- services menu --> #}
<ul id="sidebar-services" class="nav flex-column">
{% for item in services_menu %}
<li class="nav-item">
{% if item.indent %}
<li class="nav-item ml-3">
{% else %}
<li class="nav-item">
{% endif %}
<a class="nav-link text-light active" href="{% url item.pattern_name %}">
<i class="fas fa-{{ item.icon }}"></i>
{{ item.title }}

View file

@ -50,12 +50,12 @@
<div class="col-md-8">
{% with domain.websites.0 as website %}
{% with website.contents.0 as content %}
<a href="#domain-detail" class="btn btn-primary">{% trans "View DNS records" %}</a>
<button type="button" class="btn text-secondary" data-toggle="modal" data-target="#configDetailsModal"
<a href="{% url 'musician:domain-detail' domain.id %}" class="btn btn-primary">{% trans "View DNS records" %}</a>
<!-- <button type="button" class="btn text-secondary" data-toggle="modal" data-target="#configDetailsModal"
data-domain="{{ domain.name }}" data-website="{{ website|yesno:'true,false' }}" data-webapp-type="{{ content.webapp.type }}" data-root-path="{{ content.path }}"
data-url="{% url 'musician:domain-detail' domain.id %}">
{% trans "view configuration" %} <strong class="fas fa-tools"></strong>
</button>
</button> -->
{% endwith %}
{% endwith %}
</div>