Commit b4cfb8d3 authored by erdnaxe's avatar erdnaxe 🎇

Drop old templates and old search

parent d0f2140d
Pipeline #1400 failed with stage
in 3 minutes and 21 seconds
......@@ -34,3 +34,34 @@ CREATE USER 'club-med'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON club-med.* TO 'club-med'@'localhost';
FLUSH PRIVILEGES;
```
## Exemple de groupes de droits
```
bureau
Can add borrowed item
Can change borrowed item
Can delete borrowed item
Can add adhesion
Can change adhesion
Can delete adhesion
Can add clef
Can change clef
Can delete clef
Can add user
Can change user
keyholder
Can add auteur
Can change auteur
Can delete auteur
Can add media
Can change media
Can delete media
Can add jeu
Can change jeu
Can delete jeu
Can add emprunt
Can change emprunt
Can delete emprunt
```
......@@ -50,7 +50,6 @@ INSTALLED_APPS = [
'users',
'med',
'media',
'search',
'logs',
]
......@@ -72,9 +71,7 @@ ROOT_URLCONF = 'med.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(BASE_DIR, 'templates').replace('\\', '/'),
],
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
......@@ -157,24 +154,15 @@ STATIC_URL = '/static/'
PAGINATION_NUMBER = 25
PAGINATION_LARGE_NUMBER = 8
# django-bootstrap3 config dictionnary
BOOTSTRAP3 = {
'jquery_url': '/static/js/jquery-2.2.4.min.js',
'base_url': '/static/bootstrap/',
'include_jquery': True,
}
BOOTSTRAP_BASE_URL = '/static/bootstrap/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
PASSWORD_HASHERS = (
'med.login.SSHAPasswordHasher',
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
)
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
'django.contrib.auth.hashers.Argon2PasswordHasher',
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
'med.login.SSHAPasswordHasher',
]
AUTH_USER_MODEL = 'users.User'
SITE_NAME = "Med"
# Association information
ASSO_NAME = "Med"
......
......@@ -15,7 +15,6 @@ urlpatterns = [
# Include project routers
url(r'^users/', include('users.urls', namespace='users')),
url(r'^media/', include('media.urls', namespace='media')),
url(r'^search/', include('search.urls', namespace='search')),
url(r'^logs/', include('logs.urls', namespace='logs')),
# Include Django Contrib and Core routers
......
from django.apps import AppConfig
class SearchConfig(AppConfig):
name = 'search'
# -*- mode: python; coding: utf-8 -*-
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django import forms
from django.forms import Form
CHOICES2 = (
('0', 'Utilisateurs'),
('1', 'Media'),
('2', 'Emprunts'),
('3', 'Jeu'),
)
class SearchForm(Form):
search_field = forms.CharField(label='Search', max_length=100)
class SearchFormPlus(Form):
search_field = forms.CharField(label='Search', max_length=100, required=False)
affichage = forms.MultipleChoiceField(label="Filtre affichage", required=False, widget=forms.CheckboxSelectMultiple,
choices=CHOICES2)
date_deb = forms.DateField(required=False, label="Date de début", help_text='DD/MM/YYYY',
input_formats=['%d/%m/%Y'])
date_fin = forms.DateField(required=False, help_text='DD/MM/YYYY', input_formats=['%d/%m/%Y'], label="Date de fin")
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% if users_list.paginator %}
{% include "pagination.html" with list=users_list %}
{% endif %}
<table class="table table-striped">
<thead>
<tr>
<th>Prénom</th>
<th>Nom</th>
<th>Pseudo</th>
<th>Mail</th>
<th>Max emprunts</th>
<th>Adhérent</th>
</tr>
</thead>
{% for user in users_list %}
<tr>
<td>{{ user.first_name }}</td>
<td>{{ user.last_name }}</td>
<td>{{ user.username }}</td>
<td>{{ user.email }}</td>
<td>{{ user.maxemprunt }}</td>
{% if user.is_adherent %}
<td><span style="color:green">Oui</span></td>
{% else %}
<td><span style="color:red">Non</span></td>
{% endif %}
</tr>
{% endfor %}
</table>
{% extends "search/sidebar.html" %}
{% comment %}
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
se veut agnostique au réseau considéré, de manière à être installable en
quelques clics.
Copyright © 2017 Gabriel Détraz
Copyright © 2017 Goulven Kermarec
Copyright © 2017 Augustin Lemesle
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
{% load bootstrap3 %}
{% block title %}Résultats de la recherche{% endblock %}
{% block content %}
{% if users_list %}
<h2>Résultats dans les utilisateurs</h2>
{% include "search/aff_users.html" with users_list=users_list %}
{% endif%}
{% if emprunts_list %}
<h2>Résultats dans les emprunt : </h2>
{% include "media/aff_emprunts.html" with emprunts_list=emprunts_list %}
{% endif %}
{% if medias_list %}
<h2>Résultats dans les media : </h2>
{% include "media/aff_medias.html" with medias_list=medias_list %}
{% endif %}
{% if jeux_list %}
<h2>Résultats dans les jeux : </h2>
{% include "media/aff_jeux.html" with jeux_list=jeux_list %}
{% endif %}
{% if not users_list and not emprunts_list and not medias_list and not jeux_list %}
<h3>Aucun résultat</h3>
{% endif %}
<h6>(Seulement les {{ max_result }} premiers résultats sont affichés dans chaque catégorie)</h6>
<br />
<br />
<br />
{% endblock %}
{% extends "search/sidebar.html" %}
{% comment %}
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
se veut agnostique au réseau considéré, de manière à être installable en
quelques clics.
Copyright © 2017 Gabriel Détraz
Copyright © 2017 Goulven Kermarec
Copyright © 2017 Augustin Lemesle
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
{% load bootstrap3 %}
{% block title %}Recherche{% endblock %}
{% block content %}
{% bootstrap_form_errors searchform %}
<form class="form" method="post">
{% csrf_token %}
{% bootstrap_form searchform %}
{% bootstrap_button "Search" button_type="submit" icon="search" %}
</form>
<br />
<br />
<br />
<br />
<br />
{% endblock %}
{% extends "base.html" %}
{% comment %}
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
se veut agnostique au réseau considéré, de manière à être installable en
quelques clics.
Copyright © 2017 Gabriel Détraz
Copyright © 2017 Goulven Kermarec
Copyright © 2017 Augustin Lemesle
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
{% block sidebar %}
<a class="list-group-item list-group-item-warning" href="{% url "search:search" %}">
<i class="glyphicon glyphicon-search"></i>
Recherche simple
</a>
<a class="list-group-item list-group-item-warning" href="{% url "search:searchp" %}">
<i class="glyphicon glyphicon-zoom-in"></i>
Recherche avancée
</a>
{% endblock %}
# -*- mode: python; coding: utf-8 -*-
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.search, name='search'),
url(r'^avance/$', views.searchp, name='searchp'),
]
# -*- mode: python; coding: utf-8 -*-
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django.contrib.auth.decorators import login_required
from django.db.models import Q
from django.shortcuts import render
from django.template.context_processors import csrf
from med.settings import SEARCH_DISPLAY_PAGE
from media.models import Media, Jeu, Emprunt
from search.forms import SearchForm, SearchFormPlus
from users.models import User
def form(ctx, template, request):
c = ctx
c.update(csrf(request))
return render(request, template, c)
def search_result(search, type, request):
date_deb = None
date_fin = None
aff = []
if type:
aff = search.cleaned_data['affichage']
date_deb = search.cleaned_data['date_deb']
date_fin = search.cleaned_data['date_fin']
date_query = Q()
if not aff:
aff = ['0', '1', '2', '3']
if date_deb is not None:
date_query = date_query & Q(date_emprunt__gte=date_deb)
if date_fin is not None:
date_query = date_query & Q(date_emprunt__lte=date_fin)
search = search.cleaned_data['search_field']
query1 = Q()
recherche = {'users_list': None, 'emprunts_list': None, 'medias_list': None,
'jeux_list': None}
if request.user.has_perms(('perm',)):
query = Q(user__username__icontains=search) | Q(
user__first_name__icontains=search) | Q(
user__last_name__icontains=search)
else:
query = (Q(user__username__icontains=search) | Q(
user__first_name__icontains=search) | Q(
user__last_name__icontains=search)) & Q(user=request.user)
for i in aff:
if i == '0':
query_user_list = Q(username__icontains=search) | Q(
first_name__icontains=search) | Q(
last_name__icontains=search) & query1
if request.user.has_perms(('perm',)):
recherche['users_list'] = User.objects.filter(
query_user_list).order_by('last_name')
else:
recherche['users_list'] = User.objects.filter(
query_user_list & Q(id=request.user.id)).order_by(
'last_name')
if i == '1':
recherche['emprunts_list'] = Emprunt.objects.filter(
query & date_query).order_by('date_emprunt').reverse()
if i == '2':
recherche['medias_list'] = Media.objects.filter(
Q(auteur__nom__icontains=search) | Q(titre__icontains=search))
if i == '3':
recherche['jeux_list'] = Jeu.objects.filter(
Q(nom__icontains=search) | Q(
proprietaire__username__icontains=search) | Q(
proprietaire__first_name__icontains=search) | Q(
proprietaire__last_name__icontains=search))
for r in recherche:
if recherche[r] is not None:
recherche[r] = recherche[r][:SEARCH_DISPLAY_PAGE]
recherche.update({'max_result': SEARCH_DISPLAY_PAGE})
return recherche
@login_required
def search(request):
search = SearchForm(request.POST or None)
if search.is_valid():
return form(search_result(search, False, request), 'search/index.html',
request)
return form({'searchform': search}, 'search/search.html', request)
@login_required
def searchp(request):
search = SearchFormPlus(request.POST or None)
if search.is_valid():
return form(search_result(search, True, request), 'search/index.html',
request)
return form({'searchform': search}, 'search/search.html', request)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":";;;;AAmBA,YAAA,aAAA,UAAA,aAAA,aAAA,aAME,YAAA,EAAA,KAAA,EAAA,eC2CA,mBAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,IAAA,iBDvCR,mBAAA,mBAAA,oBAAA,oBAAA,iBAAA,iBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBAAA,oBCsCA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBDlCR,qBAAA,sBAAA,sBAAA,uBAAA,mBAAA,oBAAA,sBAAA,uBAAA,sBAAA,uBAAA,sBAAA,uBAAA,+BAAA,gCAAA,6BAAA,gCAAA,gCAAA,gCCiCA,mBAAA,KACQ,WAAA,KDlDV,mBAAA,oBAAA,iBAAA,oBAAA,oBAAA,oBAuBI,YAAA,KAyCF,YAAA,YAEE,iBAAA,KAKJ,aErEI,YAAA,EAAA,IAAA,EAAA,KACA,iBAAA,iDACA,iBAAA,4CAAA,iBAAA,qEAEA,iBAAA,+CCnBF,OAAA,+GH4CA,OAAA,0DACA,kBAAA,SAuC2C,aAAA,QAA2B,aAAA,KArCtE,mBAAA,mBAEE,iBAAA,QACA,oBAAA,EAAA,MAGF,oBAAA,oBAEE,iBAAA,QACA,aAAA,QAMA,sBAAA,6BAAA,4B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/PI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF4PJ,8BEhQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SF6PJ,6BEjQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFoQJ,MExQI,iBAAA,oDACA,iBAAA,+CACA,iBAAA,wEAAA,iBAAA,kDACA,OAAA,+GACA,kBAAA,SFsQF,aAAA,QC3NA,mBAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA,qBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,gBAAA,EAAA,IAAA,EAAA"}
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
/* Sticky footer hacks */
html, body {
height: 100%;
}
#wrap {
min-height: 100%;
}
#main {
overflow: auto;
padding-bottom:60px; /* this needs to be bigger than footer height*/
}
footer {
position: relative;
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;
}
footer a {
color: white;
text-decoration: underline;
}
/* 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) */
.row.content {
height: 100%;
overflow: auto;
}
/* Set gray background color and 100% height */
.sidenav {
padding-top: 20px;
background-color: #f1f1f1;
}
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
vertical-align: middle;
}
/* Pull sidebars to the bottom */
@media (min-width: 767px) {
.row {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.row > [class*='col-'] {
flex-direction: column;
}
}
/* On small screens, set height to 'auto' for sidenav and grid */
@media screen and (max-width: 767px) {
.sidenav {
height: auto;
padding: 15px;
}
.row.content {height:auto;}
}
This diff is collapsed.
{% comment %}
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
se veut agnostique au réseau considéré, de manière à être installable en
quelques clics.
Copyright © 2017 Gabriel Détraz
Copyright © 2017 Goulven Kermarec
Copyright © 2017 Augustin Lemesle
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
{% endcomment %}
{% load staticfiles %}
{# Load the tag library #}
{% load bootstrap3 %}
<!DOCTYPE html>
<html lang="fr">
<head>
{# Load CSS and JavaScript #}
{% bootstrap_css %}
{% bootstrap_javascript %}
<link rel="stylesheet" href="{% static "/css/base.css" %}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ request.site.name }} : {% block title %}Accueil{% endblock %}</title>
</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="/">{{ request.site.name }}</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
{% if perms.users.add_user %}
<li><a href="{% url "users:new-user" %}">Utilisateurs</a></li>
{% endif %}
<li><a href="{% url "media:index" %}">Media</a></li>
{% if user.is_staff %}
<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>
</div>
<ul class="nav navbar-nav navbar-right">
<li>
{% if 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>
<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 %}
</div>
</div>
</div>
<div class="col-sm-8 text-left">
{# Display django.contrib.messages as Bootstrap alerts #}
{% bootstrap_messages %}
{% block content %}{% endblock %}
</div>
<div class="col-sm-2 sidenav">
<div class="panel panel-default">
{% if user.is_authenticated %}
<div class="panel-heading">
<h4>{{ user.first_name }} {{ user.last_name }}</h4>
</div>
<table class="table">
<tr>
<th scope="row">Pseudo</th>
<td class="text-right">{{ user.username }}</td>
</tr>
<tr>
<th scope="row">Nom</th>
<td class="text-right">{{ user.last_name }}</td>
</tr>
<tr>
<th scope="row">Prénom</th>
<td class="text-right">{{ user.first_name }}</td>
</tr>
</table>
{% else %}
<p>Vous n'êtes pas authentifié</p>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<footer class="navbar">
<div class="container-fluid text-center">
<p>Mediatek 2017-2020 &mdash; <a href="mailto:club-med@crans.org">Nous contactez</a></p>
</div>
</footer>
{# Read the documentation for more information #}
</body>
</html>
{% extends "admin/base_site.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'index' %}">{% trans 'Home' %}</a>
{% if title %} &rsaquo; {{ title }}{% endif %}
</div>
{% endblock %}
{% extends "base.html" %}
{% comment %}
SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% load i18n static %}
{% block extrahead %}{{ block.super }}
{# Load Django Admin widgets #}
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/core.js' %}"></script>
{{ form.media }}
{% endblock %}
{% block extrastyle %}{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">
{% endblock %}
{% comment %}
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
se veut agnostique au réseau considéré, de manière à être installable en
quelques clics.
Copyright © 2017 Gabriel Détraz
Copyright © 2017 Goulven Kermarec
Copyright © 2017 Augustin Lemesle
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.