-
Notifications
You must be signed in to change notification settings - Fork 359
[ENG-10283] added ability to add/remove files of an archived registration under osf storage #11674
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
Merged
adlius
merged 5 commits into
CenterForOpenScience:feature/pbs-26-6
from
ihorsokhanexoft:feature/ENG-10283
Apr 15, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2e5fda0
added ability to add/remove files of an archived registration under o…
ihorsokhanexoft 4b51e36
remove registration files by their guid, not project files guids
ihorsokhanexoft 910231d
fixed missing validation and added new tests
ihorsokhanexoft caf7b21
added error handling when file is not attached to a registration
ihorsokhanexoft 60b11cd
simplify if statement
ihorsokhanexoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| {% if node.is_registration and node.archived %} | ||
| <a data-toggle="modal" data-target="#confirmAddFileModal" class="btn btn-primary"> | ||
| Add File (Osfstorage) | ||
| </a> | ||
| <div id="confirmAddFileModal" class="modal fade well" tabindex="-1" role="dialog"> | ||
| <div class="modal-dialog" role="document"> | ||
| <div class="modal-content"> | ||
| <form class="well" method="post" action="{% url 'nodes:add-osfstorage-file' guid=node.guid %}"> | ||
| <div class="modal-header"> | ||
| <button type="button" class="close" data-dismiss="modal">x</button> | ||
| <h3>Enter file to add</h3> | ||
| </div> | ||
| {% csrf_token %} | ||
|
|
||
| <div class="modal-body"> | ||
| <div style="display:flex; align-items:center; gap:12px;"> | ||
| <label for="file-guid" style="margin:0; white-space:nowrap;">File guid:</label> | ||
| <input id="file-guid" | ||
| type="text" | ||
| name="file-guid" | ||
| class="form-control" | ||
| required | ||
| style="flex:1; min-width:0;"> | ||
| </div> | ||
| </div> | ||
| <div class="modal-footer"> | ||
| <button class="btn btn-danger" name="action" type="submit">Confirm</button> | ||
| <button type="button" class="btn btn-default" data-dismiss="modal"> | ||
| Cancel | ||
| </button> | ||
| </div> | ||
| </form> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| {% if node.is_registration and node.archived %} | ||
| <a data-toggle="modal" data-target="#confirmRemoveFileModal" class="btn btn-danger"> | ||
| Remove File (Osfstorage) | ||
| </a> | ||
| <div id="confirmRemoveFileModal" class="modal fade well" tabindex="-1" role="dialog"> | ||
| <div class="modal-dialog" role="document"> | ||
| <div class="modal-content"> | ||
| <form class="well" method="post" action="{% url 'nodes:remove-osfstorage-file' guid=node.guid %}"> | ||
| <div class="modal-header"> | ||
| <button type="button" class="close" data-dismiss="modal">x</button> | ||
| <h3>Enter file to remove</h3> | ||
| </div> | ||
| {% csrf_token %} | ||
|
|
||
| <div class="modal-body"> | ||
| <div style="display:flex; align-items:center; gap:12px;"> | ||
| <label for="file-guid" style="margin:0; white-space:nowrap;">File guid:</label> | ||
| <input id="file-guid" | ||
| type="text" | ||
| name="file-guid" | ||
| class="form-control" | ||
| required | ||
| style="flex:1; min-width:0;"> | ||
| </div> | ||
| </div> | ||
| <div class="modal-footer"> | ||
| <button class="btn btn-danger" name="action" type="submit">Confirm</button> | ||
| <button type="button" class="btn btn-default" data-dismiss="modal"> | ||
| Cancel | ||
| </button> | ||
| </div> | ||
| </form> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| {% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.