Javi Martín
55a190f44a
Remove unneeded _html suffix in I18n keys
...
This suffix does the same thing as calling `.html_safe` on them. So we
don't need to use it in texts that don't use HTML.
2019-10-08 13:20:22 +02:00
Javi Martín
6fa67b5e53
Use active record translations for labels
...
This way we can simplify the way we generate form fields. In some cases,
we also use the human attribute in table headers, which IMHO makes
sense.
I haven't moved all of them: for example, sometimes a label is
different depending on whether it's shown to administrators, valuators,
or users. And I haven't touched the ones related to devise, since I
wasn't sure about possible side effects.
Note I've also removed placeholders when they had the same text as their
labels, since they weren't helpful. On the contrary, the added redundant
text to the form, potentially distracting users.
2019-10-07 01:56:23 +02:00
Javi Martín
3ea9f3cecf
Simplify generating form fields with labels
...
Instead of generating the label and then a field without a label, we can
directly generate a field with a label.
2019-10-05 16:01:58 +02:00
Senén Rodero Rodríguez
d1af36d1be
Remove uneeded lines
...
Rails form already add an error class when image or document attachments
has validations errors.
2019-09-23 10:51:25 +02:00
Javi Martín
f9ed186909
Add rubocop spacing rules
...
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Julian Herrero
b460c024f3
Use double quotes in app/helpers
2019-03-15 09:26:49 +01:00
Vicente Mendoza
410caced3e
test added for changes at documentable's view
2018-01-24 12:48:06 +01:00
Manuel Ortega
3531060476
Added partial in order to show documents collection. Added DocumentsHelper method in order to show documents link with humanized file type and file size
2017-10-21 16:53:41 +02:00
Bertocq
ce0a7f6fad
Rubocop autocorrections
2017-10-17 22:00:00 +02:00
Senén Rodero Rodríguez
6c1d828a62
Remove unneded code
2017-09-27 11:38:38 +02:00
Senén Rodero Rodríguez
0a86727c6a
Move method 'recover_image_from_cache' from imageable controllers to image.
2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
77f63a4c44
Add _destroy parameter to nested documents
2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
f8d78ec4ab
Remove new_nested action from images controller. Use cocoon gem to manage new nested fields creation on images.
2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
88a7a29d27
Remove new_nested action from documents controller. Use cocoon gem to manage new nested fields creation on documents.
2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
824dd26d5a
User new direct uploads controllers action on documentable. Skipped spec.
2017-09-26 13:55:51 +02:00
Senén Rodero Rodríguez
826385f659
Extract ajax upload and destroy_upload actions from images and documents controllers and place them at new controllers to manage direct uploads
2017-09-26 13:55:28 +02:00
Senén Rodero Rodríguez
6f71da07ee
Duplicate documentable code and rename for imageable
2017-09-26 13:55:03 +02:00
decabeza
b43e464292
renames js class
2017-09-20 19:27:11 +02:00
Bertocq
a3428ee589
Use snake_case for method names
2017-09-15 14:06:17 +02:00
Bertocq
e4e78c8f16
Rubocop autocorrections
2017-09-14 15:08:35 +02:00
Senén Rodero Rodríguez
57930df535
Remove unused code
2017-08-25 19:14:15 +02:00
Senén Rodero Rodríguez
796e6f9ce1
Code adaptation to work with nested documents and plain documents.
2017-08-25 18:34:55 +02:00
Senén Rodero Rodríguez
b2a6189cf5
Views and helpers refactor
2017-08-25 18:34:54 +02:00
Senén Rodero Rodríguez
4081dded5f
Add nested documents to new budgetinvestments.
2017-08-25 18:34:53 +02:00
Senén Rodero Rodríguez
cc89907bff
Add nested documents to proposal form.
2017-08-25 18:34:52 +02:00
Senén Rodero Rodríguez
e9c5f77368
Accept nested attributes for documents on proposals. Adapt documentable js file to allow many input files at the same page.
2017-08-25 18:34:51 +02:00
Senén Rodero Rodríguez
c438e510c0
Add rel attribute with nofollow value.
2017-08-25 18:34:51 +02:00
Senén Rodero Rodríguez
3a7c9d9f83
Add documentables helper
2017-08-25 18:34:49 +02:00
Senén Rodero Rodríguez
a2130689ed
Create documentable concern and add it to budget investment model. Create documents controller, documents helper, routes, translations and specs
2017-08-25 17:27:37 +02:00