Create base layout with sidebar + content.
This commit is contained in:
parent
4f44aac655
commit
dc1de203d0
|
@ -11,7 +11,7 @@
|
||||||
<meta name="robots" content="NONE,NOARCHIVE" />
|
<meta name="robots" content="NONE,NOARCHIVE" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<title>{% block title %}{% if name %}{{ name }} – {% endif %}ICO monitoring{% endblock %}</title>
|
<title>{% block title %}{% if name %}{{ name }} – {% endif %}Django musician{% endblock %}</title>
|
||||||
|
|
||||||
{% block style %}
|
{% block style %}
|
||||||
{% block bootstrap_theme %}
|
{% block bootstrap_theme %}
|
||||||
|
@ -30,71 +30,33 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<body class="{% block bodyclass %}{% endblock %}">
|
<body class="{% block bodyclass %}{% endblock %}">
|
||||||
|
|
||||||
{% block navbar %}
|
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
|
||||||
<a class="navbar-brand" href="/">ICO monitoring</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
|
|
||||||
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" href="javascript:void(0)" id="navbarDropdownMenuLink" role="button"
|
|
||||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
||||||
Projects
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
|
||||||
{% for project in projects %}
|
|
||||||
<a class="dropdown-item" href="{% url 'project_detail' project.slug %}">{{ project.name }}</a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<ul class="nav navbar-nav pull-right">
|
|
||||||
{% block userlinks %}
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a href="{% url 'logout' %}" class="nav-link dropdown-toggle" data-toggle="dropdown">
|
|
||||||
{{ user.username }}
|
|
||||||
</a>
|
|
||||||
<b class="caret"></b>
|
|
||||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a class="dropdown-item" href="{% url 'logout' %}">{% trans 'Log out' %}</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
{% else %}
|
|
||||||
<li><a href="{% url 'login' %}">{% trans 'Log in' %}</a></li>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<nav id="sidebar" class="border-right pt-4">
|
<nav id="sidebar" class="border-right pt-4">
|
||||||
{% block sidebar %}
|
{% block sidebar %}
|
||||||
{% if actual_project %}
|
{# <!-- branding --> #}
|
||||||
<div class="sidebar-header mb-3">
|
<h3>Pangea logotipo</h3>
|
||||||
<span class="rounded-circle" style="padding: 8px 8px 8px 12px; margin-right: 10px; background-color: #fcaf3e">
|
<h4>{{ version }}</h4>
|
||||||
{{actual_project.name|first|capfirst }}
|
|
||||||
</span>
|
|
||||||
{{ actual_project.name }} ({{ actual_project.location.name }})
|
|
||||||
</div>
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
{# <!-- services menu --> #}
|
||||||
<ul class="list-unstyled components">
|
<ul class="nav flex-column">
|
||||||
<li><a href="{% url 'project_detail' actual_project.slug %}">{% trans 'Project Details' %}</a></li>
|
<li class="nav-item">
|
||||||
<li><a href="{% url 'monitoringsite_list' actual_project.slug %}">{% trans 'Monitoring Sites' %}</a></li>
|
<a class="nav-link active" href="#">Domains & websites</a>
|
||||||
<li><a href="{% url 'project_users_list' actual_project.slug %}">{% trans 'Users' %}</a></li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{# <!-- user profile menu --> #}
|
||||||
<!-- TODO (slamora) create another menu? -->
|
<div class="dropdown-divider mt-5"></div>
|
||||||
{% endif %}
|
<ul class="nav flex-column">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="#profile" class="nav-link">{{ user.username }} <img alt="user-profile-picture" src="{% static "musician/img/default-profile-picture.png" %}" /></a>
|
||||||
|
</li>
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#logout">{% trans 'Log out' %}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
{% endblock sidebar %}
|
{% endblock sidebar %}
|
||||||
</nav><!-- ./sidebar -->
|
</nav><!-- ./sidebar -->
|
||||||
<div id="content" class="container-fluid pt-4">
|
<div id="content" class="container-fluid pt-4">
|
||||||
|
|
Loading…
Reference in New Issue