Commit graph

1820 commits

Author SHA1 Message Date
Martin Pepin 92c946a286 Merge branch 'aureplop/clean_perms' into 'master'
Clean K-Fêt permissions

See merge request !235
2017-05-23 17:40:58 +02:00
Aurélien Delobelle 1d269ef4f9 Update migration to keep perms.
If content type for old kfet.GlobalPermissions exists:
- custom permissions related to this content type are updated to new content types,
- then we can safely remove this content type.
2017-05-23 16:48:33 +02:00
Aurélien Delobelle cd5a2e0591 Move K-Fêt global permissions. 2017-05-23 13:47:40 +02:00
Martin Pépin 3c8f1c58c5 Use transaction.atomic instead of lock_table
lock_table used LOCK which is mysql-specific
2017-05-23 05:58:09 +01:00
Martin Pépin f0f1585661 Registration: remove success var, fix message
`member.profile` was not up-to-date where we used to send the success
message => move it to the place where the success var is set tu `True`
and remove the success var was which becomes irrelevant.
2017-05-23 05:41:57 +01:00
Aurélien Delobelle a36d002b17 Merge branch 'Kerl/apt_upgrade' into 'master'
Upgrade apt packages while provisioning

See merge request !233
2017-05-22 15:08:16 +02:00
Martin Pépin 3762b38afe Remove useless pip upgrade in bootstrap.sh 2017-05-22 10:29:38 +01:00
Martin Pépin dba8a0a857 Remove the num field in CofProfile 2017-05-22 01:00:32 +01:00
Martin Pépin 76dcaf7d51 drop py2 compat 2017-05-21 23:58:44 +01:00
Aurélien Delobelle eff1b7ff19 Cleaning - Article autocomplete, ForestDisplay and more
K-Psul
- Improve article autocompletion.

ArticleManager
- "selected" property becomes a reference to an article in the data properties.

ForestDisplay
- Add data property "object" linked to object being represented
- Use class to identify objects instead of id. Allow multiple displays of same ModelForest.
- New get_class method returns the class selector to find an object container in the DOM.
- New get_dom method returns the DOM element from an object in the ModelForest.

Cancellation view
- Fix 500 on cancel with already canceled opes/transfers
2017-05-21 20:03:37 +02:00
Martin Pépin 17b140fb12 Upgrade apt packages while provisioning 2017-05-21 18:42:30 +01:00
Aurélien Delobelle 51083f9195 Merge branch 'aureplop/kpsul_js_refactor' into aureplop/js_basket 2017-05-21 13:01:51 +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 1845ce825f jpp
Fixes #90
2017-05-19 20:13:36 +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 c11c3f84ed clean big tables forms 2017-05-19 16:42:26 +02:00
Aurélien Delobelle 4344b7d537 chrome support 2017-05-19 15:13:27 +02:00
Aurélien Delobelle 0995f712ca clean hover/focus/disabled btn 2017-05-19 14:48:57 +02:00
Aurélien Delobelle ecce2fda21 Merge branch 'master' into aureplop/clean_scroll 2017-05-19 14:08:57 +02:00
Aurélien Delobelle 51dca32d05 shorter transitions 2017-05-19 14:01:13 +02:00
Aurélien Delobelle ae27065626 Group permissions select multiple -> checkboxes
- Add handler for CheckboxSelectMultiple in form_field_snippet.html.
- Add template filter "widget_type" to get widget class name.
- Group permissions selection becomes easier.
2017-05-19 13:42:41 +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 8a9d6712ee Merge branch 'aureplop/kpsul_js_refactor' into aureplop/js_basket 2017-05-18 13:41:56 +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 86a3ae3c2f clean
- basket.add_withdraw takes a positive amount
- move models and formatters definitions with their siblings
2017-05-18 12:49:39 +02:00
Ludovic Stephan ef1f00c15b Merge branch 'aureplop/fix_ws' into 'aureplop/kpsul_js_refactor'
Fix some ws updates on khistory

See merge request !230
2017-05-18 03:39:53 +02:00
Aurélien Delobelle a0503d0c53 Refactor K-Psul basket (big part)
K-Psul - Basket refactor
- Almost done.

ModelForest
- Add create method (based on previous get_or_create). Direction defaults to 0.
- Add delete method.
- Methods find, traverse, update, delete can also take a model (class) as first
  argument. String representation of model still works.
- Fix child linking to parent in create method.

ModelForest -> ForestDisplay
- (One-way data binding) Changes on a ModelForest are directly reflected on
  listening ForestDisplay(s).
- ArticleManager and KHistory become simpler.

Config
- Add addcost key, shorthand for double addcost keys check.

K-Psul
- Improve display for basket summary and previous operation.
- Clean js code / duplicates.
- Some components gains chance to trigger/handle events. They are really happy.
  Eg basket amounts and summary are updated thanks to these events if the
  selected account is changed.

Formatters
- Fixes addcost and amount display.

History
- Fix options management (api_options were overrided and K-Psul displayed more
  than the last day history).
- Fix data display, thanks to formatters fixes and modelforest fixes.
2017-05-18 02:13:42 +02:00
Aurélien Delobelle 24b9aaae39 Revert template literals use
They were adding spaces at some places.
2017-05-16 18:47:26 +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
Aurélien Delobelle bc71e1628a keep eslint quiet 2017-05-16 12:27:39 +02:00
Aurélien Delobelle 311e0c48bd Merge branch 'Aufinal/refactor_history' into 'aureplop/kpsul_js_refactor'
Aufinal/refactor history

See merge request !192
2017-05-16 10:48:07 +02:00
Ludovic Stephan 6a6fc38ead Add selection reset to cancel_opes 2017-05-15 21:10:39 -03:00
Ludovic Stephan 43e772363e Extend history options 2017-05-15 19:29:12 -03:00
Ludovic Stephan 93c8844b3f typo 2017-05-15 19:28:24 -03:00
Ludovic Stephan c2da055b60 Remove duplicate ws updates 2017-05-15 18:59:18 -03:00
Aurélien Delobelle 95a8b484e0 Merge branch 'Aufinal/fix_history' into 'master'
Fix asynchronous calls with resetSettings

See merge request !229
2017-05-15 23:43:28 +02:00
Ludovic Stephan 647b32e727 Move displayAddcost function 2017-05-15 17:52:49 -03:00
Ludovic Stephan ac33e6302e Fix addExistingPurchase + few other bugs 2017-05-15 17:39:33 -03:00
Ludovic Stephan ad42687293 Fix tranfers page 2017-05-15 15:27:46 -03:00
Ludovic Stephan f4cb1e2e83 Add opesonly option 2017-05-15 14:17:58 -03:00
Martin Pepin 6871945dcd Merge branch 'aureplop/fix_perms' into 'master'
Fix UserGroupForm

Closes #161

See merge request !228
2017-05-15 11:29:33 +02:00
Ludovic Stephan bf0e345301 Fix asynchronous calls with resetSettings
The `resetSettings` function now returns the ajax object, allowing to
chain other calls to it, e.g. the `getHistory` function.
2017-05-14 23:50:09 -03:00
Ludovic Stephan c12c705f8b Bind ForestDisplay to initial data 2017-05-14 20:18:31 -03:00
Aurélien Delobelle e0b1db1e1e more robust tests 2017-05-14 22:19:25 +02:00