Skip to content

Commit

Permalink
Merge pull request #423 from sparc-request/sj-fulfillment_documents
Browse files Browse the repository at this point in the history
SJ - Fulfillment documents
  • Loading branch information
Stuart-Johnson committed Mar 11, 2019
2 parents c2b65f1 + 924c135 commit a23739a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions app/helpers/study_level_activities_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ def fulfillment_options_buttons fulfillment
unless fulfillment.invoiced?
options = raw(
note_list_item({object: fulfillment, has_notes: fulfillment.notes.any?})+
content_tag(:li, raw(
content_tag(:button, raw(content_tag(:span, '', class: "glyphicon glyphicon-open-file", aria: {hidden: "true"}))+' Documents', type: 'button', class: 'btn btn-default form-control actions-button documents list', data: {documentable_id: fulfillment.id, documentable_type: "Fulfillment"}))
)+
document_list_item({object: fulfillment, has_documents: fulfillment.documents.any?})+
content_tag(:li, raw(
content_tag(:button, raw(content_tag(:span, '', class: "glyphicon glyphicon-edit", aria: {hidden: "true"}))+' Edit Fulfillment', type: 'button', class: 'btn btn-default form-control actions-button otf_fulfillment_edit'))
)+
Expand Down
3 changes: 3 additions & 0 deletions app/views/documents/create.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

<% if @error.present? %>
$('#doc_modal_errors').empty().append("<div class='alert alert-danger'><%= @error %></div>")
<% elsif @document.documentable_type == "Fulfillment" %>
$("#modal_area").html("<%= escape_javascript(render(partial: 'study_level_activities/fulfillments_table', locals: {line_item: @document.documentable.line_item, header_text: 'Fulfillments List'})) %>")
$("#fulfillments-table").bootstrapTable()
<% else %>
$('.modal').modal('hide')
unless $("span#<%= @selector %>.glyphicon").hasClass("blue-glyphicon")
Expand Down

0 comments on commit a23739a

Please sign in to comment.