Commit Graph

16 Commits

Author SHA1 Message Date
Javi Martín
863b326142 Validate both the model and its translations
This way we guarantee there will be at least one translation for a model
and we keep compatibility with the rest of the application, which
ideally isn't aware of globalize.
2018-10-22 16:30:28 +02:00
Javi Martín
2ab49a1832 Refactor globalize models code using a concern
I've chosen the name "Globalizable" because "Translatable" already
existed.
2018-10-22 16:28:53 +02:00
Javi Martín
6278175f57 Update legislation drafts translatable fields
Updating it required reorganizing the form so translatable fields are
together.

We also needed to add a `hint` option to the form label and input
methods so the hint wouldn't show up for every language.

Finally, the markdown editor needed to use the same globalize attributes
as inputs, labels and hints, which adds a bit of duplication.
2018-10-22 15:44:14 +02:00
Javi Martín
3fb98b1752 Fix typos 2018-09-19 14:54:52 +02:00
Javi Martín
a0f1a9ec1b Be consistent checking changes in draft versions
There's no reason to only convert Markdown to HTML in translations when
their body changes but to always convert it when the "main" body field
changes.

Whether we should always use the condition or never use it is something
we can debate about, though.
2018-09-19 14:54:24 +02:00
Marko Lovic
64d72ca8e7 Enable JS in shared translatable test
Due to its markdown editor, the admin draft version page
requires JS to correctly render the draft version form.
2018-09-19 14:54:24 +02:00
Marko Lovic
05bfa193cd Make Legislation Draft Versions translatable 2018-09-19 14:54:24 +02:00
Amaia Castro
7d118a0c27 Add draft versions comments count to admin views 2017-03-10 12:10:28 +01:00
Amaia Castro
49f4bf5bc5 Destroy object when their parent object is destroyed 2017-01-13 19:34:17 +01:00
Amaia Castro
b8f034d896 Legislation annotations/comments page 2017-01-09 09:29:15 +01:00
Amaia Castro
375602d297 Display title with an * when status is draft in version chooser 2017-01-04 12:15:12 +01:00
Amaia Castro
f040759693 Show only published draft versions to users (and also drafts to admins) 2017-01-03 22:08:54 +01:00
Amaia Castro
5627b18be2 Draft Version page 2017-01-02 18:05:15 +01:00
Amaia Castro
86009bfcac Render TOC for legislation draft versions 2016-12-15 11:32:20 +01:00
Amaia Castro
766f509f8e Base legislation processes and draft versions page structure for public site 2016-12-15 11:32:20 +01:00
Amaia Castro
e4fe499e66 DraftVersion base model and very basic admin pages 2016-12-06 12:10:20 +01:00