cafebabel / cafebabel.com

The new Cafebabel!
https://cafebabel.com
MIT License
2 stars 1 forks source link

Profile-edit page layout #489

Closed johangiraud closed 6 years ago

johangiraud commented 6 years ago

translation is undefined in users/edit.html. How can I define it? @vinyll @davidbgk

johangiraud commented 6 years ago

Here I need help to close :

translation is undefined in users/edit.html. How can I define it? @vinyll @davidbgk

johangiraud commented 6 years ago

I guess it just needs to be declared somewhere in the helper.js or so? @vinyll

vinyll commented 6 years ago

@cafebabel-webmaster: I'm not certain I understand your issue well. {% macro contribution_list() %} should probably {% macro contribution_list(articles, type) %} where type can be "translations" or "articles" and articles can be a list of translations or of articles.

johangiraud commented 6 years ago

No, I need it to be both at the same time: article list and translation list. Exactly the way it works in user/detail actually @vinyll

vinyll commented 6 years ago

The translations and the articles are not mixed in the HTML. In users/details.html, you can do:

…
{% macro contribution_list(articles, 'articles') %}
…
{% macro contribution_list(translations, 'translations') %}
…
johangiraud commented 6 years ago

Ok I try

johangiraud commented 6 years ago

No, because in {{ contribution_list(articles, 'articles' }} I would need translations variable too and the other way around.

vinyll commented 6 years ago

You're getting into the next step in Python! 🐍

johangiraud commented 6 years ago

You're getting into the next step in Python! 🐍

Yeah!