Commit 5071f934 authored by erdnaxe's avatar erdnaxe 🎇

Bootstrap 4 frontend

parent 7180c1c0
import os
from django.contrib.messages import constants as messages
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
......@@ -15,7 +16,6 @@ DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
......@@ -67,12 +67,10 @@ TEMPLATES = [
WSGI_APPLICATION = 'med.wsgi.application'
# Django crispy forms
CRISPY_TEMPLATE_PACK = 'bootstrap4'
# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
......@@ -83,7 +81,6 @@ DATABASES = {
}
}
# Password validation
# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
......@@ -102,7 +99,6 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
......@@ -120,7 +116,6 @@ LOCALE_PATHS = [
os.path.join(BASE_DIR, 'locale'),
]
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
......@@ -130,7 +125,6 @@ STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
# Emails
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
......@@ -152,10 +146,15 @@ SESSION_COOKIE_SECURE = False
# eg: ADMINS = [('pseudo', 'mymail@something.org')]
ADMINS = []
# Use message tags for Bootstrap 4
MESSAGE_TAGS = {
messages.DEBUG: 'alert-info',
messages.INFO: 'alert-info',
messages.SUCCESS: 'alert-success',
messages.WARNING: 'alert-warning',
messages.ERROR: 'alert-danger',
}
### Under this comment it is code from re2o
......@@ -172,10 +171,10 @@ LOGIN_REDIRECT_URL = '/'
# django-bootstrap3 config dictionnary
BOOTSTRAP3 = {
'jquery_url': '/static/js/jquery-2.2.4.min.js',
'base_url': '/static/bootstrap/',
'include_jquery': True,
}
'jquery_url': '/static/js/jquery-2.2.4.min.js',
'base_url': '/static/bootstrap/',
'include_jquery': True,
}
BOOTSTRAP_BASE_URL = '/static/bootstrap/'
PAGINATION_NUMBER = 25
......@@ -197,8 +196,8 @@ SEARCH_RESULT = 15
# Décision radius à prendre
RADIUS_VLAN_DECISION = {
'VLAN_NOK' : 42,
'VLAN_OK' : 69,
'VLAN_NOK': 42,
'VLAN_OK': 69,
}
MAX_EMPRUNT = 5
......
{% extends "med/sidebar.html" %}
{% load bootstrap3 %}
{% load staticfiles %}
{% block title %}Accueil{% endblock %}
{% block content %}
<h1>Bienvenue sur {{ site_name }}, notre base de données.</h1>
<h1>Bienvenue sur la base de données de la médiathèque de l'ENS Paris-Saclay</h1>
<h1>Welcome to procrastination heaven ! </h1>
<p class="lead">
<span class="text-muted">Welcome to procrastination haven !</span>
À quoi sert ce site ? Comment adhérer ? Bonjour voilà ?
</p>
<center>
<div class="thumbnail">
<img src="/static/logo/logo.png" alt="logo">
</div>
</center>
<img src="/static/logo/splash.png" class="img-fluid mt-4" alt="logo">
{% endblock %}
......@@ -11,12 +11,12 @@ admin.site.site_header = _('Med administration')
admin.site.site_title = _('Med Admin')
urlpatterns = [
url(r'^$', index),
url('^logout/', auth_views.LogoutView.as_view(), {'next_page': '/'}),
url('^', include('django.contrib.auth.urls')),
url(r'^admin/', admin.site.urls),
url(r'^users/', include('users.urls')),
url(r'^media/', include('media.urls')),
url(r'^search/', include('search.urls')),
url(r'^logs/', include('logs.urls')),
path('logout/', auth_views.LogoutView.as_view(), {'next_page': '/'}),
path('admin/', admin.site.urls),
path('users/', include('users.urls')),
path('media/', include('media.urls')),
path('search/', include('search.urls')),
path('logs/', include('logs.urls')),
path('', index, name="index"),
]
/* Sticky footer hacks */
/* Sticky footer hacks
html, body {
height: 100%;
}
......@@ -9,17 +9,16 @@ html, body {
#main {
overflow: auto;
padding-bottom:60px; /* this needs to be bigger than footer height*/
padding-bottom:60px; /* this needs to be bigger than footer height
}
footer {
position: relative;
margin-top: -50px; /* negative value of footer height */
margin-top: -50px; /* negative value of footer height
height: 50px;
clear:both;
padding-top:20px;
background-color: #222222;
/*background: -webkit-linear-gradient(left, red, red 16.6%, orange 16.6%, orange, orange 33.3%, yellow 33.3%, yellow, yellow 50%, green 50%, green, green 66.6%, blue 66.6%, blue, blue 83.3%, violet 83.3%,violet); */
color: white;
padding: 15px;
}
......@@ -29,19 +28,19 @@ footer a {
text-decoration: underline;
}
/* Remove the navbar's default margin-bottom and rounded borders */
/* Remove the navbar's default margin-bottom and rounded borders
.navbar {
margin-bottom: 0;
border-radius: 0;
}
/* Set height of the grid so .sidenav can be 100% (adjust as needed) */
/* Set height of the grid so .sidenav can be 100% (adjust as needed)
.row.content {
height: 100%;
overflow: auto;
}
/* Set gray background color and 100% height */
/* Set gray background color and 100% height
.sidenav {
padding-top: 20px;
background-color: #f1f1f1;
......@@ -50,7 +49,7 @@ footer a {
vertical-align: middle;
}
/* Pull sidebars to the bottom */
/* Pull sidebars to the bottom
@media (min-width: 767px) {
.row {
display: -webkit-box;
......@@ -63,7 +62,7 @@ footer a {
}
}
/* On small screens, set height to 'auto' for sidenav and grid */
/* On small screens, set height to 'auto' for sidenav and grid
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
......@@ -71,3 +70,4 @@ footer a {
}
.row.content {height:auto;}
}
*/
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
@font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{% load staticfiles %}
{% load bootstrap3 %}
<!DOCTYPE html>
<!doctype html>
<html lang="fr">
<head>
{% bootstrap_css %}
<link rel="stylesheet" href="{% static "/css/base.css" %}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{{ site_name }} : {% block title %}Accueil{% endblock %}</title>
{# CSS style #}
<link rel="stylesheet" href="{% static "/css/bootstrap.min.css" %}">
<link rel="stylesheet" href="{% static "/css/open-iconic-bootstrap.min.css" %}">
<link rel="stylesheet" href="{% static "/css/base.css" %}">
</head>
<body>
<div id="wrap">
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">{{ site_name }}</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="{% url "users:profile" %}">Mon profil</a></li>
{% if is_perm %}
<li><a href="{% url "users:index" %}">Utilisateurs</a></li>
{% endif %}
<li><a href="{% url "media:index" %}">Media</a></li>
{% if is_perm %}
<li><a href="{% url "logs:index" %}">Statistiques</a></li>
{% endif %}
</ul>
<div class="col-sm-3 col-md-3 navbar-right">
<form action="{% url "search:search" %}" method="POST" class="navbar-form" role="search">
{% csrf_token %}
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" name="search_field"
id="search-term">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i>
</button>
<a href="{% url "search:searchp" %}" class="btn btn-default" role="button"><i
class="glyphicon glyphicon-plus"></i></a>
</div>
</div>
</form>
{# Top navbar #}
{% include "navbar.html" %}
<div class="container-fluid">
<div class="row">
<main role="main" class="col-lg-10 p-5 order-lg-12">
{% for message in messages %}
<div class="alert {{ message.tags }} alert-dismissible" role="alert">
{{ message }}
</div>
<ul class="nav navbar-nav navbar-right">
<li>
{% if request.user.is_authenticated %}
<a href="{% url 'logout' %}">
<span class="glyphicon glyphicon-log-out"></span> Logout
</a>
{% else %}
<a href="{% url 'login' %}">
<span class="glyphicon glyphicon-log-in"></span> Login
</a>
{% endif %}
</li>
</ul>
</div>
</div>
</nav>
{% endfor %}
{% block content %}{% endblock %}
</main>
<nav class="col-lg-2 bg-light sidebar shadow order-lg-1">
{% block sidebar %}{% endblock %}
<div id="main" class="container-fluid text-center">
<div class="row content">
<div class="col-sm-2 sidenav">
<div class="panel panel-default">
<div class="text-left list-group">
{% block sidebar %}
{% endblock %}
{% if request_user.is_authenticated %}
<div class="card mt-3 border-success">
<h4 class="card-header">{{ request_user.name }} {{ request_user.surname }}</h4>
<div class="card-body">
<h5 class="card-title">Pseudo</h5>
<p class="card-text">
{{ request_user.pseudo }}
</p>
</div>
</div>
</div>
<div class="col-sm-8 text-left">
{# Display django.contrib.messages as Bootstrap alerts #}
{% bootstrap_messages %}
<hr>
{% else %}
<div class="card mt-3 border-warning">
<div class="card-body text-center">
<p class="card-text">
Vous n'êtes pas authentifié·e.
</p>
<a href="{% url 'login' %}" class="btn btn-outline-success">S'authentifier</a>
</div>
</div>
{% endif %}
{% block content %}{% endblock %}
</div>
<div class="col-sm-2 sidenav">
<div class="panel panel-default">
{% if request_user.is_authenticated %}
<div class="panel-heading">
<h4>{{ request_user.name }} {{ request_user.surname }}</h4>
</div>
<table class="table">
<tr>
<th scope="row">Pseudo</th>
<td class="text-right">{{ request_user.pseudo }}</td>
</tr>
<tr>
<th scope="row">Nom</th>
<td class="text-right">{{ request_user.surname }}</td>
</tr>
<tr>
<th scope="row">Prénom</th>
<td class="text-right">{{ request_user.name }}</td>
</tr>
</table>
{% else %}
<p>Vous n'êtes pas authentifié</p>
{% endif %}
<footer class="footer mt-auto py-3">
<div class="container">
<span class="text-muted">Med 2019 - Codé avec amour par des médeux fous.</span>
</div>
</div>
</div>
</footer>
</nav>
</div>
</div>
<footer class="navbar">
<div class="containerfluid text-center">
<p>Med 2019 - Codé avec amour par des médeux fous</p>
</div>
</footer>
{# Load Javascript after #}
{% bootstrap_javascript %}
</body>
</html>
<nav class="navbar navbar-dark shadow bg-dark navbar-expand-lg">
<a class="navbar-brand" href="{% url "index" %}">Méd</a>
<ul class="navbar-nav mr-auto">
<li>
<a class="nav-link active" href="{% url "media:index" %}">
<span class="oi oi-book"></span>
Media
</a>
</li>
{% if is_perm %}
<li class="nav-item">
<a class="nav-link active" href="{% url "users:index" %}">
<span class="oi oi-person"></span>
Utilisateurs
</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{% url "logs:index" %}">
<span class="oi oi-bar-chart"></span>
Statistiques
</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link active" href="{% url "users:profile" %}">
<span class="oi oi-person"></span>
Mon profil
</a>
</li>
{% endif %}
{% if request.user.is_authenticated %}
<li>
<a class="nav-link active" href="{% url 'logout' %}">
<span class="oi oi-account-logout"></span>
Déconnexion
</a>
</li>
{% else %}
<li>
<a class="nav-link active" href="{% url 'login' %}">
<span class="oi oi-account-login"></span>
Connexion
</a>
</li>
{% endif %}
</ul>
<form action="{% url "search:search" %}" method="POST" class="form-inline" role="search">
{% csrf_token %}
<div class="input-group">
<input class="form-control" type="search" placeholder="Recherche" aria-label="Recherche"
name="search_field">
<div class="input-group-append" id="button-addon4">
<button class="btn btn-primary" type="submit">
<span class="oi oi-magnifying-glass"></span>
</button>
<a href="{% url "search:searchp" %}" class="btn btn-secondary" role="button">
<span class="oi oi-ellipses"></span>
</a>
</div>
</div>
</form>
</nav>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment