Created
December 13, 2017 13:04
-
-
Save sirramongabriel/18a6256369b861fad72fa9c8c3b9832a to your computer and use it in GitHub Desktop.
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
<div id="content-container"> | |
<div class="page-head"> | |
<div id="page-title"> | |
<h1 class="page-header text-overflow">Create <%= @resident.full_name.pluralize %> Medication Record</h1> | |
<!--Searchbox--> | |
<div class="searchbox"> | |
<div class="input-group custom-search-form"> | |
<input type="text" class="form-control" placeholder="Search.."> | |
<span class="input-group-btn"> | |
<button class="text-muted" type="button"><i class="demo-pli-magnifi-glass"></i></button> | |
</span> | |
</div> | |
</div><!--END .searchbox--> | |
</div><!--END #page-title--> | |
<ol class="breadcrumb"> | |
<li><%= link_to "Home", root_path %></li> | |
<li><%= link_to "Residents", residents_path %></li> | |
<li><%= link_to "#{@resident.full_name.pluralize} Profile", resident_path(@resident) %></li> | |
<li class="active"> | |
<%= link_to "Create #{@resident.full_name.pluralize} Medication Record", new_resident_medical_record_form_path(@resident), class: "active" %> | |
</li> | |
</ol> | |
</div><!--END .page-head--> | |
<div id="page-content"> | |
<div class="row"> | |
<ul class="pad-all col-md-12" style="margin-left: -.5%;"> | |
<%= link_to "back", resident_path(@resident), class: "btn btn-purple btn-labeled fa fa-chevron-circle-left" %> | |
</ul> | |
</div><!--END .row--> | |
<div class="panel"> | |
<div class="panel-heading panel-colorful panel-purple"> | |
<h3 class="panel-title text-center"> | |
<i class="fa fa-file-text-o"></i> <%= @resident.full_name.pluralize %> Medication Record | |
</h3><!--END .panel-title--> | |
</div><!--END .panel-heading .panel-colorful .panel-purple--> | |
<div class="panel-body"> | |
<%= bootstrap_nested_form_for([@resident, @medical_record_form], method: :post, inline_errors: false, layout: :horizontal) do |f| %> | |
<% if @medical_record_form.errors.any? %> | |
<ul class="text text-danger"> | |
<% @medical_record_form.errors.full_messages.map do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
<% end %> | |
<% if @medications.present? %> | |
<!-- <div class="row"> | |
<div id="calendar_basic" style="width: 1000px; height: 350px;"></div> | |
</div> --> | |
<!--END .row--> | |
<div class="row bord-all pad-all"> | |
<div class="col-sm-6 col-md-12"> | |
<div class="medications"> | |
<%= f.fields_for :medications do |med| %> | |
<%= render partial: 'medication_fields', locals: { f: med, parent: @medical_record_form } %> | |
<% end %> | |
</div> | |
</div><!--END .col-sm-6 .col-md-12--> | |
</div><!--END .row .bord-all .pad-all--> | |
<div class="row"> | |
<div class="col-sm-6 col-md-12 pad-top"> | |
<div class="links"> | |
<%= link_to_add_association 'add medication', f, :medications, class: "btn btn-sm btn-primary btn-labeled btn-icon fa fa-plus", data: { "association-insertion-method" => "before", "association-insertion-traversal" => "append" } %> | |
</div><!--END .medications--> | |
</div><!--END .col-sm-6 .col-md-12--> | |
</div><!--END .row--> | |
<div class="panel-footer text-right"> | |
<%= link_to "cancel", resident_path(@resident), class: "btn btn-sm btn-danger", style: "margin-top: 1.5%;" %> | |
<%= f.submit "Complete!", class: "btn btn-lg btn-primary", id: "create_medical_record_form" %> | |
</div> | |
<% else %> | |
<div class="row panel-title panel-colorful bg-gray pad-ver"> | |
<h5 class="text-overflow text-center"> | |
Add Resident Medication | |
</h5> | |
</div><!--END .row--> | |
<div class="row bord-all pad-all"> | |
<div class="col-sm-6 col-md-12"> | |
</div><!--END .col-sm-6 .col-md-12--> | |
</div><!--END .row .bord-all .pad-all--> | |
<div class="row"> | |
<div class="col-sm-6 col-md-12 pad-top"> | |
<div class="medications"> | |
<%= link_to_add_association 'add medication', f, :medications, class: "btn btn-sm btn-primary btn-labeled btn-icon fa fa-plus", data: { "association-insertion-method" => "before", "association-insertion-traversal" => "append" } %> | |
</div><!--END .medications--> | |
</div><!--END .col-sm-6 .col-md-12--> | |
</div><!--END .row--> | |
<div class="panel-footer text-right"> | |
<%= link_to "cancel", resident_path(@resident), class: "btn btn-sm btn-danger", style: "margin-top: 1.5%;" %> | |
<%= f.submit "Complete!", class: "btn btn-lg btn-primary", id: "create_medical_record_form" %> | |
</div> | |
<% end %><!--END @medications.present? --> | |
<% end %><!--END bootstrap_nested_form_for ResidentMedicalRecord--> | |
</div><!--END .panel-body--> | |
</div><!--END .panel--> | |
</div><!--END #page-content--> | |
</div><!--END .content-container--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment