Skip to content

Commit

Permalink
Merge pull request #196 from sparc-request/jl-notes_and_documents_rec…
Browse files Browse the repository at this point in the history
…onfig

Re-arranging documents table.
  • Loading branch information
jleonardw9 committed Nov 6, 2015
2 parents f2ff216 + f443b05 commit a9a272e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions app/views/service_requests/_document_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,16 @@

%table#new_document
%tr.ui-dialog-titlebar{:class => provider_css}
%th= t("documents.headers.recipients")
%th= t("documents.headers.allow")
%th= t("documents.headers.type")
%th= t("documents.headers.file")
%th= t("documents.headers.recipients")
%th= t("documents.headers.allow")
%th  
- count = 0
- @service_list.each do |key, values|
- next unless @sub_service_request.nil? or orgs.map{|org| Organization.find(org).name}.include? values[:process_ssr_organization_name] or @sub_service_request.organization.name == values[:process_ssr_organization_name]
- count += 1
%tr
%td= label_tag "process_ssr_organization_ids[]", values[:name]
%td
- if @sub_service_request.nil? or @sub_service_request.organization.name == values[:process_ssr_organization_name]
= check_box_tag "process_ssr_organization_ids[]", key, orgs.include?(key)
- else
Yes
= hidden_field_tag "process_ssr_organization_ids[]", key, :id => 'process_ssr_organization_ids', :disabled => (@document ? false : true)
- if count == 1
%td{:rowspan => @service_list.size}
= select_tag :doc_type, options_for_select(DOCUMENT_TYPES, doc_type), :prompt => t("documents.select_prompt")
Expand All @@ -58,6 +51,13 @@
= @document.document_file_name
%br
= file_field_tag :document
%td= label_tag "process_ssr_organization_ids[]", values[:name]
%td
- if @sub_service_request.nil? or @sub_service_request.organization.name == values[:process_ssr_organization_name]
= check_box_tag "process_ssr_organization_ids[]", key, orgs.include?(key)
- else
Yes
= hidden_field_tag "process_ssr_organization_ids[]", key, :id => 'process_ssr_organization_ids', :disabled => (@document ? false : true)
%td{:rowspan => @service_list.size}
= navigation_link button_text, 'document_management', 'upload_button blue-button btn btn-primary'
= link_to t("documents.cancel_button"), "javascript:void(0)", :class => "ui_close_button blue-button btn btn-danger", :id => 'cancel_upload'
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ en:
here: "here"
add_button: "Add a New Document"
headers:
recipients: "Recipients"
recipients: "Service Providers"
allow: "Allow Access"
type: "Type"
file: "File"
Expand Down

0 comments on commit a9a272e

Please sign in to comment.