end
end
+ def sharing_popup
+ respond_to do |format|
+ format.html
+ format.js
+ end
+ end
+
protected
def find_usable_token
--- /dev/null
+<div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title">Sharing</h4>
+ </div>
+ <div class="modal-body">
+ </div>
+ </div>
+</div>
<div class="col-md-6"></div>
<div class="col-md-6">
<div class="pull-right">
- Collection storage status:
+ <%= link_to "Share", sharing_popup_collection_url(id: @object.uuid), {class: 'btn btn-primary', :remote => true, 'data-toggle' => "modal", 'data-target' => '#collection-sharing-modal-window'} %>
+ <span style="padding-left: 1em">Collection storage status:</span>
<%= render partial: 'toggle_persist', locals: { uuid: @object.uuid, current_state: (@is_persistent ? 'persistent' : 'cache') } %>
+
</div>
</div>
</div>
<% end; end %>
</tbody>
</table>
+
+<% content_for :footer_html do %>
+<div id="collection-sharing-modal-window" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
+<% end %>
--- /dev/null
+$("#collection-sharing-modal-window").html("<%= escape_javascript(render partial: 'sharing_popup') %>");
match '/collections/graph' => 'collections#graph'
resources :collections do
post 'set_persistent', on: :member
+ get 'sharing_popup', :on => :member
end
get '/collections/:uuid/*file' => 'collections#show_file', :format => false
resources :folders do