Skip to content

Commit

Permalink
Merge pull request #796 from scieloorg/revert-795-issue-789
Browse files Browse the repository at this point in the history
Revert "Realiza adições e alterações no formulário de Journal"
  • Loading branch information
samuelveigarangel authored Jul 1, 2024
2 parents 9b8ed93 + 5f69b78 commit eb5cade
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 214 deletions.
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)

0 comments on commit eb5cade

Please sign in to comment.