-
Notifications
You must be signed in to change notification settings - Fork 10
Refatoração dos painéis do JournalProxyEditor com mapeamento de seções #1314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
22bbac1
1f97601
76959bc
74ff1cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Generated by Django 5.2.7 on 2026-02-08 01:08 | ||
|
|
||
| from django.db import migrations | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ("journal", "0058_rename_journal_inline_panel_related_names"), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.CreateModel( | ||
| name="JournalProxyAdminOnly", | ||
| fields=[], | ||
| options={ | ||
| "verbose_name": "Journal (Admin Only)", | ||
| "verbose_name_plural": "Journals (Admin Only)", | ||
| "proxy": True, | ||
| "indexes": [], | ||
| "constraints": [], | ||
| }, | ||
| bases=("journal.journal",), | ||
| ), | ||
| ] |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,169 +7,260 @@ | |||||||||||||
|
|
||||||||||||||
| class JournalProxyEditor(Journal): | ||||||||||||||
| panels_titles = [ | ||||||||||||||
| # SOBRE O PERIÓDICO - 08 - Ficha Bibliográfica - F - Ano de criação do periódico / ISSN | ||||||||||||||
| AutocompletePanel("official", read_only=True), | ||||||||||||||
| # SOBRE O PERIÓDICO - 08 - Ficha Bibliográfica - A - Título do periódico | ||||||||||||||
| FieldPanel("title", read_only=True), | ||||||||||||||
| # SOBRE O PERIÓDICO - 08 - Ficha Bibliográfica - B - Título abreviado do periódico | ||||||||||||||
| FieldPanel("short_title"), | ||||||||||||||
| InlinePanel("other_titles", label=_("Other titles")), | ||||||||||||||
| # InlinePanel("other_titles", label=_("Other titles")), | ||||||||||||||
| ] | ||||||||||||||
|
|
||||||||||||||
| panels_scope_and_about = [ | ||||||||||||||
| InlinePanel("mission", label=_("Mission")), | ||||||||||||||
| # InlinePanel("mission", label=_("Mission")), | ||||||||||||||
|
|
||||||||||||||
| # SOBRE O PERIÓDICO - 01 - brief history | ||||||||||||||
| InlinePanel("history", label=_("Brief History")), | ||||||||||||||
|
|
||||||||||||||
| # SOBRE O PERIÓDICO - 05 - focus and scope | ||||||||||||||
| InlinePanel("focus", label=_("Focus and Scope")), | ||||||||||||||
| AutocompletePanel("subject"), | ||||||||||||||
| InlinePanel("thematic_area", label=_("Thematic Areas")), | ||||||||||||||
| AutocompletePanel("subject_descriptor"), | ||||||||||||||
| AutocompletePanel("wos_area"), | ||||||||||||||
| AutocompletePanel("wos_db"), | ||||||||||||||
| # AutocompletePanel("subject"), | ||||||||||||||
| # InlinePanel("thematic_area", label=_("Thematic Areas")), | ||||||||||||||
| # AutocompletePanel("subject_descriptor"), | ||||||||||||||
| # AutocompletePanel("wos_area"), | ||||||||||||||
| # AutocompletePanel("wos_db"), | ||||||||||||||
|
|
||||||||||||||
| # SOBRE O PERIÓDICO - 07a - Fontes de Indexação padronizadas | ||||||||||||||
| AutocompletePanel("indexed_at"), | ||||||||||||||
| # SOBRE O PERIÓDICO - 07b - Fontes de Indexação adicionais / não padronizadas | ||||||||||||||
| AutocompletePanel("additional_indexed_at"), | ||||||||||||||
| AutocompletePanel("vocabulary"), | ||||||||||||||
| InlinePanel("title_in_database", label=_("Title in Database")), | ||||||||||||||
|
|
||||||||||||||
| # AutocompletePanel("vocabulary"), | ||||||||||||||
| # InlinePanel("title_in_database", label=_("Title in Database")), | ||||||||||||||
| ] | ||||||||||||||
|
|
||||||||||||||
| panels_institutions = [ | ||||||||||||||
| # SOBRE O PERIÓDICO - 08 - Ficha Bibliográfica - C1 - Publicação de | ||||||||||||||
| InlinePanel("owner_history", label=_("Owner")), | ||||||||||||||
| # SOBRE O PERIÓDICO - 08 - Ficha Bibliográfica - C2 - Publicação de | ||||||||||||||
| InlinePanel("publisher_history", label=_("Publisher")), | ||||||||||||||
|
|
||||||||||||||
| # POLÍTICA EDITORIAL - 14 - Patrocinadores e Agências de Fomento | ||||||||||||||
| InlinePanel("sponsor_history", label=_("Sponsor")), | ||||||||||||||
|
Comment on lines
+47
to
49
|
||||||||||||||
| InlinePanel( | ||||||||||||||
| "copyright_holder_history", | ||||||||||||||
| label=_("Copyright Holder"), | ||||||||||||||
| ), | ||||||||||||||
| # InlinePanel( | ||||||||||||||
| # "copyright_holder_history", | ||||||||||||||
| # label=_("Copyright Holder"), | ||||||||||||||
| # ), | ||||||||||||||
| ] | ||||||||||||||
|
|
||||||||||||||
| panels_website = [ | ||||||||||||||
| # SOBRE O PERIÓDICO - 10a - Contato | ||||||||||||||
| FieldPanel("contact_name"), | ||||||||||||||
| # SOBRE O PERIÓDICO - 10b - Contato | ||||||||||||||
| FieldPanel("contact_address"), | ||||||||||||||
| # SOBRE O PERIÓDICO - 10c - Contato | ||||||||||||||
| AutocompletePanel("contact_location"), | ||||||||||||||
| # SOBRE O PERIÓDICO - 10d - Contato | ||||||||||||||
| InlinePanel("journal_email", label=_("Contact e-mail")), | ||||||||||||||
|
|
||||||||||||||
| # SOBRE O PERIÓDICO - 09d - Websites | ||||||||||||||
| FieldPanel("logo", heading=_("Logo")), | ||||||||||||||
| # FieldPanel("journal_url"), | ||||||||||||||
| InlinePanel("related_journal_urls", label=_("Journal Urls")), | ||||||||||||||
| # SOBRE O PERIÓDICO - 09c - Websites | ||||||||||||||
| FieldPanel("journal_url"), | ||||||||||||||
|
|
||||||||||||||
| # InlinePanel("related_journal_urls", label=_("Journal Urls")), | ||||||||||||||
|
Comment on lines
+69
to
+71
|
||||||||||||||
| FieldPanel("journal_url"), | |
| # InlinePanel("related_journal_urls", label=_("Journal Urls")), | |
| # FieldPanel("journal_url"), | |
| InlinePanel("related_journal_urls", label=_("Journal Urls")), |
Copilot
AI
Feb 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The section-mapping comments are inconsistent here (about_the_journal vs the rest of the file using SOBRE O PERIÓDICO/POLÍTICA EDITORIAL). Since the main goal of this PR is clear field-to-section mapping, please standardize the terminology/casing so the mapping is unambiguous and searchable.
| # about_the_journal - 03b - Conformidade com a Ciência Aberta - declaração de conformidade | |
| # SOBRE O PERIÓDICO - 03b - Conformidade com a Ciência Aberta - declaração de conformidade |
Copilot
AI
Feb 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These section-mapping comments still contain placeholders like 0?. This undermines the refactor’s purpose (explicit mapping to the form sections) and makes it hard to trust the documentation. Please replace with the correct section number/name (or remove the mapping comment if it can’t be confirmed yet).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Large blocks of panels are being kept as commented-out code. This file is now the only place in the
journalapp that uses commented-outInlinePanel/AutocompletePaneldefinitions, which makes the panel configuration harder to read/maintain over time. Prefer removing these panels entirely (git history already preserves them) or gating them behind an explicit configuration/feature flag if they are expected to return.