12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- section_template
- id
- internal_name
- title
- is_canvas // remember: canvas_key == internal_name
-
- DIRECTORY:
-
- /{$section->internal_name}
-
- default.php
-
- summary.php
- processor.php
-
- form.php
- actions.php
- *WILDCARD* there may be /template from (C) to enable smart-update of text into the free text field.
- ----------------------------------------------------------------
- @foreach($sections as $section)
-
- {{$section->title}} [edit/view toggle] MAYBE:: [templates] OPTIONAL:: [actions...]
-
- --------------------------------------------------------------------------
-
- VIEW-MODE:
- {{$section->summary_html}} - DONE
-
- --------------------------------------------------------------------------
-
- EDIT-MODE: // if [name=data], just listen for changes to [name=data] and auto-save / replace summary_html.
- @if($section->section_template->canvas_key) // PAST_MEDICAL_HISTORY
-
- @include(/vijay-folder/{{$section->section_template->canvas_key}}.php) // expected: <input type="hidden" name="data">
-
- @elseif(file_exists('form.php') // PHYSICAL_ACTIVITY - DONE
-
- @include('form.php') // may contain <input type="hidden" name="data">
-
- @else // CC
-
- <input type="hidden" name="data"> // always - DONE
-
- <rich-editor onChange... update data as {value: ...}> - DONE
- $section->content_data['value']
- </rich-editor>
-
- --------------------------------------------------------------------------
-
- @endforeach
-
- ====================================================================================================
- WHEN update on section... DONE
-
- // take the $data - DONE
- // check if processor.php. - DONE
- // if not,
- // assume it's mud - the new contentData as is replaces. !!! NOT $request->all(), $request->get('data') - DONE
- // save it
- // generate summary_html...
- // run summary.php if there, ob_start/flush... etc. - DONE
- // else, use data->value as the summary_html. - DONE
- =====================================================================================================
|