Commit Graph

996 Commits

Author SHA1 Message Date
Javi Martín
4e72d9f3b7 Remove useless assignments to return values 2019-09-25 12:43:44 +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
Javier Martín
3c49ae3386 Merge pull request #3496 from LextrendIT/feature/refactor_embedded_video
Refactor embed video helper to disconnect from @proposal
2019-09-14 00:02:41 +02:00
decabeza
abf04bea4c Add related content section on proposal dashboard 2019-09-11 19:45:19 +02:00
Javi Martín
9fe8c47528 Apply Rails/SafeNavigation rubocop rule 2019-09-10 21:43:39 +02:00
Javi Martín
a5ba13b599 Apply Rails/Presence rubocop rule 2019-09-10 21:43:38 +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
Javi Martín
47b2c42a1d Apply IndentationConsistency rubocop rule 2019-09-10 20:02:15 +02:00
Javi Martín
e252d82cdb Apply IndentationWidth rubocop rule 2019-09-10 20:02:15 +02:00
Javi Martín
71d9ddd849 Apply rule to end files with a newline character 2019-09-10 20:02:15 +02:00
Javi Martín
911fe4e481 Simplify calls to render partial
We're also adding a bit of consistency, since most of our calls to
partial rendering omit the `partial` and `locals` keys.
2019-09-04 15:00:36 +02:00
Javi Martín
2fcf7c9d25 Remove unused module
The name of this file should be `settings_helper.rb` (which already
exists), and the method `setting_for_widget` was never used anywhere.
2019-08-27 17:22:22 +02:00
taitus
5953e87c71 Update help text and add dynamic example text
- Display help text and example text according to
  remote census configuration:

  Examples with expecte results:
  * With remote census without :date_of_birth and :postal_code:
    -> "To verify a user, your application needs: Document number"
    -> "Required fields for each user must be separated by commas and
        each user must be separated by semicolons."
    -> "Example: 12345678Z; 87654321Y"

  * With remote census with :date_of_birth required:
    -> "To verify a user, your application needs: Document number,
        Day of birth (dd/mm/yyyy)"
    -> "Required fields for each user must be separated by commas and
        each user must be separated by semicolons."
    -> "Example: 12345678Z, 01/01/1980; 87654321Y, 01/02/1990"

  * With remote census with :date_of_birth and :postal_code required:
    -> "To verify a user, your application needs: Document number,
        Day of birth (dd/mm/yyyy) and Postal Code"
    -> "Required fields for each user must be separated by commas and
        each user must be separated by semicolons."
    -> "Example: 12345678Z, 01/01/1980, 28001; 87654321Y, 01/02/1990, 28002"
2019-07-29 13:10:09 +02:00
taitus
12b6b1df05 Add new param to partial '_setting_table'
When we reuse the partial '_setting_table' to render the 3 types
of remote census settings, we need customize setting_name key by
default to clarify the information to render.

- Add new param 'setting_name' to partial '_setting_table'
- Create new setting helper method to use new setting_name param
  to display a more clarify setting name on table.
2019-07-29 13:10:09 +02:00
Senén Rodero Rodríguez
afd3644ace Activate menu entry when administrator is at importation pages 2019-07-29 13:07:24 +02:00
Senén Rodero Rodríguez
9b5f5e653a Add local census importations controller 2019-07-29 13:07:24 +02:00
Senén Rodero Rodríguez
76400a8c23 Add LocalCensusRecords link to admin menu
* Add to menu as a Settings sub-options
* Add translations for EN and ES locales
* Activate menu sub-option when user is at any LocalCensusRecords page
2019-07-29 13:07:24 +02:00
Senén Rodero Rodríguez
907fc18ff7 Override translations _destroy value depending of our translations managment logic
During any translatable resource edit, if you remove all translations
you will be redirected to same form with errors showing you one of
persisted but marked to destroy translations, without this patch
_destroy field value wil be true and you will no able to persist without
re-addding the same language through translation interface.
2019-07-02 17:15:39 +02:00
Senén Rodero Rodríguez
966b5b19ba Mark all translations that do not exist for destruction
When a translation not exists yet we can mark them all for destruction
by default. They already should be initialized correctly from database
or via nested attributes.
2019-07-02 17:15:34 +02:00
Senén Rodero Rodríguez
58164ee2ec Show validation error at translation interface
Only when present
2019-07-02 17:15:27 +02:00
Senén Rodero Rodríguez
041abe9044 Add persisted but marked for destruction translations to logic
Now we take into consideration locales persisted but marked for
destruction to complete some logic and to be able to show best
translations on different situations.
2019-07-02 17:15:22 +02:00
taitus
a5a62b7471 Add Tracking to backend_translations_enabled? 2019-07-01 15:03:48 +02:00
Senén Rodero Rodríguez
b2d8851bcc Add the option to disable languages managment to cover special cases
We understand languages management as the ability to add new languages
or remove existing ones. When no option is passed it will allow language
manipulation by default.

There are 3 special places where we want block languages management:
- admin legislation processes homepage
- admin legislation processes milestones summary
- proposals retired form

Co-Authored-By: Sebastia <sebastia.roig@gmail.com>
2019-07-01 15:03:48 +02:00
taitus
07577a050c Cover special translation interface behavior at admin information texts
When not yet exists I18nContentTranslation languages,
SiteCustomization::InformationText section render I18n.locale by
default. This was causing that `languages in use` description and
default selected language were incorrectly initialized.
2019-07-01 14:49:44 +02:00
Senén Rodero Rodríguez
5ada975448 Adapt globalize helper methods to new translation interface markup 2019-07-01 14:49:43 +02:00
Senén Rodero Rodríguez
9fd77d4042 Add languages in use description
New interface now shows a description to ensure the user
knows how many languages are currently in use.
2019-07-01 14:49:43 +02:00
Senén Rodero Rodríguez
a6e8fecc16 Highlight translation interface and translatable form fields
Only when translations interface is enabled.

Co-Authored-By: alessandro <agileontheweb@gmail.com>
2019-07-01 14:49:43 +02:00
taitus
395143ba5a Display button or informative text
When all remote translations are enqueued we not display button but
we display informative text.

Co-Authored-By: alessandro <agileontheweb@gmail.com>
2019-06-27 09:21:19 +02:00
taitus
72d1893703 Manage the remote translation button display
- Add remote_translation_button partial to layout
- Only display button when we have remote_translations and if current
  locale is include on available locales from remote translations service.
- Recover available locales from remote translations service.
  Use daily_cache to detect every day if remote translation service has
  added new available locale.

Co-Authored-By: alessandro <agileontheweb@gmail.com>
2019-06-27 09:21:18 +02:00
Senén Rodero Rodríguez
73563e5d86 Display needed translations when translation interface is disabled
Display only current locale translation when translation interface is disabled.

Co-Authored-By: javierm <javim@elretirao.net>
2019-06-27 09:20:25 +02:00
Senén Rodero Rodríguez
7e3f0b5c18 Add translation interface feature setting
Allow to enable/disable translation interface at frontend
2019-06-27 09:20:25 +02:00
Senén Rodero Rodríguez
bd3bb72370 Add proposals translation interface
* Convert proposal form into translatable one.
 * Adapt translatable shared spec to define an owner when running at
   frontend feature specs.
 * Remove old attributes from strong parameters.
2019-06-27 09:19:37 +02:00
Senén Rodero Rodríguez
4f0d1399f2 Fix html with links sanitization
Globalize attribute accessors were arriving here as Strings intead of
ActiveSupport::SafeBuffer so they were not sanitized correctly.
2019-06-27 09:19:36 +02:00
lalo
c6e4b2480f Add public changes to create and vote Poll:Questions with votation type 2019-06-12 19:44:14 +02:00
German Galia
74083df10f Add historic fields to participatory budget 2019-06-12 18:03:53 +02:00
German Galia
9ce524e1f3 Create tracker rol 2019-06-12 16:23:40 +02:00
German Galia
16ffa2a259 Add change log in investment participatory budget 2019-06-12 13:06:20 +02:00
Raimond Garcia
259e05c3e0 Merge pull request #3410 from LextrendIT/report_generation
Report generation, download CSV
2019-06-12 11:45:59 +02:00
German Galia
9d1ca3bfd4 Report generation. Download csv 2019-06-12 10:17:31 +02:00
lalo
c2860dda0e Add can_comment and can_edit_dossier abilities to valuators 2019-06-11 16:24:02 +02:00
lalo
be8a0dbe8a Add Milestone tag select filter on executions public page 2019-06-07 14:17:32 +02:00
Javi Martín
da59315530 Don't show links to budget results if disabled 2019-06-06 12:18:05 +02:00
Javi Martín
eb7dc3ef2d Extract partial to render budget navigation links 2019-06-06 12:17:52 +02:00
Raimond Garcia
a874d25bfa Merge pull request #3413 from LextrendIT/feature/notify_evaluation_comments
notify by email new evaluation comments
2019-06-06 11:29:38 +02:00
Javier Martín
72c6b05c64 Merge pull request #3376 from LextrendIT/3350_rename_debates_comments_admin
Refactor admin/debates and admin/comments to hidden
2019-06-05 19:15:21 +02:00
Julian Nicolas Herrero
7802305b18 Merge pull request #3585 from consul/images_and_documents_settings
Images and documents settings
2019-06-05 19:11:22 +02:00
lalo
8061bfa5e8 Send email to users related with an investment when valuation comment is created 2019-06-05 17:02:59 +02:00
lalo
28815cb290 Create new email template for new evaluation comment created and add it to system_emails view 2019-06-05 16:22:12 +02:00
lalo
d0e1eff532 Add description field to administrator users like evaluators description 2019-06-05 16:18:12 +02:00
Julian Herrero
8e0bbf54f6 Replace harcoded images and documents settings 2019-06-04 11:50:09 +02:00