-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
700 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
//= require jquery_ujs | ||
//= require bootstrap | ||
//= require bootstrap-datepicker | ||
// = stub ssds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//= require ssds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
@import 'modules/top-navbar'; | ||
@import 'modules/forms'; | ||
@import 'modules/sorting'; | ||
@import 'ssds'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
$blackish-yellow: #2e2d29; | ||
$dark-grey-red: #544948; | ||
|
||
.fill-width { | ||
width: 66%; | ||
} | ||
|
||
h1 { | ||
color: $blackish-yellow; | ||
font-size: 2.323em; | ||
font-weight: 300; | ||
line-height: 1.2em; | ||
} | ||
|
||
h2 { | ||
color: $dark-grey-red; | ||
font-size: 1.793em; | ||
font-weight: 400; | ||
line-height: 1.2em; | ||
|
||
span { | ||
font-weight: 300; | ||
} | ||
} | ||
|
||
label { | ||
font-size: inherit; | ||
font-weight: normal; | ||
line-height: 1.5; | ||
margin-bottom: 0; | ||
padding-bottom: calc(.375rem + 1px); | ||
padding-top: calc(.375rem + 1px); | ||
text-align: right; | ||
} | ||
|
||
//scss-lint:disable SelectorFormat | ||
#new_ssds_request { | ||
margin-top: 2em; | ||
} | ||
//scss-lint:enable SelectorFormat | ||
|
||
#topnav-container #topnav { | ||
padding: 5px 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Controller for SSDS request form | ||
class SsdsRequestsController < ApplicationController | ||
layout 'ssds' | ||
|
||
def index | ||
@ssds_request = SsdsRequest.new(ssds_request_params) | ||
end | ||
|
||
def new | ||
@ssds_request = SsdsRequest.new(new_ssds_request_params) | ||
end | ||
|
||
def create | ||
@ssds_request = SsdsRequest.new(ssds_request_params) | ||
WebformsMailer.ssds_request(@ssds_request).deliver_now | ||
flash[:notice] = 'SSRC will be notified of your request' | ||
render 'index', ssds_request_params | ||
end | ||
|
||
private | ||
|
||
# Never trust parameters from the scary internet, only allow the white list through. | ||
def ssds_request_params | ||
params.require(:ssds_request).permit(:affiliation, :call_no_in, :dataset_type, :department, :name, | ||
:notes, :phone, :sponsor, :sunet, :title_in, :unicorn_id_in) | ||
end | ||
|
||
def new_ssds_request_params | ||
params.permit(:call_no_in, :title_in, :unicorn_id_in) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Create the SSDS Request model | ||
class SsdsRequest | ||
include ActiveModel::Model | ||
|
||
attr_accessor :affiliation, :call_no_in, :dataset_type, :notes, :department, :name, :phone, :referer, :sponsor, | ||
:sunet, :title_in, :unicorn_id_in | ||
|
||
validates :call_no_in, :title_in, :unicorn_id_in, presence: true | ||
|
||
def affiliations | ||
%w(Other Faculty Graduate Staff Undergraduate) | ||
end | ||
|
||
def departments | ||
[ | ||
'Other', | ||
'Anthropology', | ||
'Business', | ||
'Communication', | ||
'Computer Science', | ||
'Economics', | ||
'Education', | ||
'Engineering', | ||
'History', | ||
'Human Biology', | ||
'International Relations', | ||
'Law', | ||
'Medicine', | ||
'Political Science', | ||
'Psychology', | ||
'Public Policy', | ||
'Sociology' | ||
] | ||
end | ||
|
||
def datasets | ||
%w[Other TAPE ICPSR ROPER] | ||
end | ||
|
||
def dataset_default | ||
case call_no_in | ||
when /TAPE/ | ||
'TAPE' | ||
when /ICPSR/ | ||
'ICPSR' | ||
when /ROPER/ | ||
'ROPER' | ||
else | ||
'Other' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
<meta name="description" content="Stanford University Libraries - LibSys Web Form" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
|
||
<title>SSRC dataset request</title> | ||
<link href="https://www.stanford.edu/su-identity/css/su-identity.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="https://sul-cdn.stanford.edu/sul_styles/0.5.0/sul-icons.min.css"> | ||
<%= favicon_link_tag 'favicon.ico' %> | ||
<%= stylesheet_link_tag 'ssds', media: 'all' %> | ||
<%= stylesheet_link_tag 'application', media: 'all' %> | ||
<%= yield :javascript_includes %> | ||
<%= csrf_meta_tags %> | ||
<%= content_for(:head) %> | ||
<!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> | ||
<!--[if IE 8]> <link rel="stylesheet" type="text/css" href="https://www.stanford.edu/su-identity/css/ie/ie8.css" /> <![endif]--> | ||
<!--[if IE 7]> <link rel="stylesheet" type="text/css" href="https://www.stanford.edu/su-identity/css/ie/ie7.css" /> <![endif]--> | ||
</head> | ||
<body> | ||
<div id="su-wrap"> <!-- #su-wrap start --> | ||
<div id="su-content"> <!-- #su-content start --> | ||
<div id="outer-container" class="container-fluid"> | ||
<%= render 'shared/ssds_top_navbar' %> | ||
<section id="main-container" role="main"> | ||
<%= render 'shared/flashes' %> | ||
<%= yield %> | ||
</section> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div id="topnav-container"> | ||
<header id="topnav" class="header-logo" role="banner"> | ||
<%= link_to 'http://library.stanford.edu' do %> | ||
<%= content_tag :span, 'Stanford University Libraries', class: 'sr-only' %> | ||
<%= image_tag 'StanfordLibraries-logo-cmyk.png', alt: '', height: 25 %> | ||
<% end %> | ||
</header> | ||
</div> | ||
|
||
<div class="topnav-divider"> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<h1>Thank you for submitting your data request to SSRC.</h1> | ||
<p> | ||
<b>Requestor:</b> <%= @ssds_request.name %> | ||
</p> | ||
<p> | ||
<b>Dataset type:</b> <%= @ssds_request.dataset_type %> | ||
</p> | ||
<p> | ||
<b>Dataset number:</b> <%= @ssds_request.call_no_in %> | ||
</p> | ||
<p> | ||
<b>Dataset title:</b> <%= @ssds_request.title_in %> | ||
</p> | ||
<p> | ||
<b>Catalog key:</b> <%= @ssds_request.unicorn_id_in %> | ||
</p> | ||
<p> | ||
<b>Notes:</b> <%= @ssds_request.notes %> | ||
</p> | ||
<hr /> | ||
<div> | ||
<p> | ||
Datasets listed in SearchWorks or the ICPSR data archive are routinely available within 1-3 working days. Datasets from ROPER or other sources can take a week or more to arrive depending on the data provider. | ||
</p> | ||
<p> | ||
You will be notified by email when your dataset is available. | ||
</p> | ||
<p> | ||
If you have questions, please <%= mail_to 'consult-data@lists.stanford.edu', 'Contact SSRC' %>. | ||
</p> | ||
<p> | ||
Return to <%= link_to 'SearchWorks', "#{Settings.searchworks_url}/#{@ssds_request.unicorn_id_in}" %> | ||
</p> | ||
</div> |
Oops, something went wrong.