3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-05-03 08:02:24 +00:00

Merge pull request #8 from nanoy42/dev

v3.6.2
This commit is contained in:
Yoann Pietri 2019-08-20 21:24:37 +02:00 committed by GitHub
commit 42494c9057
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 78 additions and 3 deletions

View file

@ -1,3 +1,7 @@
## v3.6.2
* Fix sur les prix des cotisations.
* Page À propose
* Fix typo
## v3.6.1
* Valeur par défaut des répartitions et calcul des répartitions
## v3.6.0

View file

@ -23,6 +23,7 @@ from . import views
urlpatterns = [
path('', views.home, name="home"),
path('home', views.homepage, name="homepage"),
path('about', views.about, name="about"),
path('coope-runner', views.coope_runner, name="coope-runner"),
path('admin/doc/', include('django.contrib.admindocs.urls')),
path('admin/', admin.site.urls),

View file

@ -1,5 +1,8 @@
import os
from django.shortcuts import redirect, render
from django.urls import reverse
from django.conf import settings
from preferences.models import GeneralPreferences
from gestion.models import Keg
@ -29,3 +32,22 @@ def coope_runner(request):
Just an easter egg
"""
return render(request, "coope-runner.html")
def about(request):
"""
A page about the project
"""
os.system("git -C " + settings.BASE_DIR + " shortlog -n $@ | grep \"):\" | sed 's|:||' >> " + settings.BASE_DIR + "/contributors.txt")
contributors = []
with open(settings.BASE_DIR + "/contributors.txt", "r") as f:
for line in f:
print(line)
print(line.split(" ")[0])
contributors.append((line.split(" ")[0], int(line.split(" ")[1].replace("(", "").replace(")", "").replace("\n", ""))))
os.system("rm " + settings.BASE_DIR + "/contributors.txt")
license = []
with open(settings.BASE_DIR + "/LICENSE", "r") as f:
for line in f:
license.append(line)
return render(request, "about.html", {"contributors": contributors, "license": license})

View file

@ -55,7 +55,7 @@
<th>Date</th>
<th>Nombre de cotisations</th>
<th>Montant des cotisations</th>
<th>Montant des cotisations pourle Phœnix</th>
<th>Montant des cotisations pour le Phœnix</th>
<th>Coopeman</th>
</tr>
</thead>

View file

@ -32,7 +32,7 @@ function get_menu(id){
function get_cotisation(id){
res = $.get("../preferences/getCotisation/" + id, function(data){
add_cotisation(data.pk, "", data.duration, data.amount, data.needQuantityButton);
add_cotisation(data.pk, data.duration, data.amount);
});
}

48
templates/about.html Normal file
View file

@ -0,0 +1,48 @@
{% extends 'base.html' %}
{% block entete %}À propos{% endblock %}
{% block navbar %}
<ul>
<li><a href="#first">CoopeV3</a></li>
<li><a href="#second">License</a></li>
<li><a href="#third">Contributeurs</a></li>
</ul>
{% endblock %}
{% block content %}
<section id="first" class="main">
<header class="major">
<h2>CoopeV3</h2>
</header>
<section>
CoopeV3 est un logiciel codé avec le framework Django pour répondre aux besoins de l'association Coopé Technopôle Metz. Il implémente une gestion des
adhérents, des cotisations, des transactions etc... Le code source de ce projet peut être trouvé sur github : <a href="https://github.com/nanoy42/coope" target="_blank">https://github.com/nanoy42/coope</a>.
</section>
</section>
<section id="second" class="main">
<header class="major">
<h2>License</h2>
</header>
<section>
Le code source est opensource et distribué sous la license MIT, dont voici le texte exact : <br>
{% for l in license %}
{{l}}<br>
{% endfor %}
(<a href="https://github.com/nanoy42/coope/blob/master/LICENSE" target="_blank">https://github.com/nanoy42/coope/blob/master/LICENSE</a>).
<br><br>
Version 3.6.2.
</section>
</section>
<section id="third" class="main">
<header class="major">
<h2>Contributeurs</h2>
</header>
<section>
Les contributeurs, triés par ordre décroissant de nombre de commits, sont:
<ol>
{% for contributor in contributors %}
<li>{{contributor.0}} ({{contributor.1}} commits)</li>
{% endfor %}
</ol>
</section>
</section>
{% endblock %}

View file

@ -42,6 +42,6 @@
<li><a href="https://www.facebook.com/coopesmetz/" class="icon fa-facebook alt"><span class="label">Facebook</span></a></li>
</ul>
</section>
<p class="copyright">coope.rez v3.6.1 (release stable) &copy; 2018-2019 Yoann Pietri.</p>
<p class="copyright">coope.rez v3.6.2 (release stable) &copy; 2018-2019 Yoann Pietri. <a href="{% url 'about'%}">À propos du projet</a>.</p>