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

Preprints - Links to external supplementary files #1590

Closed
mauromsl opened this issue May 27, 2020 · 5 comments · Fixed by #1822
Closed

Preprints - Links to external supplementary files #1590

mauromsl opened this issue May 27, 2020 · 5 comments · Fixed by #1822
Assignees
Labels
new feature A new thing that doesn't exist yet preprints

Comments

@mauromsl
Copy link
Member

Is your feature request related to a problem? Please describe.
The preprint system should allow authors to add externaly hosted supplementary files (e.g.: Driad)

Describe the solution you'd like
An interface for adding a link to an external supplementary file that is then related to the submission

Additional context
Not sure if we would need versioning support here.

@mauromsl mauromsl added the new feature A new thing that doesn't exist yet label May 27, 2020
@mauromsl mauromsl added this to the Repository/Preprints milestone May 27, 2020
@tingletech
Copy link
Contributor

I'll take a look at this one

tingletech added a commit to tingletech/janeway that referenced this issue Aug 3, 2020
Preprints - Links to external supplementary files openlibhums#1590
@ajrbyers
Copy link
Member

@tingletech can I get an update on progress with this?

@ajrbyers ajrbyers assigned tingletech and unassigned ajrbyers and mauromsl Aug 21, 2020
@tingletech
Copy link
Contributor

sorry, there is not really an update, I started over on this once and got about this far

+class PreprintSupplementaryFile(models.Model):
+    preprint = models.ForeignKey(Preprint)
+    url = models.URLField()
+    order = models.PositiveIntegerField(default=0)
+
+    def __str__(self):
+        return '{url} linked to {preprint}'.format(
+            author=self.url,
+            preprint=self.preprint.title,
+        )
+
+class PreprintSupplementaryFileForm(forms.ModelForm):
+    class Meta:
+        model = models.PreprintSupplementaryFile
+        fields = (
+            'url',
+        )
+
+    def __init__(self, *args, **kwargs):
+        user = kwargs.pop('user','')
+        super(DocumentForm, self).__init__(*args, **kwargs)
+        self.fields['user_defined_code']=forms.ModelChoiceField(queryset=UserDefinedCode.objects.filter(owner=user))
+
+
+

and I found the template where we could put it and the view that uses the template.

I've been working on DNS and certbot, and I just got that going last night, so I was hoping to have some time to start over on it this afternoon if nothing unexpected comes up.

tingletech added a commit to tingletech/janeway that referenced this issue Aug 24, 2020
ajrbyers added a commit that referenced this issue Sep 2, 2020
…ry-files-try2

WIP for preprints remodel: Supplementary files #1590 take 2
@ajrbyers
Copy link
Member

What remains on #1789 to finish this?

@tingletech
Copy link
Contributor

tingletech commented Sep 24, 2020

/repository/dashboard/1010/ pages
views.repository_author_article
admin/repository/author_article.html
Screen Shot 2020-09-24 at 5 34 48 PM


/repository/manager/1010/ pages
views.repository_manager_article
admin/repository/article.html
Screen Shot 2020-09-24 at 5 39 31 PM

^^ should be able to add / remove from this page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new thing that doesn't exist yet preprints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants