Commit graph

307 commits

Author SHA1 Message Date
Ludovic Stephan a0bd437250 Merge branch 'master' into aureplop/kpsul_js_refactor 2018-07-18 15:02:19 +02:00
Martin Pépin ea737dab29 Merge branch 'Kerl/drop_py2_compat' of git.eleves.ens.fr:cof-geek/gestioCOF into Kerl/drop_py2_compat 2018-04-16 14:18:21 +02:00
Martin Pépin a73736bf41 Merge branch 'master' into Kerl/drop_py2_compat 2018-04-16 14:12:36 +02:00
Martin Pépin 6d0ec6de43 Merge branch 'master' into qwann/separate_list 2018-04-07 14:09:48 +02:00
Martin Pépin fba105fdd1 Merge branch 'master' into aureplop/kfet-sticky_thead 2018-04-07 13:32:20 +02:00
Qwann cc27e4d964 show not sold article in a different list 2018-03-22 15:25:03 +01:00
Aurélien Delobelle 42e762bc4a Py3 allows to shorten super() 2018-01-16 16:50:27 +01:00
Aurélien Delobelle 478f56d94b kfet -- Create initial statement on checkout save
- Why? Because it should be the actual behavior.
- To allow using arithmetic operations with values of DecimalField when
object are not retrieved from DB, some strings are replaced by Decimal
or int.
If you wonder why it's not automatically done, see:
https://code.djangoproject.com/ticket/27825
2018-01-16 16:49:02 +01:00
Aurélien Delobelle 5ef219c88e kfet -- Update tests to reflect last changes + fix
- Remove duplicate categories returned by the view 'kpsul_articles_data'.
- Fix in account filtering of the view 'history_json'.

- Tests of the view 'kpsul_articles_data' are updated to reflect changes of the
  data format.
- The views returning Account and Checkout data as JSON no longer
  exists. The related tests are moved.
- The view canceling transfers has been merged with the one canceling
  the other operations. The related tests are moved.
2018-01-12 18:48:42 +01:00
Martin Pépin 5a5b60ec4d Merge branch 'master' into Kerl/drop_py2_compat 2018-01-10 20:12:59 +01:00
Ludovic Stephan f03ce35126 Merge branch 'master' into aureplop/kpsul_js_refactor 2018-01-10 19:09:41 +01:00
Ludovic Stephan b62f0293dd Merge branch 'master' into aureplop/kpsul_js_refactor 2018-01-10 18:55:33 +01:00
Martin Pépin 475f1adec5 Remove "coding: utf8" line 2018-01-06 16:10:13 +01:00
Aurélien Delobelle 32720c56a6 kfet -- Tables are sortable
Many tables in kfet app templates become sortable:
account list, negative account list, article list, article inventory
list, article supplier list, article category list, checkout list,
checkout statement list, inventory list, inventory details, order list,
order creation, order details.

This is achieved thanks to the jQuery plugin 'tablesorter':
https://mottie.github.io/tablesorter/docs/

- Affected tables also got sticky headers (it stays visible on scroll).
- Dates format are modified in order to ease the date sorting with the
plugin (it avoids writing a custom parser, or an extractor from
additional hidden element in the table cells).
- Tables whose content is classified by category (of articles) now uses
several tbodies. This has minor effects on the tables style.
- Tags of the header help signs become 'i', instead of 'span', in order
to avoid weird spacing.
2017-11-27 18:24:22 +01:00
Aurélien Delobelle b0b0542407 Upgrade to Django 1.11
- Deprecation warnings using Django 1.8 are resolved.
- Deprecation warnings using Django 1.11 are resolved.

- Admin: grappelli is no longer used.
- Upgrade to django-autocomplete-light v3 (v2 is not 1.11 compatible).
  * autocomplete.modelform_factory being dropped, code uses dal Select2
    views and widgets.
2017-11-19 18:41:39 +01:00
Aurélien Delobelle af3a7cf697 Reapply fix to kfetauth (…) and fix tests 2017-10-24 17:56:14 +02:00
Aurélien Delobelle 8cdb4c62fc Merge branch 'master' into test/views 2017-10-24 16:45:26 +02:00
Martin Pépin 116b4da1a5 Merge branch 'test/views_kfet' into test/views 2017-10-10 21:15:49 +02:00
Aurélien Delobelle b42452080f Mass cleaning of kfet' authentication machinery
AccountBackend
- Should now work if used in AUTHENTICATION_BACKENDS settings.
- It does not retieve itself the password, as it should not be used
this way.

GenericBackend
- Delete useless 'username' arg of its 'authenticate()' method.
- Now delete the token in DB.

TemporaryAuthMiddleware
- New name of the middleware is more meaningful.
- Is now responsible to retrieve the password from the request, instead
of the AccountBackend.

GenericTeamToken model
- Add a manager' method to create token, avoiding possible error due to
unicity constraint.

GenericLoginView (authentication with the kfet generic user)
- Replace obscure system with a 100% HTTP handling.
- See comments for more information.

Misc
- More docstrings!
- More tests!
- Add some i18n.
- Add kfet/confirm_form.html template:
    Ask user to confirm sth via a form (which will send a POST request).
    Context variables:
        * title: the page title
        * confirm_url: action attribute for <form>
        * text: displayed confirmation text
- kfet.js : Add functions allowing to emit POST request from <a> tag.
- Non-link nav items from kfet navbar also get a 'title'.
- A utility has been found for the 'sunglasses' glyphicon!
2017-09-25 17:57:47 +02:00
Aurélien Delobelle bf61e41b50 Move auth-related from 'kfet' app to 'kfet.auth'. 2017-09-19 17:05:51 +02:00
Martin Pépin 937a485704 Merge branch 'master' into Production 2017-09-09 22:03:32 +02:00
Martin Pépin 35b352ac1d Fix mistake introduced in 51f4bf3fb5 2017-09-04 14:50:12 +02:00
Aurélien Delobelle 414b0eb433 Add missing perms to view/edit kfet config 2017-08-16 21:28:16 +02:00
Aurélien Delobelle 6e82a2cf88 minor fix 2017-05-31 22:00:51 +02:00
Aurélien Delobelle 8c6d56b27c Add Wagtail CMS for kfet app.
K-Fêt
- Integrate wagtail to serve "static" pages of old K-Fêt website
- Fixture "kfetcms/kfet_wagtail_17_05" contains a copy of old website
(as in May 2017).
- Media files can be got until end of June 17 at
http://partage.eleves.ens.fr//files/604e6dea2ceebc66b1936c6b3f911744/kfet_media.tar.gz

Login/logout
- Update package django_cas_ng to last version.
- Clean COFCASBackend.
- Change CAS version to 3 (version used on eleves.ens). This enables
the logout redirection (for CAS ofc).
- Add messages and clean existing ones on login/logout (for both
outsider and cas users).

Misc
- Update settings to bypass an incompability between debug-toolbar and
wagtailmenus packages.
- Better management of dev/test-specific urls (if debug-toolbar wasn't in
INSTALLED_APPS, media files were not served).
- UI improvements.
2017-05-30 20:44:30 +02:00
Aurélien Delobelle e60e347a53 Add base templates to extend
- kfet/base_col_1.html for one column content.
- kfet/base_col_2.html for two columns content (left for fixed content,
right for main content).
2017-05-20 13:57:21 +02:00
Ludovic Stephan c76b729320 Merge branch 'aureplop/ws_checkout' into 'aureplop/kpsul_js_refactor'
Add last statement update support.

See merge request !232
2017-05-19 21:50:29 +02:00
Aurélien Delobelle 109a692cea Order creation improvements.
- colspan takes into account the scale length.
- add box_capacity
2017-05-19 17:55:31 +02:00
Aurélien Delobelle c0b8430a12 Better scale management for order creation
+ Extends labels formatting of scale.
2017-05-19 17:40:06 +02:00
Aurélien Delobelle ecce2fda21 Merge branch 'master' into aureplop/clean_scroll 2017-05-19 14:08:57 +02:00
Aurélien Delobelle e9073e2265 Improve multiple select inputs
+ Group edition form gains success message, is prettier
+ Fix: K-Fêt prefix for group name on this form
2017-05-18 21:41:23 +02:00
Aurélien Delobelle 1a661c1fd3 revert 2017-05-18 20:29:29 +02:00
Aurélien Delobelle 5776c81764 Clean navbar + content_center only
- Add css transitions on buttons + navbar links.
- Clean css of navbar.
- Clean templates with only centered form/content.
- Page opened when login as generic team user close itself (only for
  non-CAS users).
- A message is added when generic team user connects.
- Fix extra space on right when messages are prompted.
2017-05-18 20:17:05 +02:00
Aurélien Delobelle 914d2ca870 Add last statement update support.
K-Psul
- Add handler for checkout data (balance update)
- New statements are sent through ws, and display live on K-Psul.
2017-05-18 13:33:53 +02:00
Aurélien Delobelle cb0c0be8a2 filters on ws for khistory
- fix filters on ws khistory updates
- add filters for transfers against accounts
2017-05-16 18:08:40 +02:00
Aurélien Delobelle 02a015e633 fix data sent to ws by perform_transfers 2017-05-16 17:08:51 +02:00
Aurélien Delobelle bacc079778 Merge branch 'master' into aureplop/kpsul_js_refactor 2017-05-16 16:48:12 +02:00
Ludovic Stephan f4cb1e2e83 Add opesonly option 2017-05-15 14:17:58 -03:00
Martin Pepin 5d8427e601 Merge branch 'aureplop/fewer_requests' into 'master'
Moins de requêtes

See merge request !217
2017-05-12 21:13:35 +02:00
Aurélien Delobelle b1e46792c8 (little) cleaning of order_create view 2017-05-10 13:11:47 +02:00
Ludovic Stephan 5c5fc6da1b Merge branch 'aureplop/less_prices_history' into 'master'
Less articles prices history

Closes #142

See merge request !224
2017-04-25 14:32:18 +02:00
Ludovic Stephan 20d635137c Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_history 2017-04-24 11:30:01 -03:00
Aurélien Delobelle 2eee8f58aa Merge branch 'master' into aureplop/fewer_requests 2017-04-17 20:45:01 +02:00
Ludovic Stephan b2a5dfd682 Move permission check 2017-04-14 12:51:58 -03:00
Ludovic Stephan 100686457b Change select_related for future compatibility 2017-04-14 12:47:15 -03:00
Ludovic Stephan b544d6c5b3 Better alignment 2017-04-14 12:45:38 -03:00
Ludovic Stephan 659b20891e Add filter to cancel_opes 2017-04-14 12:43:59 -03:00
Aurélien Delobelle b0d35667b3 Merge branch 'master' into aureplop/kpsul_js_refactor 2017-04-14 15:56:44 +02:00
Aurélien Delobelle 7db497d095 Less articles prices history
- Prices given with order_to_inventory are saved to db only if they are
  updated (it doesn't create a new price row each time)

Fixes #142.
2017-04-13 16:34:29 +02:00
Aurélien Delobelle 9668f1d1ec Account: check_negative() -> update_negative() 2017-04-13 15:48:13 +02:00