Adding custom message only for the Files App

Hi,

I was wondering if it is possible to add a custom message only for the Files App, below the Upload/Download/Globus/etc. buttons, for OOD 3.1?
I know that we can customize the announcements/MOTD, but that message is always visible on the Dashboard.
I have looked into the files for custom layouts, but in addition to enabling/disabling file uploads/download, I haven’t been able to find a configuration property for a custom message for the Files App.

Is customization like this possible, and if yes, what is the best way to do this and what is the best file to edit?

Thank you in advance, and please let me know if you need any additional information.

Thank you,
Natasha

You can override any page/partial. I think this is what you’d want to do. The file in question is app/views/files/index.html.erb, and here’s the documentation for the same.

https://osc.github.io/ood-documentation/latest/customizations.html#overriding-pages

Here’s a diff you can apply to get you started.

diff --git a/apps/dashboard/app/views/files/index.html.erb b/apps/dashboard/app/views/files/index.html.erb
index c1fe4c5d9..cb3675e46 100644
--- a/apps/dashboard/app/views/files/index.html.erb
+++ b/apps/dashboard/app/views/files/index.html.erb
@@ -16,6 +16,11 @@
     <% end %>
     <button id="copy-move-btn" type="button" class="btn btn-outline-dark btn-sm"><i class="fas fa-copy" aria-hidden="true"></i> Copy/Move</button>
     <button id="delete-btn" type="button" class="btn btn-danger btn-sm"><i class="fas fa-trash" aria-hidden="true"></i> Delete</button>
+
+    <div class="row">
+      My new stuff here
+    </div>
+
 </div>
 
 <hr>

This produces something like this. Note that in 3.x we’re using Bootstrap 4 so any Boostrap 4 classes can be used (like justify-content-center to center stuff and so on). 4.0 is going to ship using Bootstrap 5 so there may be some updates you need to apply to your own partial to get the correct styling after upgrade.

Hi Jeff,

Thank you so much for your prompt reply - your suggestion worked!

Happy Holidays!

Thank you,
Natasha

1 Like