Skip to content
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

Revert "Realiza adições e alterações no formulário de Journal" #796

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 0 additions & 183 deletions journal/migrations/0026_editorialpolicy_opensciencecompliance.py

This file was deleted.

34 changes: 3 additions & 31 deletions journal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,10 +587,10 @@ def autocomplete_label(self):
panels_scope_and_about = [
AutocompletePanel("indexed_at"),
AutocompletePanel("additional_indexed_at"),
AutocompletePanel("subject"),
FieldPanel("subject"),
AutocompletePanel("subject_descriptor"),
InlinePanel("thematic_area", label=_("Thematic Areas"), classname="collapsed"),
AutocompletePanel("wos_db"),
FieldPanel("wos_db"),
AutocompletePanel("wos_area"),
InlinePanel("mission", label=_("Mission"), classname="collapsed"),
InlinePanel("history", label=_("Brief History"), classname="collapsed"),
Expand Down Expand Up @@ -635,7 +635,6 @@ def autocomplete_label(self):
InlinePanel("open_data", label=_("Open data"), classname="collapsed"),
InlinePanel("preprint", label=_("Preprint"), classname="collapsed"),
InlinePanel("review", label=_("Peer review"), classname="collapsed"),
InlinePanel("open_science_compliance", label=_("Open Science Compliance"), classname="collapsed"),
]

panels_policy = [
Expand Down Expand Up @@ -695,11 +694,6 @@ def autocomplete_label(self):
label=_("Fee Charging"),
classname="collapsed",
),
InlinePanel(
"editorial_policy",
label=_("Editorial Policy"),
classname="collapsed",
),
]
panels_notes = [InlinePanel("annotation", label=_("Notes"), classname="collapsed")]

Expand Down Expand Up @@ -1818,11 +1812,6 @@ class Subject(CommonControlField):
code = models.CharField(max_length=30, null=True, blank=True)
value = models.CharField(max_length=100, null=True, blank=True)

autocomplete_search_field = "value"

def autocomplete_label(self):
return str(self)

def __str__(self):
return f"{self.value}"

Expand Down Expand Up @@ -1866,11 +1855,7 @@ def create_or_update(
class WebOfKnowledge(CommonControlField):
code = models.CharField(max_length=8, null=True, blank=True)
value = models.CharField(max_length=100, null=True, blank=True)

autocomplete_search_field = "value"

def autocomplete_label(self):
return str(self)
def __str__(self):
return f"{self.code} - {self.value}"

Expand Down Expand Up @@ -2690,17 +2675,4 @@ def create_or_update(
try:
return cls.get(license_type=license_type)
except cls.DoesNotExist:
return cls.create(user, license_type)


class EditorialPolicy(Orderable, RichTextWithLanguage, CommonControlField):
journal = ParentalKey(
Journal, on_delete=models.SET_NULL, related_name="editorial_policy", null=True
)


class OpenScienceCompliance(Orderable, RichTextWithLanguage, CommonControlField):
journal = ParentalKey(
Journal, on_delete=models.SET_NULL, related_name="open_science_compliance", null=True
)

return cls.create(user, license_type)
Loading