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

Fix bulk edit form and browse everything modal #5215

Merged
merged 2 commits into from
Jun 29, 2022
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
102 changes: 2 additions & 100 deletions app/assets/stylesheets/components/browse_everything.scss
Original file line number Diff line number Diff line change
@@ -1,101 +1,3 @@
@import "jquery.treetable";
@import "jquery.treetable.theme.browse";

@mixin ev-link {
cursor: pointer;
a {
color: inherit;
background-color: inherit;
text-decoration: none;
}
}

#browse-everything {
overflow-y: hidden;
position: fixed !important;
margin: 0 0 0 -37.5%;
left: 50%;
top: 10%;
background-color: initial;
width: 75%;
z-index: 10001;

div {
background-color: white;
}

.modal-header {
padding: 8px;
}

.modal-body {
overflow: hidden;
}

.modal-footer {
margin: 0px;
}

.row {
margin: inherit;
}

.ev-files {
position: relative;
overflow-x: auto;
overflow-y: auto;

li {
overflow: hidden;
text-overflow: ellipsis;
.ev-file-name {
white-space: nowrap;
}
border-top: none;
}

&.detail {
}

&.list ul {
columns: 3;
}
}

.ev-container li {
cursor: pointer;
}

.ev-body {
padding: 0;
}

.ev-providers {
padding: 4px;
}

.ev-files {
table {
width: 100%;
max-width: 100%;
tr {
width: 100%;
max-width: 100%;
td {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}

.ev-files {
height: 50vh;
li { @include ev-link; }
}

.ev-providers {
select { width: 30% }
}
.modal-title {
margin-top: 0;
}
19 changes: 19 additions & 0 deletions app/views/browse_everything/_modal.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<%# Overrides modal form from upstream browse_everything gem. Can delete once this issue is fixed: samvera/browse-everything#409 %>

<div class="modal fade" id="browse-everything-modal" tabindex="-1" role="dialog" aria-labelledby="browse-everything-modal-title" aria-hidden="true">
eliotjordan marked this conversation as resolved.
Show resolved Hide resolved
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="browse-everything-modal-title">Select Your Files</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<%= render 'browse_everything/javascript_app' %>
</div>
</div>
</div>
</div>

<% render 'browse_everything/javascript_app' %>
14 changes: 9 additions & 5 deletions app/views/bulk_ingest/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

<div class="col-md-12">
<div class="row">
<p>Ingest one or more individual, multi-volume, or mixed resources. Files selected must be contained in a parent directory.</p>
<button id="bulk_structure_example" type="button" class="btn btn-secondary browse-everything" data-toggle="modal" data-target="#bulk-structure-example-modal">
Show example directory structure
</button>
<div class="col-md-12">
<p>Ingest one or more individual, multi-volume, or mixed resources. Files selected must be contained in a parent directory.</p>
</div>
<div class="col-md-12">
<button id="bulk_structure_example" type="button" class="btn btn-info browse-everything" data-toggle="modal" data-target="#bulk-structure-example-modal">
Show example directory structure
</button>
</div>
</div>
<%= form_tag polymorphic_path([main_app, :browse_everything_files_bulk_ingest]), class: "bulk-ingest-form", id: "browse-everything-form" do %>
<div class="row">
Expand Down Expand Up @@ -47,8 +51,8 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Example directory structures</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
</div>
<div class="modal-body">
<p>Single volume work:</p>
Expand Down