Skip to content
Open
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
13 changes: 13 additions & 0 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,13 @@ ul.tabular li.attribute-fundedby {
}
}

/* Embargoes */

table.embargoes th label {
margin-bottom: 0;
}


.panel-workflow .panel-heading {
background-color: #e68406;
font-weight: bold;
Expand Down Expand Up @@ -745,6 +752,12 @@ div.facets h3 {
background-color: #fafafa;
}

/** Admin Sets **/

div.panel-body.admin-set.row {
margin: 0;
}

/** Collections **/

.hyc-container {
Expand Down
6 changes: 3 additions & 3 deletions app/views/bulkrax/exporters/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
<%= link_to raw('<span class="glyphicon glyphicon-download"></span>'), exporter_download_path(exporter) %>
<% end%>
</td>
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), exporter_path(exporter), title: "View ' + exporter.name + '" %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-pencil"></span>'), edit_exporter_path(exporter), title: "Edit ' + exporter.name + '" %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-remove"></span>'), exporter, method: :delete, data: { confirm: 'Are you sure?' }, title: "Delete ' + exporter.name + '" %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), exporter_path(exporter), title: 'View ' + exporter.name %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-pencil"></span>'), edit_exporter_path(exporter), title: 'Edit ' + exporter.name %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-remove"></span>'), exporter, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete ' + exporter.name %></td>
</tr>
<% end %>
</tbody>
Expand Down
6 changes: 3 additions & 3 deletions app/views/bulkrax/importers/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
<td><%= importer.importer_runs.last&.deleted_records %></td>
<td><%= importer.importer_runs.last&.total_collection_entries %></td>
<td><%= importer.importer_runs.last&.total_work_entries %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), importer_path(importer), title: "View ' + importer.name + '" %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-pencil"></span>'), edit_importer_path(importer), title: "Edit ' + importer.name + '" %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-remove"></span>'), importer, method: :delete, data: { confirm: 'Are you sure?' }, title: "Delete ' + importer.name + '" %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), importer_path(importer), title: 'View ' + importer.name %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-pencil"></span>'), edit_importer_path(importer), title: 'Edit ' + importer.name %></td>
<td><%= link_to raw('<span class="glyphicon glyphicon-remove"></span>'), importer, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete ' + importer.name %></td>
</tr>
<% end %>
</tbody>
Expand Down
36 changes: 36 additions & 0 deletions app/views/hyrax/admin/admin_sets/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<% provide :page_header do %>
<h1><span class="fa fa-sitemap" aria-hidden="true"></span> <%= t('.header') %></h1>
<% end %>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<%= render 'show_actions', presenter: @presenter %>

<div class="panel-body admin-set row">
<div class="col-md-2">
<% if has_thumbnail? @presenter.solr_document %>
<div class="document-thumbnail">
<%= render_thumbnail_tag @presenter.solr_document, { alt: @presenter.solr_document.title }, suppress_link: true %>
</div>
<% else %>
<span class="fa fa-sitemap collection-icon-search" aria-hidden="true"></span>
<% end %>
</div>
<div class="col-md-10">
<%= render 'collection_description', presenter: @presenter %>
<%= render 'show_descriptions' %>
</div>
</div>

<div class="panel-body admin-set-members">
<h3><%= t '.item_list_header' %></h3>
<%= render 'sort_and_per_page', collection: @presenter %>

<%= render_document_index @member_docs %>

<%= render 'paginate' %>
</div>
</div>
</div>
</div>
91 changes: 37 additions & 54 deletions app/views/hyrax/dashboard/collections/_form.html.erb
Original file line number Diff line number Diff line change
@@ -1,58 +1,48 @@
<%= render "shared/nav_safety_modal" %>
<div class="tabs mt-4" id="collection-edit-controls">
<ul class="nav nav-tabs" id="dashboard-collection-tab" role="tablist">
<li class="nav-item active" role="presentation">
<a href="#description" role="tab" data-toggle="tab" class="nav-link active nav-safety-confirm">
<%= t('.tabs.description') %>
</a>
<div class="panel panel-default tabs" id="collection-edit-controls">
<ul class="nav nav-tabs" role="tablist">
<li class="active" role="presentation">
<a href="#description" role="tab" data-toggle="tab"><%= t('.tabs.description') %></a>
</li>
<% if @form.persisted? %>
<% if collection_brandable?(collection: @collection) %>
<li class="nav-item">
<a href="#branding" role="tab" data-toggle="tab" class="nav-link nav-safety-confirm">
<%= t('.tabs.branding') %>
</a>
<% if @collection.brandable? %>
<li role="presentation">
<a href="#branding" role="tab" data-toggle="tab"><%= t('.tabs.branding') %></a>
</li>
<% end %>
<% if collection_discoverable?(collection: @collection) %>
<li class="nav-item">
<a href="#discovery" role="tab" data-toggle="tab" class="nav-link nav-safety-confirm">
<%= t('.tabs.discovery') %>
</a>
<% if @collection.discoverable? %>
<li role="presentation">
<a href="#discovery" role="tab" data-toggle="tab"><%= t('.tabs.discovery') %></a>
</li>
<% end %>
<% if collection_sharable?(collection: @collection) %>
<li class="nav-item">
<a href="#sharing" role="tab" data-toggle="tab" class="nav-link nav-safety-confirm">
<%= t('.tabs.sharing') %>
</a>
<% if @collection.sharable? %>
<li role="presentation">
<a href="#sharing" role="tab" data-toggle="tab"><%= t('.tabs.sharing') %></a>
</li>
<% end %>
<% end %>
</ul>

<%= simple_form_for @form, url: [hyrax, :dashboard, @form], html: { class: 'editor nav-safety', data: { behavior: 'collection-form', 'param-key' => @form.model_name.param_key } } do |f| %>
<div class="tab-content card" id="dashboard-collection-tab-content">
<div id="description" class="tab-pane show active">
<div class="labels">
<div class="card-body">
<%= simple_form_for @form, url: [hyrax, :dashboard, @form], html: { class: 'editor' } do |f| %>
<div class="tab-content">
<div id="description" class="tab-pane active">
<div class="panel panel-default labels">
<div class="panel-body">

<div id="base-terms">
<% f.object.primary_terms.each do |term| %>
<%= render_edit_field_partial(term, f: f) %>
<% end %>

<% # TODO: Remove check for PcdmCollection when Issue #5286 is resolved. %>
<% if f.object.persisted? && !(Hyrax.config.collection_class < Valkyrie::Resource) %>
<% if f.object.persisted? %>
<%# we're loading these values dynamically to speed page load %>
<%= f.input :thumbnail_id,
input_html: { data: { text: thumbnail_label_for(object: f.object) } } %>
input_html: { data: { text: f.object.thumbnail_title } } %>
<% end %>
</div>
<% if f.object.display_additional_fields? %>
<%= link_to t('hyrax.collection.form.additional_fields'),
'#extended-terms',
class: 'btn btn-secondary additional-fields',
class: 'btn btn-default additional-fields',
data: { toggle: 'collapse' },
role: "button",
'aria-expanded'=> "false",
Expand Down Expand Up @@ -80,38 +70,32 @@
</div> <!-- end description -->

<% if @form.persisted? %>
<% if collection_brandable?(collection: @collection) %>
<div id="branding" class="tab-pane">
<div class="card labels">
<div class="card-body">
<%= render 'form_branding', f: f %>
</div>
<div id="branding" class="tab-pane">
<div class="panel panel-default labels">
<div class="panel-body">
<%= render 'form_branding', f: f %>
</div>
</div>
<% end %>
</div>

<% if collection_discoverable?(collection: @collection) %>
<div id="discovery" class="tab-pane">
<div class="card labels">
<div class="card-body">
<%= render 'form_discovery', f: f %>
</div>
<div id="discovery" class="tab-pane">
<div class="panel panel-default labels">
<div class="panel-body">
<%= render 'form_discovery', f: f %>
</div>
</div>
<% end %>
</div>

<% if collection_sharable?(collection: @collection) %>
<div id="sharing" class="tab-pane">
<div class="card labels" id="collection_permissions" data-param-key="<%= f.object.model_name.param_key %>">
<div class="card-body">
<%= render 'form_share', f: f %>
</div>
<div id="sharing" class="tab-pane">
<div class="panel panel-default labels" id="collection_permissions" data-param-key="<%= f.object.model_name.param_key %>">
<div class="panel-body">
<%= render 'form_share', f: f %>
</div>
</div>
<% end %>
</div>
<% end %>

<div class="card-footer">
<div class="panel-footer">
<% if @collection.persisted? %>
<%= f.submit t(:'hyrax.collection.select_form.update'), class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "update_submit", name: "update_collection" %>
<%= link_to t(:'helpers.action.cancel'), hyrax.dashboard_collection_path(@collection), class: 'btn btn-link' %>
Expand All @@ -124,4 +108,3 @@
<% end # simple_form_for %>

</div> <!-- end collection-controls -->

153 changes: 153 additions & 0 deletions app/views/hyrax/dashboard/collections/_form_branding.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<div class="set-access-controls">
<h2><%= t('.branding.label') %></h2>
<p><%= t('.branding.description') %></p>
<label><strong><%= t('.banner.label') %></strong></label>
<p><%= t('.banner.description') %>.</p>

<div id="fileupload">
<!-- Redirect browsers with JavaScript disabled to the origin page -->
<noscript><input type="hidden" name="redirect" value="<%= main_app.root_path %>" /></noscript>
<!-- The table listing the files available for upload/download -->

<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row fileupload-buttonbar">
<div class="col-xs-4">
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-success fileinput-button">
<span class="glyphicon glyphicon-plus"></span>
<span>Choose File</span>
<input type="file" name="files[]" single />
</span>
</div> <!-- end col-xs-4 -->

<!-- The global progress state -->
<div class="col-xs-8 fileupload-progress branding-banner-progress fade">
<!-- The global progress bar -->
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar progress-bar-success" style="width:0%;"></div>
</div>
<!-- The extended global progress state -->
<div class="progress-extended">&nbsp;</div>
</div> <!-- end col-xs-5 fileupload-progress fade -->
</div> <!-- end row fileupload-buttonbar -->

<div class="row branding-banner-list">
<div class="col-xs-12">
<div class="container">
<% if f.object.banner_info[:file] %>
<div id="banner">
<div class="row branding-banner-row">
<div class="col-sm-3">
<span class="name">
<span><%= f.object.banner_info[:file] %></span>
<input type="hidden" name="banner_unchanged" value="true" />
</span>
</div>

<div class="col-sm-2">
<button class="btn btn-danger delete branding-banner-remove" data-type="DELETE" data-url="/" onclick=$("#banner").remove();>
<span class="glyphicon glyphicon-remove"></span>
<span class="controls-remove-text">Remove</span>
<span class="sr-only">
previous
<span class="controls-field-name-text">Remove Current Banner</span>
</span>
</button>
</div> <!-- end col-sm-2 -->
</div> <!-- row branding-banner-row -->

<% if f.object.banner_info[:relative_path] %>
<div class="banner-image">
<i><%= image_tag(f.object.banner_info[:relative_path],
size: "800x100",
alt: "Unable to display banner: #{f.object.banner_info[:file]}") %></i>
</div>
<% end %>
</div> <!-- end banner -->
<div role="presentation" class="table table-striped"><span class="files"></span></div>
<% else %>
<div role="presentation" class="table table-striped"><span class="files"></span></div>
<% end %>

<!-- The global file processing state -->
<span class="fileupload-process"></span>
</div> <!-- end container -->
</div> <!-- end row branding-banner-list -->
</div> <!-- end row branding-banner-list -->
</div> <!-- fileupload -->

<%= render 'hyrax/uploads/js_templates_branding' %>

<label><strong><%= t('.logo.label') %></strong></label>
<p><%= t('.logo.description') %></p>

<div id="fileuploadlogo">
<!-- Redirect browsers with JavaScript disabled to the origin page -->
<noscript><input type="hidden" name="redirect" value="<%= main_app.root_path %>" /></noscript>
<!-- The table listing the files available for upload/download -->

<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row fileupload-buttonbar">
<div class="col-xs-4">
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-success fileinput-button">
<span class="glyphicon glyphicon-plus"></span>
<span>Choose File</span>
<input type="file" name="files[]" single />
</span>
</div> <!-- end col-xs-4 -->

<!-- The global progress state -->
<div class="col-xs-8 fileupload-progress branding-logo-progress fade">
<!-- The global progress bar -->
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar progress-bar-success" style="width:0%;"></div>
</div>
<!-- The extended global progress state -->
<div class="progress-extended">&nbsp;</div>
</div> <!-- end col-xs-8 fileupload-progress branding-logo-progress fade -->
</div> <!-- end row fileupload-buttonbar -->

<div class="row branding-logo-list">
<div class="col-xs-12">
<div class="container">
<% i = 0 %>
<% f.object.logo_info.each_with_index do |linfo, i| %>
<div class="row branding-logo-row" id="logorow_<%= i %>">
<div class="col-sm-3">
<span class="name">
<span><%= linfo[:file] %></span>
<input type="hidden" name="logo_files[]" value="<%= linfo[:full_path] %>" />
</span>
</div>

<div class="col-sm-4 branding-logo-input">
<label for="linkurl_<%= i %>">Link URL:
<input id="linkurl_<%= i %>" class="branding-logo-input" type="text" name="linkurl[]" value="<%= linfo[:linkurl] %>" />
</label>
<label for="alttext_<%= i %>">Alt Text:
<input id="alttext_<%= i %>" class="branding-logo-input" type="text" name="alttext[]" value="<%= linfo[:alttext] %>" />
</label>
</div>

<div class="col-sm-2">
<button class="btn btn-danger delete branding-logo-remove" data-type="DELETE" data-url="/" onclick=$("#logorow_<%= i %>").remove();>
<span class="glyphicon glyphicon-remove"></span>
<span class="controls-remove-text">Remove</span>
<span class="sr-only">
previous
<span class="controls-field-name-text">Remove Logo <%= i + 1 %></span>
</span>
</button>
</div> <!-- end col-sm-2 -->
</div> <!-- row logorow -->
<% end %>
<span class="files"></span>
</div> <!-- end container -->

<!-- The global file processing state -->
<span class="fileupload-process"></span>
</div> <!-- end col-xs-12 -->
</div> <!-- end row branding-logo-list -->
</div> <!-- end fileuploadlogo -->
</div> <!-- end set-access-controls -->
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class="sr-only"><%= t('hyrax.homepage.featured_collections.document.title_label') %></span>
<h3>
<%= link_to hyrax.collection_path(featured.id) do %>
<%= render_thumbnail_tag(featured.solr_document, {width: 90}, {suppress_link: true}) + featured.title.first %>
<%= render_thumbnail_tag(featured.solr_document, {width: 90, alt: featured.title.first}, {suppress_link: true}) + featured.title.first %>
<% end %>
</h3>
</div>
Expand Down