-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a bookmarklet for creating new resources
- Loading branch information
Showing
8 changed files
with
112 additions
and
18 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
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 @@ | ||
<html lang="en" class="no-js"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | ||
|
||
<!-- Mobile viewport optimization h5bp.com/ad --> | ||
<meta name="HandheldFriendly" content="True"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
|
||
<!-- Mobile IE allows us to activate ClearType technology for smoothing fonts for easy reading --> | ||
<!--[if IEMobile]> | ||
<meta http-equiv="cleartype" content="on"> | ||
<![endif]--> | ||
|
||
<title><%= h(@page_title || application_name) %></title> | ||
<link href="<%= current_exhibit ? spotlight.exhibit_opensearch_catalog_path(current_exhibit, :format => 'xml', :only_path => false) : main_app.opensearch_catalog_path(:format => 'xml', :only_path => false) %>" title="<%= application_name %>" type="application/opensearchdescription+xml" rel="search"/> | ||
<%= favicon_link_tag asset_path('favicon.ico') %> | ||
<%= stylesheet_link_tag "application" %> | ||
<%= javascript_include_tag "application" %> | ||
<%= csrf_meta_tags %> | ||
<%= content_for(:head) %> | ||
|
||
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> | ||
<!--[if lt IE 9]> | ||
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> | ||
<![endif]--> | ||
|
||
</head> | ||
<body class="<%= render_body_class %>"> | ||
|
||
<div id="ajax-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal menu" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- /container --> | ||
<div id="main-container" class="container"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div id="main-flashes"> | ||
<%= render :partial=>'/flash_msg' %> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<%= yield %> | ||
</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
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,5 @@ | ||
<div class="col-md-12"> | ||
<p><%= t(:'.instructions') %></p> | ||
|
||
<%= link_to t(:'.bookmarklet', application_name: application_name), "javascript:var q=document.location; void(open('#{new_exhibit_resource_url(current_exhibit) }?popup=true&resource[url]='+encodeURIComponent(q),'#{ application_name }','toolbar=no,width=700,height=350'));", class: 'btn btn-default', onclick: "return false;" %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
<%= bootstrap_form_for [@resource.exhibit, @resource], style: :horizontal, right: 'col-sm-5 col-md-5', :html => {:multipart => true, class: 'clearfix' } do |f| %> | ||
<%= form_for [@resource.exhibit, @resource.becomes(Spotlight::Resource)] do |f| %> | ||
<%= hidden_field_tag :popup, value: from_popup? %> | ||
<div class="form-group"> | ||
<%= f.text_field :url %> | ||
<div class="form-group <%= @resource.url and @resource.needs_provider? ? 'has-warning' : 'has-success' %> has-feedback"> | ||
<%= f.label :url, class: 'control-label' %> | ||
<%= f.hidden_field :url, class: 'form-control' %> | ||
<%= f.text_field :url, class: 'form-control', disabled: true %> | ||
<span class="glyphicon <%= @resource.url and @resource.needs_provider? ? 'glyphicon-warning-sign' : 'glyphicon-ok' %> form-control-feedback"></span> | ||
<% if @resource.url and @resource.needs_provider? %> | ||
<p class="help-block"><%= t(:'.needs_provider') %></p> | ||
<% elsif @resource.url %> | ||
<p class="help-block"><%= t(:'.has_provider') %></p> | ||
<% end %> | ||
</div> | ||
</div> | ||
<div class="form-actions col-md-7 col-sm-7"> | ||
<div class="primary-actions"> | ||
<%= cancel_link @resource, :back, class: 'btn btn-default' %> | ||
<%= cancel_link @resource, 'javascript:window.close()', class: 'btn btn-default' %> | ||
<%= f.submit nil, class: 'btn btn-primary' %> | ||
</div> | ||
</div> | ||
<% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<div id="content" class="col-md-9"> | ||
<%= curation_page_title %> | ||
<%= render 'form' %> | ||
<%= render 'form' %> | ||
</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