Skip to content

Commit

Permalink
Merge pull request #2102 from samvera/merge_with_master
Browse files Browse the repository at this point in the history
Merge with master
  • Loading branch information
elrayle authored Nov 3, 2017
2 parents 77a2b90 + 50dbfe9 commit 9f4340a
Show file tree
Hide file tree
Showing 93 changed files with 304 additions and 271 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The Samvera community is here to help. Please see our [support guide](./.github/
# Getting started

This document contains instructions specific to setting up an app with __Hyrax
v2.0.0.rc1__. If you are looking for instructions on installing a different
v2.0.0.rc2__. If you are looking for instructions on installing a different
version, be sure to select the appropriate branch or tag from the drop-down
menu above.

Expand Down Expand Up @@ -160,7 +160,7 @@ NOTE: The steps need to be done in order to create a new Hyrax based app.
Generate a new Rails application using the template.

```
rails _5.0.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v2.0.0.rc1/template.rb
rails _5.0.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v2.0.0.rc2/template.rb
```

Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
Expand Down
22 changes: 0 additions & 22 deletions app/actors/hyrax/actors/assign_representative_actor.rb

This file was deleted.

5 changes: 5 additions & 0 deletions app/assets/stylesheets/_bootstrap-default-overrides.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Brand colors
$brand-danger: #d33a35 !default;
$brand-success: #387f38 !default;
$brand-info: #2c76c7 !default;
$brand-warning: #565653 !default;
4 changes: 4 additions & 0 deletions app/assets/stylesheets/hyrax/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ legend small {
}
}

#savewidget a {
color: #2a62bc;
}

.label-checkbox .label-text {
display:block;
padding-left:1.2em;
Expand Down
6 changes: 6 additions & 0 deletions app/assets/stylesheets/hyrax/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@
.nav > li > .notify-number {
padding-right: 0;
}

.dropdown-toggle:focus {
outline: 2px auto Highlight; // FireFox
outline: 5px auto -webkit-focus-ring-color; // Chrome, Safari
outline: -2px;
}
1 change: 0 additions & 1 deletion app/services/hyrax/default_middleware_stack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def self.build_stack
middleware.use Hyrax::Actors::CreateWithFilesActor
middleware.use Hyrax::Actors::CollectionsMembershipActor
middleware.use Hyrax::Actors::AddToWorkActor
middleware.use Hyrax::Actors::AssignRepresentativeActor
middleware.use Hyrax::Actors::AttachMembersActor
middleware.use Hyrax::Actors::ApplyOrderActor
middleware.use Hyrax::Actors::InterpretVisibilityActor
Expand Down
17 changes: 13 additions & 4 deletions app/services/hyrax/file_set_derivatives_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,24 @@ def supported_mime_types

def create_pdf_derivatives(filename)
Hydra::Derivatives::PdfDerivatives.create(filename,
outputs: [{ label: :thumbnail, format: 'jpg', size: '338x493', url: derivative_url('thumbnail') }])
outputs: [{
label: :thumbnail,
format: 'jpg',
size: '338x493',
url: derivative_url('thumbnail'),
layer: 0
}])
extract_full_text(filename, uri)
end

def create_office_document_derivatives(filename)
Hydra::Derivatives::DocumentDerivatives.create(filename,
outputs: [{ label: :thumbnail, format: 'jpg',
size: '200x150>',
url: derivative_url('thumbnail') }])
outputs: [{
label: :thumbnail, format: 'jpg',
size: '200x150>',
url: derivative_url('thumbnail'),
layer: 0
}])
extract_full_text(filename, uri)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
class: 'form-control' %>

<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info' %>
<p class="help-block"><%= t('hyrax.admin.admin_sets.form.note')%></p>
</div>
</div>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/hyrax/admin/admin_sets/_form_visibility.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<li class="radio form-inline">
<label>
<%= f.radio_button :release_varies, Hyrax::PermissionTemplate::RELEASE_TEXT_VALUE_EMBARGO %>
<%= t('.release.varies.between') %>
<%= t('.release.varies.period') %>
<%= f.collection_select :release_embargo, f.object.embargo_options, :first, :last, prompt: t('.release.varies.embargo.select') %>
</label>
</li>
Expand Down
150 changes: 75 additions & 75 deletions app/views/hyrax/collections/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,51 @@
<div class="row hyc-header">
<div class="col-md-12">

<% unless @presenter.banner_file.blank? %>
<header class="hyc-banner" style="background-image:url(<%= @presenter.banner_file %>)">
<% else %>
<header class="hyc-generic">
<% end %>

<div class="hyc-title">
<h1><%=@presenter.title.first%></h1>
<span class="label label-success">Collection</span>
<%= @presenter.permission_badge %>
</div>
<% unless @presenter.banner_file.blank? %>
<header class="hyc-banner" style="background-image:url(<%= @presenter.banner_file %>)">
<% else %>
<header class="hyc-generic">
<% end %>

<div class="hyc-title">
<h1><%=@presenter.title.first%></h1>
<span class="label label-success">Collection</span>
<%= @presenter.permission_badge %>
</div>

<% unless @presenter.logo_record.blank? %>
<% unless @presenter.logo_record.blank? %>
<div class="hyc-logos">
<% @presenter.logo_record.each_with_index do |lr, i| %>
<% @presenter.logo_record.each_with_index do |lr, i| %>

<% if lr[:linkurl].blank? %>
<img alt="<%= lr[:alttext] %>" src="<%= lr[:file_location] %>">
<% else %>
<a href="<%= lr[:linkurl] %>">
<img alt="<%= lr[:alttext] %>" src="<%= lr[:file_location] %>">
</a>
<% end %>
<% if lr[:linkurl].blank? %>
<img alt="<%= lr[:alttext] %>" src="<%= lr[:file_location] %>">
<% else %>
<a href="<%= lr[:linkurl] %>">
<img alt="<%= lr[:alttext] %>" src="<%= lr[:file_location] %>">
</a>
<% end %>

<% end %>
</div>
<% end %>
<% end %>

<% unless @presenter.total_viewable_items.blank? %>
<div class="hyc-bugs">
<div class="hyc-item-count">
<b><%= @presenter.total_viewable_items %></b>
<%= 'Item'.pluralize(@presenter.total_viewable_items) %></div>
<% unless @presenter.total_viewable_items.blank? %>
<div class="hyc-bugs">
<div class="hyc-item-count">
<b><%= @presenter.total_viewable_items %></b>
<%= 'Item'.pluralize(@presenter.total_viewable_items) %></div>

<% unless @presenter.creator.blank? %>
<div class="hyc-created-by">Created by: <%= @presenter.creator.first %></div>
<% end %>
<% unless @presenter.creator.blank? %>
<div class="hyc-created-by">Created by: <%= @presenter.creator.first %></div>
<% end %>

<% unless @presenter.modified_date.blank? %>
<div class="hyc-last-updated">Last Updated: <%= @presenter.modified_date %></div>
<% end %>
</div>
<% end %>
<% unless @presenter.modified_date.blank? %>
<div class="hyc-last-updated">Last Updated: <%= @presenter.modified_date %></div>
<% end %>
</div>
<% end %>

</header>
</header>

</div>
</div>
Expand All @@ -56,19 +56,19 @@
<div class="col-md-8 hyc-description">
<%= render 'collection_description', presenter: @presenter %>
</div>
<div class="col-md-4 hyc-metadata">
<% unless has_collection_search_parameters? %>
<h2>Collection Details</h2>
<%= render 'show_descriptions' %>
<% end %>
</div>
</div>
<div class="col-md-4 hyc-metadata">
<% unless has_collection_search_parameters? %>
<h2>Collection Details</h2>
<%= render 'show_descriptions' %>
<% end %>
</div>
</div>

<% if @presenter.collection_type_is_nestable? && @subcollection_count > 0 %>
<div class="row hyc-blacklight hyc-bl-title">
<div class="col-md-12">
<h2>
<%= t('.subcollection_count') %> (<%= @subcollection_count %>)
<%= t('.subcollection_count') %> (<%= @subcollection_count %>)
</h2>
</div>
</div>
Expand All @@ -80,40 +80,40 @@
<% end %>

<% if @members_count > 0 %>
<div class="row hyc-blacklight hyc-bl-title">
<div class="col-md-12">
<h2>
<% if has_collection_search_parameters? %>
<%= t('hyrax.dashboard.collections.show.search_results') %>
<% else %>
<%= t('.works_in_collection') %> (<%= @members_count %>)
<% end %>
</h2>
</div>
</div>
<div class="row hyc-blacklight hyc-bl-title">
<div class="col-md-12">
<h2>
<% if has_collection_search_parameters? %>
<%= t('hyrax.dashboard.collections.show.search_results') %>
<% else %>
<%= t('.works_in_collection') %> (<%= @members_count %>)
<% end %>
</h2>
</div>
</div>

<div class="row hyc-blacklight hyc-bl-search">
<div class="col-md-6 col-md-offset-6">
<%= render 'search_form', presenter: @presenter %>
</div>
</div>
<div class="row hyc-blacklight hyc-bl-search">
<div class="col-md-6 col-md-offset-6">
<%= render 'search_form', presenter: @presenter %>
</div>
</div>

<div class="row hyc-blacklight hyc-bl-sort">
<div class="col-md-12">
<%= render 'sort_and_per_page', collection: @presenter %>
</div>
</div>
<div class="row hyc-blacklight hyc-bl-sort">
<div class="col-md-12">
<%= render 'sort_and_per_page', collection: @presenter %>
</div>
</div>

<div class="row hyc-blacklight hyc-bl-results">
<div class="col-md-12">
<%= render_document_index @member_docs %>
</div>
</div>
<div class="row hyc-blacklight hyc-bl-results">
<div class="col-md-12">
<%= render_document_index @member_docs %>
</div>
</div>

<div class="row hyc-blacklight hyc-bl-pager">
<div class="col-md-12">
<%= render 'paginate' %>
</div>
</div>
<% end # if @members_count > 0 %>
<div class="row hyc-blacklight hyc-bl-pager">
<div class="col-md-12">
<%= render 'paginate' %>
</div>
</div>
<% end # if @members_count > 0 %>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<% user.can_receive_deposits_from.each do |depositor| %>
<tr><td class="depositor-name"><%= depositor.name %></td>
<td><%= link_to(hyrax.user_depositor_path(user, depositor), method: :delete, class: "remove-proxy-button") do %>
<span class="sr-only"><%= I18n.t('hyrax.dashboard.proxy_delete') %></span>
<i class="glyphicon glyphicon-remove"></i><% end %>
</td></tr>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions app/views/hyrax/my/_sort_and_per_page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<%= form_tag search_action_for_dashboard, method: :get, class: 'per_page form-inline' do %>
<div class="form-group">
<fieldset class="col-xs-12">
<legend class="sr-only"><%= t('hyrax.dashboard.my.sr.results_per_page') %></legend>
<%= label_tag :per_page do %>
Show <%= select_tag :per_page, options_for_select(['10', '20', '50', '100'], h(params[:per_page])),
title: "Number of results to display per page" %> per page
Expand Down
1 change: 1 addition & 0 deletions app/views/hyrax/notifications/_notifications.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
class: "itemicon itemtrash",
title: t('hyrax.mailbox.delete'),
method: :delete do %>
<span class="sr-only"><%= I18n.t('hyrax.dashboard.delete_notification') %></span>
<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
<% end %>
</td>
Expand Down
4 changes: 4 additions & 0 deletions config/locales/hyrax.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ de:
header: Admin-Set bearbeiten
form:
cancel: Abbrechen
note: Benutzern, denen eine neue Rolle zugewiesen wurde, wird nur die Rolle zugewiesen, die nach der Gewährung dieser Rolle hinterlegt wurde.
permission_destroy_errors:
admin_group: Die Gruppe der Administratoren des Repositoriums kann nicht entfernt werden
permission_update_errors:
Expand Down Expand Up @@ -142,6 +143,7 @@ de:
3yrs: 3 Jahre nach der Deponierung
6mos: 6 Monate nach der Deponierung
select: Wählen Sie die Sperrfrist aus.
period: 'Der Einlieferer kann eine Embargo-Frist bis zu:'
visibility:
description: 'Nach dem Release-Datum können die Arbeiten in diesem Admin-Set eingesehen und heruntergeladen werden durch:'
everyone: Jeder - alle Arbeiten in diesem Admin-Set werden öffentlich sein
Expand Down Expand Up @@ -431,6 +433,7 @@ de:
works_in_collection: Arbeiten in dieser Sammlung
create_work: Arbeien erstellen
current_proxies: Aktuelle Proxies
delete_notification: Benachrichtigung löschen
heading_actions:
close: Schließen
create_work: Arbeit erstellen
Expand Down Expand Up @@ -482,6 +485,7 @@ de:
no_transfer_requests: Sie haben keine Arbeitsübertragungsanforderungen erhalten
no_transfers: Sie haben keine Arbeit übertragen
proxy_activity: Proxy-Aktivität
proxy_delete: Proxy löschen
proxy_user: Proxy-Benutzer
show_admin:
new_visitors: Neue Besucher
Expand Down
Loading

0 comments on commit 9f4340a

Please sign in to comment.